From 39cbe14d374f7a451153aedc0627c02f41ad4f34 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Wed, 15 Dec 2021 15:13:50 +0900 Subject: [PATCH 01/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 3657 +++++++++++++++++------------------- packages/e2ee/package.json | 14 +- packages/sdk/package.json | 26 +- 3 files changed, 1795 insertions(+), 1902 deletions(-) diff --git a/package-lock.json b/package-lock.json index d5778b21..33539c89 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,37 +20,40 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", + "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", "dependencies": { - "@babel/highlight": "^7.10.4" + "@babel/highlight": "^7.16.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", - "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", + "version": "7.16.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.4.tgz", + "integrity": "sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.8.tgz", - "integrity": "sha512-3UG9dsxvYBMYwRv+gS41WKHno4K60/9GPy1CJaH6xy3Elq8CTtvtjT5R5jmNhXfCYLX2mTw+7/aq5ak/gOE0og==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.15.8", - "@babel/generator": "^7.15.8", - "@babel/helper-compilation-targets": "^7.15.4", - "@babel/helper-module-transforms": "^7.15.8", - "@babel/helpers": "^7.15.4", - "@babel/parser": "^7.15.8", - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.6", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.5.tgz", + "integrity": "sha512-wUcenlLzuWMZ9Zt8S0KmFwGlH6QKRh3vsm/dhDA3CHkiTA45YuG1XkHRcNRl73EFPXDp/d5kVOU0/y7x2w6OaQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.0", + "@babel/generator": "^7.16.5", + "@babel/helper-compilation-targets": "^7.16.3", + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helpers": "^7.16.5", + "@babel/parser": "^7.16.5", + "@babel/template": "^7.16.0", + "@babel/traverse": "^7.16.5", + "@babel/types": "^7.16.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -66,18 +69,6 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/core/node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -97,12 +88,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.8.tgz", - "integrity": "sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.5.tgz", + "integrity": "sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA==", "dev": true, "dependencies": { - "@babel/types": "^7.15.6", + "@babel/types": "^7.16.0", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -120,14 +111,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz", - "integrity": "sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ==", + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.3.tgz", + "integrity": "sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.15.0", + "@babel/compat-data": "^7.16.0", "@babel/helper-validator-option": "^7.14.5", - "browserslist": "^4.16.6", + "browserslist": "^4.17.5", "semver": "^6.3.0" }, "engines": { @@ -146,142 +137,115 @@ "semver": "bin/semver.js" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", - "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", + "node_modules/@babel/helper-environment-visitor": { + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.5.tgz", + "integrity": "sha512-ODQyc5AnxmZWm/R2W7fzhamOk1ey8gSguo5SGvF0zcB3uUzRpTRmM/jmLSm9bDMyPlvbyJ+PwPEK0BWIoZ9wjg==", "dev": true, "dependencies": { - "@babel/helper-get-function-arity": "^7.15.4", - "@babel/template": "^7.15.4", - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", - "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", + "node_modules/@babel/helper-function-name": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz", + "integrity": "sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog==", "dev": true, "dependencies": { - "@babel/types": "^7.15.4" + "@babel/helper-get-function-arity": "^7.16.0", + "@babel/template": "^7.16.0", + "@babel/types": "^7.16.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", - "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", + "node_modules/@babel/helper-get-function-arity": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz", + "integrity": "sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ==", "dev": true, "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz", - "integrity": "sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA==", + "node_modules/@babel/helper-hoist-variables": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.0.tgz", + "integrity": "sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg==", "dev": true, "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz", - "integrity": "sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz", + "integrity": "sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==", "dev": true, "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.8.tgz", - "integrity": "sha512-DfAfA6PfpG8t4S6npwzLvTUpp0sS7JrcuaMiy1Y5645laRJIp/LiLGIBbQKaXSInK8tiGNI7FL7L8UvB8gdUZg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.5.tgz", + "integrity": "sha512-CkvMxgV4ZyyioElFwcuWnDCcNIeyqTkCm9BxXZi73RR1ozqlpboqsbGUNvRTflgZtFbbJ1v5Emvm+lkjMYY/LQ==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.15.4", - "@babel/helper-replace-supers": "^7.15.4", - "@babel/helper-simple-access": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/helper-environment-visitor": "^7.16.5", + "@babel/helper-module-imports": "^7.16.0", + "@babel/helper-simple-access": "^7.16.0", + "@babel/helper-split-export-declaration": "^7.16.0", "@babel/helper-validator-identifier": "^7.15.7", - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz", - "integrity": "sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.4" + "@babel/template": "^7.16.0", + "@babel/traverse": "^7.16.5", + "@babel/types": "^7.16.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", - "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.5.tgz", + "integrity": "sha512-59KHWHXxVA9K4HNF4sbHCf+eJeFe0Te/ZFGqBT4OjXhrwvA04sGfaEGsVTdsjoszq0YTP49RC9UKe5g8uN2RwQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz", - "integrity": "sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw==", - "dev": true, - "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.15.4", - "@babel/helper-optimise-call-expression": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-simple-access": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz", - "integrity": "sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.0.tgz", + "integrity": "sha512-o1rjBT/gppAqKsYfUdfHq5Rk03lMQrkPHG1OWzHWpLgVXRH4HnMM9Et9CVdIqwkCQlobnGHEJMsgWP/jE1zUiw==", "dev": true, "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", - "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz", + "integrity": "sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw==", "dev": true, "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.0" }, "engines": { "node": ">=6.9.0" @@ -305,25 +269,25 @@ } }, "node_modules/@babel/helpers": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.4.tgz", - "integrity": "sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.5.tgz", + "integrity": "sha512-TLgi6Lh71vvMZGEkFuIxzaPsyeYCHQ5jJOOX1f0xXn0uciFuE8cEk0wyBquMcCxBXZ5BJhE2aUB7pnWTD150Tw==", "dev": true, "dependencies": { - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4" + "@babel/template": "^7.16.0", + "@babel/traverse": "^7.16.5", + "@babel/types": "^7.16.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz", + "integrity": "sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==", "dependencies": { - "@babel/helper-validator-identifier": "^7.14.5", + "@babel/helper-validator-identifier": "^7.15.7", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -388,9 +352,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.8.tgz", - "integrity": "sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA==", + "version": "7.16.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", + "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -547,12 +511,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.14.5.tgz", - "integrity": "sha512-u6OXzDaIXjEstBRRoBCQ/uKQKlbuaeE5in0RvWdA4pN6AhqxTIwUsnHPU1CFZA/amYObMsuWhYfRl3Ch90HD0Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.5.tgz", + "integrity": "sha512-/d4//lZ1Vqb4mZ5xTep3dDK888j7BGM/iKqBmndBaoYAFPlPKrGU608VVBz5JeyAb6YQDjRu1UKqj86UhwWVgw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -562,44 +526,33 @@ } }, "node_modules/@babel/template": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", - "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.0.tgz", + "integrity": "sha512-MnZdpFD/ZdYhXwiunMqqgyZyucaYsbL0IrjoGjaVhGilz+x8YB++kRfygSOIj1yOtWKPlx7NBp+9I1RQSgsd5A==", "dev": true, "dependencies": { - "@babel/highlight": "^7.14.5" + "@babel/code-frame": "^7.16.0", + "@babel/parser": "^7.16.0", + "@babel/types": "^7.16.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", - "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.4", - "@babel/helper-function-name": "^7.15.4", - "@babel/helper-hoist-variables": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.5.tgz", + "integrity": "sha512-FOCODAzqUMROikDYLYxl4nmwiLlu85rNqBML/A5hKRVXG2LV8d0iMqgPzdYTcIpjZEBB7D6UDU9vxRZiriASdQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.0", + "@babel/generator": "^7.16.5", + "@babel/helper-environment-visitor": "^7.16.5", + "@babel/helper-function-name": "^7.16.0", + "@babel/helper-hoist-variables": "^7.16.0", + "@babel/helper-split-export-declaration": "^7.16.0", + "@babel/parser": "^7.16.5", + "@babel/types": "^7.16.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -607,18 +560,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/traverse/node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -629,12 +570,12 @@ } }, "node_modules/@babel/types": { - "version": "7.15.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", - "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.0.tgz", + "integrity": "sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.14.9", + "@babel/helper-validator-identifier": "^7.15.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -648,32 +589,23 @@ "dev": true }, "node_modules/@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", + "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", + "debug": "^4.3.2", + "espree": "^9.2.0", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc/node_modules/ignore": { @@ -685,19 +617,6 @@ "node": ">= 4" } }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -717,12 +636,12 @@ "dev": true }, "node_modules/@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", + "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" }, @@ -731,9 +650,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", - "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, "node_modules/@istanbuljs/load-nyc-config": { @@ -854,16 +773,16 @@ } }, "node_modules/@jest/console": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.3.1.tgz", - "integrity": "sha512-RkFNWmv0iui+qsOr/29q9dyfKTTT5DCuP31kUwg7rmOKPT/ozLeGLKJKVIiOfbiKyleUZKIrHwhmiZWVe8IMdw==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.4.2.tgz", + "integrity": "sha512-xknHThRsPB/To1FUbi6pCe43y58qFC03zfb6R7fDb/FfC7k2R3i1l+izRBJf8DI46KhYGRaF14Eo9A3qbBoixg==", "dev": true, "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^27.3.1", - "jest-util": "^27.3.1", + "jest-message-util": "^27.4.2", + "jest-util": "^27.4.2", "slash": "^3.0.0" }, "engines": { @@ -871,35 +790,35 @@ } }, "node_modules/@jest/core": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.3.1.tgz", - "integrity": "sha512-DMNE90RR5QKx0EA+wqe3/TNEwiRpOkhshKNxtLxd4rt3IZpCt+RSL+FoJsGeblRZmqdK4upHA/mKKGPPRAifhg==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.5.tgz", + "integrity": "sha512-3tm/Pevmi8bDsgvo73nX8p/WPng6KWlCyScW10FPEoN1HU4pwI83tJ3TsFvi1FfzsjwUlMNEPowgb/rPau/LTQ==", "dev": true, "dependencies": { - "@jest/console": "^27.3.1", - "@jest/reporters": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/console": "^27.4.2", + "@jest/reporters": "^27.4.5", + "@jest/test-result": "^27.4.2", + "@jest/transform": "^27.4.5", + "@jest/types": "^27.4.2", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.8.1", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-changed-files": "^27.3.0", - "jest-config": "^27.3.1", - "jest-haste-map": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-regex-util": "^27.0.6", - "jest-resolve": "^27.3.1", - "jest-resolve-dependencies": "^27.3.1", - "jest-runner": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", - "jest-watcher": "^27.3.1", + "jest-changed-files": "^27.4.2", + "jest-config": "^27.4.5", + "jest-haste-map": "^27.4.5", + "jest-message-util": "^27.4.2", + "jest-regex-util": "^27.4.0", + "jest-resolve": "^27.4.5", + "jest-resolve-dependencies": "^27.4.5", + "jest-runner": "^27.4.5", + "jest-runtime": "^27.4.5", + "jest-snapshot": "^27.4.5", + "jest-util": "^27.4.2", + "jest-validate": "^27.4.2", + "jest-watcher": "^27.4.2", "micromatch": "^4.0.4", "rimraf": "^3.0.0", "slash": "^3.0.0", @@ -918,62 +837,62 @@ } }, "node_modules/@jest/environment": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.3.1.tgz", - "integrity": "sha512-BCKCj4mOVLme6Tanoyc9k0ultp3pnmuyHw73UHRPeeZxirsU/7E3HC4le/VDb/SMzE1JcPnto+XBKFOcoiJzVw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.4.tgz", + "integrity": "sha512-q+niMx7cJgt/t/b6dzLOh4W8Ef/8VyKG7hxASK39jakijJzbFBGpptx3RXz13FFV7OishQ9lTbv+dQ5K3EhfDQ==", "dev": true, "dependencies": { - "@jest/fake-timers": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/fake-timers": "^27.4.2", + "@jest/types": "^27.4.2", "@types/node": "*", - "jest-mock": "^27.3.0" + "jest-mock": "^27.4.2" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.3.1.tgz", - "integrity": "sha512-M3ZFgwwlqJtWZ+QkBG5NmC23A9w+A6ZxNsO5nJxJsKYt4yguBd3i8TpjQz5NfCX91nEve1KqD9RA2Q+Q1uWqoA==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.2.tgz", + "integrity": "sha512-f/Xpzn5YQk5adtqBgvw1V6bF8Nx3hY0OIRRpCvWcfPl0EAjdqWPdhH3t/3XpiWZqtjIEHDyMKP9ajpva1l4Zmg==", "dev": true, "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "@sinonjs/fake-timers": "^8.0.1", "@types/node": "*", - "jest-message-util": "^27.3.1", - "jest-mock": "^27.3.0", - "jest-util": "^27.3.1" + "jest-message-util": "^27.4.2", + "jest-mock": "^27.4.2", + "jest-util": "^27.4.2" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/@jest/globals": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.3.1.tgz", - "integrity": "sha512-Q651FWiWQAIFiN+zS51xqhdZ8g9b88nGCobC87argAxA7nMfNQq0Q0i9zTfQYgLa6qFXk2cGANEqfK051CZ8Pg==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.4.tgz", + "integrity": "sha512-bqpqQhW30BOreXM8bA8t8JbOQzsq/WnPTnBl+It3UxAD9J8yxEAaBEylHx1dtBapAr/UBk8GidXbzmqnee8tYQ==", "dev": true, "dependencies": { - "@jest/environment": "^27.3.1", - "@jest/types": "^27.2.5", - "expect": "^27.3.1" + "@jest/environment": "^27.4.4", + "@jest/types": "^27.4.2", + "expect": "^27.4.2" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/@jest/reporters": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.3.1.tgz", - "integrity": "sha512-m2YxPmL9Qn1emFVgZGEiMwDntDxRRQ2D58tiDQlwYTg5GvbFOKseYCcHtn0WsI8CG4vzPglo3nqbOiT8ySBT/w==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.5.tgz", + "integrity": "sha512-3orsG4vi8zXuBqEoy2LbnC1kuvkg1KQUgqNxmxpQgIOQEPeV0onvZu+qDQnEoX8qTQErtqn/xzcnbpeTuOLSiA==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/console": "^27.4.2", + "@jest/test-result": "^27.4.2", + "@jest/transform": "^27.4.5", + "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -985,10 +904,10 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^27.3.1", - "jest-resolve": "^27.3.1", - "jest-util": "^27.3.1", - "jest-worker": "^27.3.1", + "jest-haste-map": "^27.4.5", + "jest-resolve": "^27.4.5", + "jest-util": "^27.4.2", + "jest-worker": "^27.4.5", "slash": "^3.0.0", "source-map": "^0.6.0", "string-length": "^4.0.1", @@ -1008,9 +927,9 @@ } }, "node_modules/@jest/source-map": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.0.6.tgz", - "integrity": "sha512-Fek4mi5KQrqmlY07T23JRi0e7Z9bXTOOD86V/uS0EIW4PClvPDqZOyFlLpNJheS6QI0FNX1CgmPjtJ4EA/2M+g==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.4.0.tgz", + "integrity": "sha512-Ntjx9jzP26Bvhbm93z/AKcPRj/9wrkI88/gK60glXDx1q+IeI0rf7Lw2c89Ch6ofonB0On/iRDreQuQ6te9pgQ==", "dev": true, "dependencies": { "callsites": "^3.0.0", @@ -1022,13 +941,13 @@ } }, "node_modules/@jest/test-result": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.3.1.tgz", - "integrity": "sha512-mLn6Thm+w2yl0opM8J/QnPTqrfS4FoXsXF2WIWJb2O/GBSyResL71BRuMYbYRsGt7ELwS5JGcEcGb52BNrumgg==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.4.2.tgz", + "integrity": "sha512-kr+bCrra9jfTgxHXHa2UwoQjxvQk3Am6QbpAiJ5x/50LW8llOYrxILkqY0lZRW/hu8FXesnudbql263+EW9iNA==", "dev": true, "dependencies": { - "@jest/console": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/console": "^27.4.2", + "@jest/types": "^27.4.2", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -1037,36 +956,36 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.3.1.tgz", - "integrity": "sha512-siySLo07IMEdSjA4fqEnxfIX8lB/lWYsBPwNFtkOvsFQvmBrL3yj3k3uFNZv/JDyApTakRpxbKLJ3CT8UGVCrA==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.5.tgz", + "integrity": "sha512-n5woIn/1v+FT+9hniymHPARA9upYUmfi5Pw9ewVwXCDlK4F5/Gkees9v8vdjGdAIJ2MPHLHodiajLpZZanWzEQ==", "dev": true, "dependencies": { - "@jest/test-result": "^27.3.1", + "@jest/test-result": "^27.4.2", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", - "jest-runtime": "^27.3.1" + "jest-haste-map": "^27.4.5", + "jest-runtime": "^27.4.5" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/@jest/transform": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.3.1.tgz", - "integrity": "sha512-3fSvQ02kuvjOI1C1ssqMVBKJpZf6nwoCiSu00zAKh5nrp3SptNtZy/8s5deayHnqxhjD9CWDJ+yqQwuQ0ZafXQ==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.5.tgz", + "integrity": "sha512-PuMet2UlZtlGzwc6L+aZmR3I7CEBpqadO03pU40l2RNY2fFJ191b9/ITB44LNOhVtsyykx0OZvj0PCyuLm7Eew==", "dev": true, "dependencies": { "@babel/core": "^7.1.0", - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "babel-plugin-istanbul": "^6.0.0", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", - "jest-regex-util": "^27.0.6", - "jest-util": "^27.3.1", + "jest-haste-map": "^27.4.5", + "jest-regex-util": "^27.4.0", + "jest-util": "^27.4.2", "micromatch": "^4.0.4", "pirates": "^4.0.1", "slash": "^3.0.0", @@ -1078,9 +997,9 @@ } }, "node_modules/@jest/types": { - "version": "27.2.5", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.2.5.tgz", - "integrity": "sha512-nmuM4VuDtCZcY+eTpw+0nvstwReMsjPoj7ZR80/BbixulhLaiX+fbv8oeLW8WZlJMcsGQsTmMKT/iTZu1Uy/lQ==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.4.2.tgz", + "integrity": "sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg==", "dev": true, "dependencies": { "@types/istanbul-lib-coverage": "^2.0.0", @@ -1129,13 +1048,16 @@ } }, "node_modules/@npmcli/fs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.0.0.tgz", - "integrity": "sha512-8ltnOpRR/oJbOp8vaGUnipOi3bqkcW+sLHFlyXIr08OGHmVJLB1Hn7QtGXbYcpVtH1gAYZTlmDXtE4YV0+AMMQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.0.tgz", + "integrity": "sha512-VhP1qZLXcrXRIaPoqb4YA55JQxLNF3jNR4T55IdOJa3+IFJKNYHtPvtXx8slmeMavj37vCzCfrqQM1vWLsYKLA==", "dev": true, "dependencies": { "@gar/promisify": "^1.0.1", "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" } }, "node_modules/@npmcli/git": { @@ -1232,9 +1154,9 @@ } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "13.0.6", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.6.tgz", - "integrity": "sha512-sFsPDMPd4gMqnh2gS0uIxELnoRUp5kBl5knxD2EO0778G1oOJv4G1vyT2cpWz75OU2jDVcXhjVUuTAczGyFNKA==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.1.tgz", + "integrity": "sha512-6QKtRevXLrmEig9UiMYt2fSvee9TyltGRfw+qSs6xjUnxwjOzTOqy+/Lpxsgjb8mJn1EQNbCDAvt89O4uzL5kw==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1306,9 +1228,9 @@ } }, "node_modules/@sinonjs/fake-timers": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.0.1.tgz", - "integrity": "sha512-AU7kwFxreVd6OAXcAFlKSmZquiRUU0FvYm44k1Y1QbK7Co4m0aqfGMhjykIeQp/H6rcl+nFmj0zfdUcGVs9Dew==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", + "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", "dev": true, "dependencies": { "@sinonjs/commons": "^1.7.0" @@ -1347,10 +1269,20 @@ "node": ">= 6" } }, + "node_modules/@ts-type/package-dts": { + "version": "1.0.56", + "resolved": "https://registry.npmjs.org/@ts-type/package-dts/-/package-dts-1.0.56.tgz", + "integrity": "sha512-nBjbCaVV+R81jk7q/6sRuNYOhDAbBOmaCkPI2quK0Rnye2f4FUHX+4JL+3rDPiRPHxgX3pNfVKKHBlPAHiRddw==", + "dev": true, + "dependencies": { + "@types/semver": "^7.3.9", + "ts-type": "^2.1.2" + } + }, "node_modules/@types/babel__core": { - "version": "7.1.16", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.16.tgz", - "integrity": "sha512-EAEHtisTMM+KaKwfWdC3oyllIqswlznXCIVCt7/oRNrh+DhgT4UEBNC/jlADNjvw7UnfbcdkGQcPVZ1xYiLcrQ==", + "version": "7.1.17", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.17.tgz", + "integrity": "sha512-6zzkezS9QEIL8yCBvXWxPTJPNuMeECJVxSOhxNY/jfq9LxOTHivaYTqr37n9LknWWRTIkzqH2UilS5QFvfa90A==", "dev": true, "dependencies": { "@babel/parser": "^7.1.0", @@ -1388,6 +1320,13 @@ "@babel/types": "^7.3.0" } }, + "node_modules/@types/bluebird": { + "version": "3.5.36", + "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.36.tgz", + "integrity": "sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q==", + "dev": true, + "peer": true + }, "node_modules/@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -1428,9 +1367,9 @@ } }, "node_modules/@types/jest": { - "version": "27.0.2", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.0.2.tgz", - "integrity": "sha512-4dRxkS/AFX0c5XW6IPMNOydLn2tEhNhJV7DnYK+0bjoJZ+QTmfucBlihX7aoEsh/ocYtkLC73UbnBXBXIxsULA==", + "version": "27.0.3", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.0.3.tgz", + "integrity": "sha512-cmmwv9t7gBYt7hNKH5Spu7Kuu/DotGa+Ff+JGRKZ4db5eh8PnKS4LuebJ3YLUoyOyIHraTGyULn23YtEAm0VSg==", "dev": true, "dependencies": { "jest-diff": "^27.0.0", @@ -1444,14 +1383,14 @@ "dev": true }, "node_modules/@types/node": { - "version": "16.11.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz", - "integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==" + "version": "16.11.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.13.tgz", + "integrity": "sha512-eUXZzHLHoZqj1frtUetNkUetYoJ6X55UmrVnFD4DMhVeAmwLjniZhtBmsRiemQh4uq4G3vUra/Ws/hs9vEvL3Q==" }, "node_modules/@types/prettier": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.1.tgz", - "integrity": "sha512-Fo79ojj3vdEZOHg3wR9ksAMRz4P3S5fDB5e/YWZiFnyFQI1WY2Vftu9XoXVVtJfxB7Bpce/QTqWSSntkz2Znrw==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.2.tgz", + "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", "dev": true }, "node_modules/@types/resolve": { @@ -1463,6 +1402,12 @@ "@types/node": "*" } }, + "node_modules/@types/semver": { + "version": "7.3.9", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.9.tgz", + "integrity": "sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ==", + "dev": true + }, "node_modules/@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -1485,30 +1430,30 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", - "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.7.0.tgz", + "integrity": "sha512-8RTGBpNn5a9M628wBPrCbJ+v3YTEOE2qeZb7TDkGKTDXSj36KGRg92SpFFaR/0S3rSXQxM0Og/kV9EyadsYSBg==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "4.33.0", - "@typescript-eslint/scope-manager": "4.33.0", - "debug": "^4.3.1", + "@typescript-eslint/experimental-utils": "5.7.0", + "@typescript-eslint/scope-manager": "5.7.0", + "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", - "regexpp": "^3.1.0", + "regexpp": "^3.2.0", "semver": "^7.3.5", "tsutils": "^3.21.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^4.0.0", - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1517,20 +1462,20 @@ } }, "node_modules/@typescript-eslint/experimental-utils": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", - "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.7.0.tgz", + "integrity": "sha512-u57eZ5FbEpzN5kSjmVrSesovWslH2ZyNPnaXQMXWgH57d5+EVHEt76W75vVuI9qKZ5BMDKNfRN+pxcPEjQjb2A==", "dev": true, "dependencies": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.7.0", + "@typescript-eslint/types": "5.7.0", + "@typescript-eslint/typescript-estree": "5.7.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -1541,25 +1486,25 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", - "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.7.0.tgz", + "integrity": "sha512-m/gWCCcS4jXw6vkrPQ1BjZ1vomP01PArgzvauBqzsoZ3urLbsRChexB8/YV8z9HwE3qlJM35FxfKZ1nfP/4x8g==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "debug": "^4.3.1" + "@typescript-eslint/scope-manager": "5.7.0", + "@typescript-eslint/types": "5.7.0", + "@typescript-eslint/typescript-estree": "5.7.0", + "debug": "^4.3.2" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1568,16 +1513,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", - "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz", + "integrity": "sha512-7mxR520DGq5F7sSSgM0HSSMJ+TFUymOeFRMfUfGFAVBv8BR+Jv1vHgAouYUvWRZeszVBJlLcc9fDdktxb5kmxA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0" + "@typescript-eslint/types": "5.7.0", + "@typescript-eslint/visitor-keys": "5.7.0" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -1585,12 +1530,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", - "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", + "integrity": "sha512-5AeYIF5p2kAneIpnLFve8g50VyAjq7udM7ApZZ9JYjdPjkz0LvODfuSHIDUVnIuUoxafoWzpFyU7Sqbxgi79mA==", "dev": true, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -1598,21 +1543,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", - "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.7.0.tgz", + "integrity": "sha512-aO1Ql+izMrTnPj5aFFlEJkpD4jRqC4Gwhygu2oHK2wfVQpmOPbyDSveJ+r/NQo+PWV43M6uEAeLVbTi09dFLhg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", + "@typescript-eslint/types": "5.7.0", + "@typescript-eslint/visitor-keys": "5.7.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", "semver": "^7.3.5", "tsutils": "^3.21.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -1625,22 +1570,52 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", - "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", + "integrity": "sha512-hdohahZ4lTFcglZSJ3DGdzxQHBSxsLVqHzkiOmKi7xVAWC4y2c1bIMKmPJSrA4aOEoRUPOKQ87Y/taC7yVHpFg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.33.0", - "eslint-visitor-keys": "^2.0.0" + "@typescript-eslint/types": "5.7.0", + "eslint-visitor-keys": "^3.0.0" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@yarn-tool/resolve-package": { + "version": "1.0.40", + "resolved": "https://registry.npmjs.org/@yarn-tool/resolve-package/-/resolve-package-1.0.40.tgz", + "integrity": "sha512-5kKRhGb8OCdpzuoGkb9BQw6biyY0zYesV3VyvEzRtb/cqZ7AR6o0ajR6q83jTaCJfYUaJaUPyXVOSZAUjWJQDQ==", + "dev": true, + "dependencies": { + "@ts-type/package-dts": "^1.0.56", + "pkg-dir": "< 6 >= 5", + "tslib": "^2.3.1", + "upath2": "^3.1.10" + } + }, + "node_modules/@yarn-tool/resolve-package/node_modules/pkg-dir": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", + "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", + "dev": true, + "dependencies": { + "find-up": "^5.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@yarn-tool/resolve-package/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, "node_modules/@zeit/schemas": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.6.0.tgz", @@ -1673,10 +1648,10 @@ } }, "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", + "devOptional": true, "bin": { "acorn": "bin/acorn" }, @@ -1694,6 +1669,18 @@ "acorn-walk": "^7.1.1" } }, + "node_modules/acorn-globals/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -1909,15 +1896,6 @@ "node": ">=8" } }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -1925,16 +1903,16 @@ "dev": true }, "node_modules/babel-jest": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.3.1.tgz", - "integrity": "sha512-SjIF8hh/ir0peae2D6S6ZKRhUy7q/DnpH7k/V6fT4Bgs/LXXUztOpX4G2tCgq8mLo5HA9mN6NmlFMeYtKmIsTQ==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.5.tgz", + "integrity": "sha512-3uuUTjXbgtODmSv/DXO9nZfD52IyC2OYTFaXGRzL0kpykzroaquCrD5+lZNafTvZlnNqZHt5pb0M08qVBZnsnA==", "dev": true, "dependencies": { - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/transform": "^27.4.5", + "@jest/types": "^27.4.2", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^27.2.0", + "babel-preset-jest": "^27.4.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "slash": "^3.0.0" @@ -1988,9 +1966,9 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "27.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.2.0.tgz", - "integrity": "sha512-TOux9khNKdi64mW+0OIhcmbAn75tTlzKhxmiNXevQaPbrBYK7YKjP1jl6NHTJ6XR5UgUrJbCnWlKVnJn29dfjw==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.4.0.tgz", + "integrity": "sha512-Jcu7qS4OX5kTWBc45Hz7BMmgXuJqRnhatqpUhnzGC3OBYpOmf2tv6jFNwZpwM7wU7MUuv2r9IPS/ZlYOuburVw==", "dev": true, "dependencies": { "@babel/template": "^7.3.3", @@ -2026,12 +2004,12 @@ } }, "node_modules/babel-preset-jest": { - "version": "27.2.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.2.0.tgz", - "integrity": "sha512-z7MgQ3peBwN5L5aCqBKnF6iqdlvZvFUQynEhu0J+X9nHLU72jO3iY331lcYrg+AssJ8q7xsv5/3AICzVmJ/wvg==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.4.0.tgz", + "integrity": "sha512-NK4jGYpnBvNxcGo7/ZpZJr51jCGT+3bwwpVIDY2oNfTxJJldRtB4VAcYdgp1loDE50ODuTu+yBjpMAswv5tlpg==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^27.2.0", + "babel-plugin-jest-hoist": "^27.4.0", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { @@ -2098,13 +2076,13 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.5.tgz", - "integrity": "sha512-I3ekeB92mmpctWBoLXe0d5wPS2cBuRvvW0JyyJHMrk9/HmP2ZjrTboNAZ8iuGqaEIlKguljbQY32OkOJIRrgoA==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", + "integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", "dev": true, "dependencies": { - "caniuse-lite": "^1.0.30001271", - "electron-to-chromium": "^1.3.878", + "caniuse-lite": "^1.0.30001286", + "electron-to-chromium": "^1.4.17", "escalade": "^3.1.1", "node-releases": "^2.0.1", "picocolors": "^1.0.0" @@ -2266,9 +2244,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001272", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001272.tgz", - "integrity": "sha512-DV1j9Oot5dydyH1v28g25KoVm7l8MTxazwuiH3utWiAS6iL/9Nh//TGwqFEeqqN8nnWYQ8HHhUq+o4QPt9kvYw==", + "version": "1.0.30001286", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001286.tgz", + "integrity": "sha512-zaEMRH6xg8ESMi2eQ3R4eZ5qw/hJiVsO/HlLwniIwErij0JDr9P+8V4dtx1l+kLq6j3yy8l8W4fst1lBnat5wQ==", "dev": true, "funding": { "type": "opencollective", @@ -2650,9 +2628,9 @@ } }, "node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -2754,9 +2732,9 @@ } }, "node_modules/diff-sequences": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.0.6.tgz", - "integrity": "sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.4.0.tgz", + "integrity": "sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww==", "dev": true, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" @@ -2826,9 +2804,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.3.882", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.882.tgz", - "integrity": "sha512-Kllt2R9+7yEIBbASR0MReJSK9TjPmHoomLbCLRP7r4SVtSy+Y0hYIhQ7LGjnMhlAyWUtGXTiznoGsaKxEH0ttw==", + "version": "1.4.18", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.18.tgz", + "integrity": "sha512-i7nKjGGBE1+YUIbfLObA1EZPmN7J1ITEllbhusDk+KIk6V6gUxN9PFe36v+Sd+8Cg0k3cgUv9lQhQZalr8rggw==", "dev": true }, "node_modules/emittery": { @@ -3004,37 +2982,36 @@ } }, "node_modules/eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.4.1.tgz", + "integrity": "sha512-TxU/p7LB1KxQ6+7aztTnO7K0i+h0tDi81YRY9VzB6Id71kNz+fFYnf5HD5UOQmxkzcoa0TlVZf9dpMtUv0GpWg==", "dev": true, "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", + "@eslint/eslintrc": "^1.0.5", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", + "eslint-scope": "^7.1.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.2.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", + "glob-parent": "^6.0.1", "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", @@ -3042,11 +3019,10 @@ "natural-compare": "^1.4.0", "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^3.1.0", + "regexpp": "^3.2.0", "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -3054,7 +3030,7 @@ "eslint": "bin/eslint.js" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -3124,7 +3100,7 @@ "eslint": ">=5" } }, - "node_modules/eslint-visitor-keys": { + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", @@ -3133,13 +3109,13 @@ "node": ">=10" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/eslint-visitor-keys": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/eslint/node_modules/cross-spawn": { @@ -3168,28 +3144,38 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { - "node": ">=4" + "node": ">=4.0" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" } }, "node_modules/eslint/node_modules/ignore": { @@ -3201,19 +3187,6 @@ "node": ">= 4" } }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/eslint/node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -3257,26 +3230,17 @@ } }, "node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.2.0.tgz", + "integrity": "sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==", "dev": true, "dependencies": { - "acorn": "^7.4.0", + "acorn": "^8.6.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "eslint-visitor-keys": "^3.1.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/esprima": { @@ -3386,17 +3350,17 @@ } }, "node_modules/expect": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.3.1.tgz", - "integrity": "sha512-MrNXV2sL9iDRebWPGOGFdPQRl2eDQNu/uhxIMShjjx74T6kC6jFIkmQ6OqXDtevjGUkyB2IT56RzDBqXf/QPCg==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-27.4.2.tgz", + "integrity": "sha512-BjAXIDC6ZOW+WBFNg96J22D27Nq5ohn+oGcuP2rtOtcjuxNoV9McpQ60PcQWhdFOSBIQdR72e+4HdnbZTFSTyg==", "dev": true, "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "ansi-styles": "^5.0.0", - "jest-get-type": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-regex-util": "^27.0.6" + "jest-get-type": "^27.4.0", + "jest-matcher-utils": "^27.4.2", + "jest-message-util": "^27.4.2", + "jest-regex-util": "^27.4.0" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" @@ -3488,9 +3452,9 @@ } }, "node_modules/fflate": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.1.tgz", - "integrity": "sha512-VYM2Xy1gSA5MerKzCnmmuV2XljkpKwgJBKezW+495TTnTCh1x5HcYa1aH8wRU/MfTGhW4ziXqgwprgQUVl3Ohw==" + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.2.tgz", + "integrity": "sha512-h/YiXnc37yYaGe61h3A4ZdsBzBqKG5hhrmopFizTru8xrfOiJuYX5oLnatBwNEpf9biOJrZVscuEQsUzIUAhpQ==" }, "node_modules/figgy-pudding": { "version": "3.5.2", @@ -3569,11 +3533,25 @@ } }, "node_modules/flatted": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", - "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", + "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", "dev": true }, + "node_modules/form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fp-and-or": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/fp-and-or/-/fp-and-or-0.1.3.tgz", @@ -3960,9 +3938,9 @@ } }, "node_modules/ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", + "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", "dev": true, "engines": { "node": ">= 4" @@ -4334,9 +4312,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.5.tgz", - "integrity": "sha512-5+19PlhnGabNWB7kOFnuxT8H3T/iIyQzIbQMxXsURmmvKg86P2sbkrGOT77VnHw0Qr0gc2XzRaRfMZYYbSQCJQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.1.tgz", + "integrity": "sha512-q1kvhAXWSsXfMjCdNHNPKZZv94OlspKnoGv+R9RGbnqOOQ0VbNfLFgQDVgi7hHenKsndGq3/o0OBdzDXthWcNw==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -4347,14 +4325,14 @@ } }, "node_modules/jest": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.3.1.tgz", - "integrity": "sha512-U2AX0AgQGd5EzMsiZpYt8HyZ+nSVIh5ujQ9CPp9EQZJMjXIiSZpJNweZl0swatKRoqHWgGKM3zaSwm4Zaz87ng==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.5.tgz", + "integrity": "sha512-uT5MiVN3Jppt314kidCk47MYIRilJjA/l2mxwiuzzxGUeJIvA8/pDaJOAX5KWvjAo7SCydcW0/4WEtgbLMiJkg==", "dev": true, "dependencies": { - "@jest/core": "^27.3.1", + "@jest/core": "^27.4.5", "import-local": "^3.0.2", - "jest-cli": "^27.3.1" + "jest-cli": "^27.4.5" }, "bin": { "jest": "bin/jest.js" @@ -4372,12 +4350,12 @@ } }, "node_modules/jest-changed-files": { - "version": "27.3.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.3.0.tgz", - "integrity": "sha512-9DJs9garMHv4RhylUMZgbdCJ3+jHSkpL9aaVKp13xtXAD80qLTLrqcDZL1PHA9dYA0bCI86Nv2BhkLpLhrBcPg==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.4.2.tgz", + "integrity": "sha512-/9x8MjekuzUQoPjDHbBiXbNEBauhrPU2ct7m8TfCg69ywt1y/N+yYwGh3gCpnqUS3klYWDU/lSNgv+JhoD2k1A==", "dev": true, "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "execa": "^5.0.0", "throat": "^6.0.1" }, @@ -4489,27 +4467,27 @@ } }, "node_modules/jest-circus": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.3.1.tgz", - "integrity": "sha512-v1dsM9II6gvXokgqq6Yh2jHCpfg7ZqV4jWY66u7npz24JnhP3NHxI0sKT7+ZMQ7IrOWHYAaeEllOySbDbWsiXw==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.5.tgz", + "integrity": "sha512-eTNWa9wsvBwPykhMMShheafbwyakcdHZaEYh5iRrQ0PFJxkDP/e3U/FvzGuKWu2WpwUA3C3hPlfpuzvOdTVqnw==", "dev": true, "dependencies": { - "@jest/environment": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/environment": "^27.4.4", + "@jest/test-result": "^27.4.2", + "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^27.3.1", + "expect": "^27.4.2", "is-generator-fn": "^2.0.0", - "jest-each": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "pretty-format": "^27.3.1", + "jest-each": "^27.4.2", + "jest-matcher-utils": "^27.4.2", + "jest-message-util": "^27.4.2", + "jest-runtime": "^27.4.5", + "jest-snapshot": "^27.4.5", + "jest-util": "^27.4.2", + "pretty-format": "^27.4.2", "slash": "^3.0.0", "stack-utils": "^2.0.3", "throat": "^6.0.1" @@ -4519,21 +4497,21 @@ } }, "node_modules/jest-cli": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.3.1.tgz", - "integrity": "sha512-WHnCqpfK+6EvT62me6WVs8NhtbjAS4/6vZJnk7/2+oOr50cwAzG4Wxt6RXX0hu6m1169ZGMlhYYUNeKBXCph/Q==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.5.tgz", + "integrity": "sha512-hrky3DSgE0u7sQxaCL7bdebEPHx5QzYmrGuUjaPLmPE8jx5adtvGuOlRspvMoVLTTDOHRnZDoRLYJuA+VCI7Hg==", "dev": true, "dependencies": { - "@jest/core": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/core": "^27.4.5", + "@jest/test-result": "^27.4.2", + "@jest/types": "^27.4.2", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", - "jest-config": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", + "jest-config": "^27.4.5", + "jest-util": "^27.4.2", + "jest-validate": "^27.4.2", "prompts": "^2.0.1", "yargs": "^16.2.0" }, @@ -4553,32 +4531,33 @@ } }, "node_modules/jest-config": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.3.1.tgz", - "integrity": "sha512-KY8xOIbIACZ/vdYCKSopL44I0xboxC751IX+DXL2+Wx6DKNycyEfV3rryC3BPm5Uq/BBqDoMrKuqLEUNJmMKKg==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.5.tgz", + "integrity": "sha512-t+STVJtPt+fpqQ8GBw850NtSQbnDOw/UzdPfzDaHQ48/AylQlW7LHj3dH+ndxhC1UxJ0Q3qkq7IH+nM1skwTwA==", "dev": true, "dependencies": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^27.3.1", - "@jest/types": "^27.2.5", - "babel-jest": "^27.3.1", + "@jest/test-sequencer": "^27.4.5", + "@jest/types": "^27.4.2", + "babel-jest": "^27.4.5", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-circus": "^27.3.1", - "jest-environment-jsdom": "^27.3.1", - "jest-environment-node": "^27.3.1", - "jest-get-type": "^27.3.1", - "jest-jasmine2": "^27.3.1", - "jest-regex-util": "^27.0.6", - "jest-resolve": "^27.3.1", - "jest-runner": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", + "jest-circus": "^27.4.5", + "jest-environment-jsdom": "^27.4.4", + "jest-environment-node": "^27.4.4", + "jest-get-type": "^27.4.0", + "jest-jasmine2": "^27.4.5", + "jest-regex-util": "^27.4.0", + "jest-resolve": "^27.4.5", + "jest-runner": "^27.4.5", + "jest-util": "^27.4.2", + "jest-validate": "^27.4.2", "micromatch": "^4.0.4", - "pretty-format": "^27.3.1" + "pretty-format": "^27.4.2", + "slash": "^3.0.0" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" @@ -4593,30 +4572,30 @@ } }, "node_modules/jest-config/node_modules/ci-info": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.2.0.tgz", - "integrity": "sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", "dev": true }, "node_modules/jest-diff": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.3.1.tgz", - "integrity": "sha512-PCeuAH4AWUo2O5+ksW4pL9v5xJAcIKPUPfIhZBcG1RKv/0+dvaWTQK1Nrau8d67dp65fOqbeMdoil+6PedyEPQ==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.2.tgz", + "integrity": "sha512-ujc9ToyUZDh9KcqvQDkk/gkbf6zSaeEg9AiBxtttXW59H/AcqEYp1ciXAtJp+jXWva5nAf/ePtSsgWwE5mqp4Q==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^27.0.6", - "jest-get-type": "^27.3.1", - "pretty-format": "^27.3.1" + "diff-sequences": "^27.4.0", + "jest-get-type": "^27.4.0", + "pretty-format": "^27.4.2" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-docblock": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.0.6.tgz", - "integrity": "sha512-Fid6dPcjwepTFraz0YxIMCi7dejjJ/KL9FBjPYhBp4Sv1Y9PdhImlKZqYU555BlN4TQKaTc+F2Av1z+anVyGkA==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.4.0.tgz", + "integrity": "sha512-7TBazUdCKGV7svZ+gh7C8esAnweJoG+SvcF6Cjqj4l17zA2q1cMwx2JObSioubk317H+cjcHgP+7fTs60paulg==", "dev": true, "dependencies": { "detect-newline": "^3.0.0" @@ -4626,33 +4605,33 @@ } }, "node_modules/jest-each": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.3.1.tgz", - "integrity": "sha512-E4SwfzKJWYcvOYCjOxhZcxwL+AY0uFMvdCOwvzgutJiaiodFjkxQQDxHm8FQBeTqDnSmKsQWn7ldMRzTn2zJaQ==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.4.2.tgz", + "integrity": "sha512-53V2MNyW28CTruB3lXaHNk6PkiIFuzdOC9gR3C6j8YE/ACfrPnz+slB0s17AgU1TtxNzLuHyvNlLJ+8QYw9nBg==", "dev": true, "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "chalk": "^4.0.0", - "jest-get-type": "^27.3.1", - "jest-util": "^27.3.1", - "pretty-format": "^27.3.1" + "jest-get-type": "^27.4.0", + "jest-util": "^27.4.2", + "pretty-format": "^27.4.2" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-environment-jsdom": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.3.1.tgz", - "integrity": "sha512-3MOy8qMzIkQlfb3W1TfrD7uZHj+xx8Olix5vMENkj5djPmRqndMaXtpnaZkxmxM+Qc3lo+yVzJjzuXbCcZjAlg==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.4.tgz", + "integrity": "sha512-cYR3ndNfHBqQgFvS1RL7dNqSvD//K56j/q1s2ygNHcfTCAp12zfIromO1w3COmXrxS8hWAh7+CmZmGCIoqGcGA==", "dev": true, "dependencies": { - "@jest/environment": "^27.3.1", - "@jest/fake-timers": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/environment": "^27.4.4", + "@jest/fake-timers": "^27.4.2", + "@jest/types": "^27.4.2", "@types/node": "*", - "jest-mock": "^27.3.0", - "jest-util": "^27.3.1", + "jest-mock": "^27.4.2", + "jest-util": "^27.4.2", "jsdom": "^16.6.0" }, "engines": { @@ -4660,47 +4639,47 @@ } }, "node_modules/jest-environment-node": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.3.1.tgz", - "integrity": "sha512-T89F/FgkE8waqrTSA7/ydMkcc52uYPgZZ6q8OaZgyiZkJb5QNNCF6oPZjH9IfPFfcc9uBWh1574N0kY0pSvTXw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.4.tgz", + "integrity": "sha512-D+v3lbJ2GjQTQR23TK0kY3vFVmSeea05giInI41HHOaJnAwOnmUHTZgUaZL+VxUB43pIzoa7PMwWtCVlIUoVoA==", "dev": true, "dependencies": { - "@jest/environment": "^27.3.1", - "@jest/fake-timers": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/environment": "^27.4.4", + "@jest/fake-timers": "^27.4.2", + "@jest/types": "^27.4.2", "@types/node": "*", - "jest-mock": "^27.3.0", - "jest-util": "^27.3.1" + "jest-mock": "^27.4.2", + "jest-util": "^27.4.2" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-get-type": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.3.1.tgz", - "integrity": "sha512-+Ilqi8hgHSAdhlQ3s12CAVNd8H96ZkQBfYoXmArzZnOfAtVAJEiPDBirjByEblvG/4LPJmkL+nBqPO3A1YJAEg==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.4.0.tgz", + "integrity": "sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ==", "dev": true, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-haste-map": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.3.1.tgz", - "integrity": "sha512-lYfNZIzwPccDJZIyk9Iz5iQMM/MH56NIIcGj7AFU1YyA4ewWFBl8z+YPJuSCRML/ee2cCt2y3W4K3VXPT6Nhzg==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.5.tgz", + "integrity": "sha512-oJm1b5qhhPs78K24EDGifWS0dELYxnoBiDhatT/FThgB9yxqUm5F6li3Pv+Q+apMBmmPNzOBnZ7ZxWMB1Leq1Q==", "dev": true, "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "@types/graceful-fs": "^4.1.2", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-regex-util": "^27.0.6", - "jest-serializer": "^27.0.6", - "jest-util": "^27.3.1", - "jest-worker": "^27.3.1", + "jest-regex-util": "^27.4.0", + "jest-serializer": "^27.4.0", + "jest-util": "^27.4.2", + "jest-worker": "^27.4.5", "micromatch": "^4.0.4", "walker": "^1.0.7" }, @@ -4712,28 +4691,28 @@ } }, "node_modules/jest-jasmine2": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.3.1.tgz", - "integrity": "sha512-WK11ZUetDQaC09w4/j7o4FZDUIp+4iYWH/Lik34Pv7ukL+DuXFGdnmmi7dT58J2ZYKFB5r13GyE0z3NPeyJmsg==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.5.tgz", + "integrity": "sha512-oUnvwhJDj2LhOiUB1kdnJjkx8C5PwgUZQb9urF77mELH9DGR4e2GqpWQKBOYXWs5+uTN9BGDqRz3Aeg5Wts7aw==", "dev": true, "dependencies": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^27.3.1", - "@jest/source-map": "^27.0.6", - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/environment": "^27.4.4", + "@jest/source-map": "^27.4.0", + "@jest/test-result": "^27.4.2", + "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^27.3.1", + "expect": "^27.4.2", "is-generator-fn": "^2.0.0", - "jest-each": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "pretty-format": "^27.3.1", + "jest-each": "^27.4.2", + "jest-matcher-utils": "^27.4.2", + "jest-message-util": "^27.4.2", + "jest-runtime": "^27.4.5", + "jest-snapshot": "^27.4.5", + "jest-util": "^27.4.2", + "pretty-format": "^27.4.2", "throat": "^6.0.1" }, "engines": { @@ -4741,46 +4720,46 @@ } }, "node_modules/jest-leak-detector": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.3.1.tgz", - "integrity": "sha512-78QstU9tXbaHzwlRlKmTpjP9k4Pvre5l0r8Spo4SbFFVy/4Abg9I6ZjHwjg2QyKEAMg020XcjP+UgLZIY50yEg==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.4.2.tgz", + "integrity": "sha512-ml0KvFYZllzPBJWDei3mDzUhyp/M4ubKebX++fPaudpe8OsxUE+m+P6ciVLboQsrzOCWDjE20/eXew9QMx/VGw==", "dev": true, "dependencies": { - "jest-get-type": "^27.3.1", - "pretty-format": "^27.3.1" + "jest-get-type": "^27.4.0", + "pretty-format": "^27.4.2" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.3.1.tgz", - "integrity": "sha512-hX8N7zXS4k+8bC1Aj0OWpGb7D3gIXxYvPNK1inP5xvE4ztbz3rc4AkI6jGVaerepBnfWB17FL5lWFJT3s7qo8w==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.2.tgz", + "integrity": "sha512-jyP28er3RRtMv+fmYC/PKG8wvAmfGcSNproVTW2Y0P/OY7/hWUOmsPfxN1jOhM+0u2xU984u2yEagGivz9OBGQ==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^27.3.1", - "jest-get-type": "^27.3.1", - "pretty-format": "^27.3.1" + "jest-diff": "^27.4.2", + "jest-get-type": "^27.4.0", + "pretty-format": "^27.4.2" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-message-util": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.3.1.tgz", - "integrity": "sha512-bh3JEmxsTZ/9rTm0jQrPElbY2+y48Rw2t47uMfByNyUVR+OfPh4anuyKsGqsNkXk/TI4JbLRZx+7p7Hdt6q1yg==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.2.tgz", + "integrity": "sha512-OMRqRNd9E0DkBLZpFtZkAGYOXl6ZpoMtQJWTAREJKDOFa0M6ptB7L67tp+cszMBkvSgKOhNtQp2Vbcz3ZZKo/w==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "micromatch": "^4.0.4", - "pretty-format": "^27.3.1", + "pretty-format": "^27.4.2", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -4788,25 +4767,13 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-message-util/node_modules/@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/jest-mock": { - "version": "27.3.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.3.0.tgz", - "integrity": "sha512-ziZiLk0elZOQjD08bLkegBzv5hCABu/c8Ytx45nJKkysQwGaonvmTxwjLqEA4qGdasq9o2I8/HtdGMNnVsMTGw==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.4.2.tgz", + "integrity": "sha512-PDDPuyhoukk20JrQKeofK12hqtSka7mWH0QQuxSNgrdiPsrnYYLS6wbzu/HDlxZRzji5ylLRULeuI/vmZZDrYA==", "dev": true, "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "@types/node": "*" }, "engines": { @@ -4831,27 +4798,27 @@ } }, "node_modules/jest-regex-util": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.0.6.tgz", - "integrity": "sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.4.0.tgz", + "integrity": "sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg==", "dev": true, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-resolve": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.3.1.tgz", - "integrity": "sha512-Dfzt25CFSPo3Y3GCbxynRBZzxq9AdyNN+x/v2IqYx6KVT5Z6me2Z/PsSGFSv3cOSUZqJ9pHxilao/I/m9FouLw==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.5.tgz", + "integrity": "sha512-xU3z1BuOz/hUhVUL+918KqUgK+skqOuUsAi7A+iwoUldK6/+PW+utK8l8cxIWT9AW7IAhGNXjSAh1UYmjULZZw==", "dev": true, "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", + "jest-haste-map": "^27.4.5", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", + "jest-util": "^27.4.2", + "jest-validate": "^27.4.2", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" @@ -4861,45 +4828,45 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.3.1.tgz", - "integrity": "sha512-X7iLzY8pCiYOnvYo2YrK3P9oSE8/3N2f4pUZMJ8IUcZnT81vlSonya1KTO9ZfKGuC+svE6FHK/XOb8SsoRUV1A==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.5.tgz", + "integrity": "sha512-elEVvkvRK51y037NshtEkEnukMBWvlPzZHiL847OrIljJ8yIsujD2GXRPqDXC4rEVKbcdsy7W0FxoZb4WmEs7w==", "dev": true, "dependencies": { - "@jest/types": "^27.2.5", - "jest-regex-util": "^27.0.6", - "jest-snapshot": "^27.3.1" + "@jest/types": "^27.4.2", + "jest-regex-util": "^27.4.0", + "jest-snapshot": "^27.4.5" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-runner": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.3.1.tgz", - "integrity": "sha512-r4W6kBn6sPr3TBwQNmqE94mPlYVn7fLBseeJfo4E2uCTmAyDFm2O5DYAQAFP7Q3YfiA/bMwg8TVsciP7k0xOww==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.5.tgz", + "integrity": "sha512-/irauncTfmY1WkTaRQGRWcyQLzK1g98GYG/8QvIPviHgO1Fqz1JYeEIsSfF+9mc/UTA6S+IIHFgKyvUrtiBIZg==", "dev": true, "dependencies": { - "@jest/console": "^27.3.1", - "@jest/environment": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/console": "^27.4.2", + "@jest/environment": "^27.4.4", + "@jest/test-result": "^27.4.2", + "@jest/transform": "^27.4.5", + "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.8.1", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-docblock": "^27.0.6", - "jest-environment-jsdom": "^27.3.1", - "jest-environment-node": "^27.3.1", - "jest-haste-map": "^27.3.1", - "jest-leak-detector": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-resolve": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-util": "^27.3.1", - "jest-worker": "^27.3.1", + "jest-docblock": "^27.4.0", + "jest-environment-jsdom": "^27.4.4", + "jest-environment-node": "^27.4.4", + "jest-haste-map": "^27.4.5", + "jest-leak-detector": "^27.4.2", + "jest-message-util": "^27.4.2", + "jest-resolve": "^27.4.5", + "jest-runtime": "^27.4.5", + "jest-util": "^27.4.2", + "jest-worker": "^27.4.5", "source-map-support": "^0.5.6", "throat": "^6.0.1" }, @@ -4908,18 +4875,18 @@ } }, "node_modules/jest-runtime": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.3.1.tgz", - "integrity": "sha512-qtO6VxPbS8umqhEDpjA4pqTkKQ1Hy4ZSi9mDVeE9Za7LKBo2LdW2jmT+Iod3XFaJqINikZQsn2wEi0j9wPRbLg==", - "dev": true, - "dependencies": { - "@jest/console": "^27.3.1", - "@jest/environment": "^27.3.1", - "@jest/globals": "^27.3.1", - "@jest/source-map": "^27.0.6", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.5.tgz", + "integrity": "sha512-CIYqwuJQXHQtPd/idgrx4zgJ6iCb6uBjQq1RSAGQrw2S8XifDmoM1Ot8NRd80ooAm+ZNdHVwsktIMGlA1F1FAQ==", + "dev": true, + "dependencies": { + "@jest/console": "^27.4.2", + "@jest/environment": "^27.4.4", + "@jest/globals": "^27.4.4", + "@jest/source-map": "^27.4.0", + "@jest/test-result": "^27.4.2", + "@jest/transform": "^27.4.5", + "@jest/types": "^27.4.2", "@types/yargs": "^16.0.0", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", @@ -4928,14 +4895,14 @@ "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-mock": "^27.3.0", - "jest-regex-util": "^27.0.6", - "jest-resolve": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", + "jest-haste-map": "^27.4.5", + "jest-message-util": "^27.4.2", + "jest-mock": "^27.4.2", + "jest-regex-util": "^27.4.0", + "jest-resolve": "^27.4.5", + "jest-snapshot": "^27.4.5", + "jest-util": "^27.4.2", + "jest-validate": "^27.4.2", "slash": "^3.0.0", "strip-bom": "^4.0.0", "yargs": "^16.2.0" @@ -5048,9 +5015,9 @@ } }, "node_modules/jest-serializer": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.0.6.tgz", - "integrity": "sha512-PtGdVK9EGC7dsaziskfqaAPib6wTViY3G8E5wz9tLVPhHyiDNTZn/xjZ4khAw+09QkoOVpn7vF5nPSN6dtBexA==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.4.0.tgz", + "integrity": "sha512-RDhpcn5f1JYTX2pvJAGDcnsNTnsV9bjYPU8xcV+xPwOXnUPOQwf4ZEuiU6G9H1UztH+OapMgu/ckEVwO87PwnQ==", "dev": true, "dependencies": { "@types/node": "*", @@ -5061,9 +5028,9 @@ } }, "node_modules/jest-snapshot": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.3.1.tgz", - "integrity": "sha512-APZyBvSgQgOT0XumwfFu7X3G5elj6TGhCBLbBdn3R1IzYustPGPE38F51dBWMQ8hRXa9je0vAdeVDtqHLvB6lg==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.5.tgz", + "integrity": "sha512-eCi/iM1YJFrJWiT9de4+RpWWWBqsHiYxFG9V9o/n0WXs6GpW4lUt4FAHAgFPTLPqCUVzrMQmSmTZSgQzwqR7IQ==", "dev": true, "dependencies": { "@babel/core": "^7.7.2", @@ -5072,23 +5039,23 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.0.0", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/transform": "^27.4.5", + "@jest/types": "^27.4.2", "@types/babel__traverse": "^7.0.4", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^27.3.1", + "expect": "^27.4.2", "graceful-fs": "^4.2.4", - "jest-diff": "^27.3.1", - "jest-get-type": "^27.3.1", - "jest-haste-map": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-resolve": "^27.3.1", - "jest-util": "^27.3.1", + "jest-diff": "^27.4.2", + "jest-get-type": "^27.4.0", + "jest-haste-map": "^27.4.5", + "jest-matcher-utils": "^27.4.2", + "jest-message-util": "^27.4.2", + "jest-resolve": "^27.4.5", + "jest-util": "^27.4.2", "natural-compare": "^1.4.0", - "pretty-format": "^27.3.1", + "pretty-format": "^27.4.2", "semver": "^7.3.2" }, "engines": { @@ -5096,12 +5063,12 @@ } }, "node_modules/jest-util": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.3.1.tgz", - "integrity": "sha512-8fg+ifEH3GDryLQf/eKZck1DEs2YuVPBCMOaHQxVVLmQwl/CDhWzrvChTX4efLZxGrw+AA0mSXv78cyytBt/uw==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.4.2.tgz", + "integrity": "sha512-YuxxpXU6nlMan9qyLuxHaMMOzXAl5aGZWCSzben5DhLHemYQxCc4YK+4L3ZrCutT8GPQ+ui9k5D8rUJoDioMnA==", "dev": true, "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -5113,40 +5080,40 @@ } }, "node_modules/jest-util/node_modules/ci-info": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.2.0.tgz", - "integrity": "sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", "dev": true }, "node_modules/jest-validate": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.3.1.tgz", - "integrity": "sha512-3H0XCHDFLA9uDII67Bwi1Vy7AqwA5HqEEjyy934lgVhtJ3eisw6ShOF1MDmRPspyikef5MyExvIm0/TuLzZ86Q==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.4.2.tgz", + "integrity": "sha512-hWYsSUej+Fs8ZhOm5vhWzwSLmVaPAxRy+Mr+z5MzeaHm9AxUpXdoVMEW4R86y5gOobVfBsMFLk4Rb+QkiEpx1A==", "dev": true, "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^27.3.1", + "jest-get-type": "^27.4.0", "leven": "^3.1.0", - "pretty-format": "^27.3.1" + "pretty-format": "^27.4.2" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-watcher": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.3.1.tgz", - "integrity": "sha512-9/xbV6chABsGHWh9yPaAGYVVKurWoP3ZMCv6h+O1v9/+pkOroigs6WzZ0e9gLP/njokUwM7yQhr01LKJVMkaZA==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.4.2.tgz", + "integrity": "sha512-NJvMVyyBeXfDezhWzUOCOYZrUmkSCiatpjpm+nFUid74OZEHk6aMLrZAukIiFDwdbqp6mTM6Ui1w4oc+8EobQg==", "dev": true, "dependencies": { - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/test-result": "^27.4.2", + "@jest/types": "^27.4.2", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^27.3.1", + "jest-util": "^27.4.2", "string-length": "^4.0.1" }, "engines": { @@ -5154,9 +5121,9 @@ } }, "node_modules/jest-worker": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.3.1.tgz", - "integrity": "sha512-ks3WCzsiZaOPJl/oMsDjaf0TRiSv7ctNgs0FqRr2nARsovz6AWWy4oLElwcquGSz692DzgZQrCLScPNs5YlC4g==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.5.tgz", + "integrity": "sha512-f2s8kEdy15cv9r7q4KkzGXvlY0JTcmCbMHZBfSQDwW77REr45IDWwd0lksDFeVHH2jJ5pqb90T77XscrjeGzzg==", "dev": true, "dependencies": { "@types/node": "*", @@ -5251,55 +5218,6 @@ } } }, - "node_modules/jsdom/node_modules/acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/jsdom/node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/jsdom/node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsdom/node_modules/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", - "dev": true, - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.1.2" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -5535,12 +5453,6 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -5553,12 +5465,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", - "dev": true - }, "node_modules/lowercase-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", @@ -5661,6 +5567,18 @@ "tmpl": "1.0.5" } }, + "node_modules/marked": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/marked/-/marked-3.0.8.tgz", + "integrity": "sha512-0gVrAjo5m0VZSJb4rpL59K1unJAMb/hm8HRXqasD8VeC8m91ytDPMritgFSlKonfdt+rRYYpP/JfLxgIX8yoSw==", + "dev": true, + "bin": { + "marked": "bin/marked" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -5689,21 +5607,21 @@ } }, "node_modules/mime-db": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", - "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==", + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", "dev": true, "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.33", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", - "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", "dev": true, "dependencies": { - "mime-db": "1.50.0" + "mime-db": "1.51.0" }, "engines": { "node": ">= 0.6" @@ -5746,9 +5664,9 @@ "dev": true }, "node_modules/minipass": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.5.tgz", - "integrity": "sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", + "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", "dev": true, "dependencies": { "yallist": "^4.0.0" @@ -5914,15 +5832,6 @@ "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", "dev": true }, - "node_modules/node-modules-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/node-releases": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", @@ -6159,30 +6068,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/onigasm": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/onigasm/-/onigasm-2.2.5.tgz", - "integrity": "sha512-F+th54mPc0l1lp1ZcFMyL/jTs2Tlq4SqIHKIXGZOR/VkHkF9A7Fr5rRr5+ZG/lWeRsyrClLYRq7s/yFQ/XhWCA==", - "dev": true, - "dependencies": { - "lru-cache": "^5.1.1" - } - }, - "node_modules/onigasm/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/onigasm/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -6407,6 +6292,21 @@ "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", "dev": true }, + "node_modules/path-is-network-drive": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/path-is-network-drive/-/path-is-network-drive-1.0.10.tgz", + "integrity": "sha512-D6kJYPUSKGZBpTM2nv10sOWNdC056p4JDx0y7ARe6gop0aXXm5G86Gn/SyKvaf0Ce8c9Guctf+J+qoFmzuhDQg==", + "dev": true, + "dependencies": { + "tslib": "^2.3.1" + } + }, + "node_modules/path-is-network-drive/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, "node_modules/path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", @@ -6422,6 +6322,21 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-strip-sep": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-strip-sep/-/path-strip-sep-1.0.7.tgz", + "integrity": "sha512-9xDVZPblHde4lTuTDnwqBKr9LTbPZW+Iae63ho500+BpEiZe3X6wvLInHgbB6FSMtwCTvztljw3k2zcNDNESzg==", + "dev": true, + "dependencies": { + "tslib": "^2.3.1" + } + }, + "node_modules/path-strip-sep/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, "node_modules/path-to-regexp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", @@ -6456,13 +6371,10 @@ } }, "node_modules/pirates": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", - "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.4.tgz", + "integrity": "sha512-ZIrVPH+A52Dw84R0L3/VS9Op04PuQ2SEoJL6bkshmiTic/HldyW9Tf7oH5mhJZBK7NmDx27vSMrYEXPXclpDKw==", "dev": true, - "dependencies": { - "node-modules-regexp": "^1.0.0" - }, "engines": { "node": ">= 6" } @@ -6550,9 +6462,9 @@ } }, "node_modules/prettier": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz", - "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", + "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -6574,12 +6486,12 @@ } }, "node_modules/pretty-format": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.3.1.tgz", - "integrity": "sha512-DR/c+pvFc52nLimLROYjnXPtolawm+uWDxr4FjuLDLUn+ktWnSN851KoHwHzzqq6rfCOjkzN8FLgDrSub6UDuA==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.2.tgz", + "integrity": "sha512-p0wNtJ9oLuvgOQDEIZ9zQjZffK7KtyR6Si0jnXULIDwrlNF8Cuir3AZP0hHv0jmKuNN/edOnbMjnzd4uTcmWiw==", "dev": true, "dependencies": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", "react-is": "^17.0.1" @@ -6929,9 +6841,9 @@ } }, "node_modules/rollup": { - "version": "2.58.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.58.3.tgz", - "integrity": "sha512-ei27MSw1KhRur4p87Q0/Va2NAYqMXOX++FNEumMBcdreIRLURKy+cE2wcDJKBn0nfmhP2ZGrJkP1XPO+G8FJQw==", + "version": "2.61.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.61.1.tgz", + "integrity": "sha512-BbTXlEvB8d+XFbK/7E5doIcRtxWPRiqr0eb5vQ0+2paMM04Ye4PZY5nHOQef2ix24l/L0SpLd5hwcH15QHPdvA==", "bin": { "rollup": "dist/bin/rollup" }, @@ -6970,16 +6882,17 @@ } }, "node_modules/rollup-plugin-typescript2": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.30.0.tgz", - "integrity": "sha512-NUFszIQyhgDdhRS9ya/VEmsnpTe+GERDMmFo0Y+kf8ds51Xy57nPNGglJY+W6x1vcouA7Au7nsTgsLFj2I0PxQ==", + "version": "0.31.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.31.1.tgz", + "integrity": "sha512-sklqXuQwQX+stKi4kDfEkneVESPi3YM/2S899vfRdF9Yi40vcC50Oq4A4cSZJNXsAQE/UsBZl5fAOsBLziKmjw==", "dev": true, "dependencies": { "@rollup/pluginutils": "^4.1.0", + "@yarn-tool/resolve-package": "^1.0.36", "find-cache-dir": "^3.3.1", "fs-extra": "8.1.0", "resolve": "1.20.0", - "tslib": "2.1.0" + "tslib": "2.2.0" }, "peerDependencies": { "rollup": ">=1.26.3", @@ -6987,9 +6900,9 @@ } }, "node_modules/rollup-plugin-typescript2/node_modules/@rollup/pluginutils": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.1.tgz", - "integrity": "sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.2.tgz", + "integrity": "sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==", "dev": true, "dependencies": { "estree-walker": "^2.0.1", @@ -7242,20 +7155,20 @@ } }, "node_modules/shiki": { - "version": "0.9.12", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.12.tgz", - "integrity": "sha512-VXcROdldv0/Qu0w2XvzU4IrvTeBNs/Kj/FCmtcEXGz7Tic/veQzliJj6tEiAgoKianhQstpYmbPDStHU5Opqcw==", + "version": "0.9.15", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.15.tgz", + "integrity": "sha512-/Y0z9IzhJ8nD9nbceORCqu6NgT9X6I8Fk8c3SICHI5NbZRLdZYFaB233gwct9sU0vvSypyaL/qaKvzyQGJBZSw==", "dev": true, "dependencies": { "jsonc-parser": "^3.0.0", - "onigasm": "^2.2.5", + "vscode-oniguruma": "^1.6.1", "vscode-textmate": "5.2.0" } }, "node_modules/signal-exit": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", - "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", + "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==", "dev": true }, "node_modules/sisteransi": { @@ -7273,23 +7186,6 @@ "node": ">=8" } }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -7533,45 +7429,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "node_modules/table": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.2.tgz", - "integrity": "sha512-UFZK67uvyNivLeQbVtkiUs8Uuuxv24aSL4/Vil2PJVtMgU8Lx0CYkP12uCGa3kjyQzOSgV1+z9Wkb82fCGsO0g==", - "dev": true, - "dependencies": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.6.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.3.tgz", - "integrity": "sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, "node_modules/tar": { "version": "6.1.11", "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", @@ -7606,9 +7463,9 @@ } }, "node_modules/terser": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.9.0.tgz", - "integrity": "sha512-h5hxa23sCdpzcye/7b8YqbE5OwKca/ni0RQz1uRX3tGh8haaGHqcuSqbGRybuAKNdntZ0mDgFNXPJ48xQ2RXKQ==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", + "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", "dependencies": { "commander": "^2.20.0", "source-map": "~0.7.2", @@ -7619,6 +7476,14 @@ }, "engines": { "node": ">=10" + }, + "peerDependencies": { + "acorn": "^8.5.0" + }, + "peerDependenciesMeta": { + "acorn": { + "optional": true + } } }, "node_modules/terser/node_modules/commander": { @@ -7696,6 +7561,29 @@ "node": ">=8.0" } }, + "node_modules/tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "dev": true, + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tough-cookie/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/tr46": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", @@ -7718,9 +7606,9 @@ } }, "node_modules/ts-jest": { - "version": "27.0.7", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.0.7.tgz", - "integrity": "sha512-O41shibMqzdafpuP+CkrOL7ykbmLh+FqQrXEmV9CydQ5JBk0Sj0uAEF5TNNe94fZWKm3yYvWa/IbyV4Yg1zK2Q==", + "version": "27.1.1", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.1.tgz", + "integrity": "sha512-Ds0VkB+cB+8g2JUmP/GKWndeZcCKrbe6jzolGrVWdqVUFByY/2KDHqxJ7yBSon7hDB1TA4PXxjfZ+JjzJisvgA==", "dev": true, "dependencies": { "bs-logger": "0.x", @@ -7742,6 +7630,7 @@ "@babel/core": ">=7.0.0-beta.0 <8", "@types/jest": "^27.0.0", "babel-jest": ">=27.0.0 <28", + "esbuild": "~0.14.0", "jest": "^27.0.0", "typescript": ">=3.8 <5.0" }, @@ -7754,13 +7643,44 @@ }, "babel-jest": { "optional": true + }, + "esbuild": { + "optional": true } } }, + "node_modules/ts-toolbelt": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", + "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==", + "dev": true, + "peer": true + }, + "node_modules/ts-type": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ts-type/-/ts-type-2.1.2.tgz", + "integrity": "sha512-64/2XoaipFXa/bidwXChQCSJ3VaCUVKrEaRPXiP5gLIlkPoAHfnwOMC0EWr42DsTm/+qYYuNwzxc0VQroeDs+g==", + "dev": true, + "dependencies": { + "tslib": "^2.3.1", + "typedarray-dts": "^1.0.0" + }, + "peerDependencies": { + "@types/bluebird": "*", + "@types/node": "*", + "ts-toolbelt": "^9.6.0" + } + }, + "node_modules/ts-type/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, "node_modules/tslib": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", - "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", "dev": true }, "node_modules/tsutils": { @@ -7817,6 +7737,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typedarray-dts": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typedarray-dts/-/typedarray-dts-1.0.0.tgz", + "integrity": "sha512-Ka0DBegjuV9IPYFT1h0Qqk5U4pccebNIJCGl8C5uU7xtOs+jpJvKGAY4fHGK25hTmXZOEUl9Cnsg5cS6K/b5DA==", + "dev": true + }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -7848,22 +7774,10 @@ "typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x" } }, - "node_modules/typedoc/node_modules/marked": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/marked/-/marked-3.0.8.tgz", - "integrity": "sha512-0gVrAjo5m0VZSJb4rpL59K1unJAMb/hm8HRXqasD8VeC8m91ytDPMritgFSlKonfdt+rRYYpP/JfLxgIX8yoSw==", - "dev": true, - "bin": { - "marked": "bin/marked" - }, - "engines": { - "node": ">= 12" - } - }, "node_modules/typescript": { - "version": "4.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", - "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz", + "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -7912,6 +7826,27 @@ "node": ">= 4.0.0" } }, + "node_modules/upath2": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/upath2/-/upath2-3.1.10.tgz", + "integrity": "sha512-7ph3GzTaVbQX+oIoMsGtM+9BAWQr+6Mn28TJKPu28+yGpZ+J4am590CPDBlDG0zyuo9T9T7o21ciqNzwIp/q0A==", + "dev": true, + "dependencies": { + "lodash": "^4.17.21", + "path-is-network-drive": "^1.0.10", + "path-strip-sep": "^1.0.7", + "tslib": "^2.3.1" + }, + "peerDependencies": { + "@types/node": "*" + } + }, + "node_modules/upath2/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, "node_modules/update-check": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.2.tgz", @@ -8033,6 +7968,12 @@ "node": ">= 0.8" } }, + "node_modules/vscode-oniguruma": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.1.tgz", + "integrity": "sha512-vc4WhSIaVpgJ0jJIejjYxPvURJavX6QG41vu0mGhqywMkQqulezEqEQ3cO3gc8GvcOpX6ycmKGqRoROEMBNXTQ==", + "dev": true + }, "node_modules/vscode-textmate": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", @@ -8200,9 +8141,9 @@ } }, "node_modules/ws": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz", - "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", + "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", "dev": true, "engines": { "node": ">=8.3.0" @@ -8296,7 +8237,6 @@ } }, "packages/e2ee": { - "name": "@sora/e2ee", "version": "2021.1.0", "license": "Apache-2.0", "dependencies": { @@ -8304,77 +8244,75 @@ }, "devDependencies": { "@rollup/plugin-replace": "^3.0.0", - "@typescript-eslint/eslint-plugin": "^4.33.0", - "@typescript-eslint/parser": "^4.33.0", - "eslint": "^7.32.0", + "@typescript-eslint/eslint-plugin": "^5.7.0", + "@typescript-eslint/parser": "^5.7.0", + "eslint": "^8.4.1", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.4.1", - "rollup": "^2.58.0", - "rollup-plugin-typescript2": "^0.30.0", - "typescript": "^4.4.3" + "prettier": "^2.5.1", + "rollup": "^2.61.1", + "rollup-plugin-typescript2": "^0.31.1", + "typescript": "^4.5.4" } }, "packages/go-wasm": { - "name": "@sora/go-wasm", "version": "2021.1.0" }, "packages/sdk": { - "name": "@sora/sdk", "dependencies": { "@sora/e2ee": "^2021.1.0", - "fflate": "^0.7.1", + "fflate": "^0.7.2", "rollup-plugin-terser": "^7.0.2" }, "devDependencies": { - "@rollup/plugin-commonjs": "^21.0.0", - "@rollup/plugin-node-resolve": "^13.0.5", + "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-node-resolve": "^13.1.1", "@rollup/plugin-replace": "^3.0.0", - "@types/jest": "^27.0.2", - "@typescript-eslint/eslint-plugin": "4.33.0", - "@typescript-eslint/parser": "4.33.0", - "eslint": "7.32.0", + "@types/jest": "^27.0.3", + "@typescript-eslint/eslint-plugin": "5.7.0", + "@typescript-eslint/parser": "5.7.0", + "eslint": "8.4.1", "eslint-config-prettier": "8.3.0", "eslint-plugin-prettier": "4.0.0", - "jest": "^27.2.4", - "prettier": "^2.4.1", - "rollup": "^2.58.0", - "rollup-plugin-typescript2": "^0.30.0", - "ts-jest": "^27.0.5", - "typescript": "^4.4.3" + "jest": "^27.4.5", + "prettier": "^2.5.1", + "rollup": "^2.61.1", + "rollup-plugin-typescript2": "^0.31.1", + "ts-jest": "^27.1.1", + "typescript": "^4.5.4" } } }, "dependencies": { "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", + "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", "requires": { - "@babel/highlight": "^7.10.4" + "@babel/highlight": "^7.16.0" } }, "@babel/compat-data": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", - "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", + "version": "7.16.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.4.tgz", + "integrity": "sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q==", "dev": true }, "@babel/core": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.8.tgz", - "integrity": "sha512-3UG9dsxvYBMYwRv+gS41WKHno4K60/9GPy1CJaH6xy3Elq8CTtvtjT5R5jmNhXfCYLX2mTw+7/aq5ak/gOE0og==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.15.8", - "@babel/generator": "^7.15.8", - "@babel/helper-compilation-targets": "^7.15.4", - "@babel/helper-module-transforms": "^7.15.8", - "@babel/helpers": "^7.15.4", - "@babel/parser": "^7.15.8", - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.6", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.5.tgz", + "integrity": "sha512-wUcenlLzuWMZ9Zt8S0KmFwGlH6QKRh3vsm/dhDA3CHkiTA45YuG1XkHRcNRl73EFPXDp/d5kVOU0/y7x2w6OaQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.0", + "@babel/generator": "^7.16.5", + "@babel/helper-compilation-targets": "^7.16.3", + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helpers": "^7.16.5", + "@babel/parser": "^7.16.5", + "@babel/template": "^7.16.0", + "@babel/traverse": "^7.16.5", + "@babel/types": "^7.16.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -8383,15 +8321,6 @@ "source-map": "^0.5.0" }, "dependencies": { - "@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", - "dev": true, - "requires": { - "@babel/highlight": "^7.14.5" - } - }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -8407,12 +8336,12 @@ } }, "@babel/generator": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.8.tgz", - "integrity": "sha512-ECmAKstXbp1cvpTTZciZCgfOt6iN64lR0d+euv3UZisU5awfRawOvg07Utn/qBGuH4bRIEZKrA/4LzZyXhZr8g==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.5.tgz", + "integrity": "sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA==", "dev": true, "requires": { - "@babel/types": "^7.15.6", + "@babel/types": "^7.16.0", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -8426,14 +8355,14 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz", - "integrity": "sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ==", + "version": "7.16.3", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.3.tgz", + "integrity": "sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA==", "dev": true, "requires": { - "@babel/compat-data": "^7.15.0", + "@babel/compat-data": "^7.16.0", "@babel/helper-validator-option": "^7.14.5", - "browserslist": "^4.16.6", + "browserslist": "^4.17.5", "semver": "^6.3.0" }, "dependencies": { @@ -8445,112 +8374,91 @@ } } }, - "@babel/helper-function-name": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", - "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", + "@babel/helper-environment-visitor": { + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.5.tgz", + "integrity": "sha512-ODQyc5AnxmZWm/R2W7fzhamOk1ey8gSguo5SGvF0zcB3uUzRpTRmM/jmLSm9bDMyPlvbyJ+PwPEK0BWIoZ9wjg==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.15.4", - "@babel/template": "^7.15.4", - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.0" } }, - "@babel/helper-get-function-arity": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", - "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", + "@babel/helper-function-name": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz", + "integrity": "sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/helper-get-function-arity": "^7.16.0", + "@babel/template": "^7.16.0", + "@babel/types": "^7.16.0" } }, - "@babel/helper-hoist-variables": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", - "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", + "@babel/helper-get-function-arity": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz", + "integrity": "sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.0" } }, - "@babel/helper-member-expression-to-functions": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz", - "integrity": "sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA==", + "@babel/helper-hoist-variables": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.0.tgz", + "integrity": "sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.0" } }, "@babel/helper-module-imports": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz", - "integrity": "sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz", + "integrity": "sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.0" } }, "@babel/helper-module-transforms": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.8.tgz", - "integrity": "sha512-DfAfA6PfpG8t4S6npwzLvTUpp0sS7JrcuaMiy1Y5645laRJIp/LiLGIBbQKaXSInK8tiGNI7FL7L8UvB8gdUZg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.5.tgz", + "integrity": "sha512-CkvMxgV4ZyyioElFwcuWnDCcNIeyqTkCm9BxXZi73RR1ozqlpboqsbGUNvRTflgZtFbbJ1v5Emvm+lkjMYY/LQ==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.15.4", - "@babel/helper-replace-supers": "^7.15.4", - "@babel/helper-simple-access": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/helper-environment-visitor": "^7.16.5", + "@babel/helper-module-imports": "^7.16.0", + "@babel/helper-simple-access": "^7.16.0", + "@babel/helper-split-export-declaration": "^7.16.0", "@babel/helper-validator-identifier": "^7.15.7", - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.6" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz", - "integrity": "sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw==", - "dev": true, - "requires": { - "@babel/types": "^7.15.4" + "@babel/template": "^7.16.0", + "@babel/traverse": "^7.16.5", + "@babel/types": "^7.16.0" } }, "@babel/helper-plugin-utils": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", - "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.5.tgz", + "integrity": "sha512-59KHWHXxVA9K4HNF4sbHCf+eJeFe0Te/ZFGqBT4OjXhrwvA04sGfaEGsVTdsjoszq0YTP49RC9UKe5g8uN2RwQ==", "dev": true }, - "@babel/helper-replace-supers": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz", - "integrity": "sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw==", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.15.4", - "@babel/helper-optimise-call-expression": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4" - } - }, "@babel/helper-simple-access": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz", - "integrity": "sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.0.tgz", + "integrity": "sha512-o1rjBT/gppAqKsYfUdfHq5Rk03lMQrkPHG1OWzHWpLgVXRH4HnMM9Et9CVdIqwkCQlobnGHEJMsgWP/jE1zUiw==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.0" } }, "@babel/helper-split-export-declaration": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", - "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz", + "integrity": "sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.0" } }, "@babel/helper-validator-identifier": { @@ -8565,22 +8473,22 @@ "dev": true }, "@babel/helpers": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.4.tgz", - "integrity": "sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.5.tgz", + "integrity": "sha512-TLgi6Lh71vvMZGEkFuIxzaPsyeYCHQ5jJOOX1f0xXn0uciFuE8cEk0wyBquMcCxBXZ5BJhE2aUB7pnWTD150Tw==", "dev": true, "requires": { - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4" + "@babel/template": "^7.16.0", + "@babel/traverse": "^7.16.5", + "@babel/types": "^7.16.0" } }, "@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz", + "integrity": "sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==", "requires": { - "@babel/helper-validator-identifier": "^7.14.5", + "@babel/helper-validator-identifier": "^7.15.7", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -8632,9 +8540,9 @@ } }, "@babel/parser": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.8.tgz", - "integrity": "sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA==", + "version": "7.16.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", + "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -8746,62 +8654,43 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.14.5.tgz", - "integrity": "sha512-u6OXzDaIXjEstBRRoBCQ/uKQKlbuaeE5in0RvWdA4pN6AhqxTIwUsnHPU1CFZA/amYObMsuWhYfRl3Ch90HD0Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.5.tgz", + "integrity": "sha512-/d4//lZ1Vqb4mZ5xTep3dDK888j7BGM/iKqBmndBaoYAFPlPKrGU608VVBz5JeyAb6YQDjRu1UKqj86UhwWVgw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/template": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", - "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.0.tgz", + "integrity": "sha512-MnZdpFD/ZdYhXwiunMqqgyZyucaYsbL0IrjoGjaVhGilz+x8YB++kRfygSOIj1yOtWKPlx7NBp+9I1RQSgsd5A==", "dev": true, "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", - "dev": true, - "requires": { - "@babel/highlight": "^7.14.5" - } - } + "@babel/code-frame": "^7.16.0", + "@babel/parser": "^7.16.0", + "@babel/types": "^7.16.0" } }, "@babel/traverse": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", - "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.4", - "@babel/helper-function-name": "^7.15.4", - "@babel/helper-hoist-variables": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.5.tgz", + "integrity": "sha512-FOCODAzqUMROikDYLYxl4nmwiLlu85rNqBML/A5hKRVXG2LV8d0iMqgPzdYTcIpjZEBB7D6UDU9vxRZiriASdQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.0", + "@babel/generator": "^7.16.5", + "@babel/helper-environment-visitor": "^7.16.5", + "@babel/helper-function-name": "^7.16.0", + "@babel/helper-hoist-variables": "^7.16.0", + "@babel/helper-split-export-declaration": "^7.16.0", + "@babel/parser": "^7.16.5", + "@babel/types": "^7.16.0", "debug": "^4.1.0", "globals": "^11.1.0" }, "dependencies": { - "@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", - "dev": true, - "requires": { - "@babel/highlight": "^7.14.5" - } - }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -8811,12 +8700,12 @@ } }, "@babel/types": { - "version": "7.15.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", - "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.0.tgz", + "integrity": "sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.9", + "@babel/helper-validator-identifier": "^7.15.7", "to-fast-properties": "^2.0.0" } }, @@ -8827,47 +8716,28 @@ "dev": true }, "@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", + "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", "dev": true, "requires": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", + "debug": "^4.3.2", + "espree": "^9.2.0", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -8883,20 +8753,20 @@ "dev": true }, "@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", + "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" } }, "@humanwhocodes/object-schema": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", - "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, "@istanbuljs/load-nyc-config": { @@ -8989,49 +8859,49 @@ "dev": true }, "@jest/console": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.3.1.tgz", - "integrity": "sha512-RkFNWmv0iui+qsOr/29q9dyfKTTT5DCuP31kUwg7rmOKPT/ozLeGLKJKVIiOfbiKyleUZKIrHwhmiZWVe8IMdw==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.4.2.tgz", + "integrity": "sha512-xknHThRsPB/To1FUbi6pCe43y58qFC03zfb6R7fDb/FfC7k2R3i1l+izRBJf8DI46KhYGRaF14Eo9A3qbBoixg==", "dev": true, "requires": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^27.3.1", - "jest-util": "^27.3.1", + "jest-message-util": "^27.4.2", + "jest-util": "^27.4.2", "slash": "^3.0.0" } }, "@jest/core": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.3.1.tgz", - "integrity": "sha512-DMNE90RR5QKx0EA+wqe3/TNEwiRpOkhshKNxtLxd4rt3IZpCt+RSL+FoJsGeblRZmqdK4upHA/mKKGPPRAifhg==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.5.tgz", + "integrity": "sha512-3tm/Pevmi8bDsgvo73nX8p/WPng6KWlCyScW10FPEoN1HU4pwI83tJ3TsFvi1FfzsjwUlMNEPowgb/rPau/LTQ==", "dev": true, "requires": { - "@jest/console": "^27.3.1", - "@jest/reporters": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/console": "^27.4.2", + "@jest/reporters": "^27.4.5", + "@jest/test-result": "^27.4.2", + "@jest/transform": "^27.4.5", + "@jest/types": "^27.4.2", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.8.1", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-changed-files": "^27.3.0", - "jest-config": "^27.3.1", - "jest-haste-map": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-regex-util": "^27.0.6", - "jest-resolve": "^27.3.1", - "jest-resolve-dependencies": "^27.3.1", - "jest-runner": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", - "jest-watcher": "^27.3.1", + "jest-changed-files": "^27.4.2", + "jest-config": "^27.4.5", + "jest-haste-map": "^27.4.5", + "jest-message-util": "^27.4.2", + "jest-regex-util": "^27.4.0", + "jest-resolve": "^27.4.5", + "jest-resolve-dependencies": "^27.4.5", + "jest-runner": "^27.4.5", + "jest-runtime": "^27.4.5", + "jest-snapshot": "^27.4.5", + "jest-util": "^27.4.2", + "jest-validate": "^27.4.2", + "jest-watcher": "^27.4.2", "micromatch": "^4.0.4", "rimraf": "^3.0.0", "slash": "^3.0.0", @@ -9039,53 +8909,53 @@ } }, "@jest/environment": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.3.1.tgz", - "integrity": "sha512-BCKCj4mOVLme6Tanoyc9k0ultp3pnmuyHw73UHRPeeZxirsU/7E3HC4le/VDb/SMzE1JcPnto+XBKFOcoiJzVw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.4.tgz", + "integrity": "sha512-q+niMx7cJgt/t/b6dzLOh4W8Ef/8VyKG7hxASK39jakijJzbFBGpptx3RXz13FFV7OishQ9lTbv+dQ5K3EhfDQ==", "dev": true, "requires": { - "@jest/fake-timers": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/fake-timers": "^27.4.2", + "@jest/types": "^27.4.2", "@types/node": "*", - "jest-mock": "^27.3.0" + "jest-mock": "^27.4.2" } }, "@jest/fake-timers": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.3.1.tgz", - "integrity": "sha512-M3ZFgwwlqJtWZ+QkBG5NmC23A9w+A6ZxNsO5nJxJsKYt4yguBd3i8TpjQz5NfCX91nEve1KqD9RA2Q+Q1uWqoA==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.2.tgz", + "integrity": "sha512-f/Xpzn5YQk5adtqBgvw1V6bF8Nx3hY0OIRRpCvWcfPl0EAjdqWPdhH3t/3XpiWZqtjIEHDyMKP9ajpva1l4Zmg==", "dev": true, "requires": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "@sinonjs/fake-timers": "^8.0.1", "@types/node": "*", - "jest-message-util": "^27.3.1", - "jest-mock": "^27.3.0", - "jest-util": "^27.3.1" + "jest-message-util": "^27.4.2", + "jest-mock": "^27.4.2", + "jest-util": "^27.4.2" } }, "@jest/globals": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.3.1.tgz", - "integrity": "sha512-Q651FWiWQAIFiN+zS51xqhdZ8g9b88nGCobC87argAxA7nMfNQq0Q0i9zTfQYgLa6qFXk2cGANEqfK051CZ8Pg==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.4.tgz", + "integrity": "sha512-bqpqQhW30BOreXM8bA8t8JbOQzsq/WnPTnBl+It3UxAD9J8yxEAaBEylHx1dtBapAr/UBk8GidXbzmqnee8tYQ==", "dev": true, "requires": { - "@jest/environment": "^27.3.1", - "@jest/types": "^27.2.5", - "expect": "^27.3.1" + "@jest/environment": "^27.4.4", + "@jest/types": "^27.4.2", + "expect": "^27.4.2" } }, "@jest/reporters": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.3.1.tgz", - "integrity": "sha512-m2YxPmL9Qn1emFVgZGEiMwDntDxRRQ2D58tiDQlwYTg5GvbFOKseYCcHtn0WsI8CG4vzPglo3nqbOiT8ySBT/w==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.5.tgz", + "integrity": "sha512-3orsG4vi8zXuBqEoy2LbnC1kuvkg1KQUgqNxmxpQgIOQEPeV0onvZu+qDQnEoX8qTQErtqn/xzcnbpeTuOLSiA==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/console": "^27.4.2", + "@jest/test-result": "^27.4.2", + "@jest/transform": "^27.4.5", + "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -9097,10 +8967,10 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^27.3.1", - "jest-resolve": "^27.3.1", - "jest-util": "^27.3.1", - "jest-worker": "^27.3.1", + "jest-haste-map": "^27.4.5", + "jest-resolve": "^27.4.5", + "jest-util": "^27.4.2", + "jest-worker": "^27.4.5", "slash": "^3.0.0", "source-map": "^0.6.0", "string-length": "^4.0.1", @@ -9109,9 +8979,9 @@ } }, "@jest/source-map": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.0.6.tgz", - "integrity": "sha512-Fek4mi5KQrqmlY07T23JRi0e7Z9bXTOOD86V/uS0EIW4PClvPDqZOyFlLpNJheS6QI0FNX1CgmPjtJ4EA/2M+g==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.4.0.tgz", + "integrity": "sha512-Ntjx9jzP26Bvhbm93z/AKcPRj/9wrkI88/gK60glXDx1q+IeI0rf7Lw2c89Ch6ofonB0On/iRDreQuQ6te9pgQ==", "dev": true, "requires": { "callsites": "^3.0.0", @@ -9120,45 +8990,45 @@ } }, "@jest/test-result": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.3.1.tgz", - "integrity": "sha512-mLn6Thm+w2yl0opM8J/QnPTqrfS4FoXsXF2WIWJb2O/GBSyResL71BRuMYbYRsGt7ELwS5JGcEcGb52BNrumgg==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.4.2.tgz", + "integrity": "sha512-kr+bCrra9jfTgxHXHa2UwoQjxvQk3Am6QbpAiJ5x/50LW8llOYrxILkqY0lZRW/hu8FXesnudbql263+EW9iNA==", "dev": true, "requires": { - "@jest/console": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/console": "^27.4.2", + "@jest/types": "^27.4.2", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.3.1.tgz", - "integrity": "sha512-siySLo07IMEdSjA4fqEnxfIX8lB/lWYsBPwNFtkOvsFQvmBrL3yj3k3uFNZv/JDyApTakRpxbKLJ3CT8UGVCrA==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.5.tgz", + "integrity": "sha512-n5woIn/1v+FT+9hniymHPARA9upYUmfi5Pw9ewVwXCDlK4F5/Gkees9v8vdjGdAIJ2MPHLHodiajLpZZanWzEQ==", "dev": true, "requires": { - "@jest/test-result": "^27.3.1", + "@jest/test-result": "^27.4.2", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", - "jest-runtime": "^27.3.1" + "jest-haste-map": "^27.4.5", + "jest-runtime": "^27.4.5" } }, "@jest/transform": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.3.1.tgz", - "integrity": "sha512-3fSvQ02kuvjOI1C1ssqMVBKJpZf6nwoCiSu00zAKh5nrp3SptNtZy/8s5deayHnqxhjD9CWDJ+yqQwuQ0ZafXQ==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.5.tgz", + "integrity": "sha512-PuMet2UlZtlGzwc6L+aZmR3I7CEBpqadO03pU40l2RNY2fFJ191b9/ITB44LNOhVtsyykx0OZvj0PCyuLm7Eew==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "babel-plugin-istanbul": "^6.0.0", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", - "jest-regex-util": "^27.0.6", - "jest-util": "^27.3.1", + "jest-haste-map": "^27.4.5", + "jest-regex-util": "^27.4.0", + "jest-util": "^27.4.2", "micromatch": "^4.0.4", "pirates": "^4.0.1", "slash": "^3.0.0", @@ -9167,9 +9037,9 @@ } }, "@jest/types": { - "version": "27.2.5", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.2.5.tgz", - "integrity": "sha512-nmuM4VuDtCZcY+eTpw+0nvstwReMsjPoj7ZR80/BbixulhLaiX+fbv8oeLW8WZlJMcsGQsTmMKT/iTZu1Uy/lQ==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.4.2.tgz", + "integrity": "sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", @@ -9206,9 +9076,9 @@ } }, "@npmcli/fs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.0.0.tgz", - "integrity": "sha512-8ltnOpRR/oJbOp8vaGUnipOi3bqkcW+sLHFlyXIr08OGHmVJLB1Hn7QtGXbYcpVtH1gAYZTlmDXtE4YV0+AMMQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.0.tgz", + "integrity": "sha512-VhP1qZLXcrXRIaPoqb4YA55JQxLNF3jNR4T55IdOJa3+IFJKNYHtPvtXx8slmeMavj37vCzCfrqQM1vWLsYKLA==", "dev": true, "requires": { "@gar/promisify": "^1.0.1", @@ -9294,9 +9164,9 @@ } }, "@rollup/plugin-node-resolve": { - "version": "13.0.6", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.6.tgz", - "integrity": "sha512-sFsPDMPd4gMqnh2gS0uIxELnoRUp5kBl5knxD2EO0778G1oOJv4G1vyT2cpWz75OU2jDVcXhjVUuTAczGyFNKA==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.1.tgz", + "integrity": "sha512-6QKtRevXLrmEig9UiMYt2fSvee9TyltGRfw+qSs6xjUnxwjOzTOqy+/Lpxsgjb8mJn1EQNbCDAvt89O4uzL5kw==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -9352,9 +9222,9 @@ } }, "@sinonjs/fake-timers": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.0.1.tgz", - "integrity": "sha512-AU7kwFxreVd6OAXcAFlKSmZquiRUU0FvYm44k1Y1QbK7Co4m0aqfGMhjykIeQp/H6rcl+nFmj0zfdUcGVs9Dew==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", + "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0" @@ -9365,15 +9235,15 @@ "requires": { "@rollup/plugin-replace": "^3.0.0", "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^4.33.0", - "@typescript-eslint/parser": "^4.33.0", - "eslint": "^7.32.0", + "@typescript-eslint/eslint-plugin": "^5.7.0", + "@typescript-eslint/parser": "^5.7.0", + "eslint": "^8.4.1", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.4.1", - "rollup": "^2.58.0", - "rollup-plugin-typescript2": "^0.30.0", - "typescript": "^4.4.3" + "prettier": "^2.5.1", + "rollup": "^2.61.1", + "rollup-plugin-typescript2": "^0.31.1", + "typescript": "^4.5.4" } }, "@sora/go-wasm": { @@ -9382,24 +9252,24 @@ "@sora/sdk": { "version": "file:packages/sdk", "requires": { - "@rollup/plugin-commonjs": "^21.0.0", - "@rollup/plugin-node-resolve": "^13.0.5", + "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-node-resolve": "^13.1.1", "@rollup/plugin-replace": "^3.0.0", "@sora/e2ee": "^2021.1.0", - "@types/jest": "^27.0.2", - "@typescript-eslint/eslint-plugin": "4.33.0", - "@typescript-eslint/parser": "4.33.0", - "eslint": "7.32.0", + "@types/jest": "^27.0.3", + "@typescript-eslint/eslint-plugin": "5.7.0", + "@typescript-eslint/parser": "5.7.0", + "eslint": "8.4.1", "eslint-config-prettier": "8.3.0", "eslint-plugin-prettier": "4.0.0", - "fflate": "^0.7.1", - "jest": "^27.2.4", - "prettier": "^2.4.1", - "rollup": "^2.58.0", + "fflate": "^0.7.2", + "jest": "^27.4.5", + "prettier": "^2.5.1", + "rollup": "^2.61.1", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-typescript2": "^0.30.0", - "ts-jest": "^27.0.5", - "typescript": "^4.4.3" + "rollup-plugin-typescript2": "^0.31.1", + "ts-jest": "^27.1.1", + "typescript": "^4.5.4" } }, "@szmarczak/http-timer": { @@ -9417,10 +9287,20 @@ "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true }, + "@ts-type/package-dts": { + "version": "1.0.56", + "resolved": "https://registry.npmjs.org/@ts-type/package-dts/-/package-dts-1.0.56.tgz", + "integrity": "sha512-nBjbCaVV+R81jk7q/6sRuNYOhDAbBOmaCkPI2quK0Rnye2f4FUHX+4JL+3rDPiRPHxgX3pNfVKKHBlPAHiRddw==", + "dev": true, + "requires": { + "@types/semver": "^7.3.9", + "ts-type": "^2.1.2" + } + }, "@types/babel__core": { - "version": "7.1.16", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.16.tgz", - "integrity": "sha512-EAEHtisTMM+KaKwfWdC3oyllIqswlznXCIVCt7/oRNrh+DhgT4UEBNC/jlADNjvw7UnfbcdkGQcPVZ1xYiLcrQ==", + "version": "7.1.17", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.17.tgz", + "integrity": "sha512-6zzkezS9QEIL8yCBvXWxPTJPNuMeECJVxSOhxNY/jfq9LxOTHivaYTqr37n9LknWWRTIkzqH2UilS5QFvfa90A==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -9458,6 +9338,13 @@ "@babel/types": "^7.3.0" } }, + "@types/bluebird": { + "version": "3.5.36", + "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.36.tgz", + "integrity": "sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q==", + "dev": true, + "peer": true + }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -9498,9 +9385,9 @@ } }, "@types/jest": { - "version": "27.0.2", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.0.2.tgz", - "integrity": "sha512-4dRxkS/AFX0c5XW6IPMNOydLn2tEhNhJV7DnYK+0bjoJZ+QTmfucBlihX7aoEsh/ocYtkLC73UbnBXBXIxsULA==", + "version": "27.0.3", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.0.3.tgz", + "integrity": "sha512-cmmwv9t7gBYt7hNKH5Spu7Kuu/DotGa+Ff+JGRKZ4db5eh8PnKS4LuebJ3YLUoyOyIHraTGyULn23YtEAm0VSg==", "dev": true, "requires": { "jest-diff": "^27.0.0", @@ -9514,14 +9401,14 @@ "dev": true }, "@types/node": { - "version": "16.11.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz", - "integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==" + "version": "16.11.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.13.tgz", + "integrity": "sha512-eUXZzHLHoZqj1frtUetNkUetYoJ6X55UmrVnFD4DMhVeAmwLjniZhtBmsRiemQh4uq4G3vUra/Ws/hs9vEvL3Q==" }, "@types/prettier": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.1.tgz", - "integrity": "sha512-Fo79ojj3vdEZOHg3wR9ksAMRz4P3S5fDB5e/YWZiFnyFQI1WY2Vftu9XoXVVtJfxB7Bpce/QTqWSSntkz2Znrw==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.2.tgz", + "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", "dev": true }, "@types/resolve": { @@ -9533,6 +9420,12 @@ "@types/node": "*" } }, + "@types/semver": { + "version": "7.3.9", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.9.tgz", + "integrity": "sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ==", + "dev": true + }, "@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -9555,86 +9448,115 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", - "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.7.0.tgz", + "integrity": "sha512-8RTGBpNn5a9M628wBPrCbJ+v3YTEOE2qeZb7TDkGKTDXSj36KGRg92SpFFaR/0S3rSXQxM0Og/kV9EyadsYSBg==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.33.0", - "@typescript-eslint/scope-manager": "4.33.0", - "debug": "^4.3.1", + "@typescript-eslint/experimental-utils": "5.7.0", + "@typescript-eslint/scope-manager": "5.7.0", + "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", - "regexpp": "^3.1.0", + "regexpp": "^3.2.0", "semver": "^7.3.5", "tsutils": "^3.21.0" } }, "@typescript-eslint/experimental-utils": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", - "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.7.0.tgz", + "integrity": "sha512-u57eZ5FbEpzN5kSjmVrSesovWslH2ZyNPnaXQMXWgH57d5+EVHEt76W75vVuI9qKZ5BMDKNfRN+pxcPEjQjb2A==", "dev": true, "requires": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.7.0", + "@typescript-eslint/types": "5.7.0", + "@typescript-eslint/typescript-estree": "5.7.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/parser": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", - "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.7.0.tgz", + "integrity": "sha512-m/gWCCcS4jXw6vkrPQ1BjZ1vomP01PArgzvauBqzsoZ3urLbsRChexB8/YV8z9HwE3qlJM35FxfKZ1nfP/4x8g==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "debug": "^4.3.1" + "@typescript-eslint/scope-manager": "5.7.0", + "@typescript-eslint/types": "5.7.0", + "@typescript-eslint/typescript-estree": "5.7.0", + "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", - "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz", + "integrity": "sha512-7mxR520DGq5F7sSSgM0HSSMJ+TFUymOeFRMfUfGFAVBv8BR+Jv1vHgAouYUvWRZeszVBJlLcc9fDdktxb5kmxA==", "dev": true, "requires": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0" + "@typescript-eslint/types": "5.7.0", + "@typescript-eslint/visitor-keys": "5.7.0" } }, "@typescript-eslint/types": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", - "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", + "integrity": "sha512-5AeYIF5p2kAneIpnLFve8g50VyAjq7udM7ApZZ9JYjdPjkz0LvODfuSHIDUVnIuUoxafoWzpFyU7Sqbxgi79mA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", - "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.7.0.tgz", + "integrity": "sha512-aO1Ql+izMrTnPj5aFFlEJkpD4jRqC4Gwhygu2oHK2wfVQpmOPbyDSveJ+r/NQo+PWV43M6uEAeLVbTi09dFLhg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", + "@typescript-eslint/types": "5.7.0", + "@typescript-eslint/visitor-keys": "5.7.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", "semver": "^7.3.5", "tsutils": "^3.21.0" } }, "@typescript-eslint/visitor-keys": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", - "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", + "integrity": "sha512-hdohahZ4lTFcglZSJ3DGdzxQHBSxsLVqHzkiOmKi7xVAWC4y2c1bIMKmPJSrA4aOEoRUPOKQ87Y/taC7yVHpFg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.33.0", - "eslint-visitor-keys": "^2.0.0" + "@typescript-eslint/types": "5.7.0", + "eslint-visitor-keys": "^3.0.0" + } + }, + "@yarn-tool/resolve-package": { + "version": "1.0.40", + "resolved": "https://registry.npmjs.org/@yarn-tool/resolve-package/-/resolve-package-1.0.40.tgz", + "integrity": "sha512-5kKRhGb8OCdpzuoGkb9BQw6biyY0zYesV3VyvEzRtb/cqZ7AR6o0ajR6q83jTaCJfYUaJaUPyXVOSZAUjWJQDQ==", + "dev": true, + "requires": { + "@ts-type/package-dts": "^1.0.56", + "pkg-dir": "< 6 >= 5", + "tslib": "^2.3.1", + "upath2": "^3.1.10" + }, + "dependencies": { + "pkg-dir": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", + "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", + "dev": true, + "requires": { + "find-up": "^5.0.0" + } + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } } }, "@zeit/schemas": { @@ -9666,10 +9588,10 @@ } }, "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", + "devOptional": true }, "acorn-globals": { "version": "6.0.0", @@ -9679,6 +9601,14 @@ "requires": { "acorn": "^7.1.1", "acorn-walk": "^7.1.1" + }, + "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + } } }, "acorn-jsx": { @@ -9833,12 +9763,6 @@ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -9846,16 +9770,16 @@ "dev": true }, "babel-jest": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.3.1.tgz", - "integrity": "sha512-SjIF8hh/ir0peae2D6S6ZKRhUy7q/DnpH7k/V6fT4Bgs/LXXUztOpX4G2tCgq8mLo5HA9mN6NmlFMeYtKmIsTQ==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.5.tgz", + "integrity": "sha512-3uuUTjXbgtODmSv/DXO9nZfD52IyC2OYTFaXGRzL0kpykzroaquCrD5+lZNafTvZlnNqZHt5pb0M08qVBZnsnA==", "dev": true, "requires": { - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/transform": "^27.4.5", + "@jest/types": "^27.4.2", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^27.2.0", + "babel-preset-jest": "^27.4.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "slash": "^3.0.0" @@ -9896,9 +9820,9 @@ } }, "babel-plugin-jest-hoist": { - "version": "27.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.2.0.tgz", - "integrity": "sha512-TOux9khNKdi64mW+0OIhcmbAn75tTlzKhxmiNXevQaPbrBYK7YKjP1jl6NHTJ6XR5UgUrJbCnWlKVnJn29dfjw==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.4.0.tgz", + "integrity": "sha512-Jcu7qS4OX5kTWBc45Hz7BMmgXuJqRnhatqpUhnzGC3OBYpOmf2tv6jFNwZpwM7wU7MUuv2r9IPS/ZlYOuburVw==", "dev": true, "requires": { "@babel/template": "^7.3.3", @@ -9928,12 +9852,12 @@ } }, "babel-preset-jest": { - "version": "27.2.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.2.0.tgz", - "integrity": "sha512-z7MgQ3peBwN5L5aCqBKnF6iqdlvZvFUQynEhu0J+X9nHLU72jO3iY331lcYrg+AssJ8q7xsv5/3AICzVmJ/wvg==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.4.0.tgz", + "integrity": "sha512-NK4jGYpnBvNxcGo7/ZpZJr51jCGT+3bwwpVIDY2oNfTxJJldRtB4VAcYdgp1loDE50ODuTu+yBjpMAswv5tlpg==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^27.2.0", + "babel-plugin-jest-hoist": "^27.4.0", "babel-preset-current-node-syntax": "^1.0.0" } }, @@ -9985,13 +9909,13 @@ "dev": true }, "browserslist": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.5.tgz", - "integrity": "sha512-I3ekeB92mmpctWBoLXe0d5wPS2cBuRvvW0JyyJHMrk9/HmP2ZjrTboNAZ8iuGqaEIlKguljbQY32OkOJIRrgoA==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", + "integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001271", - "electron-to-chromium": "^1.3.878", + "caniuse-lite": "^1.0.30001286", + "electron-to-chromium": "^1.4.17", "escalade": "^3.1.1", "node-releases": "^2.0.1", "picocolors": "^1.0.0" @@ -10109,9 +10033,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001272", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001272.tgz", - "integrity": "sha512-DV1j9Oot5dydyH1v28g25KoVm7l8MTxazwuiH3utWiAS6iL/9Nh//TGwqFEeqqN8nnWYQ8HHhUq+o4QPt9kvYw==", + "version": "1.0.30001286", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001286.tgz", + "integrity": "sha512-zaEMRH6xg8ESMi2eQ3R4eZ5qw/hJiVsO/HlLwniIwErij0JDr9P+8V4dtx1l+kLq6j3yy8l8W4fst1lBnat5wQ==", "dev": true }, "chalk": { @@ -10419,9 +10343,9 @@ } }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -10497,9 +10421,9 @@ "dev": true }, "diff-sequences": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.0.6.tgz", - "integrity": "sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.4.0.tgz", + "integrity": "sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww==", "dev": true }, "dir-glob": { @@ -10553,9 +10477,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.882", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.882.tgz", - "integrity": "sha512-Kllt2R9+7yEIBbASR0MReJSK9TjPmHoomLbCLRP7r4SVtSy+Y0hYIhQ7LGjnMhlAyWUtGXTiznoGsaKxEH0ttw==", + "version": "1.4.18", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.18.tgz", + "integrity": "sha512-i7nKjGGBE1+YUIbfLObA1EZPmN7J1ITEllbhusDk+KIk6V6gUxN9PFe36v+Sd+8Cg0k3cgUv9lQhQZalr8rggw==", "dev": true }, "emittery": { @@ -10688,37 +10612,36 @@ } }, "eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.4.1.tgz", + "integrity": "sha512-TxU/p7LB1KxQ6+7aztTnO7K0i+h0tDi81YRY9VzB6Id71kNz+fFYnf5HD5UOQmxkzcoa0TlVZf9dpMtUv0GpWg==", "dev": true, "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", + "@eslint/eslintrc": "^1.0.5", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", + "eslint-scope": "^7.1.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.2.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", + "glob-parent": "^6.0.1", "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", @@ -10726,24 +10649,14 @@ "natural-compare": "^1.4.0", "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^3.1.0", + "regexpp": "^3.2.0", "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -10761,39 +10674,37 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "eslint-scope": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" } }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "is-glob": "^4.0.3" } }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -10856,31 +10767,31 @@ "dev": true, "requires": { "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } } }, "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", "dev": true }, "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.2.0.tgz", + "integrity": "sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==", "dev": true, "requires": { - "acorn": "^7.4.0", + "acorn": "^8.6.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } + "eslint-visitor-keys": "^3.1.0" } }, "esprima": { @@ -10963,17 +10874,17 @@ "dev": true }, "expect": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.3.1.tgz", - "integrity": "sha512-MrNXV2sL9iDRebWPGOGFdPQRl2eDQNu/uhxIMShjjx74T6kC6jFIkmQ6OqXDtevjGUkyB2IT56RzDBqXf/QPCg==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-27.4.2.tgz", + "integrity": "sha512-BjAXIDC6ZOW+WBFNg96J22D27Nq5ohn+oGcuP2rtOtcjuxNoV9McpQ60PcQWhdFOSBIQdR72e+4HdnbZTFSTyg==", "dev": true, "requires": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "ansi-styles": "^5.0.0", - "jest-get-type": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-regex-util": "^27.0.6" + "jest-get-type": "^27.4.0", + "jest-matcher-utils": "^27.4.2", + "jest-message-util": "^27.4.2", + "jest-regex-util": "^27.4.0" }, "dependencies": { "ansi-styles": { @@ -11055,9 +10966,9 @@ } }, "fflate": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.1.tgz", - "integrity": "sha512-VYM2Xy1gSA5MerKzCnmmuV2XljkpKwgJBKezW+495TTnTCh1x5HcYa1aH8wRU/MfTGhW4ziXqgwprgQUVl3Ohw==" + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.2.tgz", + "integrity": "sha512-h/YiXnc37yYaGe61h3A4ZdsBzBqKG5hhrmopFizTru8xrfOiJuYX5oLnatBwNEpf9biOJrZVscuEQsUzIUAhpQ==" }, "figgy-pudding": { "version": "3.5.2", @@ -11115,11 +11026,22 @@ } }, "flatted": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", - "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", + "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", "dev": true }, + "form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "fp-and-or": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/fp-and-or/-/fp-and-or-0.1.3.tgz", @@ -11411,9 +11333,9 @@ } }, "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", + "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", "dev": true }, "ignore-walk": { @@ -11691,9 +11613,9 @@ } }, "istanbul-reports": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.5.tgz", - "integrity": "sha512-5+19PlhnGabNWB7kOFnuxT8H3T/iIyQzIbQMxXsURmmvKg86P2sbkrGOT77VnHw0Qr0gc2XzRaRfMZYYbSQCJQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.1.tgz", + "integrity": "sha512-q1kvhAXWSsXfMjCdNHNPKZZv94OlspKnoGv+R9RGbnqOOQ0VbNfLFgQDVgi7hHenKsndGq3/o0OBdzDXthWcNw==", "dev": true, "requires": { "html-escaper": "^2.0.0", @@ -11701,23 +11623,23 @@ } }, "jest": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.3.1.tgz", - "integrity": "sha512-U2AX0AgQGd5EzMsiZpYt8HyZ+nSVIh5ujQ9CPp9EQZJMjXIiSZpJNweZl0swatKRoqHWgGKM3zaSwm4Zaz87ng==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.5.tgz", + "integrity": "sha512-uT5MiVN3Jppt314kidCk47MYIRilJjA/l2mxwiuzzxGUeJIvA8/pDaJOAX5KWvjAo7SCydcW0/4WEtgbLMiJkg==", "dev": true, "requires": { - "@jest/core": "^27.3.1", + "@jest/core": "^27.4.5", "import-local": "^3.0.2", - "jest-cli": "^27.3.1" + "jest-cli": "^27.4.5" } }, "jest-changed-files": { - "version": "27.3.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.3.0.tgz", - "integrity": "sha512-9DJs9garMHv4RhylUMZgbdCJ3+jHSkpL9aaVKp13xtXAD80qLTLrqcDZL1PHA9dYA0bCI86Nv2BhkLpLhrBcPg==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.4.2.tgz", + "integrity": "sha512-/9x8MjekuzUQoPjDHbBiXbNEBauhrPU2ct7m8TfCg69ywt1y/N+yYwGh3gCpnqUS3klYWDU/lSNgv+JhoD2k1A==", "dev": true, "requires": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "execa": "^5.0.0", "throat": "^6.0.1" }, @@ -11795,262 +11717,252 @@ } }, "jest-circus": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.3.1.tgz", - "integrity": "sha512-v1dsM9II6gvXokgqq6Yh2jHCpfg7ZqV4jWY66u7npz24JnhP3NHxI0sKT7+ZMQ7IrOWHYAaeEllOySbDbWsiXw==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.5.tgz", + "integrity": "sha512-eTNWa9wsvBwPykhMMShheafbwyakcdHZaEYh5iRrQ0PFJxkDP/e3U/FvzGuKWu2WpwUA3C3hPlfpuzvOdTVqnw==", "dev": true, "requires": { - "@jest/environment": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/environment": "^27.4.4", + "@jest/test-result": "^27.4.2", + "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^27.3.1", + "expect": "^27.4.2", "is-generator-fn": "^2.0.0", - "jest-each": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "pretty-format": "^27.3.1", + "jest-each": "^27.4.2", + "jest-matcher-utils": "^27.4.2", + "jest-message-util": "^27.4.2", + "jest-runtime": "^27.4.5", + "jest-snapshot": "^27.4.5", + "jest-util": "^27.4.2", + "pretty-format": "^27.4.2", "slash": "^3.0.0", "stack-utils": "^2.0.3", "throat": "^6.0.1" } }, "jest-cli": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.3.1.tgz", - "integrity": "sha512-WHnCqpfK+6EvT62me6WVs8NhtbjAS4/6vZJnk7/2+oOr50cwAzG4Wxt6RXX0hu6m1169ZGMlhYYUNeKBXCph/Q==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.5.tgz", + "integrity": "sha512-hrky3DSgE0u7sQxaCL7bdebEPHx5QzYmrGuUjaPLmPE8jx5adtvGuOlRspvMoVLTTDOHRnZDoRLYJuA+VCI7Hg==", "dev": true, "requires": { - "@jest/core": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/core": "^27.4.5", + "@jest/test-result": "^27.4.2", + "@jest/types": "^27.4.2", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", - "jest-config": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", + "jest-config": "^27.4.5", + "jest-util": "^27.4.2", + "jest-validate": "^27.4.2", "prompts": "^2.0.1", "yargs": "^16.2.0" } }, "jest-config": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.3.1.tgz", - "integrity": "sha512-KY8xOIbIACZ/vdYCKSopL44I0xboxC751IX+DXL2+Wx6DKNycyEfV3rryC3BPm5Uq/BBqDoMrKuqLEUNJmMKKg==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.5.tgz", + "integrity": "sha512-t+STVJtPt+fpqQ8GBw850NtSQbnDOw/UzdPfzDaHQ48/AylQlW7LHj3dH+ndxhC1UxJ0Q3qkq7IH+nM1skwTwA==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^27.3.1", - "@jest/types": "^27.2.5", - "babel-jest": "^27.3.1", + "@jest/test-sequencer": "^27.4.5", + "@jest/types": "^27.4.2", + "babel-jest": "^27.4.5", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-circus": "^27.3.1", - "jest-environment-jsdom": "^27.3.1", - "jest-environment-node": "^27.3.1", - "jest-get-type": "^27.3.1", - "jest-jasmine2": "^27.3.1", - "jest-regex-util": "^27.0.6", - "jest-resolve": "^27.3.1", - "jest-runner": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", + "jest-circus": "^27.4.5", + "jest-environment-jsdom": "^27.4.4", + "jest-environment-node": "^27.4.4", + "jest-get-type": "^27.4.0", + "jest-jasmine2": "^27.4.5", + "jest-regex-util": "^27.4.0", + "jest-resolve": "^27.4.5", + "jest-runner": "^27.4.5", + "jest-util": "^27.4.2", + "jest-validate": "^27.4.2", "micromatch": "^4.0.4", - "pretty-format": "^27.3.1" + "pretty-format": "^27.4.2", + "slash": "^3.0.0" }, "dependencies": { "ci-info": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.2.0.tgz", - "integrity": "sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", "dev": true } } }, "jest-diff": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.3.1.tgz", - "integrity": "sha512-PCeuAH4AWUo2O5+ksW4pL9v5xJAcIKPUPfIhZBcG1RKv/0+dvaWTQK1Nrau8d67dp65fOqbeMdoil+6PedyEPQ==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.2.tgz", + "integrity": "sha512-ujc9ToyUZDh9KcqvQDkk/gkbf6zSaeEg9AiBxtttXW59H/AcqEYp1ciXAtJp+jXWva5nAf/ePtSsgWwE5mqp4Q==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^27.0.6", - "jest-get-type": "^27.3.1", - "pretty-format": "^27.3.1" + "diff-sequences": "^27.4.0", + "jest-get-type": "^27.4.0", + "pretty-format": "^27.4.2" } }, "jest-docblock": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.0.6.tgz", - "integrity": "sha512-Fid6dPcjwepTFraz0YxIMCi7dejjJ/KL9FBjPYhBp4Sv1Y9PdhImlKZqYU555BlN4TQKaTc+F2Av1z+anVyGkA==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.4.0.tgz", + "integrity": "sha512-7TBazUdCKGV7svZ+gh7C8esAnweJoG+SvcF6Cjqj4l17zA2q1cMwx2JObSioubk317H+cjcHgP+7fTs60paulg==", "dev": true, "requires": { "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.3.1.tgz", - "integrity": "sha512-E4SwfzKJWYcvOYCjOxhZcxwL+AY0uFMvdCOwvzgutJiaiodFjkxQQDxHm8FQBeTqDnSmKsQWn7ldMRzTn2zJaQ==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.4.2.tgz", + "integrity": "sha512-53V2MNyW28CTruB3lXaHNk6PkiIFuzdOC9gR3C6j8YE/ACfrPnz+slB0s17AgU1TtxNzLuHyvNlLJ+8QYw9nBg==", "dev": true, "requires": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "chalk": "^4.0.0", - "jest-get-type": "^27.3.1", - "jest-util": "^27.3.1", - "pretty-format": "^27.3.1" + "jest-get-type": "^27.4.0", + "jest-util": "^27.4.2", + "pretty-format": "^27.4.2" } }, "jest-environment-jsdom": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.3.1.tgz", - "integrity": "sha512-3MOy8qMzIkQlfb3W1TfrD7uZHj+xx8Olix5vMENkj5djPmRqndMaXtpnaZkxmxM+Qc3lo+yVzJjzuXbCcZjAlg==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.4.tgz", + "integrity": "sha512-cYR3ndNfHBqQgFvS1RL7dNqSvD//K56j/q1s2ygNHcfTCAp12zfIromO1w3COmXrxS8hWAh7+CmZmGCIoqGcGA==", "dev": true, "requires": { - "@jest/environment": "^27.3.1", - "@jest/fake-timers": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/environment": "^27.4.4", + "@jest/fake-timers": "^27.4.2", + "@jest/types": "^27.4.2", "@types/node": "*", - "jest-mock": "^27.3.0", - "jest-util": "^27.3.1", + "jest-mock": "^27.4.2", + "jest-util": "^27.4.2", "jsdom": "^16.6.0" } }, "jest-environment-node": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.3.1.tgz", - "integrity": "sha512-T89F/FgkE8waqrTSA7/ydMkcc52uYPgZZ6q8OaZgyiZkJb5QNNCF6oPZjH9IfPFfcc9uBWh1574N0kY0pSvTXw==", + "version": "27.4.4", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.4.tgz", + "integrity": "sha512-D+v3lbJ2GjQTQR23TK0kY3vFVmSeea05giInI41HHOaJnAwOnmUHTZgUaZL+VxUB43pIzoa7PMwWtCVlIUoVoA==", "dev": true, "requires": { - "@jest/environment": "^27.3.1", - "@jest/fake-timers": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/environment": "^27.4.4", + "@jest/fake-timers": "^27.4.2", + "@jest/types": "^27.4.2", "@types/node": "*", - "jest-mock": "^27.3.0", - "jest-util": "^27.3.1" + "jest-mock": "^27.4.2", + "jest-util": "^27.4.2" } }, "jest-get-type": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.3.1.tgz", - "integrity": "sha512-+Ilqi8hgHSAdhlQ3s12CAVNd8H96ZkQBfYoXmArzZnOfAtVAJEiPDBirjByEblvG/4LPJmkL+nBqPO3A1YJAEg==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.4.0.tgz", + "integrity": "sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ==", "dev": true }, "jest-haste-map": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.3.1.tgz", - "integrity": "sha512-lYfNZIzwPccDJZIyk9Iz5iQMM/MH56NIIcGj7AFU1YyA4ewWFBl8z+YPJuSCRML/ee2cCt2y3W4K3VXPT6Nhzg==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.5.tgz", + "integrity": "sha512-oJm1b5qhhPs78K24EDGifWS0dELYxnoBiDhatT/FThgB9yxqUm5F6li3Pv+Q+apMBmmPNzOBnZ7ZxWMB1Leq1Q==", "dev": true, "requires": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "@types/graceful-fs": "^4.1.2", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "fsevents": "^2.3.2", "graceful-fs": "^4.2.4", - "jest-regex-util": "^27.0.6", - "jest-serializer": "^27.0.6", - "jest-util": "^27.3.1", - "jest-worker": "^27.3.1", + "jest-regex-util": "^27.4.0", + "jest-serializer": "^27.4.0", + "jest-util": "^27.4.2", + "jest-worker": "^27.4.5", "micromatch": "^4.0.4", "walker": "^1.0.7" } }, "jest-jasmine2": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.3.1.tgz", - "integrity": "sha512-WK11ZUetDQaC09w4/j7o4FZDUIp+4iYWH/Lik34Pv7ukL+DuXFGdnmmi7dT58J2ZYKFB5r13GyE0z3NPeyJmsg==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.5.tgz", + "integrity": "sha512-oUnvwhJDj2LhOiUB1kdnJjkx8C5PwgUZQb9urF77mELH9DGR4e2GqpWQKBOYXWs5+uTN9BGDqRz3Aeg5Wts7aw==", "dev": true, "requires": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^27.3.1", - "@jest/source-map": "^27.0.6", - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/environment": "^27.4.4", + "@jest/source-map": "^27.4.0", + "@jest/test-result": "^27.4.2", + "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^27.3.1", + "expect": "^27.4.2", "is-generator-fn": "^2.0.0", - "jest-each": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "pretty-format": "^27.3.1", + "jest-each": "^27.4.2", + "jest-matcher-utils": "^27.4.2", + "jest-message-util": "^27.4.2", + "jest-runtime": "^27.4.5", + "jest-snapshot": "^27.4.5", + "jest-util": "^27.4.2", + "pretty-format": "^27.4.2", "throat": "^6.0.1" } }, "jest-leak-detector": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.3.1.tgz", - "integrity": "sha512-78QstU9tXbaHzwlRlKmTpjP9k4Pvre5l0r8Spo4SbFFVy/4Abg9I6ZjHwjg2QyKEAMg020XcjP+UgLZIY50yEg==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.4.2.tgz", + "integrity": "sha512-ml0KvFYZllzPBJWDei3mDzUhyp/M4ubKebX++fPaudpe8OsxUE+m+P6ciVLboQsrzOCWDjE20/eXew9QMx/VGw==", "dev": true, "requires": { - "jest-get-type": "^27.3.1", - "pretty-format": "^27.3.1" + "jest-get-type": "^27.4.0", + "pretty-format": "^27.4.2" } }, "jest-matcher-utils": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.3.1.tgz", - "integrity": "sha512-hX8N7zXS4k+8bC1Aj0OWpGb7D3gIXxYvPNK1inP5xvE4ztbz3rc4AkI6jGVaerepBnfWB17FL5lWFJT3s7qo8w==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.2.tgz", + "integrity": "sha512-jyP28er3RRtMv+fmYC/PKG8wvAmfGcSNproVTW2Y0P/OY7/hWUOmsPfxN1jOhM+0u2xU984u2yEagGivz9OBGQ==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^27.3.1", - "jest-get-type": "^27.3.1", - "pretty-format": "^27.3.1" + "jest-diff": "^27.4.2", + "jest-get-type": "^27.4.0", + "pretty-format": "^27.4.2" } }, "jest-message-util": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.3.1.tgz", - "integrity": "sha512-bh3JEmxsTZ/9rTm0jQrPElbY2+y48Rw2t47uMfByNyUVR+OfPh4anuyKsGqsNkXk/TI4JbLRZx+7p7Hdt6q1yg==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.2.tgz", + "integrity": "sha512-OMRqRNd9E0DkBLZpFtZkAGYOXl6ZpoMtQJWTAREJKDOFa0M6ptB7L67tp+cszMBkvSgKOhNtQp2Vbcz3ZZKo/w==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "micromatch": "^4.0.4", - "pretty-format": "^27.3.1", + "pretty-format": "^27.4.2", "slash": "^3.0.0", "stack-utils": "^2.0.3" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.15.8", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.15.8.tgz", - "integrity": "sha512-2IAnmn8zbvC/jKYhq5Ki9I+DwjlrtMPUCH/CpHvqI4dNnlwHwsxoIhlc8WcYY5LSYknXQtAlFYuHfqAFCvQ4Wg==", - "dev": true, - "requires": { - "@babel/highlight": "^7.14.5" - } - } } }, "jest-mock": { - "version": "27.3.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.3.0.tgz", - "integrity": "sha512-ziZiLk0elZOQjD08bLkegBzv5hCABu/c8Ytx45nJKkysQwGaonvmTxwjLqEA4qGdasq9o2I8/HtdGMNnVsMTGw==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.4.2.tgz", + "integrity": "sha512-PDDPuyhoukk20JrQKeofK12hqtSka7mWH0QQuxSNgrdiPsrnYYLS6wbzu/HDlxZRzji5ylLRULeuI/vmZZDrYA==", "dev": true, "requires": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "@types/node": "*" } }, @@ -12062,83 +11974,83 @@ "requires": {} }, "jest-regex-util": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.0.6.tgz", - "integrity": "sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.4.0.tgz", + "integrity": "sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg==", "dev": true }, "jest-resolve": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.3.1.tgz", - "integrity": "sha512-Dfzt25CFSPo3Y3GCbxynRBZzxq9AdyNN+x/v2IqYx6KVT5Z6me2Z/PsSGFSv3cOSUZqJ9pHxilao/I/m9FouLw==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.5.tgz", + "integrity": "sha512-xU3z1BuOz/hUhVUL+918KqUgK+skqOuUsAi7A+iwoUldK6/+PW+utK8l8cxIWT9AW7IAhGNXjSAh1UYmjULZZw==", "dev": true, "requires": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", + "jest-haste-map": "^27.4.5", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", + "jest-util": "^27.4.2", + "jest-validate": "^27.4.2", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" } }, "jest-resolve-dependencies": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.3.1.tgz", - "integrity": "sha512-X7iLzY8pCiYOnvYo2YrK3P9oSE8/3N2f4pUZMJ8IUcZnT81vlSonya1KTO9ZfKGuC+svE6FHK/XOb8SsoRUV1A==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.5.tgz", + "integrity": "sha512-elEVvkvRK51y037NshtEkEnukMBWvlPzZHiL847OrIljJ8yIsujD2GXRPqDXC4rEVKbcdsy7W0FxoZb4WmEs7w==", "dev": true, "requires": { - "@jest/types": "^27.2.5", - "jest-regex-util": "^27.0.6", - "jest-snapshot": "^27.3.1" + "@jest/types": "^27.4.2", + "jest-regex-util": "^27.4.0", + "jest-snapshot": "^27.4.5" } }, "jest-runner": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.3.1.tgz", - "integrity": "sha512-r4W6kBn6sPr3TBwQNmqE94mPlYVn7fLBseeJfo4E2uCTmAyDFm2O5DYAQAFP7Q3YfiA/bMwg8TVsciP7k0xOww==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.5.tgz", + "integrity": "sha512-/irauncTfmY1WkTaRQGRWcyQLzK1g98GYG/8QvIPviHgO1Fqz1JYeEIsSfF+9mc/UTA6S+IIHFgKyvUrtiBIZg==", "dev": true, "requires": { - "@jest/console": "^27.3.1", - "@jest/environment": "^27.3.1", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/console": "^27.4.2", + "@jest/environment": "^27.4.4", + "@jest/test-result": "^27.4.2", + "@jest/transform": "^27.4.5", + "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.8.1", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-docblock": "^27.0.6", - "jest-environment-jsdom": "^27.3.1", - "jest-environment-node": "^27.3.1", - "jest-haste-map": "^27.3.1", - "jest-leak-detector": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-resolve": "^27.3.1", - "jest-runtime": "^27.3.1", - "jest-util": "^27.3.1", - "jest-worker": "^27.3.1", + "jest-docblock": "^27.4.0", + "jest-environment-jsdom": "^27.4.4", + "jest-environment-node": "^27.4.4", + "jest-haste-map": "^27.4.5", + "jest-leak-detector": "^27.4.2", + "jest-message-util": "^27.4.2", + "jest-resolve": "^27.4.5", + "jest-runtime": "^27.4.5", + "jest-util": "^27.4.2", + "jest-worker": "^27.4.5", "source-map-support": "^0.5.6", "throat": "^6.0.1" } }, "jest-runtime": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.3.1.tgz", - "integrity": "sha512-qtO6VxPbS8umqhEDpjA4pqTkKQ1Hy4ZSi9mDVeE9Za7LKBo2LdW2jmT+Iod3XFaJqINikZQsn2wEi0j9wPRbLg==", - "dev": true, - "requires": { - "@jest/console": "^27.3.1", - "@jest/environment": "^27.3.1", - "@jest/globals": "^27.3.1", - "@jest/source-map": "^27.0.6", - "@jest/test-result": "^27.3.1", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.5.tgz", + "integrity": "sha512-CIYqwuJQXHQtPd/idgrx4zgJ6iCb6uBjQq1RSAGQrw2S8XifDmoM1Ot8NRd80ooAm+ZNdHVwsktIMGlA1F1FAQ==", + "dev": true, + "requires": { + "@jest/console": "^27.4.2", + "@jest/environment": "^27.4.4", + "@jest/globals": "^27.4.4", + "@jest/source-map": "^27.4.0", + "@jest/test-result": "^27.4.2", + "@jest/transform": "^27.4.5", + "@jest/types": "^27.4.2", "@types/yargs": "^16.0.0", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", @@ -12147,14 +12059,14 @@ "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-mock": "^27.3.0", - "jest-regex-util": "^27.0.6", - "jest-resolve": "^27.3.1", - "jest-snapshot": "^27.3.1", - "jest-util": "^27.3.1", - "jest-validate": "^27.3.1", + "jest-haste-map": "^27.4.5", + "jest-message-util": "^27.4.2", + "jest-mock": "^27.4.2", + "jest-regex-util": "^27.4.0", + "jest-resolve": "^27.4.5", + "jest-snapshot": "^27.4.5", + "jest-util": "^27.4.2", + "jest-validate": "^27.4.2", "slash": "^3.0.0", "strip-bom": "^4.0.0", "yargs": "^16.2.0" @@ -12233,9 +12145,9 @@ } }, "jest-serializer": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.0.6.tgz", - "integrity": "sha512-PtGdVK9EGC7dsaziskfqaAPib6wTViY3G8E5wz9tLVPhHyiDNTZn/xjZ4khAw+09QkoOVpn7vF5nPSN6dtBexA==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.4.0.tgz", + "integrity": "sha512-RDhpcn5f1JYTX2pvJAGDcnsNTnsV9bjYPU8xcV+xPwOXnUPOQwf4ZEuiU6G9H1UztH+OapMgu/ckEVwO87PwnQ==", "dev": true, "requires": { "@types/node": "*", @@ -12243,9 +12155,9 @@ } }, "jest-snapshot": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.3.1.tgz", - "integrity": "sha512-APZyBvSgQgOT0XumwfFu7X3G5elj6TGhCBLbBdn3R1IzYustPGPE38F51dBWMQ8hRXa9je0vAdeVDtqHLvB6lg==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.5.tgz", + "integrity": "sha512-eCi/iM1YJFrJWiT9de4+RpWWWBqsHiYxFG9V9o/n0WXs6GpW4lUt4FAHAgFPTLPqCUVzrMQmSmTZSgQzwqR7IQ==", "dev": true, "requires": { "@babel/core": "^7.7.2", @@ -12254,33 +12166,33 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.0.0", - "@jest/transform": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/transform": "^27.4.5", + "@jest/types": "^27.4.2", "@types/babel__traverse": "^7.0.4", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^27.3.1", + "expect": "^27.4.2", "graceful-fs": "^4.2.4", - "jest-diff": "^27.3.1", - "jest-get-type": "^27.3.1", - "jest-haste-map": "^27.3.1", - "jest-matcher-utils": "^27.3.1", - "jest-message-util": "^27.3.1", - "jest-resolve": "^27.3.1", - "jest-util": "^27.3.1", + "jest-diff": "^27.4.2", + "jest-get-type": "^27.4.0", + "jest-haste-map": "^27.4.5", + "jest-matcher-utils": "^27.4.2", + "jest-message-util": "^27.4.2", + "jest-resolve": "^27.4.5", + "jest-util": "^27.4.2", "natural-compare": "^1.4.0", - "pretty-format": "^27.3.1", + "pretty-format": "^27.4.2", "semver": "^7.3.2" } }, "jest-util": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.3.1.tgz", - "integrity": "sha512-8fg+ifEH3GDryLQf/eKZck1DEs2YuVPBCMOaHQxVVLmQwl/CDhWzrvChTX4efLZxGrw+AA0mSXv78cyytBt/uw==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.4.2.tgz", + "integrity": "sha512-YuxxpXU6nlMan9qyLuxHaMMOzXAl5aGZWCSzben5DhLHemYQxCc4YK+4L3ZrCutT8GPQ+ui9k5D8rUJoDioMnA==", "dev": true, "requires": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -12289,46 +12201,46 @@ }, "dependencies": { "ci-info": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.2.0.tgz", - "integrity": "sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", "dev": true } } }, "jest-validate": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.3.1.tgz", - "integrity": "sha512-3H0XCHDFLA9uDII67Bwi1Vy7AqwA5HqEEjyy934lgVhtJ3eisw6ShOF1MDmRPspyikef5MyExvIm0/TuLzZ86Q==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.4.2.tgz", + "integrity": "sha512-hWYsSUej+Fs8ZhOm5vhWzwSLmVaPAxRy+Mr+z5MzeaHm9AxUpXdoVMEW4R86y5gOobVfBsMFLk4Rb+QkiEpx1A==", "dev": true, "requires": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^27.3.1", + "jest-get-type": "^27.4.0", "leven": "^3.1.0", - "pretty-format": "^27.3.1" + "pretty-format": "^27.4.2" } }, "jest-watcher": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.3.1.tgz", - "integrity": "sha512-9/xbV6chABsGHWh9yPaAGYVVKurWoP3ZMCv6h+O1v9/+pkOroigs6WzZ0e9gLP/njokUwM7yQhr01LKJVMkaZA==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.4.2.tgz", + "integrity": "sha512-NJvMVyyBeXfDezhWzUOCOYZrUmkSCiatpjpm+nFUid74OZEHk6aMLrZAukIiFDwdbqp6mTM6Ui1w4oc+8EobQg==", "dev": true, "requires": { - "@jest/test-result": "^27.3.1", - "@jest/types": "^27.2.5", + "@jest/test-result": "^27.4.2", + "@jest/types": "^27.4.2", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^27.3.1", + "jest-util": "^27.4.2", "string-length": "^4.0.1" } }, "jest-worker": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.3.1.tgz", - "integrity": "sha512-ks3WCzsiZaOPJl/oMsDjaf0TRiSv7ctNgs0FqRr2nARsovz6AWWy4oLElwcquGSz692DzgZQrCLScPNs5YlC4g==", + "version": "27.4.5", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.5.tgz", + "integrity": "sha512-f2s8kEdy15cv9r7q4KkzGXvlY0JTcmCbMHZBfSQDwW77REr45IDWwd0lksDFeVHH2jJ5pqb90T77XscrjeGzzg==", "dev": true, "requires": { "@types/node": "*", @@ -12400,42 +12312,6 @@ "whatwg-url": "^8.5.0", "ws": "^7.4.6", "xml-name-validator": "^3.0.0" - }, - "dependencies": { - "acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", - "dev": true - }, - "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", - "dev": true, - "requires": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.1.2" - } - } } }, "jsesc": { @@ -12624,12 +12500,6 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -12642,12 +12512,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", - "dev": true - }, "lowercase-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", @@ -12734,6 +12598,12 @@ "tmpl": "1.0.5" } }, + "marked": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/marked/-/marked-3.0.8.tgz", + "integrity": "sha512-0gVrAjo5m0VZSJb4rpL59K1unJAMb/hm8HRXqasD8VeC8m91ytDPMritgFSlKonfdt+rRYYpP/JfLxgIX8yoSw==", + "dev": true + }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -12756,18 +12626,18 @@ } }, "mime-db": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", - "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==", + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", "dev": true }, "mime-types": { - "version": "2.1.33", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", - "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", "dev": true, "requires": { - "mime-db": "1.50.0" + "mime-db": "1.51.0" } }, "mimic-fn": { @@ -12798,9 +12668,9 @@ "dev": true }, "minipass": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.5.tgz", - "integrity": "sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", + "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", "dev": true, "requires": { "yallist": "^4.0.0" @@ -12928,12 +12798,6 @@ "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", "dev": true }, - "node-modules-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", - "dev": true - }, "node-releases": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", @@ -13121,32 +12985,6 @@ "mimic-fn": "^2.1.0" } }, - "onigasm": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/onigasm/-/onigasm-2.2.5.tgz", - "integrity": "sha512-F+th54mPc0l1lp1ZcFMyL/jTs2Tlq4SqIHKIXGZOR/VkHkF9A7Fr5rRr5+ZG/lWeRsyrClLYRq7s/yFQ/XhWCA==", - "dev": true, - "requires": { - "lru-cache": "^5.1.1" - }, - "dependencies": { - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - } - } - }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -13310,6 +13148,23 @@ "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", "dev": true }, + "path-is-network-drive": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/path-is-network-drive/-/path-is-network-drive-1.0.10.tgz", + "integrity": "sha512-D6kJYPUSKGZBpTM2nv10sOWNdC056p4JDx0y7ARe6gop0aXXm5G86Gn/SyKvaf0Ce8c9Guctf+J+qoFmzuhDQg==", + "dev": true, + "requires": { + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } + } + }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", @@ -13322,6 +13177,23 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-strip-sep": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-strip-sep/-/path-strip-sep-1.0.7.tgz", + "integrity": "sha512-9xDVZPblHde4lTuTDnwqBKr9LTbPZW+Iae63ho500+BpEiZe3X6wvLInHgbB6FSMtwCTvztljw3k2zcNDNESzg==", + "dev": true, + "requires": { + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } + } + }, "path-to-regexp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", @@ -13347,13 +13219,10 @@ "dev": true }, "pirates": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", - "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", - "dev": true, - "requires": { - "node-modules-regexp": "^1.0.0" - } + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.4.tgz", + "integrity": "sha512-ZIrVPH+A52Dw84R0L3/VS9Op04PuQ2SEoJL6bkshmiTic/HldyW9Tf7oH5mhJZBK7NmDx27vSMrYEXPXclpDKw==", + "dev": true }, "pkg-dir": { "version": "4.2.0", @@ -13416,9 +13285,9 @@ "dev": true }, "prettier": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz", - "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", + "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==", "dev": true }, "prettier-linter-helpers": { @@ -13431,12 +13300,12 @@ } }, "pretty-format": { - "version": "27.3.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.3.1.tgz", - "integrity": "sha512-DR/c+pvFc52nLimLROYjnXPtolawm+uWDxr4FjuLDLUn+ktWnSN851KoHwHzzqq6rfCOjkzN8FLgDrSub6UDuA==", + "version": "27.4.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.2.tgz", + "integrity": "sha512-p0wNtJ9oLuvgOQDEIZ9zQjZffK7KtyR6Si0jnXULIDwrlNF8Cuir3AZP0hHv0jmKuNN/edOnbMjnzd4uTcmWiw==", "dev": true, "requires": { - "@jest/types": "^27.2.5", + "@jest/types": "^27.4.2", "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", "react-is": "^17.0.1" @@ -13697,9 +13566,9 @@ } }, "rollup": { - "version": "2.58.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.58.3.tgz", - "integrity": "sha512-ei27MSw1KhRur4p87Q0/Va2NAYqMXOX++FNEumMBcdreIRLURKy+cE2wcDJKBn0nfmhP2ZGrJkP1XPO+G8FJQw==", + "version": "2.61.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.61.1.tgz", + "integrity": "sha512-BbTXlEvB8d+XFbK/7E5doIcRtxWPRiqr0eb5vQ0+2paMM04Ye4PZY5nHOQef2ix24l/L0SpLd5hwcH15QHPdvA==", "requires": { "fsevents": "~2.3.2" } @@ -13728,22 +13597,23 @@ } }, "rollup-plugin-typescript2": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.30.0.tgz", - "integrity": "sha512-NUFszIQyhgDdhRS9ya/VEmsnpTe+GERDMmFo0Y+kf8ds51Xy57nPNGglJY+W6x1vcouA7Au7nsTgsLFj2I0PxQ==", + "version": "0.31.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.31.1.tgz", + "integrity": "sha512-sklqXuQwQX+stKi4kDfEkneVESPi3YM/2S899vfRdF9Yi40vcC50Oq4A4cSZJNXsAQE/UsBZl5fAOsBLziKmjw==", "dev": true, "requires": { "@rollup/pluginutils": "^4.1.0", + "@yarn-tool/resolve-package": "^1.0.36", "find-cache-dir": "^3.3.1", "fs-extra": "8.1.0", "resolve": "1.20.0", - "tslib": "2.1.0" + "tslib": "2.2.0" }, "dependencies": { "@rollup/pluginutils": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.1.tgz", - "integrity": "sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.2.tgz", + "integrity": "sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==", "dev": true, "requires": { "estree-walker": "^2.0.1", @@ -13945,20 +13815,20 @@ "dev": true }, "shiki": { - "version": "0.9.12", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.12.tgz", - "integrity": "sha512-VXcROdldv0/Qu0w2XvzU4IrvTeBNs/Kj/FCmtcEXGz7Tic/veQzliJj6tEiAgoKianhQstpYmbPDStHU5Opqcw==", + "version": "0.9.15", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.15.tgz", + "integrity": "sha512-/Y0z9IzhJ8nD9nbceORCqu6NgT9X6I8Fk8c3SICHI5NbZRLdZYFaB233gwct9sU0vvSypyaL/qaKvzyQGJBZSw==", "dev": true, "requires": { "jsonc-parser": "^3.0.0", - "onigasm": "^2.2.5", + "vscode-oniguruma": "^1.6.1", "vscode-textmate": "5.2.0" } }, "signal-exit": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", - "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", + "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==", "dev": true }, "sisteransi": { @@ -13973,17 +13843,6 @@ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - }, "smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -14164,40 +14023,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "table": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.2.tgz", - "integrity": "sha512-UFZK67uvyNivLeQbVtkiUs8Uuuxv24aSL4/Vil2PJVtMgU8Lx0CYkP12uCGa3kjyQzOSgV1+z9Wkb82fCGsO0g==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "ajv": { - "version": "8.6.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.3.tgz", - "integrity": "sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - } - } - }, "tar": { "version": "6.1.11", "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", @@ -14223,9 +14048,9 @@ } }, "terser": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.9.0.tgz", - "integrity": "sha512-h5hxa23sCdpzcye/7b8YqbE5OwKca/ni0RQz1uRX3tGh8haaGHqcuSqbGRybuAKNdntZ0mDgFNXPJ48xQ2RXKQ==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", + "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", "requires": { "commander": "^2.20.0", "source-map": "~0.7.2", @@ -14294,6 +14119,25 @@ "is-number": "^7.0.0" } }, + "tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "dev": true, + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } + } + }, "tr46": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", @@ -14312,9 +14156,9 @@ } }, "ts-jest": { - "version": "27.0.7", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.0.7.tgz", - "integrity": "sha512-O41shibMqzdafpuP+CkrOL7ykbmLh+FqQrXEmV9CydQ5JBk0Sj0uAEF5TNNe94fZWKm3yYvWa/IbyV4Yg1zK2Q==", + "version": "27.1.1", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.1.tgz", + "integrity": "sha512-Ds0VkB+cB+8g2JUmP/GKWndeZcCKrbe6jzolGrVWdqVUFByY/2KDHqxJ7yBSon7hDB1TA4PXxjfZ+JjzJisvgA==", "dev": true, "requires": { "bs-logger": "0.x", @@ -14327,10 +14171,35 @@ "yargs-parser": "20.x" } }, + "ts-toolbelt": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", + "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==", + "dev": true, + "peer": true + }, + "ts-type": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ts-type/-/ts-type-2.1.2.tgz", + "integrity": "sha512-64/2XoaipFXa/bidwXChQCSJ3VaCUVKrEaRPXiP5gLIlkPoAHfnwOMC0EWr42DsTm/+qYYuNwzxc0VQroeDs+g==", + "dev": true, + "requires": { + "tslib": "^2.3.1", + "typedarray-dts": "^1.0.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } + } + }, "tslib": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", - "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", "dev": true }, "tsutils": { @@ -14371,6 +14240,12 @@ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, + "typedarray-dts": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typedarray-dts/-/typedarray-dts-1.0.0.tgz", + "integrity": "sha512-Ka0DBegjuV9IPYFT1h0Qqk5U4pccebNIJCGl8C5uU7xtOs+jpJvKGAY4fHGK25hTmXZOEUl9Cnsg5cS6K/b5DA==", + "dev": true + }, "typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -14391,20 +14266,12 @@ "marked": "^3.0.8", "minimatch": "^3.0.4", "shiki": "^0.9.12" - }, - "dependencies": { - "marked": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/marked/-/marked-3.0.8.tgz", - "integrity": "sha512-0gVrAjo5m0VZSJb4rpL59K1unJAMb/hm8HRXqasD8VeC8m91ytDPMritgFSlKonfdt+rRYYpP/JfLxgIX8yoSw==", - "dev": true - } } }, "typescript": { - "version": "4.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", - "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz", + "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==", "dev": true }, "unique-filename": { @@ -14440,6 +14307,26 @@ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, + "upath2": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/upath2/-/upath2-3.1.10.tgz", + "integrity": "sha512-7ph3GzTaVbQX+oIoMsGtM+9BAWQr+6Mn28TJKPu28+yGpZ+J4am590CPDBlDG0zyuo9T9T7o21ciqNzwIp/q0A==", + "dev": true, + "requires": { + "lodash": "^4.17.21", + "path-is-network-drive": "^1.0.10", + "path-strip-sep": "^1.0.7", + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + } + } + }, "update-check": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.2.tgz", @@ -14544,6 +14431,12 @@ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "dev": true }, + "vscode-oniguruma": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.1.tgz", + "integrity": "sha512-vc4WhSIaVpgJ0jJIejjYxPvURJavX6QG41vu0mGhqywMkQqulezEqEQ3cO3gc8GvcOpX6ycmKGqRoROEMBNXTQ==", + "dev": true + }, "vscode-textmate": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", @@ -14683,9 +14576,9 @@ } }, "ws": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz", - "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", + "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", "dev": true, "requires": {} }, diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index 3ed517a9..6ba14e0d 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -17,15 +17,15 @@ }, "devDependencies": { "@rollup/plugin-replace": "^3.0.0", - "@typescript-eslint/eslint-plugin": "^4.33.0", - "@typescript-eslint/parser": "^4.33.0", - "eslint": "^7.32.0", + "@typescript-eslint/eslint-plugin": "^5.7.0", + "@typescript-eslint/parser": "^5.7.0", + "eslint": "^8.4.1", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.4.1", - "rollup": "^2.58.0", - "rollup-plugin-typescript2": "^0.30.0", - "typescript": "^4.4.3" + "prettier": "^2.5.1", + "rollup": "^2.61.1", + "rollup-plugin-typescript2": "^0.31.1", + "typescript": "^4.5.4" }, "dependencies": { "@sora/go-wasm": "^2021.1.0" diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 6b9449a1..4b7759e6 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -8,25 +8,25 @@ "test": "jest --detectOpenHandles --forceExit" }, "devDependencies": { - "@rollup/plugin-commonjs": "^21.0.0", - "@rollup/plugin-node-resolve": "^13.0.5", + "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-node-resolve": "^13.1.1", "@rollup/plugin-replace": "^3.0.0", - "@types/jest": "^27.0.2", - "@typescript-eslint/eslint-plugin": "4.33.0", - "@typescript-eslint/parser": "4.33.0", - "eslint": "7.32.0", + "@types/jest": "^27.0.3", + "@typescript-eslint/eslint-plugin": "5.7.0", + "@typescript-eslint/parser": "5.7.0", + "eslint": "8.4.1", "eslint-config-prettier": "8.3.0", "eslint-plugin-prettier": "4.0.0", - "jest": "^27.2.4", - "prettier": "^2.4.1", - "rollup": "^2.58.0", - "rollup-plugin-typescript2": "^0.30.0", - "ts-jest": "^27.0.5", - "typescript": "^4.4.3" + "jest": "^27.4.5", + "prettier": "^2.5.1", + "rollup": "^2.61.1", + "rollup-plugin-typescript2": "^0.31.1", + "ts-jest": "^27.1.1", + "typescript": "^4.5.4" }, "dependencies": { "@sora/e2ee": "^2021.1.0", - "fflate": "^0.7.1", + "fflate": "^0.7.2", "rollup-plugin-terser": "^7.0.2" } } From d412ea19315201fad2e49cadf8b0492d6a009e16 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Thu, 16 Dec 2021 14:09:19 +0900 Subject: [PATCH 02/86] =?UTF-8?q?event=20data=20=E3=81=AE=20type=20?= =?UTF-8?q?=E3=81=8C=20any=20=E3=81=AB=E5=A4=89=E6=9B=B4=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=9F=E3=81=AE=E3=81=A7=E5=AF=BE=E5=BF=9C=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/src/base.ts | 85 ++++++++++++++++++++-------------- packages/sdk/src/publisher.ts | 2 +- packages/sdk/src/subscriber.ts | 6 ++- packages/sdk/src/utils.ts | 11 +++++ 4 files changed, 67 insertions(+), 37 deletions(-) diff --git a/packages/sdk/src/base.ts b/packages/sdk/src/base.ts index 1af9a142..04fc51b8 100644 --- a/packages/sdk/src/base.ts +++ b/packages/sdk/src/base.ts @@ -12,6 +12,7 @@ import { getSignalingNotifyAuthnMetadata, getSignalingNotifyData, isSafari, + parseDataChannelEventData, trace, } from "./utils"; import { @@ -1101,6 +1102,9 @@ export default class ConnectionBase { this.signalingOnMessageE2EE(event.data); return; } + if (typeof event.data !== "string") { + throw new Error("Received invalid signaling data"); + } const message = JSON.parse(event.data) as SignalingMessage; if (message.type == "offer") { this.writeWebSocketSignalingLog("onmessage-offer", message); @@ -1851,7 +1855,7 @@ export default class ConnectionBase { } const reports = await this.pc.getStats(); reports.forEach((s) => { - stats.push(s); + stats.push(s as RTCStatsReport); }); return stats; } @@ -1900,14 +1904,15 @@ export default class ConnectionBase { if (dataChannelEvent.channel.label === "signaling") { dataChannelEvent.channel.onmessage = async (event): Promise => { const channel = event.currentTarget as RTCDataChannel; - let data = event.data as string; - if ( - this.signalingOfferMessageDataChannels.signaling && - this.signalingOfferMessageDataChannels.signaling.compress === true - ) { - const unzlibMessage = unzlibSync(new Uint8Array(event.data)); - data = new TextDecoder().decode(unzlibMessage); + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn( + `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist` + ); + return; } + const data = parseDataChannelEventData(event.data, dataChannelSettings.compress); const message = JSON.parse(data) as SignalingMessage; this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message); if (message.type === "re-offer") { @@ -1917,14 +1922,15 @@ export default class ConnectionBase { } else if (dataChannelEvent.channel.label === "notify") { dataChannelEvent.channel.onmessage = (event): void => { const channel = event.currentTarget as RTCDataChannel; - let data = event.data as string; - if ( - this.signalingOfferMessageDataChannels.notify && - this.signalingOfferMessageDataChannels.notify.compress === true - ) { - const unzlibMessage = unzlibSync(new Uint8Array(event.data)); - data = new TextDecoder().decode(unzlibMessage); + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn( + `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist` + ); + return; } + const data = parseDataChannelEventData(event.data, dataChannelSettings.compress); const message = JSON.parse(data) as SignalingNotifyMessage; if (message.event_type === "connection.created") { this.writeDataChannelTimelineLog("notify-connection.created", channel, message); @@ -1935,14 +1941,16 @@ export default class ConnectionBase { }; } else if (dataChannelEvent.channel.label === "push") { dataChannelEvent.channel.onmessage = (event): void => { - let data = event.data as string; - if ( - this.signalingOfferMessageDataChannels.push && - this.signalingOfferMessageDataChannels.push.compress === true - ) { - const unzlibMessage = unzlibSync(new Uint8Array(event.data)); - data = new TextDecoder().decode(unzlibMessage); + const channel = event.currentTarget as RTCDataChannel; + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn( + `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist` + ); + return; } + const data = parseDataChannelEventData(event.data, dataChannelSettings.compress); const message = JSON.parse(data) as SignalingPushMessage; this.callbacks.push(message, "datachannel"); }; @@ -1955,14 +1963,16 @@ export default class ConnectionBase { }; } else if (dataChannelEvent.channel.label === "stats") { dataChannelEvent.channel.onmessage = async (event): Promise => { - let data = event.data as string; - if ( - this.signalingOfferMessageDataChannels.stats && - this.signalingOfferMessageDataChannels.stats.compress === true - ) { - const unzlibMessage = unzlibSync(new Uint8Array(event.data)); - data = new TextDecoder().decode(unzlibMessage); + const channel = event.currentTarget as RTCDataChannel; + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn( + `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist` + ); + return; } + const data = parseDataChannelEventData(event.data, dataChannelSettings.compress); const message = JSON.parse(data) as SignalingReqStatsMessage; if (message.type === "req-stats") { const stats = await this.getStats(); @@ -1971,14 +1981,21 @@ export default class ConnectionBase { }; } else if (/^#.*/.exec(dataChannelEvent.channel.label)) { dataChannelEvent.channel.onmessage = (event): void => { - if (event.target === null) { + if (event.currentTarget === null) { + return; + } + const channel = event.currentTarget as RTCDataChannel; + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn( + `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist` + ); return; } - const dataChannel = event.target as RTCDataChannel; let data = event.data as ArrayBuffer; - const settings = this.signalingOfferMessageDataChannels[dataChannel.label]; - if (settings !== undefined && settings.compress === true) { - data = unzlibSync(new Uint8Array(event.data)).buffer; + if (dataChannelSettings.compress === true) { + data = unzlibSync(new Uint8Array(data)).buffer; } this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data)); }; diff --git a/packages/sdk/src/publisher.ts b/packages/sdk/src/publisher.ts index 9e8ba5e3..bbd9236f 100644 --- a/packages/sdk/src/publisher.ts +++ b/packages/sdk/src/publisher.ts @@ -118,7 +118,7 @@ export default class ConnectionPublisher extends ConnectionBase { this.callbacks.removetrack(event); if (event.target) { // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す - const index = this.remoteConnectionIds.indexOf(event.target.id); + const index = this.remoteConnectionIds.indexOf(event.target.id as string); if (-1 < index) { delete this.remoteConnectionIds[index]; // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す diff --git a/packages/sdk/src/subscriber.ts b/packages/sdk/src/subscriber.ts index a9d938ef..625a8a93 100644 --- a/packages/sdk/src/subscriber.ts +++ b/packages/sdk/src/subscriber.ts @@ -82,7 +82,8 @@ export default class ConnectionSubscriber extends ConnectionBase { this.callbacks.removetrack(event); if (event.target) { // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す - const index = this.remoteConnectionIds.indexOf(event.target.id); + const targetId = event.target.id as string; + const index = this.remoteConnectionIds.indexOf(targetId); if (-1 < index) { delete this.remoteConnectionIds[index]; // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す @@ -147,7 +148,8 @@ export default class ConnectionSubscriber extends ConnectionBase { this.callbacks.removetrack(event); if (event.target) { // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す - const index = this.remoteConnectionIds.indexOf(event.target.id); + const targetId = event.target.id as string; + const index = this.remoteConnectionIds.indexOf(targetId); if (-1 < index) { delete this.remoteConnectionIds[index]; // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す diff --git a/packages/sdk/src/utils.ts b/packages/sdk/src/utils.ts index 7989c98b..147f5774 100644 --- a/packages/sdk/src/utils.ts +++ b/packages/sdk/src/utils.ts @@ -1,3 +1,5 @@ +import { unzlibSync } from "fflate"; + import { ConnectionOptions, Browser, @@ -344,6 +346,7 @@ export function trace(clientId: string | null, title: string, value: unknown): v if (record && typeof record === "object") { let keys = null; try { + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument keys = Object.keys(JSON.parse(JSON.stringify(record))); } catch (_) { // 何もしない @@ -445,3 +448,11 @@ export function createDataChannelEvent(channel: DataChannelConfiguration): DataC event.datachannel = channel; return event; } + +export function parseDataChannelEventData(eventData: unknown, compress: boolean): string { + if (compress) { + const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array)); + return new TextDecoder().decode(unzlibMessage); + } + return eventData as string; +} From 99f36d97edddcf25e70319a9e8d165cb66fc0084 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Thu, 16 Dec 2021 15:06:26 +0900 Subject: [PATCH 03/86] =?UTF-8?q?rollup-plugin-typescript2=20=E3=81=8B?= =?UTF-8?q?=E3=82=89=20@rollup/plugin-typescript=20=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 448 +++------------------------------ packages/e2ee/package.json | 2 +- packages/e2ee/rollup.config.js | 2 +- packages/e2ee/tsconfig.json | 3 +- packages/sdk/package.json | 2 +- packages/sdk/rollup.config.js | 2 +- packages/sdk/tsconfig.json | 3 +- 7 files changed, 47 insertions(+), 415 deletions(-) diff --git a/package-lock.json b/package-lock.json index 33539c89..b946adac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1186,6 +1186,24 @@ "rollup": "^1.20.0 || ^2.0.0" } }, + "node_modules/@rollup/plugin-typescript": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.0.tgz", + "integrity": "sha512-I5FpSvLbtAdwJ+naznv+B4sjXZUcIvLLceYpITAn7wAP8W0wqc5noLdGIp9HGVntNhRWXctwPYrSSFQxtl0FPA==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^3.1.0", + "resolve": "^1.17.0" + }, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "rollup": "^2.14.0", + "tslib": "*", + "typescript": ">=3.7.0" + } + }, "node_modules/@rollup/pluginutils": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", @@ -1269,16 +1287,6 @@ "node": ">= 6" } }, - "node_modules/@ts-type/package-dts": { - "version": "1.0.56", - "resolved": "https://registry.npmjs.org/@ts-type/package-dts/-/package-dts-1.0.56.tgz", - "integrity": "sha512-nBjbCaVV+R81jk7q/6sRuNYOhDAbBOmaCkPI2quK0Rnye2f4FUHX+4JL+3rDPiRPHxgX3pNfVKKHBlPAHiRddw==", - "dev": true, - "dependencies": { - "@types/semver": "^7.3.9", - "ts-type": "^2.1.2" - } - }, "node_modules/@types/babel__core": { "version": "7.1.17", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.17.tgz", @@ -1320,13 +1328,6 @@ "@babel/types": "^7.3.0" } }, - "node_modules/@types/bluebird": { - "version": "3.5.36", - "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.36.tgz", - "integrity": "sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q==", - "dev": true, - "peer": true - }, "node_modules/@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -1402,12 +1403,6 @@ "@types/node": "*" } }, - "node_modules/@types/semver": { - "version": "7.3.9", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.9.tgz", - "integrity": "sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ==", - "dev": true - }, "node_modules/@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -1586,36 +1581,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@yarn-tool/resolve-package": { - "version": "1.0.40", - "resolved": "https://registry.npmjs.org/@yarn-tool/resolve-package/-/resolve-package-1.0.40.tgz", - "integrity": "sha512-5kKRhGb8OCdpzuoGkb9BQw6biyY0zYesV3VyvEzRtb/cqZ7AR6o0ajR6q83jTaCJfYUaJaUPyXVOSZAUjWJQDQ==", - "dev": true, - "dependencies": { - "@ts-type/package-dts": "^1.0.56", - "pkg-dir": "< 6 >= 5", - "tslib": "^2.3.1", - "upath2": "^3.1.10" - } - }, - "node_modules/@yarn-tool/resolve-package/node_modules/pkg-dir": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", - "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", - "dev": true, - "dependencies": { - "find-up": "^5.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@yarn-tool/resolve-package/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - }, "node_modules/@zeit/schemas": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.6.0.tgz", @@ -3486,23 +3451,6 @@ "node": ">=8" } }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -3561,20 +3509,6 @@ "node": ">=10" } }, - "node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, "node_modules/fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -5284,15 +5218,6 @@ "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", "dev": true }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, "node_modules/jsonlines": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsonlines/-/jsonlines-0.1.1.tgz", @@ -6292,21 +6217,6 @@ "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", "dev": true }, - "node_modules/path-is-network-drive": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/path-is-network-drive/-/path-is-network-drive-1.0.10.tgz", - "integrity": "sha512-D6kJYPUSKGZBpTM2nv10sOWNdC056p4JDx0y7ARe6gop0aXXm5G86Gn/SyKvaf0Ce8c9Guctf+J+qoFmzuhDQg==", - "dev": true, - "dependencies": { - "tslib": "^2.3.1" - } - }, - "node_modules/path-is-network-drive/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - }, "node_modules/path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", @@ -6322,21 +6232,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "node_modules/path-strip-sep": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-strip-sep/-/path-strip-sep-1.0.7.tgz", - "integrity": "sha512-9xDVZPblHde4lTuTDnwqBKr9LTbPZW+Iae63ho500+BpEiZe3X6wvLInHgbB6FSMtwCTvztljw3k2zcNDNESzg==", - "dev": true, - "dependencies": { - "tslib": "^2.3.1" - } - }, - "node_modules/path-strip-sep/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - }, "node_modules/path-to-regexp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", @@ -6881,37 +6776,6 @@ "node": ">= 10.13.0" } }, - "node_modules/rollup-plugin-typescript2": { - "version": "0.31.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.31.1.tgz", - "integrity": "sha512-sklqXuQwQX+stKi4kDfEkneVESPi3YM/2S899vfRdF9Yi40vcC50Oq4A4cSZJNXsAQE/UsBZl5fAOsBLziKmjw==", - "dev": true, - "dependencies": { - "@rollup/pluginutils": "^4.1.0", - "@yarn-tool/resolve-package": "^1.0.36", - "find-cache-dir": "^3.3.1", - "fs-extra": "8.1.0", - "resolve": "1.20.0", - "tslib": "2.2.0" - }, - "peerDependencies": { - "rollup": ">=1.26.3", - "typescript": ">=2.4.0" - } - }, - "node_modules/rollup-plugin-typescript2/node_modules/@rollup/pluginutils": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.2.tgz", - "integrity": "sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==", - "dev": true, - "dependencies": { - "estree-walker": "^2.0.1", - "picomatch": "^2.2.2" - }, - "engines": { - "node": ">= 8.0.0" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -7649,39 +7513,12 @@ } } }, - "node_modules/ts-toolbelt": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", - "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==", - "dev": true, - "peer": true - }, - "node_modules/ts-type": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ts-type/-/ts-type-2.1.2.tgz", - "integrity": "sha512-64/2XoaipFXa/bidwXChQCSJ3VaCUVKrEaRPXiP5gLIlkPoAHfnwOMC0EWr42DsTm/+qYYuNwzxc0VQroeDs+g==", - "dev": true, - "dependencies": { - "tslib": "^2.3.1", - "typedarray-dts": "^1.0.0" - }, - "peerDependencies": { - "@types/bluebird": "*", - "@types/node": "*", - "ts-toolbelt": "^9.6.0" - } - }, - "node_modules/ts-type/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - }, "node_modules/tslib": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", - "dev": true + "dev": true, + "peer": true }, "node_modules/tsutils": { "version": "3.21.0", @@ -7737,12 +7574,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/typedarray-dts": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typedarray-dts/-/typedarray-dts-1.0.0.tgz", - "integrity": "sha512-Ka0DBegjuV9IPYFT1h0Qqk5U4pccebNIJCGl8C5uU7xtOs+jpJvKGAY4fHGK25hTmXZOEUl9Cnsg5cS6K/b5DA==", - "dev": true - }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -7826,27 +7657,6 @@ "node": ">= 4.0.0" } }, - "node_modules/upath2": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/upath2/-/upath2-3.1.10.tgz", - "integrity": "sha512-7ph3GzTaVbQX+oIoMsGtM+9BAWQr+6Mn28TJKPu28+yGpZ+J4am590CPDBlDG0zyuo9T9T7o21ciqNzwIp/q0A==", - "dev": true, - "dependencies": { - "lodash": "^4.17.21", - "path-is-network-drive": "^1.0.10", - "path-strip-sep": "^1.0.7", - "tslib": "^2.3.1" - }, - "peerDependencies": { - "@types/node": "*" - } - }, - "node_modules/upath2/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - }, "node_modules/update-check": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.2.tgz", @@ -8237,6 +8047,7 @@ } }, "packages/e2ee": { + "name": "@sora/e2ee", "version": "2021.1.0", "license": "Apache-2.0", "dependencies": { @@ -8244,6 +8055,7 @@ }, "devDependencies": { "@rollup/plugin-replace": "^3.0.0", + "@rollup/plugin-typescript": "^8.3.0", "@typescript-eslint/eslint-plugin": "^5.7.0", "@typescript-eslint/parser": "^5.7.0", "eslint": "^8.4.1", @@ -8251,14 +8063,15 @@ "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.5.1", "rollup": "^2.61.1", - "rollup-plugin-typescript2": "^0.31.1", "typescript": "^4.5.4" } }, "packages/go-wasm": { + "name": "@sora/go-wasm", "version": "2021.1.0" }, "packages/sdk": { + "name": "@sora/sdk", "dependencies": { "@sora/e2ee": "^2021.1.0", "fflate": "^0.7.2", @@ -8268,6 +8081,7 @@ "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-node-resolve": "^13.1.1", "@rollup/plugin-replace": "^3.0.0", + "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.0.3", "@typescript-eslint/eslint-plugin": "5.7.0", "@typescript-eslint/parser": "5.7.0", @@ -8277,7 +8091,6 @@ "jest": "^27.4.5", "prettier": "^2.5.1", "rollup": "^2.61.1", - "rollup-plugin-typescript2": "^0.31.1", "ts-jest": "^27.1.1", "typescript": "^4.5.4" } @@ -9187,6 +9000,16 @@ "magic-string": "^0.25.7" } }, + "@rollup/plugin-typescript": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.0.tgz", + "integrity": "sha512-I5FpSvLbtAdwJ+naznv+B4sjXZUcIvLLceYpITAn7wAP8W0wqc5noLdGIp9HGVntNhRWXctwPYrSSFQxtl0FPA==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "resolve": "^1.17.0" + } + }, "@rollup/pluginutils": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", @@ -9234,6 +9057,7 @@ "version": "file:packages/e2ee", "requires": { "@rollup/plugin-replace": "^3.0.0", + "@rollup/plugin-typescript": "^8.3.0", "@sora/go-wasm": "^2021.1.0", "@typescript-eslint/eslint-plugin": "^5.7.0", "@typescript-eslint/parser": "^5.7.0", @@ -9242,7 +9066,6 @@ "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.5.1", "rollup": "^2.61.1", - "rollup-plugin-typescript2": "^0.31.1", "typescript": "^4.5.4" } }, @@ -9255,6 +9078,7 @@ "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-node-resolve": "^13.1.1", "@rollup/plugin-replace": "^3.0.0", + "@rollup/plugin-typescript": "^8.3.0", "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.0.3", "@typescript-eslint/eslint-plugin": "5.7.0", @@ -9267,7 +9091,6 @@ "prettier": "^2.5.1", "rollup": "^2.61.1", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-typescript2": "^0.31.1", "ts-jest": "^27.1.1", "typescript": "^4.5.4" } @@ -9287,16 +9110,6 @@ "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true }, - "@ts-type/package-dts": { - "version": "1.0.56", - "resolved": "https://registry.npmjs.org/@ts-type/package-dts/-/package-dts-1.0.56.tgz", - "integrity": "sha512-nBjbCaVV+R81jk7q/6sRuNYOhDAbBOmaCkPI2quK0Rnye2f4FUHX+4JL+3rDPiRPHxgX3pNfVKKHBlPAHiRddw==", - "dev": true, - "requires": { - "@types/semver": "^7.3.9", - "ts-type": "^2.1.2" - } - }, "@types/babel__core": { "version": "7.1.17", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.17.tgz", @@ -9338,13 +9151,6 @@ "@babel/types": "^7.3.0" } }, - "@types/bluebird": { - "version": "3.5.36", - "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.36.tgz", - "integrity": "sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q==", - "dev": true, - "peer": true - }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -9420,12 +9226,6 @@ "@types/node": "*" } }, - "@types/semver": { - "version": "7.3.9", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.9.tgz", - "integrity": "sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ==", - "dev": true - }, "@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -9530,35 +9330,6 @@ "eslint-visitor-keys": "^3.0.0" } }, - "@yarn-tool/resolve-package": { - "version": "1.0.40", - "resolved": "https://registry.npmjs.org/@yarn-tool/resolve-package/-/resolve-package-1.0.40.tgz", - "integrity": "sha512-5kKRhGb8OCdpzuoGkb9BQw6biyY0zYesV3VyvEzRtb/cqZ7AR6o0ajR6q83jTaCJfYUaJaUPyXVOSZAUjWJQDQ==", - "dev": true, - "requires": { - "@ts-type/package-dts": "^1.0.56", - "pkg-dir": "< 6 >= 5", - "tslib": "^2.3.1", - "upath2": "^3.1.10" - }, - "dependencies": { - "pkg-dir": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", - "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", - "dev": true, - "requires": { - "find-up": "^5.0.0" - } - }, - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - } - } - }, "@zeit/schemas": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.6.0.tgz", @@ -10994,17 +10765,6 @@ "to-regex-range": "^5.0.1" } }, - "find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -11048,17 +10808,6 @@ "integrity": "sha512-wJaE62fLaB3jCYvY2ZHjZvmKK2iiLiiehX38rz5QZxtdN8fVPJDeZUiVvJrHStdTc+23LHlyZuSEKgFc0pxi2g==", "dev": true }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, "fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -12368,15 +12117,6 @@ "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", "dev": true }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, "jsonlines": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsonlines/-/jsonlines-0.1.1.tgz", @@ -13148,23 +12888,6 @@ "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", "dev": true }, - "path-is-network-drive": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/path-is-network-drive/-/path-is-network-drive-1.0.10.tgz", - "integrity": "sha512-D6kJYPUSKGZBpTM2nv10sOWNdC056p4JDx0y7ARe6gop0aXXm5G86Gn/SyKvaf0Ce8c9Guctf+J+qoFmzuhDQg==", - "dev": true, - "requires": { - "tslib": "^2.3.1" - }, - "dependencies": { - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - } - } - }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", @@ -13177,23 +12900,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "path-strip-sep": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-strip-sep/-/path-strip-sep-1.0.7.tgz", - "integrity": "sha512-9xDVZPblHde4lTuTDnwqBKr9LTbPZW+Iae63ho500+BpEiZe3X6wvLInHgbB6FSMtwCTvztljw3k2zcNDNESzg==", - "dev": true, - "requires": { - "tslib": "^2.3.1" - }, - "dependencies": { - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - } - } - }, "path-to-regexp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", @@ -13596,32 +13302,6 @@ } } }, - "rollup-plugin-typescript2": { - "version": "0.31.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.31.1.tgz", - "integrity": "sha512-sklqXuQwQX+stKi4kDfEkneVESPi3YM/2S899vfRdF9Yi40vcC50Oq4A4cSZJNXsAQE/UsBZl5fAOsBLziKmjw==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^4.1.0", - "@yarn-tool/resolve-package": "^1.0.36", - "find-cache-dir": "^3.3.1", - "fs-extra": "8.1.0", - "resolve": "1.20.0", - "tslib": "2.2.0" - }, - "dependencies": { - "@rollup/pluginutils": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.2.tgz", - "integrity": "sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==", - "dev": true, - "requires": { - "estree-walker": "^2.0.1", - "picomatch": "^2.2.2" - } - } - } - }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -14171,36 +13851,12 @@ "yargs-parser": "20.x" } }, - "ts-toolbelt": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", - "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==", - "dev": true, - "peer": true - }, - "ts-type": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ts-type/-/ts-type-2.1.2.tgz", - "integrity": "sha512-64/2XoaipFXa/bidwXChQCSJ3VaCUVKrEaRPXiP5gLIlkPoAHfnwOMC0EWr42DsTm/+qYYuNwzxc0VQroeDs+g==", - "dev": true, - "requires": { - "tslib": "^2.3.1", - "typedarray-dts": "^1.0.0" - }, - "dependencies": { - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - } - } - }, "tslib": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", - "dev": true + "dev": true, + "peer": true }, "tsutils": { "version": "3.21.0", @@ -14240,12 +13896,6 @@ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, - "typedarray-dts": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typedarray-dts/-/typedarray-dts-1.0.0.tgz", - "integrity": "sha512-Ka0DBegjuV9IPYFT1h0Qqk5U4pccebNIJCGl8C5uU7xtOs+jpJvKGAY4fHGK25hTmXZOEUl9Cnsg5cS6K/b5DA==", - "dev": true - }, "typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -14307,26 +13957,6 @@ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, - "upath2": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/upath2/-/upath2-3.1.10.tgz", - "integrity": "sha512-7ph3GzTaVbQX+oIoMsGtM+9BAWQr+6Mn28TJKPu28+yGpZ+J4am590CPDBlDG0zyuo9T9T7o21ciqNzwIp/q0A==", - "dev": true, - "requires": { - "lodash": "^4.17.21", - "path-is-network-drive": "^1.0.10", - "path-strip-sep": "^1.0.7", - "tslib": "^2.3.1" - }, - "dependencies": { - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - } - } - }, "update-check": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.2.tgz", diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index 6ba14e0d..23dd805f 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -17,6 +17,7 @@ }, "devDependencies": { "@rollup/plugin-replace": "^3.0.0", + "@rollup/plugin-typescript": "^8.3.0", "@typescript-eslint/eslint-plugin": "^5.7.0", "@typescript-eslint/parser": "^5.7.0", "eslint": "^8.4.1", @@ -24,7 +25,6 @@ "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.5.1", "rollup": "^2.61.1", - "rollup-plugin-typescript2": "^0.31.1", "typescript": "^4.5.4" }, "dependencies": { diff --git a/packages/e2ee/rollup.config.js b/packages/e2ee/rollup.config.js index 1ec9106e..8f0ba3bb 100644 --- a/packages/e2ee/rollup.config.js +++ b/packages/e2ee/rollup.config.js @@ -1,5 +1,5 @@ import fs from "fs"; -import typescript from "rollup-plugin-typescript2"; +import typescript from '@rollup/plugin-typescript'; import replace from "@rollup/plugin-replace"; import pkg from "./package.json"; diff --git a/packages/e2ee/tsconfig.json b/packages/e2ee/tsconfig.json index 87e8d6b6..6b55fd86 100644 --- a/packages/e2ee/tsconfig.json +++ b/packages/e2ee/tsconfig.json @@ -17,7 +17,8 @@ "dom", "dom.iterable", "scripthost" - ] + ], + "declarationDir": "." }, "include": [ "src/sora_e2ee.ts" diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 4b7759e6..d80d9490 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -11,6 +11,7 @@ "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-node-resolve": "^13.1.1", "@rollup/plugin-replace": "^3.0.0", + "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.0.3", "@typescript-eslint/eslint-plugin": "5.7.0", "@typescript-eslint/parser": "5.7.0", @@ -20,7 +21,6 @@ "jest": "^27.4.5", "prettier": "^2.5.1", "rollup": "^2.61.1", - "rollup-plugin-typescript2": "^0.31.1", "ts-jest": "^27.1.1", "typescript": "^4.5.4" }, diff --git a/packages/sdk/rollup.config.js b/packages/sdk/rollup.config.js index 2513a4d2..57743e5e 100644 --- a/packages/sdk/rollup.config.js +++ b/packages/sdk/rollup.config.js @@ -1,7 +1,7 @@ import commonjs from '@rollup/plugin-commonjs'; import resolve from '@rollup/plugin-node-resolve'; import { terser } from 'rollup-plugin-terser'; -import typescript from 'rollup-plugin-typescript2'; +import typescript from '@rollup/plugin-typescript'; import replace from '@rollup/plugin-replace'; import pkg from '../../package.json'; diff --git a/packages/sdk/tsconfig.json b/packages/sdk/tsconfig.json index 27550f43..c38a3d79 100644 --- a/packages/sdk/tsconfig.json +++ b/packages/sdk/tsconfig.json @@ -20,7 +20,8 @@ "dom", "dom.iterable", "scripthost" - ] + ], + "declarationDir": "." }, "include": [ "src/**/*.ts" From c66d773822e81cf733d3d2c341bdf031df4f9606 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Thu, 16 Dec 2021 15:30:37 +0900 Subject: [PATCH 04/86] =?UTF-8?q?CHANGES=20=E3=82=92=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 63d45288..1e2ee225 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,11 @@ - FIX - バグ修正 +## develop +- [UPDATE] パッケージを更新する + - fflate "0.7.1" -> "0.7.2" + - typescript "4.4.3" -> "4.5.4" + ## 2021.2.0 - [UPDATE] simulcast 時の transceiver 判定条件に offer.mids.video での分岐を追加する - @yuitowest From da21eae800b327e5978806c39c1ce148f35620ca Mon Sep 17 00:00:00 2001 From: miosakuma Date: Tue, 21 Dec 2021 12:18:47 +0900 Subject: [PATCH 05/86] =?UTF-8?q?Sora=20=E3=81=AE=E3=83=90=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=92=202021.2=20=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 74418c54..5b527c96 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Please read https://github.com/shiguredo/oss before use. ## システム条件 -- WebRTC SFU Sora 2021.1 以降 +- WebRTC SFU Sora 2021.2 以降 - TypeScript 3.8 以降 ## サンプル From 8304941adaa10473cebd73f529f7b372156052f0 Mon Sep 17 00:00:00 2001 From: voluntas Date: Wed, 29 Dec 2021 11:02:58 +0900 Subject: [PATCH 06/86] Create codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 70 +++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000..18bb2225 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,70 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ develop ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ develop ] + schedule: + - cron: '41 3 * * 2' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://git.io/codeql-language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 From 8a7d894c55c92708dd02f7bdaf64dec98a9f34b6 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 4 Jan 2022 16:09:06 +0900 Subject: [PATCH 07/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 1103 ++++++++++++++++++++---------------- package.json | 2 +- packages/e2ee/package.json | 10 +- packages/sdk/package.json | 20 +- 4 files changed, 625 insertions(+), 510 deletions(-) diff --git a/package-lock.json b/package-lock.json index b946adac..3a1f812c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,17 +14,18 @@ "packages/sdk" ], "devDependencies": { - "npm-check-updates": "^12.0.3", + "npm-check-updates": "^12.1.0", "serve": "^13.0.2", "typedoc": "^0.22.10" } }, "node_modules/@babel/code-frame": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", - "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "dev": true, "dependencies": { - "@babel/highlight": "^7.16.0" + "@babel/highlight": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -40,20 +41,20 @@ } }, "node_modules/@babel/core": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.5.tgz", - "integrity": "sha512-wUcenlLzuWMZ9Zt8S0KmFwGlH6QKRh3vsm/dhDA3CHkiTA45YuG1XkHRcNRl73EFPXDp/d5kVOU0/y7x2w6OaQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.5", - "@babel/helper-compilation-targets": "^7.16.3", - "@babel/helper-module-transforms": "^7.16.5", - "@babel/helpers": "^7.16.5", - "@babel/parser": "^7.16.5", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.5", - "@babel/types": "^7.16.0", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.7.tgz", + "integrity": "sha512-aeLaqcqThRNZYmbMqtulsetOQZ/5gbR/dWruUCJcpas4Qoyy+QeagfDsPdMrqwsPRDNxJvBlRiZxxX7THO7qtA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.16.7", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helpers": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -88,12 +89,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.5.tgz", - "integrity": "sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.7.tgz", + "integrity": "sha512-/ST3Sg8MLGY5HVYmrjOgL60ENux/HfO/CsUh7y4MalThufhE/Ff/6EibFDHi4jiDCaWfJKoqbE6oTh21c5hrRg==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0", + "@babel/types": "^7.16.7", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -111,13 +112,13 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.3.tgz", - "integrity": "sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", + "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.16.0", - "@babel/helper-validator-option": "^7.14.5", + "@babel/compat-data": "^7.16.4", + "@babel/helper-validator-option": "^7.16.7", "browserslist": "^4.17.5", "semver": "^6.3.0" }, @@ -138,156 +139,158 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.5.tgz", - "integrity": "sha512-ODQyc5AnxmZWm/R2W7fzhamOk1ey8gSguo5SGvF0zcB3uUzRpTRmM/jmLSm9bDMyPlvbyJ+PwPEK0BWIoZ9wjg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz", - "integrity": "sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", "dev": true, "dependencies": { - "@babel/helper-get-function-arity": "^7.16.0", - "@babel/template": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-get-function-arity": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz", - "integrity": "sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.0.tgz", - "integrity": "sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz", - "integrity": "sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.5.tgz", - "integrity": "sha512-CkvMxgV4ZyyioElFwcuWnDCcNIeyqTkCm9BxXZi73RR1ozqlpboqsbGUNvRTflgZtFbbJ1v5Emvm+lkjMYY/LQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", + "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.16.5", - "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-simple-access": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/helper-validator-identifier": "^7.15.7", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.5", - "@babel/types": "^7.16.0" + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.5.tgz", - "integrity": "sha512-59KHWHXxVA9K4HNF4sbHCf+eJeFe0Te/ZFGqBT4OjXhrwvA04sGfaEGsVTdsjoszq0YTP49RC9UKe5g8uN2RwQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", + "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.0.tgz", - "integrity": "sha512-o1rjBT/gppAqKsYfUdfHq5Rk03lMQrkPHG1OWzHWpLgVXRH4HnMM9Et9CVdIqwkCQlobnGHEJMsgWP/jE1zUiw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", + "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz", - "integrity": "sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", - "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.5.tgz", - "integrity": "sha512-TLgi6Lh71vvMZGEkFuIxzaPsyeYCHQ5jJOOX1f0xXn0uciFuE8cEk0wyBquMcCxBXZ5BJhE2aUB7pnWTD150Tw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.7.tgz", + "integrity": "sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw==", "dev": true, "dependencies": { - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.5", - "@babel/types": "^7.16.0" + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz", - "integrity": "sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.7.tgz", + "integrity": "sha512-aKpPMfLvGO3Q97V0qhw/V2SWNWlwfJknuwAunU7wZLSfrM4xTBvg7E5opUVi1kJTBKihE38CPg4nBiqX83PWYw==", + "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.15.7", + "@babel/helper-validator-identifier": "^7.16.7", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -299,6 +302,7 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, "dependencies": { "color-convert": "^1.9.0" }, @@ -310,6 +314,7 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -323,6 +328,7 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, "dependencies": { "color-name": "1.1.3" } @@ -330,12 +336,14 @@ "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, "engines": { "node": ">=4" } @@ -344,6 +352,7 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, "dependencies": { "has-flag": "^3.0.0" }, @@ -352,9 +361,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.16.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", - "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.7.tgz", + "integrity": "sha512-sR4eaSrnM7BV7QPzGfEX5paG/6wrZM3I0HDzfIAK06ESvo9oy3xBuVBxE3MbQaKNhvg8g/ixjMWo2CGpzpHsDA==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -511,12 +520,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.5.tgz", - "integrity": "sha512-/d4//lZ1Vqb4mZ5xTep3dDK888j7BGM/iKqBmndBaoYAFPlPKrGU608VVBz5JeyAb6YQDjRu1UKqj86UhwWVgw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz", + "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -526,33 +535,33 @@ } }, "node_modules/@babel/template": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.0.tgz", - "integrity": "sha512-MnZdpFD/ZdYhXwiunMqqgyZyucaYsbL0IrjoGjaVhGilz+x8YB++kRfygSOIj1yOtWKPlx7NBp+9I1RQSgsd5A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.16.0", - "@babel/parser": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.5.tgz", - "integrity": "sha512-FOCODAzqUMROikDYLYxl4nmwiLlu85rNqBML/A5hKRVXG2LV8d0iMqgPzdYTcIpjZEBB7D6UDU9vxRZiriASdQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.5", - "@babel/helper-environment-visitor": "^7.16.5", - "@babel/helper-function-name": "^7.16.0", - "@babel/helper-hoist-variables": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/parser": "^7.16.5", - "@babel/types": "^7.16.0", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.7.tgz", + "integrity": "sha512-8KWJPIb8c2VvY8AJrydh6+fVRo2ODx1wYBU2398xJVq0JomuLBZmVQzLPBblJgHIGYG4znCpUZUZ0Pt2vdmVYQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -570,12 +579,12 @@ } }, "node_modules/@babel/types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.0.tgz", - "integrity": "sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.7.tgz", + "integrity": "sha512-E8HuV7FO9qLpx6OtoGfUQ2cjIYnbFwvZWYBS+87EwtdMvmUPJSwykpovFB+8insbpF0uJcpr8KMUi64XZntZcg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.15.7", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1154,9 +1163,9 @@ } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.1.tgz", - "integrity": "sha512-6QKtRevXLrmEig9UiMYt2fSvee9TyltGRfw+qSs6xjUnxwjOzTOqy+/Lpxsgjb8mJn1EQNbCDAvt89O4uzL5kw==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.2.tgz", + "integrity": "sha512-xyqbuf1vyOPC60jEKhx3DBHunymnCJswzjNTKfX4Jz7zCPar1UqbRZCNY1u5QaXh97beaFTWdoUUWiV4qX8o/g==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1174,9 +1183,9 @@ } }, "node_modules/@rollup/plugin-replace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-3.0.0.tgz", - "integrity": "sha512-3c7JCbMuYXM4PbPWT4+m/4Y6U60SgsnDT/cCyAyUKwFHg7pTSfsSQzIpETha3a3ig6OdOKzZz87D9ZXIK3qsDg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-3.0.1.tgz", + "integrity": "sha512-989J5oRzf3mm0pO/0djTijdfEh9U3n63BIXN5X7T4U9BP+fN4oxQ6DvDuBvFaHA6scaHQRclqmKQEkBhB7k7Hg==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1288,9 +1297,9 @@ } }, "node_modules/@types/babel__core": { - "version": "7.1.17", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.17.tgz", - "integrity": "sha512-6zzkezS9QEIL8yCBvXWxPTJPNuMeECJVxSOhxNY/jfq9LxOTHivaYTqr37n9LknWWRTIkzqH2UilS5QFvfa90A==", + "version": "7.1.18", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.18.tgz", + "integrity": "sha512-S7unDjm/C7z2A2R9NzfKCK1I+BAALDtxEmsJBwlB3EzNfb929ykjL++1CK9LO++EIp2fQrC8O+BwjKvz6UeDyQ==", "dev": true, "dependencies": { "@babel/parser": "^7.1.0", @@ -1301,9 +1310,9 @@ } }, "node_modules/@types/babel__generator": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.3.tgz", - "integrity": "sha512-/GWCmzJWqV7diQW54smJZzWbSFf4QYtF71WCKhcx6Ru/tFyQIY2eiiITcCAeuPbNSvT9YCGkVMqqvSk2Z0mXiA==", + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", "dev": true, "dependencies": { "@babel/types": "^7.0.0" @@ -1344,9 +1353,9 @@ } }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", - "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", "dev": true }, "node_modules/@types/istanbul-lib-report": { @@ -1368,9 +1377,9 @@ } }, "node_modules/@types/jest": { - "version": "27.0.3", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.0.3.tgz", - "integrity": "sha512-cmmwv9t7gBYt7hNKH5Spu7Kuu/DotGa+Ff+JGRKZ4db5eh8PnKS4LuebJ3YLUoyOyIHraTGyULn23YtEAm0VSg==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.0.tgz", + "integrity": "sha512-gHl8XuC1RZ8H2j5sHv/JqsaxXkDDM9iDOgu0Wp8sjs4u/snb2PVehyWXJPr+ORA0RPpgw231mnutWI1+0hgjIQ==", "dev": true, "dependencies": { "jest-diff": "^27.0.0", @@ -1384,9 +1393,10 @@ "dev": true }, "node_modules/@types/node": { - "version": "16.11.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.13.tgz", - "integrity": "sha512-eUXZzHLHoZqj1frtUetNkUetYoJ6X55UmrVnFD4DMhVeAmwLjniZhtBmsRiemQh4uq4G3vUra/Ws/hs9vEvL3Q==" + "version": "17.0.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.7.tgz", + "integrity": "sha512-1QUk+WAUD4t8iR+Oj+UgI8oJa6yyxaB8a8pHaC8uqM6RrS1qbL7bf3Pwl5rHv0psm2CuDErgho6v5N+G+5fwtQ==", + "dev": true }, "node_modules/@types/prettier": { "version": "2.4.2", @@ -1425,13 +1435,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.7.0.tgz", - "integrity": "sha512-8RTGBpNn5a9M628wBPrCbJ+v3YTEOE2qeZb7TDkGKTDXSj36KGRg92SpFFaR/0S3rSXQxM0Og/kV9EyadsYSBg==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.9.0.tgz", + "integrity": "sha512-qT4lr2jysDQBQOPsCCvpPUZHjbABoTJW8V9ZzIYKHMfppJtpdtzszDYsldwhFxlhvrp7aCHeXD1Lb9M1zhwWwQ==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "5.7.0", - "@typescript-eslint/scope-manager": "5.7.0", + "@typescript-eslint/experimental-utils": "5.9.0", + "@typescript-eslint/scope-manager": "5.9.0", + "@typescript-eslint/type-utils": "5.9.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1457,15 +1468,15 @@ } }, "node_modules/@typescript-eslint/experimental-utils": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.7.0.tgz", - "integrity": "sha512-u57eZ5FbEpzN5kSjmVrSesovWslH2ZyNPnaXQMXWgH57d5+EVHEt76W75vVuI9qKZ5BMDKNfRN+pxcPEjQjb2A==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.9.0.tgz", + "integrity": "sha512-ZnLVjBrf26dn7ElyaSKa6uDhqwvAi4jBBmHK1VxuFGPRAxhdi18ubQYSGA7SRiFiES3q9JiBOBHEBStOFkwD2g==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.7.0", - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/typescript-estree": "5.7.0", + "@typescript-eslint/scope-manager": "5.9.0", + "@typescript-eslint/types": "5.9.0", + "@typescript-eslint/typescript-estree": "5.9.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1477,18 +1488,18 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.7.0.tgz", - "integrity": "sha512-m/gWCCcS4jXw6vkrPQ1BjZ1vomP01PArgzvauBqzsoZ3urLbsRChexB8/YV8z9HwE3qlJM35FxfKZ1nfP/4x8g==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.9.0.tgz", + "integrity": "sha512-/6pOPz8yAxEt4PLzgbFRDpZmHnXCeZgPDrh/1DaVKOjvn/UPMlWhbx/gA96xRi2JxY1kBl2AmwVbyROUqys5xQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.7.0", - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/typescript-estree": "5.7.0", + "@typescript-eslint/scope-manager": "5.9.0", + "@typescript-eslint/types": "5.9.0", + "@typescript-eslint/typescript-estree": "5.9.0", "debug": "^4.3.2" }, "engines": { @@ -1508,13 +1519,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz", - "integrity": "sha512-7mxR520DGq5F7sSSgM0HSSMJ+TFUymOeFRMfUfGFAVBv8BR+Jv1vHgAouYUvWRZeszVBJlLcc9fDdktxb5kmxA==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.9.0.tgz", + "integrity": "sha512-DKtdIL49Qxk2a8icF6whRk7uThuVz4A6TCXfjdJSwOsf+9ree7vgQWcx0KOyCdk0i9ETX666p4aMhrRhxhUkyg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0" + "@typescript-eslint/types": "5.9.0", + "@typescript-eslint/visitor-keys": "5.9.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1524,10 +1535,36 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.9.0.tgz", + "integrity": "sha512-uVCb9dJXpBrK1071ri5aEW7ZHdDHAiqEjYznF3HSSvAJXyrkxGOw2Ejibz/q6BXdT8lea8CMI0CzKNFTNI6TEQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/experimental-utils": "5.9.0", + "debug": "^4.3.2", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/@typescript-eslint/types": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", - "integrity": "sha512-5AeYIF5p2kAneIpnLFve8g50VyAjq7udM7ApZZ9JYjdPjkz0LvODfuSHIDUVnIuUoxafoWzpFyU7Sqbxgi79mA==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.9.0.tgz", + "integrity": "sha512-mWp6/b56Umo1rwyGCk8fPIzb9Migo8YOniBGPAQDNC6C52SeyNGN4gsVwQTAR+RS2L5xyajON4hOLwAGwPtUwg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1538,13 +1575,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.7.0.tgz", - "integrity": "sha512-aO1Ql+izMrTnPj5aFFlEJkpD4jRqC4Gwhygu2oHK2wfVQpmOPbyDSveJ+r/NQo+PWV43M6uEAeLVbTi09dFLhg==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.9.0.tgz", + "integrity": "sha512-kxo3xL2mB7XmiVZcECbaDwYCt3qFXz99tBSuVJR4L/sR7CJ+UNAPrYILILktGj1ppfZ/jNt/cWYbziJUlHl1Pw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0", + "@typescript-eslint/types": "5.9.0", + "@typescript-eslint/visitor-keys": "5.9.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1565,12 +1602,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", - "integrity": "sha512-hdohahZ4lTFcglZSJ3DGdzxQHBSxsLVqHzkiOmKi7xVAWC4y2c1bIMKmPJSrA4aOEoRUPOKQ87Y/taC7yVHpFg==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.9.0.tgz", + "integrity": "sha512-6zq0mb7LV0ThExKlecvpfepiB+XEtFv/bzx7/jKSgyXTFD7qjmSu1FoiS0x3OZaiS+UIXpH2vd9O89f02RCtgw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.7.0", + "@typescript-eslint/types": "5.9.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -1613,10 +1650,10 @@ } }, "node_modules/acorn": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", - "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", - "devOptional": true, + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -1677,9 +1714,9 @@ } }, "node_modules/agentkeepalive": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.1.4.tgz", - "integrity": "sha512-+V/rGa3EuU74H6wR04plBb7Ks10FbtUQgRj/FQOG7uUIEuaINI+AiqJR1k6t3SVNs7o7ZjIdus6706qqzVq8jQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.0.tgz", + "integrity": "sha512-0PhAp58jZNw13UJv7NVdTGb0ZcghHUb3DrZ046JiiJY/BOaTTpbwdHq2VObPCBV8M2GPh7sgrJ3AQ8Ey468LJw==", "dev": true, "dependencies": { "debug": "^4.1.0", @@ -2087,7 +2124,8 @@ "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true }, "node_modules/builtin-modules": { "version": "3.2.0", @@ -2197,9 +2235,9 @@ } }, "node_modules/camelcase": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", - "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, "engines": { "node": ">=10" @@ -2209,9 +2247,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001286", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001286.tgz", - "integrity": "sha512-zaEMRH6xg8ESMi2eQ3R4eZ5qw/hJiVsO/HlLwniIwErij0JDr9P+8V4dtx1l+kLq6j3yy8l8W4fst1lBnat5wQ==", + "version": "1.0.30001296", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001296.tgz", + "integrity": "sha512-WfrtPEoNSoeATDlf4y3QvkwiELl9GyPLISV5GejTbbQRtQx4LhsXmc9IQ6XCL2d7UxCyEzToEZNMeqR79OUw8Q==", "dev": true, "funding": { "type": "opencollective", @@ -2769,9 +2807,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.18", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.18.tgz", - "integrity": "sha512-i7nKjGGBE1+YUIbfLObA1EZPmN7J1ITEllbhusDk+KIk6V6gUxN9PFe36v+Sd+8Cg0k3cgUv9lQhQZalr8rggw==", + "version": "1.4.33", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.33.tgz", + "integrity": "sha512-OVK1Ad3pHnmuXPhEfq85X8vUKr1UPNHryBnbKnyLcAfh8dPwoFjoDhDlP5KpPJIiymvSucZs48UBrE1250IxOw==", "dev": true }, "node_modules/emittery": { @@ -2860,6 +2898,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, "engines": { "node": ">=0.8.0" } @@ -2947,9 +2986,9 @@ } }, "node_modules/eslint": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.4.1.tgz", - "integrity": "sha512-TxU/p7LB1KxQ6+7aztTnO7K0i+h0tDi81YRY9VzB6Id71kNz+fFYnf5HD5UOQmxkzcoa0TlVZf9dpMtUv0GpWg==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.6.0.tgz", + "integrity": "sha512-UvxdOJ7mXFlw7iuHZA4jmzPaUqIw54mZrv+XPYKNbKdLR0et4rf60lIZUU9kiNtnzzMzGWxMV+tQ7uG7JG8DPw==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.0.5", @@ -2964,7 +3003,7 @@ "eslint-scope": "^7.1.0", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.1.0", - "espree": "^9.2.0", + "espree": "^9.3.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -3195,12 +3234,12 @@ } }, "node_modules/espree": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.2.0.tgz", - "integrity": "sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", + "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", "dev": true, "dependencies": { - "acorn": "^8.6.0", + "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", "eslint-visitor-keys": "^3.1.0" }, @@ -3531,6 +3570,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -3758,6 +3798,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, "engines": { "node": ">=8" } @@ -3872,9 +3913,9 @@ } }, "node_modules/ignore": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, "engines": { "node": ">= 4" @@ -4246,9 +4287,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.1.tgz", - "integrity": "sha512-q1kvhAXWSsXfMjCdNHNPKZZv94OlspKnoGv+R9RGbnqOOQ0VbNfLFgQDVgi7hHenKsndGq3/o0OBdzDXthWcNw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.3.tgz", + "integrity": "sha512-x9LtDVtfm/t1GFiLl3NffC7hz+I1ragvgX1P/Lg1NlIagifZDKUkuuaAxH/qpwj2IuEfD8G2Bs/UKp+sZ/pKkg==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -5092,7 +5133,8 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, "node_modules/js-yaml": { "version": "4.1.0", @@ -5507,7 +5549,8 @@ "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true }, "node_modules/merge2": { "version": "1.4.1", @@ -5806,9 +5849,9 @@ } }, "node_modules/npm-check-updates": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.0.3.tgz", - "integrity": "sha512-MTHzkDZY1ebhPaDvzWOU9bt4UYdHmY4tIcMCaZjgguGKUgwqokH/aB0Nrc4WcZ4rD491Spuj5DILo/RvKAefvw==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.1.0.tgz", + "integrity": "sha512-9GtSetBvcth7MuL+0MpOmWgdfiEgZcWRfnvoYnNZxbZpleHZCT0Z3HnbsL6/EAT2M+ye7FTZ+YjmDmZptt7Rkg==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -6254,9 +6297,9 @@ "dev": true }, "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { "node": ">=8.6" @@ -6506,6 +6549,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, "dependencies": { "safe-buffer": "^5.1.0" } @@ -6641,13 +6685,17 @@ } }, "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.0.tgz", + "integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==", "dev": true, "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6736,9 +6784,10 @@ } }, "node_modules/rollup": { - "version": "2.61.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.61.1.tgz", - "integrity": "sha512-BbTXlEvB8d+XFbK/7E5doIcRtxWPRiqr0eb5vQ0+2paMM04Ye4PZY5nHOQef2ix24l/L0SpLd5hwcH15QHPdvA==", + "version": "2.62.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.62.0.tgz", + "integrity": "sha512-cJEQq2gwB0GWMD3rYImefQTSjrPYaC6s4J9pYqnstVLJ1CHa/aZNVkD4Epuvg4iLeMA4KRiq7UM7awKK6j7jcw==", + "dev": true, "bin": { "rollup": "dist/bin/rollup" }, @@ -6753,6 +6802,7 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "dev": true, "dependencies": { "@babel/code-frame": "^7.10.4", "jest-worker": "^26.2.1", @@ -6767,6 +6817,7 @@ "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -6802,7 +6853,8 @@ "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "node_modules/safer-buffer": { "version": "2.1.2", @@ -6868,6 +6920,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, "dependencies": { "randombytes": "^2.1.0" } @@ -7092,6 +7145,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -7100,6 +7154,7 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -7267,6 +7322,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -7287,6 +7343,18 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -7330,6 +7398,7 @@ "version": "5.10.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", + "dev": true, "dependencies": { "commander": "^2.20.0", "source-map": "~0.7.2", @@ -7353,12 +7422,14 @@ "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true }, "node_modules/terser/node_modules/source-map": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true, "engines": { "node": ">= 8" } @@ -7470,9 +7541,9 @@ } }, "node_modules/ts-jest": { - "version": "27.1.1", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.1.tgz", - "integrity": "sha512-Ds0VkB+cB+8g2JUmP/GKWndeZcCKrbe6jzolGrVWdqVUFByY/2KDHqxJ7yBSon7hDB1TA4PXxjfZ+JjzJisvgA==", + "version": "27.1.2", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.2.tgz", + "integrity": "sha512-eSOiJOWq6Hhs6Khzk5wKC5sgWIXgXqOCiIl1+3lfnearu58Hj4QpE5tUhQcA3xtZrELbcvAGCsd6HB8OsaVaTA==", "dev": true, "dependencies": { "bs-logger": "0.x", @@ -7514,9 +7585,9 @@ } }, "node_modules/tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", "dev": true, "peer": true }, @@ -8047,62 +8118,60 @@ } }, "packages/e2ee": { - "name": "@sora/e2ee", "version": "2021.1.0", "license": "Apache-2.0", "dependencies": { "@sora/go-wasm": "^2021.1.0" }, "devDependencies": { - "@rollup/plugin-replace": "^3.0.0", + "@rollup/plugin-replace": "^3.0.1", "@rollup/plugin-typescript": "^8.3.0", - "@typescript-eslint/eslint-plugin": "^5.7.0", - "@typescript-eslint/parser": "^5.7.0", - "eslint": "^8.4.1", + "@typescript-eslint/eslint-plugin": "^5.9.0", + "@typescript-eslint/parser": "^5.9.0", + "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.5.1", - "rollup": "^2.61.1", + "rollup": "^2.62.0", "typescript": "^4.5.4" } }, "packages/go-wasm": { - "name": "@sora/go-wasm", "version": "2021.1.0" }, "packages/sdk": { - "name": "@sora/sdk", "dependencies": { "@sora/e2ee": "^2021.1.0", - "fflate": "^0.7.2", - "rollup-plugin-terser": "^7.0.2" + "fflate": "^0.7.2" }, "devDependencies": { "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-node-resolve": "^13.1.1", - "@rollup/plugin-replace": "^3.0.0", + "@rollup/plugin-node-resolve": "^13.1.2", + "@rollup/plugin-replace": "^3.0.1", "@rollup/plugin-typescript": "^8.3.0", - "@types/jest": "^27.0.3", - "@typescript-eslint/eslint-plugin": "5.7.0", - "@typescript-eslint/parser": "5.7.0", - "eslint": "8.4.1", + "@types/jest": "^27.4.0", + "@typescript-eslint/eslint-plugin": "5.9.0", + "@typescript-eslint/parser": "5.9.0", + "eslint": "8.6.0", "eslint-config-prettier": "8.3.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.4.5", "prettier": "^2.5.1", - "rollup": "^2.61.1", - "ts-jest": "^27.1.1", + "rollup": "^2.62.0", + "rollup-plugin-terser": "^7.0.2", + "ts-jest": "^27.1.2", "typescript": "^4.5.4" } } }, "dependencies": { "@babel/code-frame": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", - "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "dev": true, "requires": { - "@babel/highlight": "^7.16.0" + "@babel/highlight": "^7.16.7" } }, "@babel/compat-data": { @@ -8112,20 +8181,20 @@ "dev": true }, "@babel/core": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.5.tgz", - "integrity": "sha512-wUcenlLzuWMZ9Zt8S0KmFwGlH6QKRh3vsm/dhDA3CHkiTA45YuG1XkHRcNRl73EFPXDp/d5kVOU0/y7x2w6OaQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.5", - "@babel/helper-compilation-targets": "^7.16.3", - "@babel/helper-module-transforms": "^7.16.5", - "@babel/helpers": "^7.16.5", - "@babel/parser": "^7.16.5", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.5", - "@babel/types": "^7.16.0", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.7.tgz", + "integrity": "sha512-aeLaqcqThRNZYmbMqtulsetOQZ/5gbR/dWruUCJcpas4Qoyy+QeagfDsPdMrqwsPRDNxJvBlRiZxxX7THO7qtA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.16.7", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helpers": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -8149,12 +8218,12 @@ } }, "@babel/generator": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.5.tgz", - "integrity": "sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.7.tgz", + "integrity": "sha512-/ST3Sg8MLGY5HVYmrjOgL60ENux/HfO/CsUh7y4MalThufhE/Ff/6EibFDHi4jiDCaWfJKoqbE6oTh21c5hrRg==", "dev": true, "requires": { - "@babel/types": "^7.16.0", + "@babel/types": "^7.16.7", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -8168,13 +8237,13 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.3.tgz", - "integrity": "sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", + "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", "dev": true, "requires": { - "@babel/compat-data": "^7.16.0", - "@babel/helper-validator-option": "^7.14.5", + "@babel/compat-data": "^7.16.4", + "@babel/helper-validator-option": "^7.16.7", "browserslist": "^4.17.5", "semver": "^6.3.0" }, @@ -8188,120 +8257,122 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.5.tgz", - "integrity": "sha512-ODQyc5AnxmZWm/R2W7fzhamOk1ey8gSguo5SGvF0zcB3uUzRpTRmM/jmLSm9bDMyPlvbyJ+PwPEK0BWIoZ9wjg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", "dev": true, "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-function-name": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz", - "integrity": "sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.16.0", - "@babel/template": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/helper-get-function-arity": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz", - "integrity": "sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", "dev": true, "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-hoist-variables": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.0.tgz", - "integrity": "sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dev": true, "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-module-imports": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz", - "integrity": "sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", "dev": true, "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-module-transforms": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.5.tgz", - "integrity": "sha512-CkvMxgV4ZyyioElFwcuWnDCcNIeyqTkCm9BxXZi73RR1ozqlpboqsbGUNvRTflgZtFbbJ1v5Emvm+lkjMYY/LQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", + "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.16.5", - "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-simple-access": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/helper-validator-identifier": "^7.15.7", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.5", - "@babel/types": "^7.16.0" + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/helper-plugin-utils": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.5.tgz", - "integrity": "sha512-59KHWHXxVA9K4HNF4sbHCf+eJeFe0Te/ZFGqBT4OjXhrwvA04sGfaEGsVTdsjoszq0YTP49RC9UKe5g8uN2RwQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", + "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", "dev": true }, "@babel/helper-simple-access": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.0.tgz", - "integrity": "sha512-o1rjBT/gppAqKsYfUdfHq5Rk03lMQrkPHG1OWzHWpLgVXRH4HnMM9Et9CVdIqwkCQlobnGHEJMsgWP/jE1zUiw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", + "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", "dev": true, "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-split-export-declaration": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz", - "integrity": "sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dev": true, "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==" + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true }, "@babel/helper-validator-option": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", - "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", "dev": true }, "@babel/helpers": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.5.tgz", - "integrity": "sha512-TLgi6Lh71vvMZGEkFuIxzaPsyeYCHQ5jJOOX1f0xXn0uciFuE8cEk0wyBquMcCxBXZ5BJhE2aUB7pnWTD150Tw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.7.tgz", + "integrity": "sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw==", "dev": true, "requires": { - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.5", - "@babel/types": "^7.16.0" + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/highlight": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz", - "integrity": "sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.7.tgz", + "integrity": "sha512-aKpPMfLvGO3Q97V0qhw/V2SWNWlwfJknuwAunU7wZLSfrM4xTBvg7E5opUVi1kJTBKihE38CPg4nBiqX83PWYw==", + "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.15.7", + "@babel/helper-validator-identifier": "^7.16.7", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -8310,6 +8381,7 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, "requires": { "color-convert": "^1.9.0" } @@ -8318,6 +8390,7 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -8328,6 +8401,7 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, "requires": { "color-name": "1.1.3" } @@ -8335,17 +8409,20 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -8353,9 +8430,9 @@ } }, "@babel/parser": { - "version": "7.16.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", - "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.7.tgz", + "integrity": "sha512-sR4eaSrnM7BV7QPzGfEX5paG/6wrZM3I0HDzfIAK06ESvo9oy3xBuVBxE3MbQaKNhvg8g/ixjMWo2CGpzpHsDA==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -8467,39 +8544,39 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.5.tgz", - "integrity": "sha512-/d4//lZ1Vqb4mZ5xTep3dDK888j7BGM/iKqBmndBaoYAFPlPKrGU608VVBz5JeyAb6YQDjRu1UKqj86UhwWVgw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz", + "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/template": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.0.tgz", - "integrity": "sha512-MnZdpFD/ZdYhXwiunMqqgyZyucaYsbL0IrjoGjaVhGilz+x8YB++kRfygSOIj1yOtWKPlx7NBp+9I1RQSgsd5A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, "requires": { - "@babel/code-frame": "^7.16.0", - "@babel/parser": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/traverse": { - "version": "7.16.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.5.tgz", - "integrity": "sha512-FOCODAzqUMROikDYLYxl4nmwiLlu85rNqBML/A5hKRVXG2LV8d0iMqgPzdYTcIpjZEBB7D6UDU9vxRZiriASdQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.5", - "@babel/helper-environment-visitor": "^7.16.5", - "@babel/helper-function-name": "^7.16.0", - "@babel/helper-hoist-variables": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/parser": "^7.16.5", - "@babel/types": "^7.16.0", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.7.tgz", + "integrity": "sha512-8KWJPIb8c2VvY8AJrydh6+fVRo2ODx1wYBU2398xJVq0JomuLBZmVQzLPBblJgHIGYG4znCpUZUZ0Pt2vdmVYQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -8513,12 +8590,12 @@ } }, "@babel/types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.0.tgz", - "integrity": "sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.7.tgz", + "integrity": "sha512-E8HuV7FO9qLpx6OtoGfUQ2cjIYnbFwvZWYBS+87EwtdMvmUPJSwykpovFB+8insbpF0uJcpr8KMUi64XZntZcg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.15.7", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" } }, @@ -8977,9 +9054,9 @@ } }, "@rollup/plugin-node-resolve": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.1.tgz", - "integrity": "sha512-6QKtRevXLrmEig9UiMYt2fSvee9TyltGRfw+qSs6xjUnxwjOzTOqy+/Lpxsgjb8mJn1EQNbCDAvt89O4uzL5kw==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.2.tgz", + "integrity": "sha512-xyqbuf1vyOPC60jEKhx3DBHunymnCJswzjNTKfX4Jz7zCPar1UqbRZCNY1u5QaXh97beaFTWdoUUWiV4qX8o/g==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -8991,9 +9068,9 @@ } }, "@rollup/plugin-replace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-3.0.0.tgz", - "integrity": "sha512-3c7JCbMuYXM4PbPWT4+m/4Y6U60SgsnDT/cCyAyUKwFHg7pTSfsSQzIpETha3a3ig6OdOKzZz87D9ZXIK3qsDg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-3.0.1.tgz", + "integrity": "sha512-989J5oRzf3mm0pO/0djTijdfEh9U3n63BIXN5X7T4U9BP+fN4oxQ6DvDuBvFaHA6scaHQRclqmKQEkBhB7k7Hg==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -9056,16 +9133,16 @@ "@sora/e2ee": { "version": "file:packages/e2ee", "requires": { - "@rollup/plugin-replace": "^3.0.0", + "@rollup/plugin-replace": "^3.0.1", "@rollup/plugin-typescript": "^8.3.0", "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^5.7.0", - "@typescript-eslint/parser": "^5.7.0", - "eslint": "^8.4.1", + "@typescript-eslint/eslint-plugin": "^5.9.0", + "@typescript-eslint/parser": "^5.9.0", + "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.5.1", - "rollup": "^2.61.1", + "rollup": "^2.62.0", "typescript": "^4.5.4" } }, @@ -9076,22 +9153,22 @@ "version": "file:packages/sdk", "requires": { "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-node-resolve": "^13.1.1", - "@rollup/plugin-replace": "^3.0.0", + "@rollup/plugin-node-resolve": "^13.1.2", + "@rollup/plugin-replace": "^3.0.1", "@rollup/plugin-typescript": "^8.3.0", "@sora/e2ee": "^2021.1.0", - "@types/jest": "^27.0.3", - "@typescript-eslint/eslint-plugin": "5.7.0", - "@typescript-eslint/parser": "5.7.0", - "eslint": "8.4.1", + "@types/jest": "^27.4.0", + "@typescript-eslint/eslint-plugin": "5.9.0", + "@typescript-eslint/parser": "5.9.0", + "eslint": "8.6.0", "eslint-config-prettier": "8.3.0", "eslint-plugin-prettier": "4.0.0", "fflate": "^0.7.2", "jest": "^27.4.5", "prettier": "^2.5.1", - "rollup": "^2.61.1", + "rollup": "^2.62.0", "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^27.1.1", + "ts-jest": "^27.1.2", "typescript": "^4.5.4" } }, @@ -9111,9 +9188,9 @@ "dev": true }, "@types/babel__core": { - "version": "7.1.17", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.17.tgz", - "integrity": "sha512-6zzkezS9QEIL8yCBvXWxPTJPNuMeECJVxSOhxNY/jfq9LxOTHivaYTqr37n9LknWWRTIkzqH2UilS5QFvfa90A==", + "version": "7.1.18", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.18.tgz", + "integrity": "sha512-S7unDjm/C7z2A2R9NzfKCK1I+BAALDtxEmsJBwlB3EzNfb929ykjL++1CK9LO++EIp2fQrC8O+BwjKvz6UeDyQ==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -9124,9 +9201,9 @@ } }, "@types/babel__generator": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.3.tgz", - "integrity": "sha512-/GWCmzJWqV7diQW54smJZzWbSFf4QYtF71WCKhcx6Ru/tFyQIY2eiiITcCAeuPbNSvT9YCGkVMqqvSk2Z0mXiA==", + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", "dev": true, "requires": { "@babel/types": "^7.0.0" @@ -9167,9 +9244,9 @@ } }, "@types/istanbul-lib-coverage": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", - "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", "dev": true }, "@types/istanbul-lib-report": { @@ -9191,9 +9268,9 @@ } }, "@types/jest": { - "version": "27.0.3", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.0.3.tgz", - "integrity": "sha512-cmmwv9t7gBYt7hNKH5Spu7Kuu/DotGa+Ff+JGRKZ4db5eh8PnKS4LuebJ3YLUoyOyIHraTGyULn23YtEAm0VSg==", + "version": "27.4.0", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.0.tgz", + "integrity": "sha512-gHl8XuC1RZ8H2j5sHv/JqsaxXkDDM9iDOgu0Wp8sjs4u/snb2PVehyWXJPr+ORA0RPpgw231mnutWI1+0hgjIQ==", "dev": true, "requires": { "jest-diff": "^27.0.0", @@ -9207,9 +9284,10 @@ "dev": true }, "@types/node": { - "version": "16.11.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.13.tgz", - "integrity": "sha512-eUXZzHLHoZqj1frtUetNkUetYoJ6X55UmrVnFD4DMhVeAmwLjniZhtBmsRiemQh4uq4G3vUra/Ws/hs9vEvL3Q==" + "version": "17.0.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.7.tgz", + "integrity": "sha512-1QUk+WAUD4t8iR+Oj+UgI8oJa6yyxaB8a8pHaC8uqM6RrS1qbL7bf3Pwl5rHv0psm2CuDErgho6v5N+G+5fwtQ==", + "dev": true }, "@types/prettier": { "version": "2.4.2", @@ -9248,13 +9326,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.7.0.tgz", - "integrity": "sha512-8RTGBpNn5a9M628wBPrCbJ+v3YTEOE2qeZb7TDkGKTDXSj36KGRg92SpFFaR/0S3rSXQxM0Og/kV9EyadsYSBg==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.9.0.tgz", + "integrity": "sha512-qT4lr2jysDQBQOPsCCvpPUZHjbABoTJW8V9ZzIYKHMfppJtpdtzszDYsldwhFxlhvrp7aCHeXD1Lb9M1zhwWwQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "5.7.0", - "@typescript-eslint/scope-manager": "5.7.0", + "@typescript-eslint/experimental-utils": "5.9.0", + "@typescript-eslint/scope-manager": "5.9.0", + "@typescript-eslint/type-utils": "5.9.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -9264,55 +9343,66 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.7.0.tgz", - "integrity": "sha512-u57eZ5FbEpzN5kSjmVrSesovWslH2ZyNPnaXQMXWgH57d5+EVHEt76W75vVuI9qKZ5BMDKNfRN+pxcPEjQjb2A==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.9.0.tgz", + "integrity": "sha512-ZnLVjBrf26dn7ElyaSKa6uDhqwvAi4jBBmHK1VxuFGPRAxhdi18ubQYSGA7SRiFiES3q9JiBOBHEBStOFkwD2g==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.7.0", - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/typescript-estree": "5.7.0", + "@typescript-eslint/scope-manager": "5.9.0", + "@typescript-eslint/types": "5.9.0", + "@typescript-eslint/typescript-estree": "5.9.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/parser": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.7.0.tgz", - "integrity": "sha512-m/gWCCcS4jXw6vkrPQ1BjZ1vomP01PArgzvauBqzsoZ3urLbsRChexB8/YV8z9HwE3qlJM35FxfKZ1nfP/4x8g==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.9.0.tgz", + "integrity": "sha512-/6pOPz8yAxEt4PLzgbFRDpZmHnXCeZgPDrh/1DaVKOjvn/UPMlWhbx/gA96xRi2JxY1kBl2AmwVbyROUqys5xQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.7.0", - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/typescript-estree": "5.7.0", + "@typescript-eslint/scope-manager": "5.9.0", + "@typescript-eslint/types": "5.9.0", + "@typescript-eslint/typescript-estree": "5.9.0", "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz", - "integrity": "sha512-7mxR520DGq5F7sSSgM0HSSMJ+TFUymOeFRMfUfGFAVBv8BR+Jv1vHgAouYUvWRZeszVBJlLcc9fDdktxb5kmxA==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.9.0.tgz", + "integrity": "sha512-DKtdIL49Qxk2a8icF6whRk7uThuVz4A6TCXfjdJSwOsf+9ree7vgQWcx0KOyCdk0i9ETX666p4aMhrRhxhUkyg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0" + "@typescript-eslint/types": "5.9.0", + "@typescript-eslint/visitor-keys": "5.9.0" + } + }, + "@typescript-eslint/type-utils": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.9.0.tgz", + "integrity": "sha512-uVCb9dJXpBrK1071ri5aEW7ZHdDHAiqEjYznF3HSSvAJXyrkxGOw2Ejibz/q6BXdT8lea8CMI0CzKNFTNI6TEQ==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "5.9.0", + "debug": "^4.3.2", + "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.7.0.tgz", - "integrity": "sha512-5AeYIF5p2kAneIpnLFve8g50VyAjq7udM7ApZZ9JYjdPjkz0LvODfuSHIDUVnIuUoxafoWzpFyU7Sqbxgi79mA==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.9.0.tgz", + "integrity": "sha512-mWp6/b56Umo1rwyGCk8fPIzb9Migo8YOniBGPAQDNC6C52SeyNGN4gsVwQTAR+RS2L5xyajON4hOLwAGwPtUwg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.7.0.tgz", - "integrity": "sha512-aO1Ql+izMrTnPj5aFFlEJkpD4jRqC4Gwhygu2oHK2wfVQpmOPbyDSveJ+r/NQo+PWV43M6uEAeLVbTi09dFLhg==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.9.0.tgz", + "integrity": "sha512-kxo3xL2mB7XmiVZcECbaDwYCt3qFXz99tBSuVJR4L/sR7CJ+UNAPrYILILktGj1ppfZ/jNt/cWYbziJUlHl1Pw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.7.0", - "@typescript-eslint/visitor-keys": "5.7.0", + "@typescript-eslint/types": "5.9.0", + "@typescript-eslint/visitor-keys": "5.9.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -9321,12 +9411,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz", - "integrity": "sha512-hdohahZ4lTFcglZSJ3DGdzxQHBSxsLVqHzkiOmKi7xVAWC4y2c1bIMKmPJSrA4aOEoRUPOKQ87Y/taC7yVHpFg==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.9.0.tgz", + "integrity": "sha512-6zq0mb7LV0ThExKlecvpfepiB+XEtFv/bzx7/jKSgyXTFD7qjmSu1FoiS0x3OZaiS+UIXpH2vd9O89f02RCtgw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.7.0", + "@typescript-eslint/types": "5.9.0", "eslint-visitor-keys": "^3.0.0" } }, @@ -9359,10 +9449,10 @@ } }, "acorn": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", - "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", - "devOptional": true + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "dev": true }, "acorn-globals": { "version": "6.0.0", @@ -9405,9 +9495,9 @@ } }, "agentkeepalive": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.1.4.tgz", - "integrity": "sha512-+V/rGa3EuU74H6wR04plBb7Ks10FbtUQgRj/FQOG7uUIEuaINI+AiqJR1k6t3SVNs7o7ZjIdus6706qqzVq8jQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.0.tgz", + "integrity": "sha512-0PhAp58jZNw13UJv7NVdTGb0ZcghHUb3DrZ046JiiJY/BOaTTpbwdHq2VObPCBV8M2GPh7sgrJ3AQ8Ey468LJw==", "dev": true, "requires": { "debug": "^4.1.0", @@ -9713,7 +9803,8 @@ "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true }, "builtin-modules": { "version": "3.2.0", @@ -9798,15 +9889,15 @@ "dev": true }, "camelcase": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", - "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, "caniuse-lite": { - "version": "1.0.30001286", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001286.tgz", - "integrity": "sha512-zaEMRH6xg8ESMi2eQ3R4eZ5qw/hJiVsO/HlLwniIwErij0JDr9P+8V4dtx1l+kLq6j3yy8l8W4fst1lBnat5wQ==", + "version": "1.0.30001296", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001296.tgz", + "integrity": "sha512-WfrtPEoNSoeATDlf4y3QvkwiELl9GyPLISV5GejTbbQRtQx4LhsXmc9IQ6XCL2d7UxCyEzToEZNMeqR79OUw8Q==", "dev": true }, "chalk": { @@ -10248,9 +10339,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.18", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.18.tgz", - "integrity": "sha512-i7nKjGGBE1+YUIbfLObA1EZPmN7J1ITEllbhusDk+KIk6V6gUxN9PFe36v+Sd+8Cg0k3cgUv9lQhQZalr8rggw==", + "version": "1.4.33", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.33.tgz", + "integrity": "sha512-OVK1Ad3pHnmuXPhEfq85X8vUKr1UPNHryBnbKnyLcAfh8dPwoFjoDhDlP5KpPJIiymvSucZs48UBrE1250IxOw==", "dev": true }, "emittery": { @@ -10320,7 +10411,8 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true }, "escodegen": { "version": "2.0.0", @@ -10383,9 +10475,9 @@ } }, "eslint": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.4.1.tgz", - "integrity": "sha512-TxU/p7LB1KxQ6+7aztTnO7K0i+h0tDi81YRY9VzB6Id71kNz+fFYnf5HD5UOQmxkzcoa0TlVZf9dpMtUv0GpWg==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.6.0.tgz", + "integrity": "sha512-UvxdOJ7mXFlw7iuHZA4jmzPaUqIw54mZrv+XPYKNbKdLR0et4rf60lIZUU9kiNtnzzMzGWxMV+tQ7uG7JG8DPw==", "dev": true, "requires": { "@eslint/eslintrc": "^1.0.5", @@ -10400,7 +10492,7 @@ "eslint-scope": "^7.1.0", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.1.0", - "espree": "^9.2.0", + "espree": "^9.3.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -10555,12 +10647,12 @@ "dev": true }, "espree": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.2.0.tgz", - "integrity": "sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", + "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", "dev": true, "requires": { - "acorn": "^8.6.0", + "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", "eslint-visitor-keys": "^3.1.0" } @@ -10827,6 +10919,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, "optional": true }, "function-bind": { @@ -10991,7 +11084,8 @@ "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "has-unicode": { "version": "2.0.1", @@ -11082,9 +11176,9 @@ } }, "ignore": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, "ignore-walk": { @@ -11362,9 +11456,9 @@ } }, "istanbul-reports": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.1.tgz", - "integrity": "sha512-q1kvhAXWSsXfMjCdNHNPKZZv94OlspKnoGv+R9RGbnqOOQ0VbNfLFgQDVgi7hHenKsndGq3/o0OBdzDXthWcNw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.3.tgz", + "integrity": "sha512-x9LtDVtfm/t1GFiLl3NffC7hz+I1ragvgX1P/Lg1NlIagifZDKUkuuaAxH/qpwj2IuEfD8G2Bs/UKp+sZ/pKkg==", "dev": true, "requires": { "html-escaper": "^2.0.0", @@ -12017,7 +12111,8 @@ "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, "js-yaml": { "version": "4.1.0", @@ -12347,7 +12442,8 @@ "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true }, "merge2": { "version": "1.4.1", @@ -12575,9 +12671,9 @@ } }, "npm-check-updates": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.0.3.tgz", - "integrity": "sha512-MTHzkDZY1ebhPaDvzWOU9bt4UYdHmY4tIcMCaZjgguGKUgwqokH/aB0Nrc4WcZ4rD491Spuj5DILo/RvKAefvw==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.1.0.tgz", + "integrity": "sha512-9GtSetBvcth7MuL+0MpOmWgdfiEgZcWRfnvoYnNZxbZpleHZCT0Z3HnbsL6/EAT2M+ye7FTZ+YjmDmZptt7Rkg==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -12919,9 +13015,9 @@ "dev": true }, "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "pirates": { @@ -13098,6 +13194,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, "requires": { "safe-buffer": "^5.1.0" } @@ -13203,13 +13300,14 @@ "dev": true }, "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.0.tgz", + "integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==", "dev": true, "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-cwd": { @@ -13272,9 +13370,10 @@ } }, "rollup": { - "version": "2.61.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.61.1.tgz", - "integrity": "sha512-BbTXlEvB8d+XFbK/7E5doIcRtxWPRiqr0eb5vQ0+2paMM04Ye4PZY5nHOQef2ix24l/L0SpLd5hwcH15QHPdvA==", + "version": "2.62.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.62.0.tgz", + "integrity": "sha512-cJEQq2gwB0GWMD3rYImefQTSjrPYaC6s4J9pYqnstVLJ1CHa/aZNVkD4Epuvg4iLeMA4KRiq7UM7awKK6j7jcw==", + "dev": true, "requires": { "fsevents": "~2.3.2" } @@ -13283,6 +13382,7 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "jest-worker": "^26.2.1", @@ -13294,6 +13394,7 @@ "version": "26.6.2", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -13314,7 +13415,8 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -13367,6 +13469,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, "requires": { "randombytes": "^2.1.0" } @@ -13553,12 +13656,14 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true }, "source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -13683,6 +13788,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -13697,6 +13803,12 @@ "supports-color": "^7.0.0" } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -13731,6 +13843,7 @@ "version": "5.10.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", + "dev": true, "requires": { "commander": "^2.20.0", "source-map": "~0.7.2", @@ -13740,12 +13853,14 @@ "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true }, "source-map": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true } } }, @@ -13836,9 +13951,9 @@ } }, "ts-jest": { - "version": "27.1.1", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.1.tgz", - "integrity": "sha512-Ds0VkB+cB+8g2JUmP/GKWndeZcCKrbe6jzolGrVWdqVUFByY/2KDHqxJ7yBSon7hDB1TA4PXxjfZ+JjzJisvgA==", + "version": "27.1.2", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.2.tgz", + "integrity": "sha512-eSOiJOWq6Hhs6Khzk5wKC5sgWIXgXqOCiIl1+3lfnearu58Hj4QpE5tUhQcA3xtZrELbcvAGCsd6HB8OsaVaTA==", "dev": true, "requires": { "bs-logger": "0.x", @@ -13852,9 +13967,9 @@ } }, "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", "dev": true, "peer": true }, diff --git a/package.json b/package.json index ed0dd4fc..ea8baf8b 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dist" ], "devDependencies": { - "npm-check-updates": "^12.0.3", + "npm-check-updates": "^12.1.0", "serve": "^13.0.2", "typedoc": "^0.22.10" }, diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index 23dd805f..2c615fce 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -16,15 +16,15 @@ "test": "echo \"no test\"" }, "devDependencies": { - "@rollup/plugin-replace": "^3.0.0", + "@rollup/plugin-replace": "^3.0.1", "@rollup/plugin-typescript": "^8.3.0", - "@typescript-eslint/eslint-plugin": "^5.7.0", - "@typescript-eslint/parser": "^5.7.0", - "eslint": "^8.4.1", + "@typescript-eslint/eslint-plugin": "^5.9.0", + "@typescript-eslint/parser": "^5.9.0", + "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.5.1", - "rollup": "^2.61.1", + "rollup": "^2.62.0", "typescript": "^4.5.4" }, "dependencies": { diff --git a/packages/sdk/package.json b/packages/sdk/package.json index d80d9490..bdddf0ea 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -9,24 +9,24 @@ }, "devDependencies": { "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-node-resolve": "^13.1.1", - "@rollup/plugin-replace": "^3.0.0", + "@rollup/plugin-node-resolve": "^13.1.2", + "@rollup/plugin-replace": "^3.0.1", "@rollup/plugin-typescript": "^8.3.0", - "@types/jest": "^27.0.3", - "@typescript-eslint/eslint-plugin": "5.7.0", - "@typescript-eslint/parser": "5.7.0", - "eslint": "8.4.1", + "@types/jest": "^27.4.0", + "@typescript-eslint/eslint-plugin": "5.9.0", + "@typescript-eslint/parser": "5.9.0", + "eslint": "8.6.0", "eslint-config-prettier": "8.3.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.4.5", "prettier": "^2.5.1", - "rollup": "^2.61.1", - "ts-jest": "^27.1.1", + "rollup": "^2.62.0", + "rollup-plugin-terser": "^7.0.2", + "ts-jest": "^27.1.2", "typescript": "^4.5.4" }, "dependencies": { "@sora/e2ee": "^2021.1.0", - "fflate": "^0.7.2", - "rollup-plugin-terser": "^7.0.2" + "fflate": "^0.7.2" } } From 91110b35d76b36b99c83eaedc9d7a70979aaf782 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 4 Jan 2022 16:13:41 +0900 Subject: [PATCH 08/86] 2022.1.0-canary.0 --- dist/sora.js | 100 ++++++++++++++++++++++++++----------------- dist/sora.min.js | 2 +- dist/sora.min.js.map | 2 +- dist/sora.mjs | 100 ++++++++++++++++++++++++++----------------- dist/utils.d.ts | 1 + package-lock.json | 7 ++- package.json | 2 +- 7 files changed, 131 insertions(+), 83 deletions(-) diff --git a/dist/sora.js b/dist/sora.js index f47ab642..47ed0d84 100644 --- a/dist/sora.js +++ b/dist/sora.js @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2021.2.0 + * @version: 2022.1.0-canary.0 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -828,8 +828,10 @@ // u16 "map": index -> # of codes with bit length = index var l = new u16(mb); // length of cd must be 288 (total # of codes) - for (; i < s; ++i) - ++l[cd[i] - 1]; + for (; i < s; ++i) { + if (cd[i]) + ++l[cd[i] - 1]; + } // u16 "map": index -> minimum code for bit length = index var le = new u16(mb); for (i = 0; i < mb; ++i) { @@ -1363,15 +1365,11 @@ for (var i = 0; i <= s; i += 65535) { // end var e = i + 65535; - if (e < s) { - // write full block - pos = wfblk(w, pos, dat.subarray(i, e)); - } - else { + if (e >= s) { // write final block - w[i] = lst; - pos = wfblk(w, pos, dat.subarray(i, s)); + w[pos >> 3] = lst; } + pos = wfblk(w, pos + 1, dat.subarray(i, e)); } } else { @@ -1635,7 +1633,7 @@ } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2021.2.0", + sora_client: "Sora JavaScript SDK 2022.1.0-canary.0", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -1843,6 +1841,7 @@ if (record && typeof record === "object") { let keys = null; try { + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument keys = Object.keys(JSON.parse(JSON.stringify(record))); } catch (_) { @@ -1935,6 +1934,13 @@ event.datachannel = channel; return event; } + function parseDataChannelEventData(eventData, compress) { + if (compress) { + const unzlibMessage = unzlibSync(new Uint8Array(eventData)); + return new TextDecoder().decode(unzlibMessage); + } + return eventData; + } /** * Sora との WebRTC 接続を扱う基底クラス @@ -2838,6 +2844,9 @@ this.signalingOnMessageE2EE(event.data); return; } + if (typeof event.data !== "string") { + throw new Error("Received invalid signaling data"); + } const message = JSON.parse(event.data); if (message.type == "offer") { this.writeWebSocketSignalingLog("onmessage-offer", message); @@ -3593,12 +3602,13 @@ if (dataChannelEvent.channel.label === "signaling") { dataChannelEvent.channel.onmessage = async (event) => { const channel = event.currentTarget; - let data = event.data; - if (this.signalingOfferMessageDataChannels.signaling && - this.signalingOfferMessageDataChannels.signaling.compress === true) { - const unzlibMessage = unzlibSync(new Uint8Array(event.data)); - data = new TextDecoder().decode(unzlibMessage); + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn(`Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`); + return; } + const data = parseDataChannelEventData(event.data, dataChannelSettings.compress); const message = JSON.parse(data); this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message); if (message.type === "re-offer") { @@ -3609,12 +3619,13 @@ else if (dataChannelEvent.channel.label === "notify") { dataChannelEvent.channel.onmessage = (event) => { const channel = event.currentTarget; - let data = event.data; - if (this.signalingOfferMessageDataChannels.notify && - this.signalingOfferMessageDataChannels.notify.compress === true) { - const unzlibMessage = unzlibSync(new Uint8Array(event.data)); - data = new TextDecoder().decode(unzlibMessage); + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn(`Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`); + return; } + const data = parseDataChannelEventData(event.data, dataChannelSettings.compress); const message = JSON.parse(data); if (message.event_type === "connection.created") { this.writeDataChannelTimelineLog("notify-connection.created", channel, message); @@ -3627,12 +3638,14 @@ } else if (dataChannelEvent.channel.label === "push") { dataChannelEvent.channel.onmessage = (event) => { - let data = event.data; - if (this.signalingOfferMessageDataChannels.push && - this.signalingOfferMessageDataChannels.push.compress === true) { - const unzlibMessage = unzlibSync(new Uint8Array(event.data)); - data = new TextDecoder().decode(unzlibMessage); + const channel = event.currentTarget; + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn(`Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`); + return; } + const data = parseDataChannelEventData(event.data, dataChannelSettings.compress); const message = JSON.parse(data); this.callbacks.push(message, "datachannel"); }; @@ -3647,12 +3660,14 @@ } else if (dataChannelEvent.channel.label === "stats") { dataChannelEvent.channel.onmessage = async (event) => { - let data = event.data; - if (this.signalingOfferMessageDataChannels.stats && - this.signalingOfferMessageDataChannels.stats.compress === true) { - const unzlibMessage = unzlibSync(new Uint8Array(event.data)); - data = new TextDecoder().decode(unzlibMessage); + const channel = event.currentTarget; + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn(`Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`); + return; } + const data = parseDataChannelEventData(event.data, dataChannelSettings.compress); const message = JSON.parse(data); if (message.type === "req-stats") { const stats = await this.getStats(); @@ -3662,14 +3677,19 @@ } else if (/^#.*/.exec(dataChannelEvent.channel.label)) { dataChannelEvent.channel.onmessage = (event) => { - if (event.target === null) { + if (event.currentTarget === null) { + return; + } + const channel = event.currentTarget; + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn(`Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`); return; } - const dataChannel = event.target; let data = event.data; - const settings = this.signalingOfferMessageDataChannels[dataChannel.label]; - if (settings !== undefined && settings.compress === true) { - data = unzlibSync(new Uint8Array(event.data)).buffer; + if (dataChannelSettings.compress === true) { + data = unzlibSync(new Uint8Array(data)).buffer; } this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data)); }; @@ -4135,7 +4155,8 @@ this.callbacks.removetrack(event); if (event.target) { // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す - const index = this.remoteConnectionIds.indexOf(event.target.id); + const targetId = event.target.id; + const index = this.remoteConnectionIds.indexOf(targetId); if (-1 < index) { delete this.remoteConnectionIds[index]; // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す @@ -4199,7 +4220,8 @@ this.callbacks.removetrack(event); if (event.target) { // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す - const index = this.remoteConnectionIds.indexOf(event.target.id); + const targetId = event.target.id; + const index = this.remoteConnectionIds.indexOf(targetId); if (-1 < index) { delete this.remoteConnectionIds[index]; // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す @@ -4373,7 +4395,7 @@ * @public */ version: function () { - return "2021.2.0"; + return "2022.1.0-canary.0"; }, /** * WebRTC のユーティリティ関数群 diff --git a/dist/sora.min.js b/dist/sora.min.js index 57a77701..42a9233d 100644 --- a/dist/sora.min.js +++ b/dist/sora.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sora=t()}(this,(function(){"use strict";class e{constructor(){if(!!!RTCRtpSender.prototype.createEncodedStreams)throw new Error("E2EE is not supported in this browser.");this.worker=null,this.onWorkerDisconnect=null}startWorker(){const e=atob("InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCkgPSBsb2coeCkgLyBsb2coMjU2KQogICAgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5sb2cobikgLyBNYXRoLmxvZygyICoqIDgpICsgMSk7Cn0KZnVuY3Rpb24gYXJyYXlCdWZmZXJUb051bWJlcihhcnJheUJ1ZmZlcikgewogICAgLy8gMzJiaXQg44G+44Gn44KS5oOz5a6aIChCaWdJbnQg44G444Gu5pu444GN5o+b44GI5pmC44Gr6KaB5L+u5q2jKQogICAgY29uc3QgbmV3QXJyYXlCdWZmZXIgPSBuZXcgQXJyYXlCdWZmZXIoVWludDMyQXJyYXkuQllURVNfUEVSX0VMRU1FTlQpOwogICAgY29uc3QgbmV3RGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcobmV3QXJyYXlCdWZmZXIpOwogICAgY29uc3QgZGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcoYXJyYXlCdWZmZXIpOwogICAgY29uc3QgcGFkZGluZ0xlbmd0aCA9IFVpbnQzMkFycmF5LkJZVEVTX1BFUl9FTEVNRU5UIC0gZGF0YVZpZXcuYnl0ZUxlbmd0aDsKICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcGFkZGluZ0xlbmd0aDsgaSArPSAxKSB7CiAgICAgICAgbmV3RGF0YVZpZXcuc2V0VWludDgoaSwgMCk7CiAgICB9CiAgIC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RGcmFtZS5kYXRhLnNsaWNlKHVuZW5jcnlwdGVkQnl0ZXNbZW5jb2RlZEZyYW1lLnR5cGVdKSk7CiAgICAgICAgY29uc3Qgc2ZyYW1lSGVhZGVyID0gbmV3IFVpbnQ4QXJyYXkoc2ZyYW1lSGVhZGVyQnVmZmVyKTsKICAgICAgICBjb25zdCBjb25uZWN0aW9uSWQgPSB0ZXh0RGVjb2Rlci5kZWNvZGUoY29ubmVjdGlvbklkQnVmZmVyKTsKICAgICAgICBjb25zdCBbcywgY291bnQsIGtleUlkXSA9IHBhcnNlU0ZyYW1lSGVhZGVyKHNmcmFtZUhlYWRlckJ1ZmZlcik7CiAgICAgICAgLy8g5LuK5Zue44GvIHMgZmxhZyDjga8gMCDjga7jgb8KICAgICAgICBpZiAocyAhPT0gMCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlVORVhQRUNURUQtUy1GTEFHIik7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGRlcml2ZUtleSA9IGdldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICBpZiAoIWRlcml2ZUtleSkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGl2ID0gZ2VuZXJhdGVJVihjb3VudCwgY29ubmVjdGlvbklkLCBrZXlJZCk7CiAgICAgICAgaWYgKCFpdikgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGZyYW1lQWRkID0gZW5jb2RlRnJhbWVBZGQoZnJhbWVNZXRhZGF0YSwgc2ZyYW1lSGVhZGVyLCBjb25uZWN0aW9uSWQpOwogICAgICAgIGNyeXB0by5zdWJ0bGUKICAgICAgICAgICAgLmRlY3J5cHQoewogICAgICAgICAgICBuYW1lOiAiQUVTLUdDTSIsCiAgICAgICAgICAgIGl2OiBpdiwKICAgICAgICAgICAgYWRkaXRpb25hbERhdGE6IGZyYW1lQWRkLAogICAgICAgIH0sIG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gICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lc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ICAgfSk7CiAgICAgICAgcmVhZGFibGVTdHJlYW0ucGlwZVRocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=");this.worker=new Worker(URL.createObjectURL(new Blob([e],{type:"application/javascript"}))),this.worker.onmessage=e=>{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},g=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},c=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(c+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,l(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),l(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),l(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),l(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,l(e+16)),i=g(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=g(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=g(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),g=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>c]=r}else for(g=new n(s),a=0;a>>15-e[a]);return g},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var p=new t(32);for(m=0;m<32;++m)p[m]=5;var Z=A(b,9,0),w=A(b,9,1),S=A(p,5,0),V=A(p,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(e instanceof n?n:e instanceof i?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},X=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},O=function(e,i){for(var s=[],a=0;aI&&(I=g[a].s);var m=new n(I+1),u=E(s[d-1],m,0);if(u>i){a=0;var A=0,b=u-i,p=1<i))break;A+=p-(1<>>=b;A>0;){var w=g[a].s;m[w]=0&&A;--a){var S=g[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},E=function(e,t,n){return-1==e.s?Math.max(E(e.l,t,n+1),E(e.r,t,n+1)):t[e.s]=n},N=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,g=function(e){i[s++]=e},l=1;l<=t;++l)if(e[l]==a&&l!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)g(32754);o>2&&(g(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(g(a),--o;o>6;o-=6)g(8304);o>2&&(g(o-3<<5|8208),o=0)}for(;o--;)g(a);o=1,a=e[l]}return[i.subarray(0,s),t]},B=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!D[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=B(l,b)+B(c,p)+r,z=B(l,u)+B(c,f)+r+14+3*U+B(K,D)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(d,d+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=Z,j=b,Q=S,H=p;for(L=0;L255){te=g[L]>>>18&31;X(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,g[L]>>>23&31),I+=s[te]);var ne=31&g[L];X(t,I,Q[ne]),I+=H[ne],ne>3&&(X(t,I,g[L]>>>5&8191),I+=a[ne])}else X(t,I,M[g[L]]),I+=j[g[L]];return X(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),J=new t(0),D=function(e,o,g,l,c){return function(e,o,g,l,c,C){var d=e.length,I=new t(l+d+5*(1+Math.ceil(d/7e3))+c),m=I.subarray(l,I.length-c),u=0;if(!o||d<8)for(var A=0;A<=d;A+=65535){var b=A+65535;b>>13,w=8191&p,S=(1<7e3||N>24576)&&j>423){u=K(e,m,0,v,T,X,E,N,D,A-D,u),N=O=E=0,D=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)X[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(Z,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[N++]=268435456|r[H]<<18|h[x];var ae=31&r[H],oe=31&h[x];E+=s[ae]+a[oe],++T[257+ae],++X[oe],B=A+H,++O}else v[N++]=e[A],++T[e[A]]}}u=K(e,m,C,v,T,X,E,N,D,A-D,u),!C&&7&u&&(u=Y(m,u+1,J))}return k(I,0,l+G(u)+c)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,g,l,!c)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var g=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=D(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var g=e.length;if(!g||i&&i.f&&!i.l)return n||new t(0);var l=!n||i,r=!i||i.i;i||(i={}),n||(n=new t(3*g));var C=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,p=i.m,Z=i.n,S=8*g;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,X=F+T;if(X>g){r&&v(0);break}l&&C(m+T),n.set(e.subarray(F,X),m),i.b=m+=T,i.p=I=8*X,i.f=h;continue}if(1==R)u=w,b=V,p=9,Z=5;else if(2==R){var O=y(e,I,31)+257,E=y(e,I+10,15)+4,N=O+y(e,I+5,31)+1;I+=14;for(var B=new t(N),Y=new t(19),K=0;K>>4)<16)B[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=B[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)B[K++]=M}}var Q=B.subarray(0,O),H=B.subarray(O);p=f(Q),Z=f(H),u=A(Q,p,1),b=A(H,Z,1)}else v(1);if(I>S){r&&v(0);break}}l&&C(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){r&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+c[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=d[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){r&&v(0);break}l&&C(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(J,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2021.2.0",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if(void 0!==i&&(o.metadata=i),a&&(o.redirect=!0),"signalingNotifyMetadata"in s&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),"multistream"in s&&!0===s.multistream&&(o.multistream=!0,"spotlight"in s&&(o.spotlight=s.spotlight,"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber)),!0===o.spotlight)){const e=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=e.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=e.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid)}if("simulcast"in s||"simulcastRid"in s){"simulcast"in s&&!0===s.simulcast&&(o.simulcast=!0);const e=["r0","r1","r2"];void 0!==s.simulcastRid&&0<=e.indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid)}"clientId"in s&&void 0!==s.clientId&&(o.client_id=s.clientId),"dataChannelSignaling"in s&&"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"ignoreDisconnectWebSocket"in s&&"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const g=["audioCodecType","audioBitRate"],l=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],c=["videoCodecType","videoBitRate"],r=Object.assign({},s);Object.keys(r).forEach((e=>{"audio"===e&&"boolean"==typeof r[e]||"video"===e&&"boolean"==typeof r[e]||0<=g.indexOf(e)&&null!==r[e]||0<=l.indexOf(e)&&null!==r[e]||0<=c.indexOf(e)&&null!==r[e]||delete r[e]})),void 0!==r.audio&&(o.audio=r.audio);const C=Object.keys(r).some((e=>0<=g.indexOf(e)));o.audio&&C&&(o.audio={},"audioCodecType"in r&&(o.audio.codec_type=r.audioCodecType),"audioBitRate"in r&&(o.audio.bit_rate=r.audioBitRate));const d=Object.keys(r).some((e=>0<=l.indexOf(e)));o.audio&&d&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in r&&(o.audio.opus_params.channels=r.audioOpusParamsChannels),"audioOpusParamsClockRate"in r&&(o.audio.opus_params.clock_rate=r.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in r&&(o.audio.opus_params.maxplaybackrate=r.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in r&&(o.audio.opus_params.stereo=r.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in r&&(o.audio.opus_params.sprop_stereo=r.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in r&&(o.audio.opus_params.minptime=r.audioOpusParamsMinptime),"audioOpusParamsPtime"in r&&(o.audio.opus_params.ptime=r.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in r&&(o.audio.opus_params.useinbandfec=r.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in r&&(o.audio.opus_params.usedtx=r.audioOpusParamsUsedtx)),void 0!==r.video&&(o.video=r.video);const h=Object.keys(r).some((e=>0<=c.indexOf(e)));if(o.video&&h&&(o.video={},"videoCodecType"in r&&(o.video.codec_type=r.videoCodecType),"videoBitRate"in r&&(o.video.bit_rate=r.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if(!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8"),o.e2ee=!0}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={}}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}stopStream(){return new Promise(((e,t)=>(this.debug&&console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."),this.stream?(this.stream.getTracks().forEach((e=>{e.stop()})),this.stream=null,e()):e())))}async signalingTerminate(){await this.stopStream();for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}async abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=async e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),await this.signalingTerminate(),s(t)},e.onmessage=async e=>{if(e.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",e.data),void this.signalingOnMessageE2EE(e.data);const t=JSON.parse(e.data);if("offer"==t.type)this.writeWebSocketSignalingLog("onmessage-offer",t),this.signalingOnMessageTypeOffer(t),i(t);else if("update"==t.type)this.writeWebSocketSignalingLog("onmessage-update",t),await this.signalingOnMessageTypeUpdate(t);else if("re-offer"==t.type)this.writeWebSocketSignalingLog("onmessage-re-offer",t),await this.signalingOnMessageTypeReOffer(t);else if("ping"==t.type)await this.signalingOnMessageTypePing(t);else if("push"==t.type)this.callbacks.push(t,"websocket");else if("notify"==t.type)"connection.created"===t.event_type?this.writeWebSocketTimelineLog("notify-connection.created",t):"connection.destroyed"===t.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",t),this.signalingOnMessageTypeNotify(t,"websocket");else if("switched"==t.type)this.writeWebSocketSignalingLog("onmessage-switched",t),this.signalingOnMessageTypeSwitched(t);else if("redirect"==t.type){this.writeWebSocketSignalingLog("onmessage-redirect",t);const e=await this.signalingOnMessageTypeRedirect(t);i(e)}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e)})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=async e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),await this.signalingTerminate(),t(n)},this.ws.onerror=async e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),await this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=async e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((async()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=async e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),await this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget;let n=e.data;if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=U(new Uint8Array(e.data));n=(new TextDecoder).decode(t)}const i=JSON.parse(n);this.writeDataChannelSignalingLog(`onmessage-${i.type}`,t,i),"re-offer"===i.type&&await this.signalingOnMessageTypeReOffer(i)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget;let n=e.data;if(this.signalingOfferMessageDataChannels.notify&&!0===this.signalingOfferMessageDataChannels.notify.compress){const t=U(new Uint8Array(e.data));n=(new TextDecoder).decode(t)}const i=JSON.parse(n);"connection.created"===i.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,i):"connection.destroyed"===i.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,i),this.signalingOnMessageTypeNotify(i,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{let t=e.data;if(this.signalingOfferMessageDataChannels.push&&!0===this.signalingOfferMessageDataChannels.push.compress){const n=U(new Uint8Array(e.data));t=(new TextDecoder).decode(n)}const n=JSON.parse(t);this.callbacks.push(n,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{let t=e.data;if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const n=U(new Uint8Array(e.data));t=(new TextDecoder).decode(n)}if("req-stats"===JSON.parse(t).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.target)return;const t=e.target;let n=e.data;const i=this.signalingOfferMessageDataChannels[t.label];void 0!==i&&!0===i.compress&&(n=U(new Uint8Array(e.data)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(t.label,n))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get connectedSignalingUrl(){return this.ws?this.ws.url:""}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class te extends ee{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ne extends ee{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var Z=new t(32);for(m=0;m<32;++m)Z[m]=5;var p=A(b,9,0),w=A(b,9,1),S=A(Z,5,0),V=A(Z,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(e instanceof n?n:e instanceof i?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},X=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},O=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=E(s[d-1],m,0);if(u>i){a=0;var A=0,b=u-i,Z=1<i))break;A+=Z-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},E=function(e,t,n){return-1==e.s?Math.max(E(e.l,t,n+1),E(e.r,t,n+1)):t[e.s]=n},N=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},B=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!D[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=B(g,b)+B(r,Z)+c,z=B(g,u)+B(r,f)+c+14+3*U+B(K,D)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(d,d+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=p,j=b,Q=S,H=Z;for(L=0;L255){te=l[L]>>>18&31;X(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];X(t,I,Q[ne]),I+=H[ne],ne>3&&(X(t,I,l[L]>>>5&8191),I+=a[ne])}else X(t,I,M[l[L]]),I+=j[l[L]];return X(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),J=new t(0),D=function(e,o,l,g,r){return function(e,o,l,g,r,C){var d=e.length,I=new t(g+d+5*(1+Math.ceil(d/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||d<8)for(var A=0;A<=d;A+=65535){var b=A+65535;b>=d&&(m[u>>3]=C),u=Y(m,u+1,e.subarray(A,b))}else{for(var Z=L[o-1],p=Z>>>13,w=8191&Z,S=(1<7e3||N>24576)&&j>423){u=K(e,m,0,v,T,X,E,N,D,A-D,u),N=O=E=0,D=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)X[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(p,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[N++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];E+=s[ae]+a[oe],++T[257+ae],++X[oe],B=A+H,++O}else v[N++]=e[A],++T[e[A]]}}u=K(e,m,C,v,T,X,E,N,D,A-D,u),!C&&7&u&&(u=Y(m,u+1,J))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=D(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var C=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,Z=i.m,p=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,X=F+T;if(X>l){c&&v(0);break}g&&C(m+T),n.set(e.subarray(F,X),m),i.b=m+=T,i.p=I=8*X,i.f=h;continue}if(1==R)u=w,b=V,Z=9,p=5;else if(2==R){var O=y(e,I,31)+257,E=y(e,I+10,15)+4,N=O+y(e,I+5,31)+1;I+=14;for(var B=new t(N),Y=new t(19),K=0;K>>4)<16)B[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=B[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)B[K++]=M}}var Q=B.subarray(0,O),H=B.subarray(O);Z=f(Q),p=f(H),u=A(Q,Z,1),b=A(H,p,1)}else v(1);if(I>S){c&&v(0);break}}g&&C(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=d[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&C(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(J,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0-canary.0",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if(void 0!==i&&(o.metadata=i),a&&(o.redirect=!0),"signalingNotifyMetadata"in s&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),"multistream"in s&&!0===s.multistream&&(o.multistream=!0,"spotlight"in s&&(o.spotlight=s.spotlight,"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber)),!0===o.spotlight)){const e=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=e.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=e.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid)}if("simulcast"in s||"simulcastRid"in s){"simulcast"in s&&!0===s.simulcast&&(o.simulcast=!0);const e=["r0","r1","r2"];void 0!==s.simulcastRid&&0<=e.indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid)}"clientId"in s&&void 0!==s.clientId&&(o.client_id=s.clientId),"dataChannelSignaling"in s&&"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"ignoreDisconnectWebSocket"in s&&"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const l=["audioCodecType","audioBitRate"],g=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],r=["videoCodecType","videoBitRate"],c=Object.assign({},s);Object.keys(c).forEach((e=>{"audio"===e&&"boolean"==typeof c[e]||"video"===e&&"boolean"==typeof c[e]||0<=l.indexOf(e)&&null!==c[e]||0<=g.indexOf(e)&&null!==c[e]||0<=r.indexOf(e)&&null!==c[e]||delete c[e]})),void 0!==c.audio&&(o.audio=c.audio);const C=Object.keys(c).some((e=>0<=l.indexOf(e)));o.audio&&C&&(o.audio={},"audioCodecType"in c&&(o.audio.codec_type=c.audioCodecType),"audioBitRate"in c&&(o.audio.bit_rate=c.audioBitRate));const d=Object.keys(c).some((e=>0<=g.indexOf(e)));o.audio&&d&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in c&&(o.audio.opus_params.channels=c.audioOpusParamsChannels),"audioOpusParamsClockRate"in c&&(o.audio.opus_params.clock_rate=c.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in c&&(o.audio.opus_params.maxplaybackrate=c.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in c&&(o.audio.opus_params.stereo=c.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in c&&(o.audio.opus_params.sprop_stereo=c.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in c&&(o.audio.opus_params.minptime=c.audioOpusParamsMinptime),"audioOpusParamsPtime"in c&&(o.audio.opus_params.ptime=c.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in c&&(o.audio.opus_params.useinbandfec=c.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in c&&(o.audio.opus_params.usedtx=c.audioOpusParamsUsedtx)),void 0!==c.video&&(o.video=c.video);const h=Object.keys(c).some((e=>0<=r.indexOf(e)));if(o.video&&h&&(o.video={},"videoCodecType"in c&&(o.video.codec_type=c.videoCodecType),"videoBitRate"in c&&(o.video.bit_rate=c.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if(!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8"),o.e2ee=!0}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={}}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}stopStream(){return new Promise(((e,t)=>(this.debug&&console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."),this.stream?(this.stream.getTracks().forEach((e=>{e.stop()})),this.stream=null,e()):e())))}async signalingTerminate(){await this.stopStream();for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}async abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=async e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),await this.signalingTerminate(),s(t)},e.onmessage=async e=>{if(e.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",e.data),void this.signalingOnMessageE2EE(e.data);if("string"!=typeof e.data)throw new Error("Received invalid signaling data");const t=JSON.parse(e.data);if("offer"==t.type)this.writeWebSocketSignalingLog("onmessage-offer",t),this.signalingOnMessageTypeOffer(t),i(t);else if("update"==t.type)this.writeWebSocketSignalingLog("onmessage-update",t),await this.signalingOnMessageTypeUpdate(t);else if("re-offer"==t.type)this.writeWebSocketSignalingLog("onmessage-re-offer",t),await this.signalingOnMessageTypeReOffer(t);else if("ping"==t.type)await this.signalingOnMessageTypePing(t);else if("push"==t.type)this.callbacks.push(t,"websocket");else if("notify"==t.type)"connection.created"===t.event_type?this.writeWebSocketTimelineLog("notify-connection.created",t):"connection.destroyed"===t.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",t),this.signalingOnMessageTypeNotify(t,"websocket");else if("switched"==t.type)this.writeWebSocketSignalingLog("onmessage-switched",t),this.signalingOnMessageTypeSwitched(t);else if("redirect"==t.type){this.writeWebSocketSignalingLog("onmessage-redirect",t);const e=await this.signalingOnMessageTypeRedirect(t);i(e)}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e)})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=async e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),await this.signalingTerminate(),t(n)},this.ws.onerror=async e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),await this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=async e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((async()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=async e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),await this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const n=e.currentTarget.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);let s=e.data;!0===i.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(t.label,s))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get connectedSignalingUrl(){return this.ws?this.ws.url:""}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1 {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexport default function () {\n\t(() => {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") {\n\t\t\t// global already exists\n\t\t} else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t}\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t}\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t}\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t}\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t}\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t}\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t}\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});\n\t\t}\n\t})();\n}\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i)\n ++l[cd[i] - 1];\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v instanceof u16 ? u16 : v instanceof u32 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e < s) {\n // write full block\n pos = wfblk(w, pos, dat.subarray(i, e));\n }\n else {\n // write final block\n w[i] = lst;\n pos = wfblk(w, pos, dat.subarray(i, s));\n }\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/ /g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k] instanceof u8 || v[k] instanceof u16 || v[k] instanceof u32)\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k;\n if (val instanceof u8)\n t[n] = [val, o];\n else if (Array.isArray(val))\n t[n] = [val[0], mrg(o, val[1])];\n else\n fltn(val, n + '/', t, o);\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream"],"mappings":"qOAWA,MAAMA,EACFC,cAII,MADoCC,aAAaC,UAAUC,qBAEvD,MAAM,IAAIC,MAAM,0CAEpBC,KAAKC,OAAS,KACdD,KAAKE,mBAAqB,KAG9BC,cAEI,MAAMC,EAAeC,KAfP,wjwBAgBdL,KAAKC,OAAS,IAAIK,OAAOC,IAAIC,gBAAgB,IAAIC,KAAK,CAACL,GAAe,CAAEM,KAAM,6BAC9EV,KAAKC,OAAOU,UAAaC,IACrB,MAAMC,UAAEA,GAAcD,EAAME,KACV,eAAdD,GAAiE,mBAA5Bb,KAAKE,oBAC1CF,KAAKE,sBAKjBa,cACQf,KAAKC,QACLD,KAAKC,OAAOe,YAAY,CACpBN,KAAM,UAKlBO,kBACQjB,KAAKC,QACLD,KAAKC,OAAOiB,YAIpBC,aACI,MAAMC,aAAEA,SAAuBC,OAAOC,KAAKC,OAC3C,OAAOH,EAEXI,qBAAqBC,GACjB,IAAKA,EAAOC,MACR,OAGJ,MAAMC,EAAgBF,EAAO3B,uBACvB8B,EAAiBD,EAAcC,gBAAkBD,EAAcE,SAC/DC,EAAiBH,EAAcG,gBAAkBH,EAAcI,SACrE,IAAK/B,KAAKC,OACN,MAAM,IAAIF,MAAM,gDAEpB,MAAMiC,EAAU,CACZtB,KAAM,UACNkB,eAAgBA,EAChBE,eAAgBA,GAEpB9B,KAAKC,OAAOe,YAAYgB,EAAS,CAACJ,EAAgBE,IAEtDG,uBAAuBC,GAEnB,MAAMC,EAAk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AAKD,IAAS,GAAKlN,GAAK,EAAIkN,GAAOlN,GAEhDkN,EAAMsF,EAAM,CACRN,GACA/X,EAAI,GACR,MAEA8X,GACAE,EAAKE,EAAK,QAEd,IADA,IAAImB,GAAMnB,EAAKiB,EACRjB,EAAKmB,GAAKnB,GAAM,EACnBjW,EAAIiW,GAAMjW,EAAIiW,EAAKpG,GACnB7P,EAAIiW,EAAK,GAAKjW,EAAIiW,EAAK,EAAIpG,GAC3B7P,EAAIiW,EAAK,GAAKjW,EAAIiW,EAAK,EAAIpG,GAC3B7P,EAAIiW,EAAK,GAAKjW,EAAIiW,EAAK,EAAIpG,GAE/BoG,EAAKmB,IAGb7D,EAAGhG,EAAIgF,EAAIgB,EAAGxL,EAAIiP,EAAMzD,EAAG3P,EAAIqS,EAAI1C,EAAG1N,EAAIoL,EACtCsB,IACAtB,EAAQ,EAAGsC,EAAG1K,EAAIqN,EAAK3C,EAAGlF,EAAIoE,EAAIc,EAAGvL,EAAImO,UACvClF,GACV,OAAOgF,GAAMjW,EAAIO,OAASP,EAAMyO,EAAIzO,EAAK,EAAGiW,GA+/BrCoB,GAvcY,IAAP,IADIhJ,EAwcEvS,GAvcX,KAAkBuS,EAAE,KAAO,EAAK,IAAOA,EAAE,IAAM,EAAIA,EAAE,IAAM,KAC9DtQ,EAAI,EAAG,qBACA,GAAPsQ,EAAE,IACFtQ,EAAI,EAAG,wDAoccjC,EAAK4N,SAAS,GAAI,IAAKmH,GAxc1C,IAAUxC,EA6jBpB,IAAIiJ,EAA2B,oBAAflT,aAA4C,IAAIA,YAGhE,IACIkT,EAAGpX,OAAOmP,EAAI,CAAEkI,QAAQ,IAClB,EAEV,MAAO7I"} \ No newline at end of file +{"version":3,"file":"sora.min.js","sources":["../packages/e2ee/dist/sora_e2ee.mjs","../packages/go-wasm/src/wasm_exec.js","../node_modules/fflate/esm/browser.js","../packages/sdk/src/utils.ts","../packages/sdk/src/base.ts","../packages/sdk/src/publisher.ts","../packages/sdk/src/subscriber.ts","../packages/sdk/src/sora.ts","../packages/sdk/src/helpers.ts"],"sourcesContent":["/**\n * @sora/e2ee\n * WebRTC SFU Sora JavaScript E2EE Library\n * @version: 2021.1.0\n * @author: Shiguredo Inc.\n * @license: Apache-2.0\n **/\n\nimport WasmExec from '@sora/go-wasm';\n\nconst WORKER_SCRIPT = \"InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCkgPSBsb2coeCkgLyBsb2coMjU2KQogICAgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5sb2cobikgLyBNYXRoLmxvZygyICoqIDgpICsgMSk7Cn0KZnVuY3Rpb24gYXJyYXlCdWZmZXJUb051bWJlcihhcnJheUJ1ZmZlcikgewogICAgLy8gMzJiaXQg44G+44Gn44KS5oOz5a6aIChCaWdJbnQg44G444Gu5pu444GN5o+b44GI5pmC44Gr6KaB5L+u5q2jKQogICAgY29uc3QgbmV3QXJyYXlCdWZmZXIgPSBuZXcgQXJyYXlCdWZmZXIoVWludDMyQXJyYXkuQllURVNfUEVSX0VMRU1FTlQpOwogICAgY29uc3QgbmV3RGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcobmV3QXJyYXlCdWZmZXIpOwogICAgY29uc3QgZGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcoYXJyYXlCdWZmZXIpOwogICAgY29uc3QgcGFkZGluZ0xlbmd0aCA9IFVpbnQzMkFycmF5LkJZVEVTX1BFUl9FTEVNRU5UIC0gZGF0YVZpZXcuYnl0ZUxlbmd0aDsKICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcGFkZGluZ0xlbmd0aDsgaSArPSAxK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xmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCB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KHsKICAgICAgICAgICAgdHJhbnNmb3JtOiBkZWNyeXB0RnVuY3Rpb24sCiAgICAgICAgfSk7CiAgICAgICAgcmVhZGFibGVTdHJlYW0ucGlwZVRocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=\";\nclass SoraE2EE {\n constructor() {\n // 対応しているかどうかの判断\n // @ts-ignore トライアル段階の API なので無視する\n const supportsInsertableStreams = !!RTCRtpSender.prototype.createEncodedStreams;\n if (!supportsInsertableStreams) {\n throw new Error(\"E2EE is not supported in this browser.\");\n }\n this.worker = null;\n this.onWorkerDisconnect = null;\n }\n // worker を起動する\n startWorker() {\n // ワーカーを起動する\n const workerScript = atob(WORKER_SCRIPT);\n this.worker = new Worker(URL.createObjectURL(new Blob([workerScript], { type: \"application/javascript\" })));\n this.worker.onmessage = (event) => {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexport default function () {\n\t(() => {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") {\n\t\t\t// global already exists\n\t\t} else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t}\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t}\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t}\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t}\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t}\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t}\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t}\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});\n\t\t}\n\t})();\n}\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v instanceof u16 ? u16 : v instanceof u32 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/ /g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k] instanceof u8 || v[k] instanceof u16 || v[k] instanceof u32)\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k;\n if (val instanceof u8)\n t[n] = [val, o];\n else if (Array.isArray(val))\n t[n] = [val[0], mrg(o, val[1])];\n else\n fltn(val, n + '/', t, o);\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n\n if (redirect) {\n message.redirect = true;\n }\n\n if (\"signalingNotifyMetadata\" in options) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n\n if (\"multistream\" in options && options.multistream === true) {\n // multistream\n message.multistream = true;\n // spotlight\n if (\"spotlight\" in options) {\n message.spotlight = options.spotlight;\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n }\n if (message.spotlight === true) {\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n }\n }\n\n if (\"simulcast\" in options || \"simulcastRid\" in options) {\n // simulcast\n if (\"simulcast\" in options && options.simulcast === true) {\n message.simulcast = true;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n }\n\n // client_id\n if (\"clientId\" in options && options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n\n if (\"dataChannelSignaling\" in options && typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (\"ignoreDisconnectWebSocket\" in options && typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n message.e2ee = true;\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * stream を停止するメソッド\n */\n private stopStream(): Promise {\n return new Promise((resolve, _) => {\n if (this.debug) {\n console.warn(\n \"@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself.\"\n );\n }\n if (!this.stream) {\n return resolve();\n }\n this.stream.getTracks().forEach((t) => {\n t.stop();\n });\n this.stream = null;\n return resolve();\n });\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private async signalingTerminate(): Promise {\n await this.stopStream();\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private async abendPeerConnectionState(title: SoraAbendTitle): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = async (event): Promise => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = async (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = async (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n await this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = async (_): Promise => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = async (_): Promise => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n await this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(async () => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n await this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n channel.bufferedAmountLowThreshold = 65536;\n channel.binaryType = \"arraybuffer\";\n this.soraDataChannels[channel.label] = channel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n let data = event.data as ArrayBuffer;\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * 接続中のシグナリング URL\n */\n get connectedSignalingUrl(): string {\n if (!this.ws) {\n return \"\";\n }\n return this.ws.url;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendrecv\", channelId, metadata, options, this.debug);\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","signaling_notify_metadata","signalingNotifyMetadata","multistream","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","simulcast","simalcastRids","simulcastRid","simulcast_rid","clientId","client_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","stopStream","getTracks","dataChannel","initializeConnection","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","signalingTerminate","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","abendPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmount","bufferedAmountLowThreshold","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","connectedSignalingUrl","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","ontrack","streams","muted","onremovetrack","target","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMedia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WAAY,SAAU3N,EAA2CvV,GAAQ,GACvE,OAAO,IAAI4iB,GAAerN,EAAwBvV,IAOpDoC,QAAS,WACP,MAAO,qBAOT+gB,QAAS,CACPC,4BC1LJ5wB,eACE6wB,EACAzN,GAEA,GAAIA,EAAYjG,OAAsC,kBAAtBiG,EAAYjG,MAC1C,IAAK,MAAM5c,KAASswB,EAAYlM,uBACxBpkB,EAAMuwB,iBAAiB1N,EAAYjG,OAG7C,GAAIiG,EAAYhG,OAAsC,kBAAtBgG,EAAYhG,MAC1C,IAAK,MAAM7c,KAASswB,EAAY1L,uBACxB5kB,EAAMuwB,iBAAiB1N,EAAYhG"} \ No newline at end of file diff --git a/dist/sora.mjs b/dist/sora.mjs index 054ffc2d..ae41f65a 100644 --- a/dist/sora.mjs +++ b/dist/sora.mjs @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2021.2.0 + * @version: 2022.1.0-canary.0 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -822,8 +822,10 @@ var hMap = (function (cd, mb, r) { // u16 "map": index -> # of codes with bit length = index var l = new u16(mb); // length of cd must be 288 (total # of codes) - for (; i < s; ++i) - ++l[cd[i] - 1]; + for (; i < s; ++i) { + if (cd[i]) + ++l[cd[i] - 1]; + } // u16 "map": index -> minimum code for bit length = index var le = new u16(mb); for (i = 0; i < mb; ++i) { @@ -1357,15 +1359,11 @@ var dflt = function (dat, lvl, plvl, pre, post, lst) { for (var i = 0; i <= s; i += 65535) { // end var e = i + 65535; - if (e < s) { - // write full block - pos = wfblk(w, pos, dat.subarray(i, e)); - } - else { + if (e >= s) { // write final block - w[i] = lst; - pos = wfblk(w, pos, dat.subarray(i, s)); + w[pos >> 3] = lst; } + pos = wfblk(w, pos + 1, dat.subarray(i, e)); } } else { @@ -1629,7 +1627,7 @@ function createSignalingMessage(offerSDP, role, channelId, metadata, options, re } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2021.2.0", + sora_client: "Sora JavaScript SDK 2022.1.0-canary.0", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -1837,6 +1835,7 @@ function trace(clientId, title, value) { if (record && typeof record === "object") { let keys = null; try { + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument keys = Object.keys(JSON.parse(JSON.stringify(record))); } catch (_) { @@ -1929,6 +1928,13 @@ function createDataChannelEvent(channel) { event.datachannel = channel; return event; } +function parseDataChannelEventData(eventData, compress) { + if (compress) { + const unzlibMessage = unzlibSync(new Uint8Array(eventData)); + return new TextDecoder().decode(unzlibMessage); + } + return eventData; +} /** * Sora との WebRTC 接続を扱う基底クラス @@ -2832,6 +2838,9 @@ class ConnectionBase { this.signalingOnMessageE2EE(event.data); return; } + if (typeof event.data !== "string") { + throw new Error("Received invalid signaling data"); + } const message = JSON.parse(event.data); if (message.type == "offer") { this.writeWebSocketSignalingLog("onmessage-offer", message); @@ -3587,12 +3596,13 @@ class ConnectionBase { if (dataChannelEvent.channel.label === "signaling") { dataChannelEvent.channel.onmessage = async (event) => { const channel = event.currentTarget; - let data = event.data; - if (this.signalingOfferMessageDataChannels.signaling && - this.signalingOfferMessageDataChannels.signaling.compress === true) { - const unzlibMessage = unzlibSync(new Uint8Array(event.data)); - data = new TextDecoder().decode(unzlibMessage); + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn(`Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`); + return; } + const data = parseDataChannelEventData(event.data, dataChannelSettings.compress); const message = JSON.parse(data); this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message); if (message.type === "re-offer") { @@ -3603,12 +3613,13 @@ class ConnectionBase { else if (dataChannelEvent.channel.label === "notify") { dataChannelEvent.channel.onmessage = (event) => { const channel = event.currentTarget; - let data = event.data; - if (this.signalingOfferMessageDataChannels.notify && - this.signalingOfferMessageDataChannels.notify.compress === true) { - const unzlibMessage = unzlibSync(new Uint8Array(event.data)); - data = new TextDecoder().decode(unzlibMessage); + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn(`Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`); + return; } + const data = parseDataChannelEventData(event.data, dataChannelSettings.compress); const message = JSON.parse(data); if (message.event_type === "connection.created") { this.writeDataChannelTimelineLog("notify-connection.created", channel, message); @@ -3621,12 +3632,14 @@ class ConnectionBase { } else if (dataChannelEvent.channel.label === "push") { dataChannelEvent.channel.onmessage = (event) => { - let data = event.data; - if (this.signalingOfferMessageDataChannels.push && - this.signalingOfferMessageDataChannels.push.compress === true) { - const unzlibMessage = unzlibSync(new Uint8Array(event.data)); - data = new TextDecoder().decode(unzlibMessage); + const channel = event.currentTarget; + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn(`Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`); + return; } + const data = parseDataChannelEventData(event.data, dataChannelSettings.compress); const message = JSON.parse(data); this.callbacks.push(message, "datachannel"); }; @@ -3641,12 +3654,14 @@ class ConnectionBase { } else if (dataChannelEvent.channel.label === "stats") { dataChannelEvent.channel.onmessage = async (event) => { - let data = event.data; - if (this.signalingOfferMessageDataChannels.stats && - this.signalingOfferMessageDataChannels.stats.compress === true) { - const unzlibMessage = unzlibSync(new Uint8Array(event.data)); - data = new TextDecoder().decode(unzlibMessage); + const channel = event.currentTarget; + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn(`Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`); + return; } + const data = parseDataChannelEventData(event.data, dataChannelSettings.compress); const message = JSON.parse(data); if (message.type === "req-stats") { const stats = await this.getStats(); @@ -3656,14 +3671,19 @@ class ConnectionBase { } else if (/^#.*/.exec(dataChannelEvent.channel.label)) { dataChannelEvent.channel.onmessage = (event) => { - if (event.target === null) { + if (event.currentTarget === null) { + return; + } + const channel = event.currentTarget; + const label = channel.label; + const dataChannelSettings = this.signalingOfferMessageDataChannels[label]; + if (!dataChannelSettings) { + console.warn(`Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`); return; } - const dataChannel = event.target; let data = event.data; - const settings = this.signalingOfferMessageDataChannels[dataChannel.label]; - if (settings !== undefined && settings.compress === true) { - data = unzlibSync(new Uint8Array(event.data)).buffer; + if (dataChannelSettings.compress === true) { + data = unzlibSync(new Uint8Array(data)).buffer; } this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data)); }; @@ -4129,7 +4149,8 @@ class ConnectionSubscriber extends ConnectionBase { this.callbacks.removetrack(event); if (event.target) { // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す - const index = this.remoteConnectionIds.indexOf(event.target.id); + const targetId = event.target.id; + const index = this.remoteConnectionIds.indexOf(targetId); if (-1 < index) { delete this.remoteConnectionIds[index]; // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す @@ -4193,7 +4214,8 @@ class ConnectionSubscriber extends ConnectionBase { this.callbacks.removetrack(event); if (event.target) { // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す - const index = this.remoteConnectionIds.indexOf(event.target.id); + const targetId = event.target.id; + const index = this.remoteConnectionIds.indexOf(targetId); if (-1 < index) { delete this.remoteConnectionIds[index]; // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す @@ -4367,7 +4389,7 @@ var sora = { * @public */ version: function () { - return "2021.2.0"; + return "2022.1.0-canary.0"; }, /** * WebRTC のユーティリティ関数群 diff --git a/dist/utils.d.ts b/dist/utils.d.ts index e2d99ad0..fc4d33c2 100644 --- a/dist/utils.d.ts +++ b/dist/utils.d.ts @@ -15,3 +15,4 @@ export declare function createDataChannelData(channel: RTCDataChannel): Record Date: Tue, 4 Jan 2022 16:21:41 +0900 Subject: [PATCH 09/86] =?UTF-8?q?release:canary=20=E3=82=B3=E3=83=9E?= =?UTF-8?q?=E3=83=B3=E3=83=89=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RELEASE.md | 5 +++-- package.json | 5 +---- scripts/{versioning.sh => release_canary.sh} | 17 +++-------------- 3 files changed, 7 insertions(+), 20 deletions(-) rename scripts/{versioning.sh => release_canary.sh} (57%) diff --git a/RELEASE.md b/RELEASE.md index b809733f..569850a0 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -32,7 +32,8 @@ - npm run test を実行する - npm run release:canary を実行する - Next version を確認する - - コミットメッセージをバージョンにして差分をコミットする(例. git commit -m "2020.1.0-canary.0") -- git push -u origin develop master + - git commit をするか聞かれるので確認して yes を選択する + - git tag をするか聞かれるので確認して yes を選択する +- git push -u origin develop - git push origin - npm publish --tag canary を実行する diff --git a/package.json b/package.json index ddbe110d..ed4875ab 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,7 @@ "test": "npm run test --workspaces", "start": "npx serve -S -l 8080 ./example", "doc": "npx typedoc", - "release:major": "./scripts/versioning.sh major", - "release:minor": "./scripts/versioning.sh minor", - "release:patch": "./scripts/versioning.sh patch", - "release:canary": "./scripts/versioning.sh canary" + "release:canary": "./scripts/release_canary.sh" }, "repository": { "type": "git", diff --git a/scripts/versioning.sh b/scripts/release_canary.sh similarity index 57% rename from scripts/versioning.sh rename to scripts/release_canary.sh index aa1bd251..4c9923c6 100755 --- a/scripts/versioning.sh +++ b/scripts/release_canary.sh @@ -2,21 +2,10 @@ version=`cat ./package.json | jq -r -c ".version"` - -if [ $1 = "canary" ]; then - if [[ ${version} =~ ^.*canary.*$ ]]; then - npm version prerelease --preid canary --no-git-tag-version > /dev/null; - else - npm version preminor --preid canary --no-git-tag-version > /dev/null; - fi -elif [ $1 = "major" ]; then - npm version major --no-git-tag-version > /dev/null; -elif [ $1 = "minor" ]; then - npm version minor --no-git-tag-version > /dev/null; -elif [ $1 = "patch" ]; then - npm version patch --no-git-tag-version > /dev/null; +if [[ ${version} =~ ^.*canary.*$ ]]; then + npm version prerelease --preid canary --no-git-tag-version > /dev/null; else - exit 1; + npm version preminor --preid canary --no-git-tag-version > /dev/null; fi echo "==== sora-js-sdk@${version} $1 update ====" From f8f7ca75a96af8529a5793bada177f37086cb27d Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 11 Jan 2022 15:10:21 +0900 Subject: [PATCH 10/86] =?UTF-8?q?sendrecv=20=E3=82=92=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E3=81=99=E3=82=8B=E5=A0=B4=E5=90=88=E3=81=AB=20multistream=20?= =?UTF-8?q?=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7=E3=83=B3=E3=81=AE=E5=88=9D?= =?UTF-8?q?=E6=9C=9F=E5=80=A4=E3=82=92=E8=A8=AD=E5=AE=9A=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/src/sora.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/sdk/src/sora.ts b/packages/sdk/src/sora.ts index 50bf9364..c64848cb 100644 --- a/packages/sdk/src/sora.ts +++ b/packages/sdk/src/sora.ts @@ -81,7 +81,16 @@ class SoraConnection { metadata: JSONType = null, options: ConnectionOptions = { audio: true, video: true } ): ConnectionPublisher { - return new ConnectionPublisher(this.signalingUrlCandidates, "sendrecv", channelId, metadata, options, this.debug); + // sendrecv の場合、multistream に初期値を指定する + const sendrecvOptions: ConnectionOptions = Object.assign({ multistream: true }, options); + return new ConnectionPublisher( + this.signalingUrlCandidates, + "sendrecv", + channelId, + metadata, + sendrecvOptions, + this.debug + ); } /** * role sendonly で接続するための Connecion インスタンスを生成するメソッド From c54f6b950571544f398929c8c6405eceb501e3b7 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 11 Jan 2022 15:13:03 +0900 Subject: [PATCH 11/86] =?UTF-8?q?sendrecv=20+=20multistream:=20false=20?= =?UTF-8?q?=E3=81=AE=E5=A0=B4=E5=90=88=E3=81=AF=E4=BE=8B=E5=A4=96=E3=82=92?= =?UTF-8?q?=E6=8A=95=E3=81=92=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/src/utils.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/sdk/src/utils.ts b/packages/sdk/src/utils.ts index 147f5774..481886b2 100644 --- a/packages/sdk/src/utils.ts +++ b/packages/sdk/src/utils.ts @@ -127,6 +127,10 @@ export function createSignalingMessage( audio: true, video: true, }; + // role: sendrecv で multistream: false の場合は例外を発生させる + if (role === "sendrecv" && options.multistream !== true) { + throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'"); + } if (metadata !== undefined) { message.metadata = metadata; From eda84d113016d5914347d1f92a330d2c23dcd765 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 11 Jan 2022 15:22:20 +0900 Subject: [PATCH 12/86] =?UTF-8?q?CHANGES=20=E3=82=92=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 1e2ee225..0967ba89 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,8 @@ - バグ修正 ## develop +- [UPDATE] sendrecv API を使用して接続する場合に multistream option の初期値が true になるよう修正する +- [UPDATE] sendrecv API を使用して multistream: false で接続した場合、Sora との接続前に例外が発生するように修正する - [UPDATE] パッケージを更新する - fflate "0.7.1" -> "0.7.2" - typescript "4.4.3" -> "4.5.4" From e92e1afda0f917c4786ba347f689ff9d2b17ae02 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 11 Jan 2022 15:22:55 +0900 Subject: [PATCH 13/86] 2022.1.0-canary.1 --- dist/sora.js | 14 ++++++++++---- dist/sora.min.js | 2 +- dist/sora.min.js.map | 2 +- dist/sora.mjs | 14 ++++++++++---- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 25 insertions(+), 13 deletions(-) diff --git a/dist/sora.js b/dist/sora.js index 47ed0d84..dafb2291 100644 --- a/dist/sora.js +++ b/dist/sora.js @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2022.1.0-canary.0 + * @version: 2022.1.0-canary.1 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -1633,7 +1633,7 @@ } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2022.1.0-canary.0", + sora_client: "Sora JavaScript SDK 2022.1.0-canary.1", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -1641,6 +1641,10 @@ audio: true, video: true, }; + // role: sendrecv で multistream: false の場合は例外を発生させる + if (role === "sendrecv" && options.multistream !== true) { + throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'"); + } if (metadata !== undefined) { message.metadata = metadata; } @@ -4300,7 +4304,9 @@ * @public */ sendrecv(channelId, metadata = null, options = { audio: true, video: true }) { - return new ConnectionPublisher(this.signalingUrlCandidates, "sendrecv", channelId, metadata, options, this.debug); + // sendrecv の場合、multistream に初期値を指定する + const sendrecvOptions = Object.assign({ multistream: true }, options); + return new ConnectionPublisher(this.signalingUrlCandidates, "sendrecv", channelId, metadata, sendrecvOptions, this.debug); } /** * role sendonly で接続するための Connecion インスタンスを生成するメソッド @@ -4395,7 +4401,7 @@ * @public */ version: function () { - return "2022.1.0-canary.0"; + return "2022.1.0-canary.1"; }, /** * WebRTC のユーティリティ関数群 diff --git a/dist/sora.min.js b/dist/sora.min.js index 42a9233d..0daf0b1d 100644 --- a/dist/sora.min.js +++ b/dist/sora.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sora=t()}(this,(function(){"use strict";class e{constructor(){if(!!!RTCRtpSender.prototype.createEncodedStreams)throw new Error("E2EE is not supported in this browser.");this.worker=null,this.onWorkerDisconnect=null}startWorker(){const e=atob("InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCkgPSBsb2coeCkgLyBsb2coMjU2KQogICAgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5sb2cobikgLyBNYXRoLmxvZygyICoqIDgpICsgMSk7Cn0KZnVuY3Rpb24gYXJyYXlCdWZmZXJUb051bWJlcihhcnJheUJ1ZmZlcikgewogICAgLy8gMzJiaXQg44G+44Gn44KS5oOz5a6aIChCaWdJbnQg44G444Gu5pu444GN5o+b44GI5pmC44Gr6KaB5L+u5q2jKQogICAgY29uc3QgbmV3QXJyYXlCdWZmZXIgPSBuZXcgQXJyYXlCdWZmZXIoVWludDMyQXJyYXkuQllURVNfUEVSX0VMRU1FTlQpOwogICAgY29uc3QgbmV3RGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcobmV3QXJyYXlCdWZmZXIpOwogICAgY29uc3QgZGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcoYXJyYXlCdWZmZXIpOwogICAgY29uc3QgcGFkZGluZ0xlbmd0aCA9IFVpbnQzMkFycmF5LkJZVEVTX1BFUl9FTEVNRU5U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dGVXcml0ZUlWKG1hdGVyaWFsKS50aGVuKCh3cml0ZUlWKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2V0V3JpdGVJVihzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5lY3Rpb25JZCwga2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBzZXRMYXRlc3RSZW1vdGVLZXlJZChjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gInJlbW92ZVJlbW90ZURlcml2ZUtleSIpIHsKICAgICAgICBjb25zdCB7IGNvbm5lY3Rpb25JZCB9ID0gZXZlbnQuZGF0YTsKICAgICAgICByZW1vdmVEZXJpdmVLZXkoY29ubmVjdGlvbklkKTsKICAgIH0KICAgIGVsc2UgaWYgKHR5cGUgPT09ICJlbmNyeXB0IikgewogICAgICAgIGNvbnN0IHsgcmVhZGFibGVTdHJlYW0sIHdyaXRhYmxlU3RyZWFtIH0gPSBldmVudC5kYXRhOwogICAgICAgIGNvbnN0IHRyYW5zZm9ybVN0cmVhbSA9IG5ldyBUcmFuc2Zvcm1TdHJlYW0oewogICAgICAgICAgICB0cmFuc2Zvcm06IGVuY3J5cHRGdW5jdGlvbiwKICAgICAgICB9KTsKICAgICAgICByZWFkYWJsZVN0cmVhbS5waXBlVGhyb3VnaCh0cmFuc2Zvcm1TdHJlYW0pLnBpcGVUbyh3cml0YWJsZVN0cmVhbSk7CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAiZGVjcnlwdCIpIHsKICAgICAgICBjb25zdCB7IHJlYWRhYmxlU3RyZWFtLCB3cml0YWJsZVN0cmVhbSB9ID0gZXZlbnQuZGF0YTsKICAgICAgICBjb25zdCB0cmFuc2Zvcm1TdHJlYW0gPSBuZXcgVHJhbnNmb3JtU3RyZWFtKHsKICAgICAgICAgICAgdHJhbnNmb3JtOiBkZWNyeXB0RnVuY3Rpb24sCiAgICAgICAgfSk7CiAgICAgICAgcmVhZGFibGVTdHJlYW0ucGlwZVRocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=");this.worker=new Worker(URL.createObjectURL(new Blob([e],{type:"application/javascript"}))),this.worker.onmessage=e=>{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var Z=new t(32);for(m=0;m<32;++m)Z[m]=5;var p=A(b,9,0),w=A(b,9,1),S=A(Z,5,0),V=A(Z,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(e instanceof n?n:e instanceof i?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},X=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},O=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=E(s[d-1],m,0);if(u>i){a=0;var A=0,b=u-i,Z=1<i))break;A+=Z-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},E=function(e,t,n){return-1==e.s?Math.max(E(e.l,t,n+1),E(e.r,t,n+1)):t[e.s]=n},N=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},B=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!D[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=B(g,b)+B(r,Z)+c,z=B(g,u)+B(r,f)+c+14+3*U+B(K,D)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(d,d+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=p,j=b,Q=S,H=Z;for(L=0;L255){te=l[L]>>>18&31;X(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];X(t,I,Q[ne]),I+=H[ne],ne>3&&(X(t,I,l[L]>>>5&8191),I+=a[ne])}else X(t,I,M[l[L]]),I+=j[l[L]];return X(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),J=new t(0),D=function(e,o,l,g,r){return function(e,o,l,g,r,C){var d=e.length,I=new t(g+d+5*(1+Math.ceil(d/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||d<8)for(var A=0;A<=d;A+=65535){var b=A+65535;b>=d&&(m[u>>3]=C),u=Y(m,u+1,e.subarray(A,b))}else{for(var Z=L[o-1],p=Z>>>13,w=8191&Z,S=(1<7e3||N>24576)&&j>423){u=K(e,m,0,v,T,X,E,N,D,A-D,u),N=O=E=0,D=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)X[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(p,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[N++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];E+=s[ae]+a[oe],++T[257+ae],++X[oe],B=A+H,++O}else v[N++]=e[A],++T[e[A]]}}u=K(e,m,C,v,T,X,E,N,D,A-D,u),!C&&7&u&&(u=Y(m,u+1,J))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=D(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var C=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,Z=i.m,p=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,X=F+T;if(X>l){c&&v(0);break}g&&C(m+T),n.set(e.subarray(F,X),m),i.b=m+=T,i.p=I=8*X,i.f=h;continue}if(1==R)u=w,b=V,Z=9,p=5;else if(2==R){var O=y(e,I,31)+257,E=y(e,I+10,15)+4,N=O+y(e,I+5,31)+1;I+=14;for(var B=new t(N),Y=new t(19),K=0;K>>4)<16)B[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=B[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)B[K++]=M}}var Q=B.subarray(0,O),H=B.subarray(O);Z=f(Q),p=f(H),u=A(Q,Z,1),b=A(H,p,1)}else v(1);if(I>S){c&&v(0);break}}g&&C(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=d[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&C(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(J,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0-canary.0",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if(void 0!==i&&(o.metadata=i),a&&(o.redirect=!0),"signalingNotifyMetadata"in s&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),"multistream"in s&&!0===s.multistream&&(o.multistream=!0,"spotlight"in s&&(o.spotlight=s.spotlight,"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber)),!0===o.spotlight)){const e=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=e.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=e.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid)}if("simulcast"in s||"simulcastRid"in s){"simulcast"in s&&!0===s.simulcast&&(o.simulcast=!0);const e=["r0","r1","r2"];void 0!==s.simulcastRid&&0<=e.indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid)}"clientId"in s&&void 0!==s.clientId&&(o.client_id=s.clientId),"dataChannelSignaling"in s&&"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"ignoreDisconnectWebSocket"in s&&"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const l=["audioCodecType","audioBitRate"],g=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],r=["videoCodecType","videoBitRate"],c=Object.assign({},s);Object.keys(c).forEach((e=>{"audio"===e&&"boolean"==typeof c[e]||"video"===e&&"boolean"==typeof c[e]||0<=l.indexOf(e)&&null!==c[e]||0<=g.indexOf(e)&&null!==c[e]||0<=r.indexOf(e)&&null!==c[e]||delete c[e]})),void 0!==c.audio&&(o.audio=c.audio);const C=Object.keys(c).some((e=>0<=l.indexOf(e)));o.audio&&C&&(o.audio={},"audioCodecType"in c&&(o.audio.codec_type=c.audioCodecType),"audioBitRate"in c&&(o.audio.bit_rate=c.audioBitRate));const d=Object.keys(c).some((e=>0<=g.indexOf(e)));o.audio&&d&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in c&&(o.audio.opus_params.channels=c.audioOpusParamsChannels),"audioOpusParamsClockRate"in c&&(o.audio.opus_params.clock_rate=c.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in c&&(o.audio.opus_params.maxplaybackrate=c.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in c&&(o.audio.opus_params.stereo=c.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in c&&(o.audio.opus_params.sprop_stereo=c.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in c&&(o.audio.opus_params.minptime=c.audioOpusParamsMinptime),"audioOpusParamsPtime"in c&&(o.audio.opus_params.ptime=c.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in c&&(o.audio.opus_params.useinbandfec=c.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in c&&(o.audio.opus_params.usedtx=c.audioOpusParamsUsedtx)),void 0!==c.video&&(o.video=c.video);const h=Object.keys(c).some((e=>0<=r.indexOf(e)));if(o.video&&h&&(o.video={},"videoCodecType"in c&&(o.video.codec_type=c.videoCodecType),"videoBitRate"in c&&(o.video.bit_rate=c.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if(!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8"),o.e2ee=!0}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={}}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}stopStream(){return new Promise(((e,t)=>(this.debug&&console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."),this.stream?(this.stream.getTracks().forEach((e=>{e.stop()})),this.stream=null,e()):e())))}async signalingTerminate(){await this.stopStream();for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}async abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=async e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),await this.signalingTerminate(),s(t)},e.onmessage=async e=>{if(e.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",e.data),void this.signalingOnMessageE2EE(e.data);if("string"!=typeof e.data)throw new Error("Received invalid signaling data");const t=JSON.parse(e.data);if("offer"==t.type)this.writeWebSocketSignalingLog("onmessage-offer",t),this.signalingOnMessageTypeOffer(t),i(t);else if("update"==t.type)this.writeWebSocketSignalingLog("onmessage-update",t),await this.signalingOnMessageTypeUpdate(t);else if("re-offer"==t.type)this.writeWebSocketSignalingLog("onmessage-re-offer",t),await this.signalingOnMessageTypeReOffer(t);else if("ping"==t.type)await this.signalingOnMessageTypePing(t);else if("push"==t.type)this.callbacks.push(t,"websocket");else if("notify"==t.type)"connection.created"===t.event_type?this.writeWebSocketTimelineLog("notify-connection.created",t):"connection.destroyed"===t.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",t),this.signalingOnMessageTypeNotify(t,"websocket");else if("switched"==t.type)this.writeWebSocketSignalingLog("onmessage-switched",t),this.signalingOnMessageTypeSwitched(t);else if("redirect"==t.type){this.writeWebSocketSignalingLog("onmessage-redirect",t);const e=await this.signalingOnMessageTypeRedirect(t);i(e)}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e)})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=async e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),await this.signalingTerminate(),t(n)},this.ws.onerror=async e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),await this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=async e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((async()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=async e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),await this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const n=e.currentTarget.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);let s=e.data;!0===i.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(t.label,s))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get connectedSignalingUrl(){return this.ws?this.ws.url:""}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var p=new t(32);for(m=0;m<32;++m)p[m]=5;var Z=A(b,9,0),w=A(b,9,1),S=A(p,5,0),V=A(p,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(e instanceof n?n:e instanceof i?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},X=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},O=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=E(s[d-1],m,0);if(u>i){a=0;var A=0,b=u-i,p=1<i))break;A+=p-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},E=function(e,t,n){return-1==e.s?Math.max(E(e.l,t,n+1),E(e.r,t,n+1)):t[e.s]=n},N=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},B=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!D[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=B(g,b)+B(r,p)+c,z=B(g,u)+B(r,f)+c+14+3*U+B(K,D)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(d,d+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=Z,j=b,Q=S,H=p;for(L=0;L255){te=l[L]>>>18&31;X(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];X(t,I,Q[ne]),I+=H[ne],ne>3&&(X(t,I,l[L]>>>5&8191),I+=a[ne])}else X(t,I,M[l[L]]),I+=j[l[L]];return X(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),J=new t(0),D=function(e,o,l,g,r){return function(e,o,l,g,r,C){var d=e.length,I=new t(g+d+5*(1+Math.ceil(d/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||d<8)for(var A=0;A<=d;A+=65535){var b=A+65535;b>=d&&(m[u>>3]=C),u=Y(m,u+1,e.subarray(A,b))}else{for(var p=L[o-1],Z=p>>>13,w=8191&p,S=(1<7e3||N>24576)&&j>423){u=K(e,m,0,v,T,X,E,N,D,A-D,u),N=O=E=0,D=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)X[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(Z,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[N++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];E+=s[ae]+a[oe],++T[257+ae],++X[oe],B=A+H,++O}else v[N++]=e[A],++T[e[A]]}}u=K(e,m,C,v,T,X,E,N,D,A-D,u),!C&&7&u&&(u=Y(m,u+1,J))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=D(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var C=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,p=i.m,Z=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,X=F+T;if(X>l){c&&v(0);break}g&&C(m+T),n.set(e.subarray(F,X),m),i.b=m+=T,i.p=I=8*X,i.f=h;continue}if(1==R)u=w,b=V,p=9,Z=5;else if(2==R){var O=y(e,I,31)+257,E=y(e,I+10,15)+4,N=O+y(e,I+5,31)+1;I+=14;for(var B=new t(N),Y=new t(19),K=0;K>>4)<16)B[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=B[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)B[K++]=M}}var Q=B.subarray(0,O),H=B.subarray(O);p=f(Q),Z=f(H),u=A(Q,p,1),b=A(H,Z,1)}else v(1);if(I>S){c&&v(0);break}}g&&C(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=d[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&C(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(J,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0-canary.1",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if("sendrecv"===t&&!0!==s.multistream)throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'");if(void 0!==i&&(o.metadata=i),a&&(o.redirect=!0),"signalingNotifyMetadata"in s&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),"multistream"in s&&!0===s.multistream&&(o.multistream=!0,"spotlight"in s&&(o.spotlight=s.spotlight,"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber)),!0===o.spotlight)){const e=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=e.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=e.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid)}if("simulcast"in s||"simulcastRid"in s){"simulcast"in s&&!0===s.simulcast&&(o.simulcast=!0);const e=["r0","r1","r2"];void 0!==s.simulcastRid&&0<=e.indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid)}"clientId"in s&&void 0!==s.clientId&&(o.client_id=s.clientId),"dataChannelSignaling"in s&&"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"ignoreDisconnectWebSocket"in s&&"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const l=["audioCodecType","audioBitRate"],g=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],r=["videoCodecType","videoBitRate"],c=Object.assign({},s);Object.keys(c).forEach((e=>{"audio"===e&&"boolean"==typeof c[e]||"video"===e&&"boolean"==typeof c[e]||0<=l.indexOf(e)&&null!==c[e]||0<=g.indexOf(e)&&null!==c[e]||0<=r.indexOf(e)&&null!==c[e]||delete c[e]})),void 0!==c.audio&&(o.audio=c.audio);const C=Object.keys(c).some((e=>0<=l.indexOf(e)));o.audio&&C&&(o.audio={},"audioCodecType"in c&&(o.audio.codec_type=c.audioCodecType),"audioBitRate"in c&&(o.audio.bit_rate=c.audioBitRate));const d=Object.keys(c).some((e=>0<=g.indexOf(e)));o.audio&&d&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in c&&(o.audio.opus_params.channels=c.audioOpusParamsChannels),"audioOpusParamsClockRate"in c&&(o.audio.opus_params.clock_rate=c.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in c&&(o.audio.opus_params.maxplaybackrate=c.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in c&&(o.audio.opus_params.stereo=c.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in c&&(o.audio.opus_params.sprop_stereo=c.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in c&&(o.audio.opus_params.minptime=c.audioOpusParamsMinptime),"audioOpusParamsPtime"in c&&(o.audio.opus_params.ptime=c.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in c&&(o.audio.opus_params.useinbandfec=c.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in c&&(o.audio.opus_params.usedtx=c.audioOpusParamsUsedtx)),void 0!==c.video&&(o.video=c.video);const h=Object.keys(c).some((e=>0<=r.indexOf(e)));if(o.video&&h&&(o.video={},"videoCodecType"in c&&(o.video.codec_type=c.videoCodecType),"videoBitRate"in c&&(o.video.bit_rate=c.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if(!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8"),o.e2ee=!0}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={}}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}stopStream(){return new Promise(((e,t)=>(this.debug&&console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."),this.stream?(this.stream.getTracks().forEach((e=>{e.stop()})),this.stream=null,e()):e())))}async signalingTerminate(){await this.stopStream();for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}async abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=async e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),await this.signalingTerminate(),s(t)},e.onmessage=async e=>{if(e.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",e.data),void this.signalingOnMessageE2EE(e.data);if("string"!=typeof e.data)throw new Error("Received invalid signaling data");const t=JSON.parse(e.data);if("offer"==t.type)this.writeWebSocketSignalingLog("onmessage-offer",t),this.signalingOnMessageTypeOffer(t),i(t);else if("update"==t.type)this.writeWebSocketSignalingLog("onmessage-update",t),await this.signalingOnMessageTypeUpdate(t);else if("re-offer"==t.type)this.writeWebSocketSignalingLog("onmessage-re-offer",t),await this.signalingOnMessageTypeReOffer(t);else if("ping"==t.type)await this.signalingOnMessageTypePing(t);else if("push"==t.type)this.callbacks.push(t,"websocket");else if("notify"==t.type)"connection.created"===t.event_type?this.writeWebSocketTimelineLog("notify-connection.created",t):"connection.destroyed"===t.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",t),this.signalingOnMessageTypeNotify(t,"websocket");else if("switched"==t.type)this.writeWebSocketSignalingLog("onmessage-switched",t),this.signalingOnMessageTypeSwitched(t);else if("redirect"==t.type){this.writeWebSocketSignalingLog("onmessage-redirect",t);const e=await this.signalingOnMessageTypeRedirect(t);i(e)}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e)})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=async e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),await this.signalingTerminate(),t(n)},this.ws.onerror=async e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),await this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=async e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((async()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=async e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),await this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const n=e.currentTarget.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);let s=e.data;!0===i.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(t.label,s))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get connectedSignalingUrl(){return this.ws?this.ws.url:""}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1 {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexport default function () {\n\t(() => {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") {\n\t\t\t// global already exists\n\t\t} else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t}\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t}\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t}\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t}\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t}\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t}\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t}\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});\n\t\t}\n\t})();\n}\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v instanceof u16 ? u16 : v instanceof u32 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/ /g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k] instanceof u8 || v[k] instanceof u16 || v[k] instanceof u32)\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k;\n if (val instanceof u8)\n t[n] = [val, o];\n else if (Array.isArray(val))\n t[n] = [val[0], mrg(o, val[1])];\n else\n fltn(val, n + '/', t, o);\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n\n if (redirect) {\n message.redirect = true;\n }\n\n if (\"signalingNotifyMetadata\" in options) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n\n if (\"multistream\" in options && options.multistream === true) {\n // multistream\n message.multistream = true;\n // spotlight\n if (\"spotlight\" in options) {\n message.spotlight = options.spotlight;\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n }\n if (message.spotlight === true) {\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n }\n }\n\n if (\"simulcast\" in options || \"simulcastRid\" in options) {\n // simulcast\n if (\"simulcast\" in options && options.simulcast === true) {\n message.simulcast = true;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n }\n\n // client_id\n if (\"clientId\" in options && options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n\n if (\"dataChannelSignaling\" in options && typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (\"ignoreDisconnectWebSocket\" in options && typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n message.e2ee = true;\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * stream を停止するメソッド\n */\n private stopStream(): Promise {\n return new Promise((resolve, _) => {\n if (this.debug) {\n console.warn(\n \"@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself.\"\n );\n }\n if (!this.stream) {\n return resolve();\n }\n this.stream.getTracks().forEach((t) => {\n t.stop();\n });\n this.stream = null;\n return resolve();\n });\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private async signalingTerminate(): Promise {\n await this.stopStream();\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private async abendPeerConnectionState(title: SoraAbendTitle): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = async (event): Promise => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = async (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = async (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n await this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = async (_): Promise => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = async (_): Promise => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n await this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(async () => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n await this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n channel.bufferedAmountLowThreshold = 65536;\n channel.binaryType = \"arraybuffer\";\n this.soraDataChannels[channel.label] = channel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n let data = event.data as ArrayBuffer;\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * 接続中のシグナリング URL\n */\n get connectedSignalingUrl(): string {\n if (!this.ws) {\n return \"\";\n }\n return this.ws.url;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendrecv\", channelId, metadata, options, this.debug);\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","signaling_notify_metadata","signalingNotifyMetadata","multistream","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","simulcast","simalcastRids","simulcastRid","simulcast_rid","clientId","client_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","stopStream","getTracks","dataChannel","initializeConnection","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","signalingTerminate","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","abendPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmount","bufferedAmountLowThreshold","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","connectedSignalingUrl","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","ontrack","streams","muted","onremovetrack","target","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMediaStreamConstraints","mediastream","applyConstraints"],"mappings":"qOAWA,MAAMA,EACFC,cAII,MADoCC,aAAaC,UAAUC,qBAEvD,MAAM,IAAIC,MAAM,0CAEpBC,KAAKC,OAAS,KACdD,KAAKE,mBAAqB,KAG9BC,cAEI,MAAMC,EAAeC,KAfP,wjwBAgBdL,KAAKC,OAAS,IAAIK,OAAOC,IAAIC,gBAAgB,IAAIC,KAAK,CAACL,GAAe,CAAEM,KAAM,6BAC9EV,KAAKC,OAAOU,UAAaC,IACrB,MAAMC,UAAEA,GAAcD,EAAME,KACV,eAAdD,GAAiE,mBAA5Bb,KAAKE,oBAC1CF,KAAKE,sBAKjBa,cACQf,KAAKC,QACLD,KAAKC,OAAOe,YAAY,CACpBN,KAAM,UAKlBO,kBACQjB,KAAKC,QACLD,KAAKC,OAAOiB,YAIpBC,aACI,MAAMC,aAAEA,SAAuBC,OAAOC,KAAKC,OAC3C,OAAOH,EAEXI,qBAAqBC,GACjB,IAAKA,EAAOC,MACR,OAGJ,MAAMC,EAAgBF,EAAO3B,uBACvB8B,EAAiBD,EAAcC,gBAAkBD,EAAcE,SAC/DC,EAAiBH,EAAcG,gBAAkBH,EAAcI,SACrE,IAAK/B,KAAKC,OACN,MAAM,IAAIF,MAAM,gDAEpB,MAAMiC,EAAU,CACZtB,KAAM,UACNkB,eAAgBA,EAChBE,eAAgBA,GAEpB9B,KAAKC,OAAOe,YAAYgB,EAAS,CAACJ,EAAgBE,IAEtDG,uBAAuBC,GAEnB,MAAMC,EAAkBD,EAASpC,uBAC3B8B,EAAiBO,EAAgBP,gBAAkBO,EAAgBN,SACnEC,EAAiBK,EAAgBL,gBAA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AO,EAAMC,OAAO,IAEnD,OAAO,IAAI4S,GAAqBnxB,KAAKkkB,uBAAwB,WAAYpG,EAAWC,EAAUC,EAAShe,KAAK2O,OAQ1G+a,mBACF,OAAO1pB,KAAKkkB,8BAOD,CAYbyN,SAAUxwB,eAAgBuC,SAClBhE,EAASkyB,SAASluB,IAgB1BmuB,WAAY,SAAU3N,EAA2CvV,GAAQ,GACvE,OAAO,IAAI4iB,GAAerN,EAAwBvV,IAOpDoC,QAAS,WACP,MAAO,qBAOT+gB,QAAS,CACPC,4BC1LJ5wB,eACE6wB,EACAzN,GAEA,GAAIA,EAAYjG,OAAsC,kBAAtBiG,EAAYjG,MAC1C,IAAK,MAAM5c,KAASswB,EAAYlM,uBACxBpkB,EAAMuwB,iBAAiB1N,EAAYjG,OAG7C,GAAIiG,EAAYhG,OAAsC,kBAAtBgG,EAAYhG,MAC1C,IAAK,MAAM7c,KAASswB,EAAY1L,uBACxB5kB,EAAMuwB,iBAAiB1N,EAAYhG"} \ No newline at end of file +{"version":3,"file":"sora.min.js","sources":["../packages/e2ee/dist/sora_e2ee.mjs","../packages/go-wasm/src/wasm_exec.js","../node_modules/fflate/esm/browser.js","../packages/sdk/src/utils.ts","../packages/sdk/src/base.ts","../packages/sdk/src/publisher.ts","../packages/sdk/src/subscriber.ts","../packages/sdk/src/sora.ts","../packages/sdk/src/helpers.ts"],"sourcesContent":["/**\n * @sora/e2ee\n * WebRTC SFU Sora JavaScript E2EE Library\n * @version: 2021.1.0\n * @author: Shiguredo Inc.\n * @license: Apache-2.0\n **/\n\nimport WasmExec from '@sora/go-wasm';\n\nconst WORKER_SCRIPT = \"InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiA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ZyYW1lSGVhZGVyKHNmcmFtZUhlYWRlckJ1ZmZlcik7CiAgICAgICAgLy8g5LuK5Zue44GvIHMgZmxhZyDjga8gMCDjga7jgb8KICAgICAgICBpZiAocyAhPT0gMCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlVORVhQRUNURUQtUy1GTEFHIik7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGRlcml2ZUtleSA9IGdldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICBpZiAoIWRlcml2ZUtleSkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGl2ID0gZ2VuZXJhdGVJVihjb3VudCwgY29ubmVjdGlvbklkLCBrZXlJZCk7CiAgICAgICAgaWYgKCFpdikgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGZyYW1lQWRkID0gZW5jb2RlRnJhbWVBZGQoZnJhbWVNZXRhZGF0YSwgc2ZyYW1lSGVhZGVyLCBjb25uZWN0aW9uSWQpOwogICAgICAgIGNyeXB0by5zdWJ0bGUKICAgICAgICAgICAgLmRlY3J5cHQoewogICAgICAgICAgICBuYW1lOiAiQUVTLUdDTSIsCiAgICAgICAgICAgIGl2OiBpdiwKICAgICAgICAgICAgYWRkaXRpb25hbERhdGE6IGZyYW1lQWRkLAogICAgICAgIH0sIGRlcml2ZUtleSwgbmV3IFVpbnQ4QXJyYXkoZW5jcnlwdGVkRnJhbWVCdWZmZXIpKQogICAgICAgICAgICAudGhlbigocGxhaW5UZXh0KSA9PiB7CiAgICAgICAgICAgIGNvbnN0IG5ld0RhdGEgPSBuZXcgQXJyYXlCdWZmZXIoZnJhbWVNZXRhZGF0YUJ1ZmZlci5ieXRlTGVuZ3RoICsgcGxhaW5UZXh0LmJ5dGVMZW5ndGgpOwogICAgICAgICAgICBjb25zdCBuZXdVaW50OCA9IG5ldyBVaW50OEFycmF5KG5ld0RhdGE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lY3JldEtleU1hdGVyaWFsLCBzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdhaXRpbmdUaW1lIH0gPSBldmVudC5kYXRhOwogICAgICAgIGNvbnN0IHRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWxmU2VjcmV0S2V5TWF0ZXJpYWwuYnVmZmVyLCAiSEtERiIsIGZhbHNlLCBbImRlcml2ZUJpdHMiLCAiZGVyaXZlS2V5Il0pCiAgICAgICAgICAgICAgICAudGhlbigobWF0ZXJpYWwpID0+IHsKICAgICAgICAgICAgICAgIGdlbmVyYXRlRGVyaXZlS2V5KG1hdGVyaWFsKS50aGVuKChkZXJpdmVLZXkpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRTZWxmRGVyaXZlS2V5KHNlbGZDb25uZWN0aW9uSWQsIHNlbGZLZXlJZCwgZGVyaXZlS2V5KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgZ2VuZXJhdGVXcml0ZUlWKG1hdGVyaWFsKS50aGVuKCh3cml0ZUlWKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2V0V3JpdGVJVihzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5lY3Rpb25JZCwga2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBzZXRMYXRlc3RSZW1vdGVLZXlJZChjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gInJlbW92ZVJlbW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k7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=\";\nclass SoraE2EE {\n constructor() {\n // 対応しているかどうかの判断\n // @ts-ignore トライアル段階の API なので無視する\n const supportsInsertableStreams = !!RTCRtpSender.prototype.createEncodedStreams;\n if (!supportsInsertableStreams) {\n throw new Error(\"E2EE is not supported in this browser.\");\n }\n this.worker = null;\n this.onWorkerDisconnect = null;\n }\n // worker を起動する\n startWorker() {\n // ワーカーを起動する\n const workerScript = atob(WORKER_SCRIPT);\n this.worker = new Worker(URL.createObjectURL(new Blob([workerScript], { type: \"application/javascript\" })));\n this.worker.onmessage = (event) => {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexport default function () {\n\t(() => {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") {\n\t\t\t// global already exists\n\t\t} else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t}\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t}\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t}\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t}\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t}\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t}\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t}\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});\n\t\t}\n\t})();\n}\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v instanceof u16 ? u16 : v instanceof u32 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/ /g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k] instanceof u8 || v[k] instanceof u16 || v[k] instanceof u32)\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k;\n if (val instanceof u8)\n t[n] = [val, o];\n else if (Array.isArray(val))\n t[n] = [val[0], mrg(o, val[1])];\n else\n fltn(val, n + '/', t, o);\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n // role: sendrecv で multistream: false の場合は例外を発生させる\n if (role === \"sendrecv\" && options.multistream !== true) {\n throw new Error(\"Failed to parse options. Options multistream must be true when connecting using 'sendrecv'\");\n }\n\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n\n if (redirect) {\n message.redirect = true;\n }\n\n if (\"signalingNotifyMetadata\" in options) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n\n if (\"multistream\" in options && options.multistream === true) {\n // multistream\n message.multistream = true;\n // spotlight\n if (\"spotlight\" in options) {\n message.spotlight = options.spotlight;\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n }\n if (message.spotlight === true) {\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n }\n }\n\n if (\"simulcast\" in options || \"simulcastRid\" in options) {\n // simulcast\n if (\"simulcast\" in options && options.simulcast === true) {\n message.simulcast = true;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n }\n\n // client_id\n if (\"clientId\" in options && options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n\n if (\"dataChannelSignaling\" in options && typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (\"ignoreDisconnectWebSocket\" in options && typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n message.e2ee = true;\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * stream を停止するメソッド\n */\n private stopStream(): Promise {\n return new Promise((resolve, _) => {\n if (this.debug) {\n console.warn(\n \"@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself.\"\n );\n }\n if (!this.stream) {\n return resolve();\n }\n this.stream.getTracks().forEach((t) => {\n t.stop();\n });\n this.stream = null;\n return resolve();\n });\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private async signalingTerminate(): Promise {\n await this.stopStream();\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private async abendPeerConnectionState(title: SoraAbendTitle): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = async (event): Promise => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = async (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = async (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n await this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = async (_): Promise => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = async (_): Promise => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n await this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(async () => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n await this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n channel.bufferedAmountLowThreshold = 65536;\n channel.binaryType = \"arraybuffer\";\n this.soraDataChannels[channel.label] = channel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n let data = event.data as ArrayBuffer;\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * 接続中のシグナリング URL\n */\n get connectedSignalingUrl(): string {\n if (!this.ws) {\n return \"\";\n }\n return this.ws.url;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n // sendrecv の場合、multistream に初期値を指定する\n const sendrecvOptions: ConnectionOptions = Object.assign({ multistream: true }, options);\n return new ConnectionPublisher(\n this.signalingUrlCandidates,\n \"sendrecv\",\n channelId,\n metadata,\n sendrecvOptions,\n this.debug\n );\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","multistream","signaling_notify_metadata","signalingNotifyMetadata","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","simulcast","simalcastRids","simulcastRid","simulcast_rid","clientId","client_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","stopStream","getTracks","dataChannel","initializeConnection","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","signalingTerminate","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","abendPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmount","bufferedAmountLowThreshold","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","connectedSignalingUrl","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","ontrack","streams","muted","onremovetrack","target","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendrecvOptions","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMediaStreamConstraints","mediastream","applyConstraints"],"mappings":"qOAWA,MAAMA,EACFC,cAII,MADoCC,aAAaC,UAAUC,qBAEvD,MAAM,IAAIC,MAAM,0CAEpBC,KAAKC,OAAS,KACdD,KAAKE,mBAAqB,KAG9BC,cAEI,MAAMC,EAAeC,KAfP,wjwBAgBdL,KA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DoC,QAAS,WACP,MAAO,qBAOTghB,QAAS,CACPC,4BCnMJ7wB,eACE8wB,EACA1N,GAEA,GAAIA,EAAYjG,OAAsC,kBAAtBiG,EAAYjG,MAC1C,IAAK,MAAM5c,KAASuwB,EAAYnM,uBACxBpkB,EAAMwwB,iBAAiB3N,EAAYjG,OAG7C,GAAIiG,EAAYhG,OAAsC,kBAAtBgG,EAAYhG,MAC1C,IAAK,MAAM7c,KAASuwB,EAAY3L,uBACxB5kB,EAAMwwB,iBAAiB3N,EAAYhG"} \ No newline at end of file diff --git a/dist/sora.mjs b/dist/sora.mjs index ae41f65a..4cffc59f 100644 --- a/dist/sora.mjs +++ b/dist/sora.mjs @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2022.1.0-canary.0 + * @version: 2022.1.0-canary.1 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -1627,7 +1627,7 @@ function createSignalingMessage(offerSDP, role, channelId, metadata, options, re } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2022.1.0-canary.0", + sora_client: "Sora JavaScript SDK 2022.1.0-canary.1", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -1635,6 +1635,10 @@ function createSignalingMessage(offerSDP, role, channelId, metadata, options, re audio: true, video: true, }; + // role: sendrecv で multistream: false の場合は例外を発生させる + if (role === "sendrecv" && options.multistream !== true) { + throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'"); + } if (metadata !== undefined) { message.metadata = metadata; } @@ -4294,7 +4298,9 @@ class SoraConnection { * @public */ sendrecv(channelId, metadata = null, options = { audio: true, video: true }) { - return new ConnectionPublisher(this.signalingUrlCandidates, "sendrecv", channelId, metadata, options, this.debug); + // sendrecv の場合、multistream に初期値を指定する + const sendrecvOptions = Object.assign({ multistream: true }, options); + return new ConnectionPublisher(this.signalingUrlCandidates, "sendrecv", channelId, metadata, sendrecvOptions, this.debug); } /** * role sendonly で接続するための Connecion インスタンスを生成するメソッド @@ -4389,7 +4395,7 @@ var sora = { * @public */ version: function () { - return "2022.1.0-canary.0"; + return "2022.1.0-canary.1"; }, /** * WebRTC のユーティリティ関数群 diff --git a/package-lock.json b/package-lock.json index 09b7b373..e5576d7a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sora-js-sdk", - "version": "2022.1.0-canary.0", + "version": "2022.1.0-canary.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "sora-js-sdk", - "version": "2022.1.0-canary.0", + "version": "2022.1.0-canary.1", "license": "Apache-2.0", "workspaces": [ "packages/go-wasm", diff --git a/package.json b/package.json index ed4875ab..60f2a5d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sora-js-sdk", - "version": "2022.1.0-canary.0", + "version": "2022.1.0-canary.1", "description": "WebRTC SFU Sora JavaScript SDK", "main": "dist/sora.min.js", "module": "dist/sora.mjs", From 41c86537a4d1a29ffe79b839413f2c782ad0b148 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 1 Feb 2022 19:10:59 +0900 Subject: [PATCH 14/86] Create dependabot.yml --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..8abca405 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" From d47e99a4772ab7693c0322fa12287a1869385cca Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Wed, 2 Feb 2022 09:59:07 +0900 Subject: [PATCH 15/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 48 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index e5576d7a..23a88d7a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "devDependencies": { "npm-check-updates": "^12.1.0", "serve": "^13.0.2", - "typedoc": "^0.22.10" + "typedoc": "^0.22.11" } }, "node_modules/@babel/code-frame": { @@ -5535,12 +5535,12 @@ } }, "node_modules/marked": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/marked/-/marked-3.0.8.tgz", - "integrity": "sha512-0gVrAjo5m0VZSJb4rpL59K1unJAMb/hm8HRXqasD8VeC8m91ytDPMritgFSlKonfdt+rRYYpP/JfLxgIX8yoSw==", + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.12.tgz", + "integrity": "sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==", "dev": true, "bin": { - "marked": "bin/marked" + "marked": "bin/marked.js" }, "engines": { "node": ">= 12" @@ -7072,9 +7072,9 @@ } }, "node_modules/shiki": { - "version": "0.9.15", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.15.tgz", - "integrity": "sha512-/Y0z9IzhJ8nD9nbceORCqu6NgT9X6I8Fk8c3SICHI5NbZRLdZYFaB233gwct9sU0vvSypyaL/qaKvzyQGJBZSw==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.0.tgz", + "integrity": "sha512-iczxaIYeBFHTFrQPb9DVy2SKgYxC4Wo7Iucm7C17cCh2Ge/refnvHscUOxM85u57MfLoNOtjoEFUWt9gBexblA==", "dev": true, "dependencies": { "jsonc-parser": "^3.0.0", @@ -7655,16 +7655,16 @@ } }, "node_modules/typedoc": { - "version": "0.22.10", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.10.tgz", - "integrity": "sha512-hQYZ4WtoMZ61wDC6w10kxA42+jclWngdmztNZsDvIz7BMJg7F2xnT+uYsUa7OluyKossdFj9E9Ye4QOZKTy8SA==", + "version": "0.22.11", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.11.tgz", + "integrity": "sha512-pVr3hh6dkS3lPPaZz1fNpvcrqLdtEvXmXayN55czlamSgvEjh+57GUqfhAI1Xsuu/hNHUT1KNSx8LH2wBP/7SA==", "dev": true, "dependencies": { "glob": "^7.2.0", "lunr": "^2.3.9", - "marked": "^3.0.8", + "marked": "^4.0.10", "minimatch": "^3.0.4", - "shiki": "^0.9.12" + "shiki": "^0.10.0" }, "bin": { "typedoc": "bin/typedoc" @@ -12437,9 +12437,9 @@ } }, "marked": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/marked/-/marked-3.0.8.tgz", - "integrity": "sha512-0gVrAjo5m0VZSJb4rpL59K1unJAMb/hm8HRXqasD8VeC8m91ytDPMritgFSlKonfdt+rRYYpP/JfLxgIX8yoSw==", + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.12.tgz", + "integrity": "sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==", "dev": true }, "merge-stream": { @@ -13601,9 +13601,9 @@ "dev": true }, "shiki": { - "version": "0.9.15", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.15.tgz", - "integrity": "sha512-/Y0z9IzhJ8nD9nbceORCqu6NgT9X6I8Fk8c3SICHI5NbZRLdZYFaB233gwct9sU0vvSypyaL/qaKvzyQGJBZSw==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.0.tgz", + "integrity": "sha512-iczxaIYeBFHTFrQPb9DVy2SKgYxC4Wo7Iucm7C17cCh2Ge/refnvHscUOxM85u57MfLoNOtjoEFUWt9gBexblA==", "dev": true, "requires": { "jsonc-parser": "^3.0.0", @@ -14024,16 +14024,16 @@ } }, "typedoc": { - "version": "0.22.10", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.10.tgz", - "integrity": "sha512-hQYZ4WtoMZ61wDC6w10kxA42+jclWngdmztNZsDvIz7BMJg7F2xnT+uYsUa7OluyKossdFj9E9Ye4QOZKTy8SA==", + "version": "0.22.11", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.11.tgz", + "integrity": "sha512-pVr3hh6dkS3lPPaZz1fNpvcrqLdtEvXmXayN55czlamSgvEjh+57GUqfhAI1Xsuu/hNHUT1KNSx8LH2wBP/7SA==", "dev": true, "requires": { "glob": "^7.2.0", "lunr": "^2.3.9", - "marked": "^3.0.8", + "marked": "^4.0.10", "minimatch": "^3.0.4", - "shiki": "^0.9.12" + "shiki": "^0.10.0" } }, "typescript": { diff --git a/package.json b/package.json index 60f2a5d3..c77fae18 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "devDependencies": { "npm-check-updates": "^12.1.0", "serve": "^13.0.2", - "typedoc": "^0.22.10" + "typedoc": "^0.22.11" }, "resolutions": { "get-pkg-repo": "4.1.2" From 02cbfc4ad13dd11fcd0da735476f5e1454292335 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Wed, 2 Feb 2022 10:05:22 +0900 Subject: [PATCH 16/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 30 +++++++++++++++--------------- package.json | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 23a88d7a..662a4c0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "packages/sdk" ], "devDependencies": { - "npm-check-updates": "^12.1.0", + "npm-check-updates": "^12.2.1", "serve": "^13.0.2", "typedoc": "^0.22.11" } @@ -3819,9 +3819,9 @@ } }, "node_modules/hosted-git-info": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", - "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -5849,9 +5849,9 @@ } }, "node_modules/npm-check-updates": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.1.0.tgz", - "integrity": "sha512-9GtSetBvcth7MuL+0MpOmWgdfiEgZcWRfnvoYnNZxbZpleHZCT0Z3HnbsL6/EAT2M+ye7FTZ+YjmDmZptt7Rkg==", + "version": "12.2.1", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.2.1.tgz", + "integrity": "sha512-fqfH2USwTLgho8HaC79i5Bl+RH3zV15AbdtJQTCaOAp9L3D2W8k+jsfuwee2vSTUrt6IUTXPbzwUIYo4/TQdYA==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -5863,7 +5863,7 @@ "fp-and-or": "^0.1.3", "get-stdin": "^8.0.0", "globby": "^11.0.4", - "hosted-git-info": "^4.0.2", + "hosted-git-info": "^4.1.0", "json-parse-helpfulerror": "^1.0.3", "jsonlines": "^0.1.1", "libnpmconfig": "^1.2.1", @@ -11103,9 +11103,9 @@ "dev": true }, "hosted-git-info": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", - "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -12674,9 +12674,9 @@ } }, "npm-check-updates": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.1.0.tgz", - "integrity": "sha512-9GtSetBvcth7MuL+0MpOmWgdfiEgZcWRfnvoYnNZxbZpleHZCT0Z3HnbsL6/EAT2M+ye7FTZ+YjmDmZptt7Rkg==", + "version": "12.2.1", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.2.1.tgz", + "integrity": "sha512-fqfH2USwTLgho8HaC79i5Bl+RH3zV15AbdtJQTCaOAp9L3D2W8k+jsfuwee2vSTUrt6IUTXPbzwUIYo4/TQdYA==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -12688,7 +12688,7 @@ "fp-and-or": "^0.1.3", "get-stdin": "^8.0.0", "globby": "^11.0.4", - "hosted-git-info": "^4.0.2", + "hosted-git-info": "^4.1.0", "json-parse-helpfulerror": "^1.0.3", "jsonlines": "^0.1.1", "libnpmconfig": "^1.2.1", diff --git a/package.json b/package.json index c77fae18..76a55257 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "dist" ], "devDependencies": { - "npm-check-updates": "^12.1.0", + "npm-check-updates": "^12.2.1", "serve": "^13.0.2", "typedoc": "^0.22.11" }, From 7037f51d182cc8ca9d415420db54e6cdc5a682cc Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Wed, 2 Feb 2022 10:36:37 +0900 Subject: [PATCH 17/86] =?UTF-8?q?dev=20=E3=83=91=E3=83=83=E3=82=B1?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 1444 ++++++++++++++++-------------------- packages/e2ee/package.json | 10 +- packages/sdk/package.json | 16 +- 3 files changed, 666 insertions(+), 804 deletions(-) diff --git a/package-lock.json b/package-lock.json index 662a4c0f..9a61d62d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -782,15 +782,15 @@ } }, "node_modules/@jest/console": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.4.2.tgz", - "integrity": "sha512-xknHThRsPB/To1FUbi6pCe43y58qFC03zfb6R7fDb/FfC7k2R3i1l+izRBJf8DI46KhYGRaF14Eo9A3qbBoixg==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.4.6.tgz", + "integrity": "sha512-jauXyacQD33n47A44KrlOVeiXHEXDqapSdfb9kTekOchH/Pd18kBIO1+xxJQRLuG+LUuljFCwTG92ra4NW7SpA==", "dev": true, "dependencies": { "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^27.4.2", + "jest-message-util": "^27.4.6", "jest-util": "^27.4.2", "slash": "^3.0.0" }, @@ -799,15 +799,15 @@ } }, "node_modules/@jest/core": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.5.tgz", - "integrity": "sha512-3tm/Pevmi8bDsgvo73nX8p/WPng6KWlCyScW10FPEoN1HU4pwI83tJ3TsFvi1FfzsjwUlMNEPowgb/rPau/LTQ==", + "version": "27.4.7", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.7.tgz", + "integrity": "sha512-n181PurSJkVMS+kClIFSX/LLvw9ExSb+4IMtD6YnfxZVerw9ANYtW0bPrm0MJu2pfe9SY9FJ9FtQ+MdZkrZwjg==", "dev": true, "dependencies": { - "@jest/console": "^27.4.2", - "@jest/reporters": "^27.4.5", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.5", + "@jest/console": "^27.4.6", + "@jest/reporters": "^27.4.6", + "@jest/test-result": "^27.4.6", + "@jest/transform": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", "ansi-escapes": "^4.2.1", @@ -816,18 +816,18 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-changed-files": "^27.4.2", - "jest-config": "^27.4.5", - "jest-haste-map": "^27.4.5", - "jest-message-util": "^27.4.2", + "jest-config": "^27.4.7", + "jest-haste-map": "^27.4.6", + "jest-message-util": "^27.4.6", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.5", - "jest-resolve-dependencies": "^27.4.5", - "jest-runner": "^27.4.5", - "jest-runtime": "^27.4.5", - "jest-snapshot": "^27.4.5", + "jest-resolve": "^27.4.6", + "jest-resolve-dependencies": "^27.4.6", + "jest-runner": "^27.4.6", + "jest-runtime": "^27.4.6", + "jest-snapshot": "^27.4.6", "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", - "jest-watcher": "^27.4.2", + "jest-validate": "^27.4.6", + "jest-watcher": "^27.4.6", "micromatch": "^4.0.4", "rimraf": "^3.0.0", "slash": "^3.0.0", @@ -846,31 +846,31 @@ } }, "node_modules/@jest/environment": { - "version": "27.4.4", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.4.tgz", - "integrity": "sha512-q+niMx7cJgt/t/b6dzLOh4W8Ef/8VyKG7hxASK39jakijJzbFBGpptx3RXz13FFV7OishQ9lTbv+dQ5K3EhfDQ==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.6.tgz", + "integrity": "sha512-E6t+RXPfATEEGVidr84WngLNWZ8ffCPky8RqqRK6u1Bn0LK92INe0MDttyPl/JOzaq92BmDzOeuqk09TvM22Sg==", "dev": true, "dependencies": { - "@jest/fake-timers": "^27.4.2", + "@jest/fake-timers": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", - "jest-mock": "^27.4.2" + "jest-mock": "^27.4.6" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.2.tgz", - "integrity": "sha512-f/Xpzn5YQk5adtqBgvw1V6bF8Nx3hY0OIRRpCvWcfPl0EAjdqWPdhH3t/3XpiWZqtjIEHDyMKP9ajpva1l4Zmg==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.6.tgz", + "integrity": "sha512-mfaethuYF8scV8ntPpiVGIHQgS0XIALbpY2jt2l7wb/bvq4Q5pDLk4EP4D7SAvYT1QrPOPVZAtbdGAOOyIgs7A==", "dev": true, "dependencies": { "@jest/types": "^27.4.2", "@sinonjs/fake-timers": "^8.0.1", "@types/node": "*", - "jest-message-util": "^27.4.2", - "jest-mock": "^27.4.2", + "jest-message-util": "^27.4.6", + "jest-mock": "^27.4.6", "jest-util": "^27.4.2" }, "engines": { @@ -878,29 +878,29 @@ } }, "node_modules/@jest/globals": { - "version": "27.4.4", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.4.tgz", - "integrity": "sha512-bqpqQhW30BOreXM8bA8t8JbOQzsq/WnPTnBl+It3UxAD9J8yxEAaBEylHx1dtBapAr/UBk8GidXbzmqnee8tYQ==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.6.tgz", + "integrity": "sha512-kAiwMGZ7UxrgPzu8Yv9uvWmXXxsy0GciNejlHvfPIfWkSxChzv6bgTS3YqBkGuHcis+ouMFI2696n2t+XYIeFw==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.4", + "@jest/environment": "^27.4.6", "@jest/types": "^27.4.2", - "expect": "^27.4.2" + "expect": "^27.4.6" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/@jest/reporters": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.5.tgz", - "integrity": "sha512-3orsG4vi8zXuBqEoy2LbnC1kuvkg1KQUgqNxmxpQgIOQEPeV0onvZu+qDQnEoX8qTQErtqn/xzcnbpeTuOLSiA==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.6.tgz", + "integrity": "sha512-+Zo9gV81R14+PSq4wzee4GC2mhAN9i9a7qgJWL90Gpx7fHYkWpTBvwWNZUXvJByYR9tAVBdc8VxDWqfJyIUrIQ==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.4.2", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.5", + "@jest/console": "^27.4.6", + "@jest/test-result": "^27.4.6", + "@jest/transform": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", @@ -909,14 +909,14 @@ "glob": "^7.1.2", "graceful-fs": "^4.2.4", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^4.0.3", + "istanbul-lib-instrument": "^5.1.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "jest-haste-map": "^27.4.5", - "jest-resolve": "^27.4.5", + "istanbul-reports": "^3.1.3", + "jest-haste-map": "^27.4.6", + "jest-resolve": "^27.4.6", "jest-util": "^27.4.2", - "jest-worker": "^27.4.5", + "jest-worker": "^27.4.6", "slash": "^3.0.0", "source-map": "^0.6.0", "string-length": "^4.0.1", @@ -950,12 +950,12 @@ } }, "node_modules/@jest/test-result": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.4.2.tgz", - "integrity": "sha512-kr+bCrra9jfTgxHXHa2UwoQjxvQk3Am6QbpAiJ5x/50LW8llOYrxILkqY0lZRW/hu8FXesnudbql263+EW9iNA==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.4.6.tgz", + "integrity": "sha512-fi9IGj3fkOrlMmhQqa/t9xum8jaJOOAi/lZlm6JXSc55rJMXKHxNDN1oCP39B0/DhNOa2OMupF9BcKZnNtXMOQ==", "dev": true, "dependencies": { - "@jest/console": "^27.4.2", + "@jest/console": "^27.4.6", "@jest/types": "^27.4.2", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" @@ -965,38 +965,38 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.5.tgz", - "integrity": "sha512-n5woIn/1v+FT+9hniymHPARA9upYUmfi5Pw9ewVwXCDlK4F5/Gkees9v8vdjGdAIJ2MPHLHodiajLpZZanWzEQ==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.6.tgz", + "integrity": "sha512-3GL+nsf6E1PsyNsJuvPyIz+DwFuCtBdtvPpm/LMXVkBJbdFvQYCDpccYT56qq5BGniXWlE81n2qk1sdXfZebnw==", "dev": true, "dependencies": { - "@jest/test-result": "^27.4.2", + "@jest/test-result": "^27.4.6", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.5", - "jest-runtime": "^27.4.5" + "jest-haste-map": "^27.4.6", + "jest-runtime": "^27.4.6" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/@jest/transform": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.5.tgz", - "integrity": "sha512-PuMet2UlZtlGzwc6L+aZmR3I7CEBpqadO03pU40l2RNY2fFJ191b9/ITB44LNOhVtsyykx0OZvj0PCyuLm7Eew==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.6.tgz", + "integrity": "sha512-9MsufmJC8t5JTpWEQJ0OcOOAXaH5ioaIX6uHVBLBMoCZPfKKQF+EqP8kACAvCZ0Y1h2Zr3uOccg8re+Dr5jxyw==", "dev": true, "dependencies": { "@babel/core": "^7.1.0", "@jest/types": "^27.4.2", - "babel-plugin-istanbul": "^6.0.0", + "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.5", + "jest-haste-map": "^27.4.6", "jest-regex-util": "^27.4.0", "jest-util": "^27.4.2", "micromatch": "^4.0.4", - "pirates": "^4.0.1", + "pirates": "^4.0.4", "slash": "^3.0.0", "source-map": "^0.6.1", "write-file-atomic": "^3.0.0" @@ -1163,9 +1163,9 @@ } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.2.tgz", - "integrity": "sha512-xyqbuf1vyOPC60jEKhx3DBHunymnCJswzjNTKfX4Jz7zCPar1UqbRZCNY1u5QaXh97beaFTWdoUUWiV4qX8o/g==", + "version": "13.1.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz", + "integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1399,9 +1399,9 @@ "dev": true }, "node_modules/@types/prettier": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.2.tgz", - "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.3.tgz", + "integrity": "sha512-QzSuZMBuG5u8HqYz01qtMdg/Jfctlnvj1z/lYnIDXs/golxw0fxtRAHd9KrzjR7Yxz1qVeI00o0kiO3PmVdJ9w==", "dev": true }, "node_modules/@types/resolve": { @@ -1435,14 +1435,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.9.0.tgz", - "integrity": "sha512-qT4lr2jysDQBQOPsCCvpPUZHjbABoTJW8V9ZzIYKHMfppJtpdtzszDYsldwhFxlhvrp7aCHeXD1Lb9M1zhwWwQ==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.2.tgz", + "integrity": "sha512-4W/9lLuE+v27O/oe7hXJKjNtBLnZE8tQAFpapdxwSVHqtmIoPB1gph3+ahNwVuNL37BX7YQHyGF9Xv6XCnIX2Q==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "5.9.0", - "@typescript-eslint/scope-manager": "5.9.0", - "@typescript-eslint/type-utils": "5.9.0", + "@typescript-eslint/scope-manager": "5.10.2", + "@typescript-eslint/type-utils": "5.10.2", + "@typescript-eslint/utils": "5.10.2", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1467,39 +1467,15 @@ } } }, - "node_modules/@typescript-eslint/experimental-utils": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.9.0.tgz", - "integrity": "sha512-ZnLVjBrf26dn7ElyaSKa6uDhqwvAi4jBBmHK1VxuFGPRAxhdi18ubQYSGA7SRiFiES3q9JiBOBHEBStOFkwD2g==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.9.0", - "@typescript-eslint/types": "5.9.0", - "@typescript-eslint/typescript-estree": "5.9.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, "node_modules/@typescript-eslint/parser": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.9.0.tgz", - "integrity": "sha512-/6pOPz8yAxEt4PLzgbFRDpZmHnXCeZgPDrh/1DaVKOjvn/UPMlWhbx/gA96xRi2JxY1kBl2AmwVbyROUqys5xQ==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.10.2.tgz", + "integrity": "sha512-JaNYGkaQVhP6HNF+lkdOr2cAs2wdSZBoalE22uYWq8IEv/OVH0RksSGydk+sW8cLoSeYmC+OHvRyv2i4AQ7Czg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.9.0", - "@typescript-eslint/types": "5.9.0", - "@typescript-eslint/typescript-estree": "5.9.0", + "@typescript-eslint/scope-manager": "5.10.2", + "@typescript-eslint/types": "5.10.2", + "@typescript-eslint/typescript-estree": "5.10.2", "debug": "^4.3.2" }, "engines": { @@ -1519,13 +1495,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.9.0.tgz", - "integrity": "sha512-DKtdIL49Qxk2a8icF6whRk7uThuVz4A6TCXfjdJSwOsf+9ree7vgQWcx0KOyCdk0i9ETX666p4aMhrRhxhUkyg==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.2.tgz", + "integrity": "sha512-39Tm6f4RoZoVUWBYr3ekS75TYgpr5Y+X0xLZxXqcZNDWZdJdYbKd3q2IR4V9y5NxxiPu/jxJ8XP7EgHiEQtFnw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.9.0", - "@typescript-eslint/visitor-keys": "5.9.0" + "@typescript-eslint/types": "5.10.2", + "@typescript-eslint/visitor-keys": "5.10.2" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1536,12 +1512,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.9.0.tgz", - "integrity": "sha512-uVCb9dJXpBrK1071ri5aEW7ZHdDHAiqEjYznF3HSSvAJXyrkxGOw2Ejibz/q6BXdT8lea8CMI0CzKNFTNI6TEQ==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.10.2.tgz", + "integrity": "sha512-uRKSvw/Ccs5FYEoXW04Z5VfzF2iiZcx8Fu7DGIB7RHozuP0VbKNzP1KfZkHBTM75pCpsWxIthEH1B33dmGBKHw==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "5.9.0", + "@typescript-eslint/utils": "5.10.2", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -1562,9 +1538,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.9.0.tgz", - "integrity": "sha512-mWp6/b56Umo1rwyGCk8fPIzb9Migo8YOniBGPAQDNC6C52SeyNGN4gsVwQTAR+RS2L5xyajON4hOLwAGwPtUwg==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.2.tgz", + "integrity": "sha512-Qfp0qk/5j2Rz3p3/WhWgu4S1JtMcPgFLnmAKAW061uXxKSa7VWKZsDXVaMXh2N60CX9h6YLaBoy9PJAfCOjk3w==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1575,13 +1551,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.9.0.tgz", - "integrity": "sha512-kxo3xL2mB7XmiVZcECbaDwYCt3qFXz99tBSuVJR4L/sR7CJ+UNAPrYILILktGj1ppfZ/jNt/cWYbziJUlHl1Pw==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.2.tgz", + "integrity": "sha512-WHHw6a9vvZls6JkTgGljwCsMkv8wu8XU8WaYKeYhxhWXH/atZeiMW6uDFPLZOvzNOGmuSMvHtZKd6AuC8PrwKQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.9.0", - "@typescript-eslint/visitor-keys": "5.9.0", + "@typescript-eslint/types": "5.10.2", + "@typescript-eslint/visitor-keys": "5.10.2", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1601,13 +1577,37 @@ } } }, + "node_modules/@typescript-eslint/utils": { + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.10.2.tgz", + "integrity": "sha512-vuJaBeig1NnBRkf7q9tgMLREiYD7zsMrsN1DA3wcoMDvr3BTFiIpKjGiYZoKPllfEwN7spUjv7ZqD+JhbVjEPg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.10.2", + "@typescript-eslint/types": "5.10.2", + "@typescript-eslint/typescript-estree": "5.10.2", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.9.0.tgz", - "integrity": "sha512-6zq0mb7LV0ThExKlecvpfepiB+XEtFv/bzx7/jKSgyXTFD7qjmSu1FoiS0x3OZaiS+UIXpH2vd9O89f02RCtgw==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.2.tgz", + "integrity": "sha512-zHIhYGGGrFJvvyfwHk5M08C5B5K4bewkm+rrvNTKk1/S15YHR+SA/QUF8ZWscXSfEaB8Nn2puZj+iHcoxVOD/Q==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.9.0", + "@typescript-eslint/types": "5.10.2", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -1765,15 +1765,6 @@ "string-width": "^4.1.0" } }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -1905,15 +1896,15 @@ "dev": true }, "node_modules/babel-jest": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.5.tgz", - "integrity": "sha512-3uuUTjXbgtODmSv/DXO9nZfD52IyC2OYTFaXGRzL0kpykzroaquCrD5+lZNafTvZlnNqZHt5pb0M08qVBZnsnA==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.6.tgz", + "integrity": "sha512-qZL0JT0HS1L+lOuH+xC2DVASR3nunZi/ozGhpgauJHgmI7f8rudxf6hUjEHympdQ/J64CdKmPkgfJ+A3U6QCrg==", "dev": true, "dependencies": { - "@jest/transform": "^27.4.5", + "@jest/transform": "^27.4.6", "@jest/types": "^27.4.2", "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.0.0", + "babel-plugin-istanbul": "^6.1.1", "babel-preset-jest": "^27.4.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", @@ -1942,31 +1933,6 @@ "node": ">=8" } }, - "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz", - "integrity": "sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q==", - "dev": true, - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-istanbul/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/babel-plugin-jest-hoist": { "version": "27.4.0", "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.4.0.tgz", @@ -2849,18 +2815,6 @@ "once": "^1.4.0" } }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/env-paths": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", @@ -2986,9 +2940,9 @@ } }, "node_modules/eslint": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.6.0.tgz", - "integrity": "sha512-UvxdOJ7mXFlw7iuHZA4jmzPaUqIw54mZrv+XPYKNbKdLR0et4rf60lIZUU9kiNtnzzMzGWxMV+tQ7uG7JG8DPw==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz", + "integrity": "sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.0.5", @@ -2998,11 +2952,10 @@ "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.0", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.1.0", + "eslint-visitor-keys": "^3.2.0", "espree": "^9.3.0", "esquery": "^1.4.0", "esutils": "^2.0.2", @@ -3011,7 +2964,7 @@ "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.6.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", @@ -3022,9 +2975,7 @@ "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", "regexpp": "^3.2.0", - "semver": "^7.2.1", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0", @@ -3114,9 +3065,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", + "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3182,15 +3133,6 @@ "node": ">=10.13.0" } }, - "node_modules/eslint/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/eslint/node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -3354,34 +3296,20 @@ } }, "node_modules/expect": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.4.2.tgz", - "integrity": "sha512-BjAXIDC6ZOW+WBFNg96J22D27Nq5ohn+oGcuP2rtOtcjuxNoV9McpQ60PcQWhdFOSBIQdR72e+4HdnbZTFSTyg==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/expect/-/expect-27.4.6.tgz", + "integrity": "sha512-1M/0kAALIaj5LaG66sFJTbRsWTADnylly82cu4bspI0nl+pgP4E6Bh/aqdHlTUjul06K7xQnnrAoqfxVU0+/ag==", "dev": true, "dependencies": { "@jest/types": "^27.4.2", - "ansi-styles": "^5.0.0", "jest-get-type": "^27.4.0", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-regex-util": "^27.4.0" + "jest-matcher-utils": "^27.4.6", + "jest-message-util": "^27.4.6" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/expect/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3959,9 +3887,9 @@ } }, "node_modules/import-local": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.3.tgz", - "integrity": "sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dev": true, "dependencies": { "pkg-dir": "^4.2.0", @@ -3972,6 +3900,9 @@ }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/imurmurhash": { @@ -4235,14 +4166,15 @@ } }, "node_modules/istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz", + "integrity": "sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q==", "dev": true, "dependencies": { - "@babel/core": "^7.7.5", + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-coverage": "^3.2.0", "semver": "^6.3.0" }, "engines": { @@ -4300,14 +4232,14 @@ } }, "node_modules/jest": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.5.tgz", - "integrity": "sha512-uT5MiVN3Jppt314kidCk47MYIRilJjA/l2mxwiuzzxGUeJIvA8/pDaJOAX5KWvjAo7SCydcW0/4WEtgbLMiJkg==", + "version": "27.4.7", + "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.7.tgz", + "integrity": "sha512-8heYvsx7nV/m8m24Vk26Y87g73Ba6ueUd0MWed/NXMhSZIm62U/llVbS0PJe1SHunbyXjJ/BqG1z9bFjGUIvTg==", "dev": true, "dependencies": { - "@jest/core": "^27.4.5", + "@jest/core": "^27.4.7", "import-local": "^3.0.2", - "jest-cli": "^27.4.5" + "jest-cli": "^27.4.7" }, "bin": { "jest": "bin/jest.js" @@ -4442,27 +4374,27 @@ } }, "node_modules/jest-circus": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.5.tgz", - "integrity": "sha512-eTNWa9wsvBwPykhMMShheafbwyakcdHZaEYh5iRrQ0PFJxkDP/e3U/FvzGuKWu2WpwUA3C3hPlfpuzvOdTVqnw==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.6.tgz", + "integrity": "sha512-UA7AI5HZrW4wRM72Ro80uRR2Fg+7nR0GESbSI/2M+ambbzVuA63mn5T1p3Z/wlhntzGpIG1xx78GP2YIkf6PhQ==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.4", - "@jest/test-result": "^27.4.2", + "@jest/environment": "^27.4.6", + "@jest/test-result": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^27.4.2", + "expect": "^27.4.6", "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.2", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-runtime": "^27.4.5", - "jest-snapshot": "^27.4.5", + "jest-each": "^27.4.6", + "jest-matcher-utils": "^27.4.6", + "jest-message-util": "^27.4.6", + "jest-runtime": "^27.4.6", + "jest-snapshot": "^27.4.6", "jest-util": "^27.4.2", - "pretty-format": "^27.4.2", + "pretty-format": "^27.4.6", "slash": "^3.0.0", "stack-utils": "^2.0.3", "throat": "^6.0.1" @@ -4472,21 +4404,21 @@ } }, "node_modules/jest-cli": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.5.tgz", - "integrity": "sha512-hrky3DSgE0u7sQxaCL7bdebEPHx5QzYmrGuUjaPLmPE8jx5adtvGuOlRspvMoVLTTDOHRnZDoRLYJuA+VCI7Hg==", + "version": "27.4.7", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.7.tgz", + "integrity": "sha512-zREYhvjjqe1KsGV15mdnxjThKNDgza1fhDT+iUsXWLCq3sxe9w5xnvyctcYVT5PcdLSjv7Y5dCwTS3FCF1tiuw==", "dev": true, "dependencies": { - "@jest/core": "^27.4.5", - "@jest/test-result": "^27.4.2", + "@jest/core": "^27.4.7", + "@jest/test-result": "^27.4.6", "@jest/types": "^27.4.2", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", - "jest-config": "^27.4.5", + "jest-config": "^27.4.7", "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", + "jest-validate": "^27.4.6", "prompts": "^2.0.1", "yargs": "^16.2.0" }, @@ -4506,32 +4438,32 @@ } }, "node_modules/jest-config": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.5.tgz", - "integrity": "sha512-t+STVJtPt+fpqQ8GBw850NtSQbnDOw/UzdPfzDaHQ48/AylQlW7LHj3dH+ndxhC1UxJ0Q3qkq7IH+nM1skwTwA==", + "version": "27.4.7", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.7.tgz", + "integrity": "sha512-xz/o/KJJEedHMrIY9v2ParIoYSrSVY6IVeE4z5Z3i101GoA5XgfbJz+1C8EYPsv7u7f39dS8F9v46BHDhn0vlw==", "dev": true, "dependencies": { - "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^27.4.5", + "@babel/core": "^7.8.0", + "@jest/test-sequencer": "^27.4.6", "@jest/types": "^27.4.2", - "babel-jest": "^27.4.5", + "babel-jest": "^27.4.6", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-circus": "^27.4.5", - "jest-environment-jsdom": "^27.4.4", - "jest-environment-node": "^27.4.4", + "jest-circus": "^27.4.6", + "jest-environment-jsdom": "^27.4.6", + "jest-environment-node": "^27.4.6", "jest-get-type": "^27.4.0", - "jest-jasmine2": "^27.4.5", + "jest-jasmine2": "^27.4.6", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.5", - "jest-runner": "^27.4.5", + "jest-resolve": "^27.4.6", + "jest-runner": "^27.4.6", "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", + "jest-validate": "^27.4.6", "micromatch": "^4.0.4", - "pretty-format": "^27.4.2", + "pretty-format": "^27.4.6", "slash": "^3.0.0" }, "engines": { @@ -4553,15 +4485,15 @@ "dev": true }, "node_modules/jest-diff": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.2.tgz", - "integrity": "sha512-ujc9ToyUZDh9KcqvQDkk/gkbf6zSaeEg9AiBxtttXW59H/AcqEYp1ciXAtJp+jXWva5nAf/ePtSsgWwE5mqp4Q==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.6.tgz", + "integrity": "sha512-zjaB0sh0Lb13VyPsd92V7HkqF6yKRH9vm33rwBt7rPYrpQvS1nCvlIy2pICbKta+ZjWngYLNn4cCK4nyZkjS/w==", "dev": true, "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^27.4.0", "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.2" + "pretty-format": "^27.4.6" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" @@ -4580,32 +4512,32 @@ } }, "node_modules/jest-each": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.4.2.tgz", - "integrity": "sha512-53V2MNyW28CTruB3lXaHNk6PkiIFuzdOC9gR3C6j8YE/ACfrPnz+slB0s17AgU1TtxNzLuHyvNlLJ+8QYw9nBg==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.4.6.tgz", + "integrity": "sha512-n6QDq8y2Hsmn22tRkgAk+z6MCX7MeVlAzxmZDshfS2jLcaBlyhpF3tZSJLR+kXmh23GEvS0ojMR8i6ZeRvpQcA==", "dev": true, "dependencies": { "@jest/types": "^27.4.2", "chalk": "^4.0.0", "jest-get-type": "^27.4.0", "jest-util": "^27.4.2", - "pretty-format": "^27.4.2" + "pretty-format": "^27.4.6" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-environment-jsdom": { - "version": "27.4.4", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.4.tgz", - "integrity": "sha512-cYR3ndNfHBqQgFvS1RL7dNqSvD//K56j/q1s2ygNHcfTCAp12zfIromO1w3COmXrxS8hWAh7+CmZmGCIoqGcGA==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.6.tgz", + "integrity": "sha512-o3dx5p/kHPbUlRvSNjypEcEtgs6LmvESMzgRFQE6c+Prwl2JLA4RZ7qAnxc5VM8kutsGRTB15jXeeSbJsKN9iA==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.4", - "@jest/fake-timers": "^27.4.2", + "@jest/environment": "^27.4.6", + "@jest/fake-timers": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", - "jest-mock": "^27.4.2", + "jest-mock": "^27.4.6", "jest-util": "^27.4.2", "jsdom": "^16.6.0" }, @@ -4614,16 +4546,16 @@ } }, "node_modules/jest-environment-node": { - "version": "27.4.4", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.4.tgz", - "integrity": "sha512-D+v3lbJ2GjQTQR23TK0kY3vFVmSeea05giInI41HHOaJnAwOnmUHTZgUaZL+VxUB43pIzoa7PMwWtCVlIUoVoA==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.6.tgz", + "integrity": "sha512-yfHlZ9m+kzTKZV0hVfhVu6GuDxKAYeFHrfulmy7Jxwsq4V7+ZK7f+c0XP/tbVDMQW7E4neG2u147hFkuVz0MlQ==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.4", - "@jest/fake-timers": "^27.4.2", + "@jest/environment": "^27.4.6", + "@jest/fake-timers": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", - "jest-mock": "^27.4.2", + "jest-mock": "^27.4.6", "jest-util": "^27.4.2" }, "engines": { @@ -4640,9 +4572,9 @@ } }, "node_modules/jest-haste-map": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.5.tgz", - "integrity": "sha512-oJm1b5qhhPs78K24EDGifWS0dELYxnoBiDhatT/FThgB9yxqUm5F6li3Pv+Q+apMBmmPNzOBnZ7ZxWMB1Leq1Q==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.6.tgz", + "integrity": "sha512-0tNpgxg7BKurZeFkIOvGCkbmOHbLFf4LUQOxrQSMjvrQaQe3l6E8x6jYC1NuWkGo5WDdbr8FEzUxV2+LWNawKQ==", "dev": true, "dependencies": { "@jest/types": "^27.4.2", @@ -4654,7 +4586,7 @@ "jest-regex-util": "^27.4.0", "jest-serializer": "^27.4.0", "jest-util": "^27.4.2", - "jest-worker": "^27.4.5", + "jest-worker": "^27.4.6", "micromatch": "^4.0.4", "walker": "^1.0.7" }, @@ -4666,28 +4598,27 @@ } }, "node_modules/jest-jasmine2": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.5.tgz", - "integrity": "sha512-oUnvwhJDj2LhOiUB1kdnJjkx8C5PwgUZQb9urF77mELH9DGR4e2GqpWQKBOYXWs5+uTN9BGDqRz3Aeg5Wts7aw==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.6.tgz", + "integrity": "sha512-uAGNXF644I/whzhsf7/qf74gqy9OuhvJ0XYp8SDecX2ooGeaPnmJMjXjKt0mqh1Rl5dtRGxJgNrHlBQIBfS5Nw==", "dev": true, "dependencies": { - "@babel/traverse": "^7.1.0", - "@jest/environment": "^27.4.4", + "@jest/environment": "^27.4.6", "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.2", + "@jest/test-result": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^27.4.2", + "expect": "^27.4.6", "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.2", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-runtime": "^27.4.5", - "jest-snapshot": "^27.4.5", + "jest-each": "^27.4.6", + "jest-matcher-utils": "^27.4.6", + "jest-message-util": "^27.4.6", + "jest-runtime": "^27.4.6", + "jest-snapshot": "^27.4.6", "jest-util": "^27.4.2", - "pretty-format": "^27.4.2", + "pretty-format": "^27.4.6", "throat": "^6.0.1" }, "engines": { @@ -4695,37 +4626,37 @@ } }, "node_modules/jest-leak-detector": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.4.2.tgz", - "integrity": "sha512-ml0KvFYZllzPBJWDei3mDzUhyp/M4ubKebX++fPaudpe8OsxUE+m+P6ciVLboQsrzOCWDjE20/eXew9QMx/VGw==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.4.6.tgz", + "integrity": "sha512-kkaGixDf9R7CjHm2pOzfTxZTQQQ2gHTIWKY/JZSiYTc90bZp8kSZnUMS3uLAfwTZwc0tcMRoEX74e14LG1WapA==", "dev": true, "dependencies": { "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.2" + "pretty-format": "^27.4.6" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.2.tgz", - "integrity": "sha512-jyP28er3RRtMv+fmYC/PKG8wvAmfGcSNproVTW2Y0P/OY7/hWUOmsPfxN1jOhM+0u2xU984u2yEagGivz9OBGQ==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.6.tgz", + "integrity": "sha512-XD4PKT3Wn1LQnRAq7ZsTI0VRuEc9OrCPFiO1XL7bftTGmfNF0DcEwMHRgqiu7NGf8ZoZDREpGrCniDkjt79WbA==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^27.4.2", + "jest-diff": "^27.4.6", "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.2" + "pretty-format": "^27.4.6" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-message-util": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.2.tgz", - "integrity": "sha512-OMRqRNd9E0DkBLZpFtZkAGYOXl6ZpoMtQJWTAREJKDOFa0M6ptB7L67tp+cszMBkvSgKOhNtQp2Vbcz3ZZKo/w==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.6.tgz", + "integrity": "sha512-0p5szriFU0U74czRSFjH6RyS7UYIAkn/ntwMuOwTGWrQIOh5NzXXrq72LOqIkJKKvFbPq+byZKuBz78fjBERBA==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", @@ -4734,7 +4665,7 @@ "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "micromatch": "^4.0.4", - "pretty-format": "^27.4.2", + "pretty-format": "^27.4.6", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -4743,9 +4674,9 @@ } }, "node_modules/jest-mock": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.4.2.tgz", - "integrity": "sha512-PDDPuyhoukk20JrQKeofK12hqtSka7mWH0QQuxSNgrdiPsrnYYLS6wbzu/HDlxZRzji5ylLRULeuI/vmZZDrYA==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.4.6.tgz", + "integrity": "sha512-kvojdYRkst8iVSZ1EJ+vc1RRD9llueBjKzXzeCytH3dMM7zvPV/ULcfI2nr0v0VUgm3Bjt3hBCQvOeaBz+ZTHw==", "dev": true, "dependencies": { "@jest/types": "^27.4.2", @@ -4782,18 +4713,18 @@ } }, "node_modules/jest-resolve": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.5.tgz", - "integrity": "sha512-xU3z1BuOz/hUhVUL+918KqUgK+skqOuUsAi7A+iwoUldK6/+PW+utK8l8cxIWT9AW7IAhGNXjSAh1UYmjULZZw==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.6.tgz", + "integrity": "sha512-SFfITVApqtirbITKFAO7jOVN45UgFzcRdQanOFzjnbd+CACDoyeX7206JyU92l4cRr73+Qy/TlW51+4vHGt+zw==", "dev": true, "dependencies": { "@jest/types": "^27.4.2", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.5", + "jest-haste-map": "^27.4.6", "jest-pnp-resolver": "^1.2.2", "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", + "jest-validate": "^27.4.6", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" @@ -4803,29 +4734,29 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.5.tgz", - "integrity": "sha512-elEVvkvRK51y037NshtEkEnukMBWvlPzZHiL847OrIljJ8yIsujD2GXRPqDXC4rEVKbcdsy7W0FxoZb4WmEs7w==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.6.tgz", + "integrity": "sha512-W85uJZcFXEVZ7+MZqIPCscdjuctruNGXUZ3OHSXOfXR9ITgbUKeHj+uGcies+0SsvI5GtUfTw4dY7u9qjTvQOw==", "dev": true, "dependencies": { "@jest/types": "^27.4.2", "jest-regex-util": "^27.4.0", - "jest-snapshot": "^27.4.5" + "jest-snapshot": "^27.4.6" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-runner": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.5.tgz", - "integrity": "sha512-/irauncTfmY1WkTaRQGRWcyQLzK1g98GYG/8QvIPviHgO1Fqz1JYeEIsSfF+9mc/UTA6S+IIHFgKyvUrtiBIZg==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.6.tgz", + "integrity": "sha512-IDeFt2SG4DzqalYBZRgbbPmpwV3X0DcntjezPBERvnhwKGWTW7C5pbbA5lVkmvgteeNfdd/23gwqv3aiilpYPg==", "dev": true, "dependencies": { - "@jest/console": "^27.4.2", - "@jest/environment": "^27.4.4", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.5", + "@jest/console": "^27.4.6", + "@jest/environment": "^27.4.6", + "@jest/test-result": "^27.4.6", + "@jest/transform": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", @@ -4833,15 +4764,15 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-docblock": "^27.4.0", - "jest-environment-jsdom": "^27.4.4", - "jest-environment-node": "^27.4.4", - "jest-haste-map": "^27.4.5", - "jest-leak-detector": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-resolve": "^27.4.5", - "jest-runtime": "^27.4.5", + "jest-environment-jsdom": "^27.4.6", + "jest-environment-node": "^27.4.6", + "jest-haste-map": "^27.4.6", + "jest-leak-detector": "^27.4.6", + "jest-message-util": "^27.4.6", + "jest-resolve": "^27.4.6", + "jest-runtime": "^27.4.6", "jest-util": "^27.4.2", - "jest-worker": "^27.4.5", + "jest-worker": "^27.4.6", "source-map-support": "^0.5.6", "throat": "^6.0.1" }, @@ -4850,37 +4781,33 @@ } }, "node_modules/jest-runtime": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.5.tgz", - "integrity": "sha512-CIYqwuJQXHQtPd/idgrx4zgJ6iCb6uBjQq1RSAGQrw2S8XifDmoM1Ot8NRd80ooAm+ZNdHVwsktIMGlA1F1FAQ==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.6.tgz", + "integrity": "sha512-eXYeoR/MbIpVDrjqy5d6cGCFOYBFFDeKaNWqTp0h6E74dK0zLHzASQXJpl5a2/40euBmKnprNLJ0Kh0LCndnWQ==", "dev": true, "dependencies": { - "@jest/console": "^27.4.2", - "@jest/environment": "^27.4.4", - "@jest/globals": "^27.4.4", + "@jest/environment": "^27.4.6", + "@jest/fake-timers": "^27.4.6", + "@jest/globals": "^27.4.6", "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.5", + "@jest/test-result": "^27.4.6", + "@jest/transform": "^27.4.6", "@jest/types": "^27.4.2", - "@types/yargs": "^16.0.0", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "execa": "^5.0.0", - "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.5", - "jest-message-util": "^27.4.2", - "jest-mock": "^27.4.2", + "jest-haste-map": "^27.4.6", + "jest-message-util": "^27.4.6", + "jest-mock": "^27.4.6", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.5", - "jest-snapshot": "^27.4.5", + "jest-resolve": "^27.4.6", + "jest-snapshot": "^27.4.6", "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", "slash": "^3.0.0", - "strip-bom": "^4.0.0", - "yargs": "^16.2.0" + "strip-bom": "^4.0.0" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" @@ -5003,34 +4930,32 @@ } }, "node_modules/jest-snapshot": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.5.tgz", - "integrity": "sha512-eCi/iM1YJFrJWiT9de4+RpWWWBqsHiYxFG9V9o/n0WXs6GpW4lUt4FAHAgFPTLPqCUVzrMQmSmTZSgQzwqR7IQ==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.6.tgz", + "integrity": "sha512-fafUCDLQfzuNP9IRcEqaFAMzEe7u5BF7mude51wyWv7VRex60WznZIC7DfKTgSIlJa8aFzYmXclmN328aqSDmQ==", "dev": true, "dependencies": { "@babel/core": "^7.7.2", "@babel/generator": "^7.7.2", - "@babel/parser": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.0.0", - "@jest/transform": "^27.4.5", + "@jest/transform": "^27.4.6", "@jest/types": "^27.4.2", "@types/babel__traverse": "^7.0.4", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^27.4.2", + "expect": "^27.4.6", "graceful-fs": "^4.2.4", - "jest-diff": "^27.4.2", + "jest-diff": "^27.4.6", "jest-get-type": "^27.4.0", - "jest-haste-map": "^27.4.5", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-resolve": "^27.4.5", + "jest-haste-map": "^27.4.6", + "jest-matcher-utils": "^27.4.6", + "jest-message-util": "^27.4.6", "jest-util": "^27.4.2", "natural-compare": "^1.4.0", - "pretty-format": "^27.4.2", + "pretty-format": "^27.4.6", "semver": "^7.3.2" }, "engines": { @@ -5061,9 +4986,9 @@ "dev": true }, "node_modules/jest-validate": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.4.2.tgz", - "integrity": "sha512-hWYsSUej+Fs8ZhOm5vhWzwSLmVaPAxRy+Mr+z5MzeaHm9AxUpXdoVMEW4R86y5gOobVfBsMFLk4Rb+QkiEpx1A==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.4.6.tgz", + "integrity": "sha512-872mEmCPVlBqbA5dToC57vA3yJaMRfIdpCoD3cyHWJOMx+SJwLNw0I71EkWs41oza/Er9Zno9XuTkRYCPDUJXQ==", "dev": true, "dependencies": { "@jest/types": "^27.4.2", @@ -5071,19 +4996,19 @@ "chalk": "^4.0.0", "jest-get-type": "^27.4.0", "leven": "^3.1.0", - "pretty-format": "^27.4.2" + "pretty-format": "^27.4.6" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-watcher": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.4.2.tgz", - "integrity": "sha512-NJvMVyyBeXfDezhWzUOCOYZrUmkSCiatpjpm+nFUid74OZEHk6aMLrZAukIiFDwdbqp6mTM6Ui1w4oc+8EobQg==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.4.6.tgz", + "integrity": "sha512-yKQ20OMBiCDigbD0quhQKLkBO+ObGN79MO4nT7YaCuQ5SM+dkBNWE8cZX0FjU6czwMvWw6StWbe+Wv4jJPJ+fw==", "dev": true, "dependencies": { - "@jest/test-result": "^27.4.2", + "@jest/test-result": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", "ansi-escapes": "^4.2.1", @@ -5096,9 +5021,9 @@ } }, "node_modules/jest-worker": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.5.tgz", - "integrity": "sha512-f2s8kEdy15cv9r7q4KkzGXvlY0JTcmCbMHZBfSQDwW77REr45IDWwd0lksDFeVHH2jJ5pqb90T77XscrjeGzzg==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.6.tgz", + "integrity": "sha512-gHWJF/6Xi5CTG5QCvROr6GcmpIqNYpDJyc8A1h/DyXqH1tD6SnRCM0d3U5msV31D2LB/U+E0M+W4oyvKV44oNw==", "dev": true, "dependencies": { "@types/node": "*", @@ -6424,12 +6349,11 @@ } }, "node_modules/pretty-format": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.2.tgz", - "integrity": "sha512-p0wNtJ9oLuvgOQDEIZ9zQjZffK7KtyR6Si0jnXULIDwrlNF8Cuir3AZP0hHv0jmKuNN/edOnbMjnzd4uTcmWiw==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.6.tgz", + "integrity": "sha512-NblstegA1y/RJW2VyML+3LlpFjzx62cUrtBIKIWDXEDkjNeleA7Od7nrzcs/VLQvAeV4CgSYhrN39DRN88Qi/g==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", "react-is": "^17.0.1" @@ -6784,9 +6708,9 @@ } }, "node_modules/rollup": { - "version": "2.62.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.62.0.tgz", - "integrity": "sha512-cJEQq2gwB0GWMD3rYImefQTSjrPYaC6s4J9pYqnstVLJ1CHa/aZNVkD4Epuvg4iLeMA4KRiq7UM7awKK6j7jcw==", + "version": "2.66.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.66.1.tgz", + "integrity": "sha512-crSgLhSkLMnKr4s9iZ/1qJCplgAgrRY+igWv8KhG/AjKOJ0YX/WpmANyn8oxrw+zenF3BXWDLa7Xl/QZISH+7w==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -7541,9 +7465,9 @@ } }, "node_modules/ts-jest": { - "version": "27.1.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.2.tgz", - "integrity": "sha512-eSOiJOWq6Hhs6Khzk5wKC5sgWIXgXqOCiIl1+3lfnearu58Hj4QpE5tUhQcA3xtZrELbcvAGCsd6HB8OsaVaTA==", + "version": "27.1.3", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.3.tgz", + "integrity": "sha512-6Nlura7s6uM9BVUAoqLH7JHyMXjz8gluryjpPXxr3IxZdAXnU6FhjvVLHFtfd1vsE1p8zD1OJfskkc0jhTSnkA==", "dev": true, "dependencies": { "bs-logger": "0.x", @@ -7677,9 +7601,9 @@ } }, "node_modules/typescript": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz", - "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -7809,9 +7733,9 @@ "dev": true }, "node_modules/v8-to-istanbul": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz", - "integrity": "sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", + "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", "dev": true, "dependencies": { "@types/istanbul-lib-coverage": "^2.0.1", @@ -8127,14 +8051,14 @@ "devDependencies": { "@rollup/plugin-replace": "^3.0.1", "@rollup/plugin-typescript": "^8.3.0", - "@typescript-eslint/eslint-plugin": "^5.9.0", - "@typescript-eslint/parser": "^5.9.0", - "eslint": "^8.6.0", + "@typescript-eslint/eslint-plugin": "^5.10.2", + "@typescript-eslint/parser": "^5.10.2", + "eslint": "^8.8.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.5.1", - "rollup": "^2.62.0", - "typescript": "^4.5.4" + "rollup": "^2.66.1", + "typescript": "^4.5.5" } }, "packages/go-wasm": { @@ -8149,21 +8073,21 @@ }, "devDependencies": { "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-node-resolve": "^13.1.2", + "@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-replace": "^3.0.1", "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.9.0", - "@typescript-eslint/parser": "5.9.0", - "eslint": "8.6.0", + "@typescript-eslint/eslint-plugin": "5.10.2", + "@typescript-eslint/parser": "5.10.2", + "eslint": "8.8.0", "eslint-config-prettier": "8.3.0", "eslint-plugin-prettier": "4.0.0", - "jest": "^27.4.5", + "jest": "^27.4.7", "prettier": "^2.5.1", - "rollup": "^2.62.0", + "rollup": "^2.66.1", "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^27.1.2", - "typescript": "^4.5.4" + "ts-jest": "^27.1.3", + "typescript": "^4.5.5" } } }, @@ -8752,29 +8676,29 @@ "dev": true }, "@jest/console": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.4.2.tgz", - "integrity": "sha512-xknHThRsPB/To1FUbi6pCe43y58qFC03zfb6R7fDb/FfC7k2R3i1l+izRBJf8DI46KhYGRaF14Eo9A3qbBoixg==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.4.6.tgz", + "integrity": "sha512-jauXyacQD33n47A44KrlOVeiXHEXDqapSdfb9kTekOchH/Pd18kBIO1+xxJQRLuG+LUuljFCwTG92ra4NW7SpA==", "dev": true, "requires": { "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^27.4.2", + "jest-message-util": "^27.4.6", "jest-util": "^27.4.2", "slash": "^3.0.0" } }, "@jest/core": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.5.tgz", - "integrity": "sha512-3tm/Pevmi8bDsgvo73nX8p/WPng6KWlCyScW10FPEoN1HU4pwI83tJ3TsFvi1FfzsjwUlMNEPowgb/rPau/LTQ==", + "version": "27.4.7", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.7.tgz", + "integrity": "sha512-n181PurSJkVMS+kClIFSX/LLvw9ExSb+4IMtD6YnfxZVerw9ANYtW0bPrm0MJu2pfe9SY9FJ9FtQ+MdZkrZwjg==", "dev": true, "requires": { - "@jest/console": "^27.4.2", - "@jest/reporters": "^27.4.5", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.5", + "@jest/console": "^27.4.6", + "@jest/reporters": "^27.4.6", + "@jest/test-result": "^27.4.6", + "@jest/transform": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", "ansi-escapes": "^4.2.1", @@ -8783,18 +8707,18 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-changed-files": "^27.4.2", - "jest-config": "^27.4.5", - "jest-haste-map": "^27.4.5", - "jest-message-util": "^27.4.2", + "jest-config": "^27.4.7", + "jest-haste-map": "^27.4.6", + "jest-message-util": "^27.4.6", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.5", - "jest-resolve-dependencies": "^27.4.5", - "jest-runner": "^27.4.5", - "jest-runtime": "^27.4.5", - "jest-snapshot": "^27.4.5", + "jest-resolve": "^27.4.6", + "jest-resolve-dependencies": "^27.4.6", + "jest-runner": "^27.4.6", + "jest-runtime": "^27.4.6", + "jest-snapshot": "^27.4.6", "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", - "jest-watcher": "^27.4.2", + "jest-validate": "^27.4.6", + "jest-watcher": "^27.4.6", "micromatch": "^4.0.4", "rimraf": "^3.0.0", "slash": "^3.0.0", @@ -8802,52 +8726,52 @@ } }, "@jest/environment": { - "version": "27.4.4", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.4.tgz", - "integrity": "sha512-q+niMx7cJgt/t/b6dzLOh4W8Ef/8VyKG7hxASK39jakijJzbFBGpptx3RXz13FFV7OishQ9lTbv+dQ5K3EhfDQ==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.6.tgz", + "integrity": "sha512-E6t+RXPfATEEGVidr84WngLNWZ8ffCPky8RqqRK6u1Bn0LK92INe0MDttyPl/JOzaq92BmDzOeuqk09TvM22Sg==", "dev": true, "requires": { - "@jest/fake-timers": "^27.4.2", + "@jest/fake-timers": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", - "jest-mock": "^27.4.2" + "jest-mock": "^27.4.6" } }, "@jest/fake-timers": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.2.tgz", - "integrity": "sha512-f/Xpzn5YQk5adtqBgvw1V6bF8Nx3hY0OIRRpCvWcfPl0EAjdqWPdhH3t/3XpiWZqtjIEHDyMKP9ajpva1l4Zmg==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.6.tgz", + "integrity": "sha512-mfaethuYF8scV8ntPpiVGIHQgS0XIALbpY2jt2l7wb/bvq4Q5pDLk4EP4D7SAvYT1QrPOPVZAtbdGAOOyIgs7A==", "dev": true, "requires": { "@jest/types": "^27.4.2", "@sinonjs/fake-timers": "^8.0.1", "@types/node": "*", - "jest-message-util": "^27.4.2", - "jest-mock": "^27.4.2", + "jest-message-util": "^27.4.6", + "jest-mock": "^27.4.6", "jest-util": "^27.4.2" } }, "@jest/globals": { - "version": "27.4.4", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.4.tgz", - "integrity": "sha512-bqpqQhW30BOreXM8bA8t8JbOQzsq/WnPTnBl+It3UxAD9J8yxEAaBEylHx1dtBapAr/UBk8GidXbzmqnee8tYQ==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.6.tgz", + "integrity": "sha512-kAiwMGZ7UxrgPzu8Yv9uvWmXXxsy0GciNejlHvfPIfWkSxChzv6bgTS3YqBkGuHcis+ouMFI2696n2t+XYIeFw==", "dev": true, "requires": { - "@jest/environment": "^27.4.4", + "@jest/environment": "^27.4.6", "@jest/types": "^27.4.2", - "expect": "^27.4.2" + "expect": "^27.4.6" } }, "@jest/reporters": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.5.tgz", - "integrity": "sha512-3orsG4vi8zXuBqEoy2LbnC1kuvkg1KQUgqNxmxpQgIOQEPeV0onvZu+qDQnEoX8qTQErtqn/xzcnbpeTuOLSiA==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.6.tgz", + "integrity": "sha512-+Zo9gV81R14+PSq4wzee4GC2mhAN9i9a7qgJWL90Gpx7fHYkWpTBvwWNZUXvJByYR9tAVBdc8VxDWqfJyIUrIQ==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.4.2", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.5", + "@jest/console": "^27.4.6", + "@jest/test-result": "^27.4.6", + "@jest/transform": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", @@ -8856,14 +8780,14 @@ "glob": "^7.1.2", "graceful-fs": "^4.2.4", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^4.0.3", + "istanbul-lib-instrument": "^5.1.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "jest-haste-map": "^27.4.5", - "jest-resolve": "^27.4.5", + "istanbul-reports": "^3.1.3", + "jest-haste-map": "^27.4.6", + "jest-resolve": "^27.4.6", "jest-util": "^27.4.2", - "jest-worker": "^27.4.5", + "jest-worker": "^27.4.6", "slash": "^3.0.0", "source-map": "^0.6.0", "string-length": "^4.0.1", @@ -8883,47 +8807,47 @@ } }, "@jest/test-result": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.4.2.tgz", - "integrity": "sha512-kr+bCrra9jfTgxHXHa2UwoQjxvQk3Am6QbpAiJ5x/50LW8llOYrxILkqY0lZRW/hu8FXesnudbql263+EW9iNA==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.4.6.tgz", + "integrity": "sha512-fi9IGj3fkOrlMmhQqa/t9xum8jaJOOAi/lZlm6JXSc55rJMXKHxNDN1oCP39B0/DhNOa2OMupF9BcKZnNtXMOQ==", "dev": true, "requires": { - "@jest/console": "^27.4.2", + "@jest/console": "^27.4.6", "@jest/types": "^27.4.2", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.5.tgz", - "integrity": "sha512-n5woIn/1v+FT+9hniymHPARA9upYUmfi5Pw9ewVwXCDlK4F5/Gkees9v8vdjGdAIJ2MPHLHodiajLpZZanWzEQ==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.6.tgz", + "integrity": "sha512-3GL+nsf6E1PsyNsJuvPyIz+DwFuCtBdtvPpm/LMXVkBJbdFvQYCDpccYT56qq5BGniXWlE81n2qk1sdXfZebnw==", "dev": true, "requires": { - "@jest/test-result": "^27.4.2", + "@jest/test-result": "^27.4.6", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.5", - "jest-runtime": "^27.4.5" + "jest-haste-map": "^27.4.6", + "jest-runtime": "^27.4.6" } }, "@jest/transform": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.5.tgz", - "integrity": "sha512-PuMet2UlZtlGzwc6L+aZmR3I7CEBpqadO03pU40l2RNY2fFJ191b9/ITB44LNOhVtsyykx0OZvj0PCyuLm7Eew==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.6.tgz", + "integrity": "sha512-9MsufmJC8t5JTpWEQJ0OcOOAXaH5ioaIX6uHVBLBMoCZPfKKQF+EqP8kACAvCZ0Y1h2Zr3uOccg8re+Dr5jxyw==", "dev": true, "requires": { "@babel/core": "^7.1.0", "@jest/types": "^27.4.2", - "babel-plugin-istanbul": "^6.0.0", + "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.5", + "jest-haste-map": "^27.4.6", "jest-regex-util": "^27.4.0", "jest-util": "^27.4.2", "micromatch": "^4.0.4", - "pirates": "^4.0.1", + "pirates": "^4.0.4", "slash": "^3.0.0", "source-map": "^0.6.1", "write-file-atomic": "^3.0.0" @@ -9057,9 +8981,9 @@ } }, "@rollup/plugin-node-resolve": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.2.tgz", - "integrity": "sha512-xyqbuf1vyOPC60jEKhx3DBHunymnCJswzjNTKfX4Jz7zCPar1UqbRZCNY1u5QaXh97beaFTWdoUUWiV4qX8o/g==", + "version": "13.1.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz", + "integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -9139,14 +9063,14 @@ "@rollup/plugin-replace": "^3.0.1", "@rollup/plugin-typescript": "^8.3.0", "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^5.9.0", - "@typescript-eslint/parser": "^5.9.0", - "eslint": "^8.6.0", + "@typescript-eslint/eslint-plugin": "^5.10.2", + "@typescript-eslint/parser": "^5.10.2", + "eslint": "^8.8.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.5.1", - "rollup": "^2.62.0", - "typescript": "^4.5.4" + "rollup": "^2.66.1", + "typescript": "^4.5.5" } }, "@sora/go-wasm": { @@ -9156,23 +9080,23 @@ "version": "file:packages/sdk", "requires": { "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-node-resolve": "^13.1.2", + "@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-replace": "^3.0.1", "@rollup/plugin-typescript": "^8.3.0", "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.9.0", - "@typescript-eslint/parser": "5.9.0", - "eslint": "8.6.0", + "@typescript-eslint/eslint-plugin": "5.10.2", + "@typescript-eslint/parser": "5.10.2", + "eslint": "8.8.0", "eslint-config-prettier": "8.3.0", "eslint-plugin-prettier": "4.0.0", "fflate": "^0.7.2", - "jest": "^27.4.5", + "jest": "^27.4.7", "prettier": "^2.5.1", - "rollup": "^2.62.0", + "rollup": "^2.66.1", "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^27.1.2", - "typescript": "^4.5.4" + "ts-jest": "^27.1.3", + "typescript": "^4.5.5" } }, "@szmarczak/http-timer": { @@ -9293,9 +9217,9 @@ "dev": true }, "@types/prettier": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.2.tgz", - "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.3.tgz", + "integrity": "sha512-QzSuZMBuG5u8HqYz01qtMdg/Jfctlnvj1z/lYnIDXs/golxw0fxtRAHd9KrzjR7Yxz1qVeI00o0kiO3PmVdJ9w==", "dev": true }, "@types/resolve": { @@ -9329,14 +9253,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.9.0.tgz", - "integrity": "sha512-qT4lr2jysDQBQOPsCCvpPUZHjbABoTJW8V9ZzIYKHMfppJtpdtzszDYsldwhFxlhvrp7aCHeXD1Lb9M1zhwWwQ==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.2.tgz", + "integrity": "sha512-4W/9lLuE+v27O/oe7hXJKjNtBLnZE8tQAFpapdxwSVHqtmIoPB1gph3+ahNwVuNL37BX7YQHyGF9Xv6XCnIX2Q==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "5.9.0", - "@typescript-eslint/scope-manager": "5.9.0", - "@typescript-eslint/type-utils": "5.9.0", + "@typescript-eslint/scope-manager": "5.10.2", + "@typescript-eslint/type-utils": "5.10.2", + "@typescript-eslint/utils": "5.10.2", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -9345,67 +9269,53 @@ "tsutils": "^3.21.0" } }, - "@typescript-eslint/experimental-utils": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.9.0.tgz", - "integrity": "sha512-ZnLVjBrf26dn7ElyaSKa6uDhqwvAi4jBBmHK1VxuFGPRAxhdi18ubQYSGA7SRiFiES3q9JiBOBHEBStOFkwD2g==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.9.0", - "@typescript-eslint/types": "5.9.0", - "@typescript-eslint/typescript-estree": "5.9.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - } - }, "@typescript-eslint/parser": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.9.0.tgz", - "integrity": "sha512-/6pOPz8yAxEt4PLzgbFRDpZmHnXCeZgPDrh/1DaVKOjvn/UPMlWhbx/gA96xRi2JxY1kBl2AmwVbyROUqys5xQ==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.10.2.tgz", + "integrity": "sha512-JaNYGkaQVhP6HNF+lkdOr2cAs2wdSZBoalE22uYWq8IEv/OVH0RksSGydk+sW8cLoSeYmC+OHvRyv2i4AQ7Czg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.9.0", - "@typescript-eslint/types": "5.9.0", - "@typescript-eslint/typescript-estree": "5.9.0", + "@typescript-eslint/scope-manager": "5.10.2", + "@typescript-eslint/types": "5.10.2", + "@typescript-eslint/typescript-estree": "5.10.2", "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.9.0.tgz", - "integrity": "sha512-DKtdIL49Qxk2a8icF6whRk7uThuVz4A6TCXfjdJSwOsf+9ree7vgQWcx0KOyCdk0i9ETX666p4aMhrRhxhUkyg==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.2.tgz", + "integrity": "sha512-39Tm6f4RoZoVUWBYr3ekS75TYgpr5Y+X0xLZxXqcZNDWZdJdYbKd3q2IR4V9y5NxxiPu/jxJ8XP7EgHiEQtFnw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.9.0", - "@typescript-eslint/visitor-keys": "5.9.0" + "@typescript-eslint/types": "5.10.2", + "@typescript-eslint/visitor-keys": "5.10.2" } }, "@typescript-eslint/type-utils": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.9.0.tgz", - "integrity": "sha512-uVCb9dJXpBrK1071ri5aEW7ZHdDHAiqEjYznF3HSSvAJXyrkxGOw2Ejibz/q6BXdT8lea8CMI0CzKNFTNI6TEQ==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.10.2.tgz", + "integrity": "sha512-uRKSvw/Ccs5FYEoXW04Z5VfzF2iiZcx8Fu7DGIB7RHozuP0VbKNzP1KfZkHBTM75pCpsWxIthEH1B33dmGBKHw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "5.9.0", + "@typescript-eslint/utils": "5.10.2", "debug": "^4.3.2", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.9.0.tgz", - "integrity": "sha512-mWp6/b56Umo1rwyGCk8fPIzb9Migo8YOniBGPAQDNC6C52SeyNGN4gsVwQTAR+RS2L5xyajON4hOLwAGwPtUwg==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.2.tgz", + "integrity": "sha512-Qfp0qk/5j2Rz3p3/WhWgu4S1JtMcPgFLnmAKAW061uXxKSa7VWKZsDXVaMXh2N60CX9h6YLaBoy9PJAfCOjk3w==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.9.0.tgz", - "integrity": "sha512-kxo3xL2mB7XmiVZcECbaDwYCt3qFXz99tBSuVJR4L/sR7CJ+UNAPrYILILktGj1ppfZ/jNt/cWYbziJUlHl1Pw==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.2.tgz", + "integrity": "sha512-WHHw6a9vvZls6JkTgGljwCsMkv8wu8XU8WaYKeYhxhWXH/atZeiMW6uDFPLZOvzNOGmuSMvHtZKd6AuC8PrwKQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.9.0", - "@typescript-eslint/visitor-keys": "5.9.0", + "@typescript-eslint/types": "5.10.2", + "@typescript-eslint/visitor-keys": "5.10.2", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -9413,13 +9323,27 @@ "tsutils": "^3.21.0" } }, + "@typescript-eslint/utils": { + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.10.2.tgz", + "integrity": "sha512-vuJaBeig1NnBRkf7q9tgMLREiYD7zsMrsN1DA3wcoMDvr3BTFiIpKjGiYZoKPllfEwN7spUjv7ZqD+JhbVjEPg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.10.2", + "@typescript-eslint/types": "5.10.2", + "@typescript-eslint/typescript-estree": "5.10.2", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, "@typescript-eslint/visitor-keys": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.9.0.tgz", - "integrity": "sha512-6zq0mb7LV0ThExKlecvpfepiB+XEtFv/bzx7/jKSgyXTFD7qjmSu1FoiS0x3OZaiS+UIXpH2vd9O89f02RCtgw==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.2.tgz", + "integrity": "sha512-zHIhYGGGrFJvvyfwHk5M08C5B5K4bewkm+rrvNTKk1/S15YHR+SA/QUF8ZWscXSfEaB8Nn2puZj+iHcoxVOD/Q==", "dev": true, "requires": { - "@typescript-eslint/types": "5.9.0", + "@typescript-eslint/types": "5.10.2", "eslint-visitor-keys": "^3.0.0" } }, @@ -9539,12 +9463,6 @@ "string-width": "^4.1.0" } }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, "ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -9634,15 +9552,15 @@ "dev": true }, "babel-jest": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.5.tgz", - "integrity": "sha512-3uuUTjXbgtODmSv/DXO9nZfD52IyC2OYTFaXGRzL0kpykzroaquCrD5+lZNafTvZlnNqZHt5pb0M08qVBZnsnA==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.6.tgz", + "integrity": "sha512-qZL0JT0HS1L+lOuH+xC2DVASR3nunZi/ozGhpgauJHgmI7f8rudxf6hUjEHympdQ/J64CdKmPkgfJ+A3U6QCrg==", "dev": true, "requires": { - "@jest/transform": "^27.4.5", + "@jest/transform": "^27.4.6", "@jest/types": "^27.4.2", "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.0.0", + "babel-plugin-istanbul": "^6.1.1", "babel-preset-jest": "^27.4.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", @@ -9660,27 +9578,6 @@ "@istanbuljs/schema": "^0.1.2", "istanbul-lib-instrument": "^5.0.4", "test-exclude": "^6.0.0" - }, - "dependencies": { - "istanbul-lib-instrument": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz", - "integrity": "sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q==", - "dev": true, - "requires": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } } }, "babel-plugin-jest-hoist": { @@ -10378,15 +10275,6 @@ "once": "^1.4.0" } }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, "env-paths": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", @@ -10478,9 +10366,9 @@ } }, "eslint": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.6.0.tgz", - "integrity": "sha512-UvxdOJ7mXFlw7iuHZA4jmzPaUqIw54mZrv+XPYKNbKdLR0et4rf60lIZUU9kiNtnzzMzGWxMV+tQ7uG7JG8DPw==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz", + "integrity": "sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ==", "dev": true, "requires": { "@eslint/eslintrc": "^1.0.5", @@ -10490,11 +10378,10 @@ "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.0", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.1.0", + "eslint-visitor-keys": "^3.2.0", "espree": "^9.3.0", "esquery": "^1.4.0", "esutils": "^2.0.2", @@ -10503,7 +10390,7 @@ "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.6.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", @@ -10514,9 +10401,7 @@ "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", "regexpp": "^3.2.0", - "semver": "^7.2.1", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0", @@ -10565,12 +10450,6 @@ "is-glob": "^4.0.3" } }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -10644,9 +10523,9 @@ } }, "eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", + "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", "dev": true }, "espree": { @@ -10740,25 +10619,15 @@ "dev": true }, "expect": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.4.2.tgz", - "integrity": "sha512-BjAXIDC6ZOW+WBFNg96J22D27Nq5ohn+oGcuP2rtOtcjuxNoV9McpQ60PcQWhdFOSBIQdR72e+4HdnbZTFSTyg==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/expect/-/expect-27.4.6.tgz", + "integrity": "sha512-1M/0kAALIaj5LaG66sFJTbRsWTADnylly82cu4bspI0nl+pgP4E6Bh/aqdHlTUjul06K7xQnnrAoqfxVU0+/ag==", "dev": true, "requires": { "@jest/types": "^27.4.2", - "ansi-styles": "^5.0.0", "jest-get-type": "^27.4.0", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-regex-util": "^27.4.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } + "jest-matcher-utils": "^27.4.6", + "jest-message-util": "^27.4.6" } }, "fast-deep-equal": { @@ -11210,9 +11079,9 @@ "dev": true }, "import-local": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.3.tgz", - "integrity": "sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dev": true, "requires": { "pkg-dir": "^4.2.0", @@ -11417,14 +11286,15 @@ "dev": true }, "istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz", + "integrity": "sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q==", "dev": true, "requires": { - "@babel/core": "^7.7.5", + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-coverage": "^3.2.0", "semver": "^6.3.0" }, "dependencies": { @@ -11469,14 +11339,14 @@ } }, "jest": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.5.tgz", - "integrity": "sha512-uT5MiVN3Jppt314kidCk47MYIRilJjA/l2mxwiuzzxGUeJIvA8/pDaJOAX5KWvjAo7SCydcW0/4WEtgbLMiJkg==", + "version": "27.4.7", + "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.7.tgz", + "integrity": "sha512-8heYvsx7nV/m8m24Vk26Y87g73Ba6ueUd0MWed/NXMhSZIm62U/llVbS0PJe1SHunbyXjJ/BqG1z9bFjGUIvTg==", "dev": true, "requires": { - "@jest/core": "^27.4.5", + "@jest/core": "^27.4.7", "import-local": "^3.0.2", - "jest-cli": "^27.4.5" + "jest-cli": "^27.4.7" } }, "jest-changed-files": { @@ -11563,79 +11433,79 @@ } }, "jest-circus": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.5.tgz", - "integrity": "sha512-eTNWa9wsvBwPykhMMShheafbwyakcdHZaEYh5iRrQ0PFJxkDP/e3U/FvzGuKWu2WpwUA3C3hPlfpuzvOdTVqnw==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.6.tgz", + "integrity": "sha512-UA7AI5HZrW4wRM72Ro80uRR2Fg+7nR0GESbSI/2M+ambbzVuA63mn5T1p3Z/wlhntzGpIG1xx78GP2YIkf6PhQ==", "dev": true, "requires": { - "@jest/environment": "^27.4.4", - "@jest/test-result": "^27.4.2", + "@jest/environment": "^27.4.6", + "@jest/test-result": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^27.4.2", + "expect": "^27.4.6", "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.2", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-runtime": "^27.4.5", - "jest-snapshot": "^27.4.5", + "jest-each": "^27.4.6", + "jest-matcher-utils": "^27.4.6", + "jest-message-util": "^27.4.6", + "jest-runtime": "^27.4.6", + "jest-snapshot": "^27.4.6", "jest-util": "^27.4.2", - "pretty-format": "^27.4.2", + "pretty-format": "^27.4.6", "slash": "^3.0.0", "stack-utils": "^2.0.3", "throat": "^6.0.1" } }, "jest-cli": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.5.tgz", - "integrity": "sha512-hrky3DSgE0u7sQxaCL7bdebEPHx5QzYmrGuUjaPLmPE8jx5adtvGuOlRspvMoVLTTDOHRnZDoRLYJuA+VCI7Hg==", + "version": "27.4.7", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.7.tgz", + "integrity": "sha512-zREYhvjjqe1KsGV15mdnxjThKNDgza1fhDT+iUsXWLCq3sxe9w5xnvyctcYVT5PcdLSjv7Y5dCwTS3FCF1tiuw==", "dev": true, "requires": { - "@jest/core": "^27.4.5", - "@jest/test-result": "^27.4.2", + "@jest/core": "^27.4.7", + "@jest/test-result": "^27.4.6", "@jest/types": "^27.4.2", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", - "jest-config": "^27.4.5", + "jest-config": "^27.4.7", "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", + "jest-validate": "^27.4.6", "prompts": "^2.0.1", "yargs": "^16.2.0" } }, "jest-config": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.5.tgz", - "integrity": "sha512-t+STVJtPt+fpqQ8GBw850NtSQbnDOw/UzdPfzDaHQ48/AylQlW7LHj3dH+ndxhC1UxJ0Q3qkq7IH+nM1skwTwA==", + "version": "27.4.7", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.7.tgz", + "integrity": "sha512-xz/o/KJJEedHMrIY9v2ParIoYSrSVY6IVeE4z5Z3i101GoA5XgfbJz+1C8EYPsv7u7f39dS8F9v46BHDhn0vlw==", "dev": true, "requires": { - "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^27.4.5", + "@babel/core": "^7.8.0", + "@jest/test-sequencer": "^27.4.6", "@jest/types": "^27.4.2", - "babel-jest": "^27.4.5", + "babel-jest": "^27.4.6", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-circus": "^27.4.5", - "jest-environment-jsdom": "^27.4.4", - "jest-environment-node": "^27.4.4", + "jest-circus": "^27.4.6", + "jest-environment-jsdom": "^27.4.6", + "jest-environment-node": "^27.4.6", "jest-get-type": "^27.4.0", - "jest-jasmine2": "^27.4.5", + "jest-jasmine2": "^27.4.6", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.5", - "jest-runner": "^27.4.5", + "jest-resolve": "^27.4.6", + "jest-runner": "^27.4.6", "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", + "jest-validate": "^27.4.6", "micromatch": "^4.0.4", - "pretty-format": "^27.4.2", + "pretty-format": "^27.4.6", "slash": "^3.0.0" }, "dependencies": { @@ -11648,15 +11518,15 @@ } }, "jest-diff": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.2.tgz", - "integrity": "sha512-ujc9ToyUZDh9KcqvQDkk/gkbf6zSaeEg9AiBxtttXW59H/AcqEYp1ciXAtJp+jXWva5nAf/ePtSsgWwE5mqp4Q==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.6.tgz", + "integrity": "sha512-zjaB0sh0Lb13VyPsd92V7HkqF6yKRH9vm33rwBt7rPYrpQvS1nCvlIy2pICbKta+ZjWngYLNn4cCK4nyZkjS/w==", "dev": true, "requires": { "chalk": "^4.0.0", "diff-sequences": "^27.4.0", "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.2" + "pretty-format": "^27.4.6" } }, "jest-docblock": { @@ -11669,44 +11539,44 @@ } }, "jest-each": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.4.2.tgz", - "integrity": "sha512-53V2MNyW28CTruB3lXaHNk6PkiIFuzdOC9gR3C6j8YE/ACfrPnz+slB0s17AgU1TtxNzLuHyvNlLJ+8QYw9nBg==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.4.6.tgz", + "integrity": "sha512-n6QDq8y2Hsmn22tRkgAk+z6MCX7MeVlAzxmZDshfS2jLcaBlyhpF3tZSJLR+kXmh23GEvS0ojMR8i6ZeRvpQcA==", "dev": true, "requires": { "@jest/types": "^27.4.2", "chalk": "^4.0.0", "jest-get-type": "^27.4.0", "jest-util": "^27.4.2", - "pretty-format": "^27.4.2" + "pretty-format": "^27.4.6" } }, "jest-environment-jsdom": { - "version": "27.4.4", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.4.tgz", - "integrity": "sha512-cYR3ndNfHBqQgFvS1RL7dNqSvD//K56j/q1s2ygNHcfTCAp12zfIromO1w3COmXrxS8hWAh7+CmZmGCIoqGcGA==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.6.tgz", + "integrity": "sha512-o3dx5p/kHPbUlRvSNjypEcEtgs6LmvESMzgRFQE6c+Prwl2JLA4RZ7qAnxc5VM8kutsGRTB15jXeeSbJsKN9iA==", "dev": true, "requires": { - "@jest/environment": "^27.4.4", - "@jest/fake-timers": "^27.4.2", + "@jest/environment": "^27.4.6", + "@jest/fake-timers": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", - "jest-mock": "^27.4.2", + "jest-mock": "^27.4.6", "jest-util": "^27.4.2", "jsdom": "^16.6.0" } }, "jest-environment-node": { - "version": "27.4.4", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.4.tgz", - "integrity": "sha512-D+v3lbJ2GjQTQR23TK0kY3vFVmSeea05giInI41HHOaJnAwOnmUHTZgUaZL+VxUB43pIzoa7PMwWtCVlIUoVoA==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.6.tgz", + "integrity": "sha512-yfHlZ9m+kzTKZV0hVfhVu6GuDxKAYeFHrfulmy7Jxwsq4V7+ZK7f+c0XP/tbVDMQW7E4neG2u147hFkuVz0MlQ==", "dev": true, "requires": { - "@jest/environment": "^27.4.4", - "@jest/fake-timers": "^27.4.2", + "@jest/environment": "^27.4.6", + "@jest/fake-timers": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", - "jest-mock": "^27.4.2", + "jest-mock": "^27.4.6", "jest-util": "^27.4.2" } }, @@ -11717,9 +11587,9 @@ "dev": true }, "jest-haste-map": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.5.tgz", - "integrity": "sha512-oJm1b5qhhPs78K24EDGifWS0dELYxnoBiDhatT/FThgB9yxqUm5F6li3Pv+Q+apMBmmPNzOBnZ7ZxWMB1Leq1Q==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.6.tgz", + "integrity": "sha512-0tNpgxg7BKurZeFkIOvGCkbmOHbLFf4LUQOxrQSMjvrQaQe3l6E8x6jYC1NuWkGo5WDdbr8FEzUxV2+LWNawKQ==", "dev": true, "requires": { "@jest/types": "^27.4.2", @@ -11732,63 +11602,62 @@ "jest-regex-util": "^27.4.0", "jest-serializer": "^27.4.0", "jest-util": "^27.4.2", - "jest-worker": "^27.4.5", + "jest-worker": "^27.4.6", "micromatch": "^4.0.4", "walker": "^1.0.7" } }, "jest-jasmine2": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.5.tgz", - "integrity": "sha512-oUnvwhJDj2LhOiUB1kdnJjkx8C5PwgUZQb9urF77mELH9DGR4e2GqpWQKBOYXWs5+uTN9BGDqRz3Aeg5Wts7aw==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.6.tgz", + "integrity": "sha512-uAGNXF644I/whzhsf7/qf74gqy9OuhvJ0XYp8SDecX2ooGeaPnmJMjXjKt0mqh1Rl5dtRGxJgNrHlBQIBfS5Nw==", "dev": true, "requires": { - "@babel/traverse": "^7.1.0", - "@jest/environment": "^27.4.4", + "@jest/environment": "^27.4.6", "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.2", + "@jest/test-result": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^27.4.2", + "expect": "^27.4.6", "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.2", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-runtime": "^27.4.5", - "jest-snapshot": "^27.4.5", + "jest-each": "^27.4.6", + "jest-matcher-utils": "^27.4.6", + "jest-message-util": "^27.4.6", + "jest-runtime": "^27.4.6", + "jest-snapshot": "^27.4.6", "jest-util": "^27.4.2", - "pretty-format": "^27.4.2", + "pretty-format": "^27.4.6", "throat": "^6.0.1" } }, "jest-leak-detector": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.4.2.tgz", - "integrity": "sha512-ml0KvFYZllzPBJWDei3mDzUhyp/M4ubKebX++fPaudpe8OsxUE+m+P6ciVLboQsrzOCWDjE20/eXew9QMx/VGw==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.4.6.tgz", + "integrity": "sha512-kkaGixDf9R7CjHm2pOzfTxZTQQQ2gHTIWKY/JZSiYTc90bZp8kSZnUMS3uLAfwTZwc0tcMRoEX74e14LG1WapA==", "dev": true, "requires": { "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.2" + "pretty-format": "^27.4.6" } }, "jest-matcher-utils": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.2.tgz", - "integrity": "sha512-jyP28er3RRtMv+fmYC/PKG8wvAmfGcSNproVTW2Y0P/OY7/hWUOmsPfxN1jOhM+0u2xU984u2yEagGivz9OBGQ==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.6.tgz", + "integrity": "sha512-XD4PKT3Wn1LQnRAq7ZsTI0VRuEc9OrCPFiO1XL7bftTGmfNF0DcEwMHRgqiu7NGf8ZoZDREpGrCniDkjt79WbA==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^27.4.2", + "jest-diff": "^27.4.6", "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.2" + "pretty-format": "^27.4.6" } }, "jest-message-util": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.2.tgz", - "integrity": "sha512-OMRqRNd9E0DkBLZpFtZkAGYOXl6ZpoMtQJWTAREJKDOFa0M6ptB7L67tp+cszMBkvSgKOhNtQp2Vbcz3ZZKo/w==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.6.tgz", + "integrity": "sha512-0p5szriFU0U74czRSFjH6RyS7UYIAkn/ntwMuOwTGWrQIOh5NzXXrq72LOqIkJKKvFbPq+byZKuBz78fjBERBA==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", @@ -11797,15 +11666,15 @@ "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "micromatch": "^4.0.4", - "pretty-format": "^27.4.2", + "pretty-format": "^27.4.6", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "jest-mock": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.4.2.tgz", - "integrity": "sha512-PDDPuyhoukk20JrQKeofK12hqtSka7mWH0QQuxSNgrdiPsrnYYLS6wbzu/HDlxZRzji5ylLRULeuI/vmZZDrYA==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.4.6.tgz", + "integrity": "sha512-kvojdYRkst8iVSZ1EJ+vc1RRD9llueBjKzXzeCytH3dMM7zvPV/ULcfI2nr0v0VUgm3Bjt3hBCQvOeaBz+ZTHw==", "dev": true, "requires": { "@jest/types": "^27.4.2", @@ -11826,44 +11695,44 @@ "dev": true }, "jest-resolve": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.5.tgz", - "integrity": "sha512-xU3z1BuOz/hUhVUL+918KqUgK+skqOuUsAi7A+iwoUldK6/+PW+utK8l8cxIWT9AW7IAhGNXjSAh1UYmjULZZw==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.6.tgz", + "integrity": "sha512-SFfITVApqtirbITKFAO7jOVN45UgFzcRdQanOFzjnbd+CACDoyeX7206JyU92l4cRr73+Qy/TlW51+4vHGt+zw==", "dev": true, "requires": { "@jest/types": "^27.4.2", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.5", + "jest-haste-map": "^27.4.6", "jest-pnp-resolver": "^1.2.2", "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", + "jest-validate": "^27.4.6", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" } }, "jest-resolve-dependencies": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.5.tgz", - "integrity": "sha512-elEVvkvRK51y037NshtEkEnukMBWvlPzZHiL847OrIljJ8yIsujD2GXRPqDXC4rEVKbcdsy7W0FxoZb4WmEs7w==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.6.tgz", + "integrity": "sha512-W85uJZcFXEVZ7+MZqIPCscdjuctruNGXUZ3OHSXOfXR9ITgbUKeHj+uGcies+0SsvI5GtUfTw4dY7u9qjTvQOw==", "dev": true, "requires": { "@jest/types": "^27.4.2", "jest-regex-util": "^27.4.0", - "jest-snapshot": "^27.4.5" + "jest-snapshot": "^27.4.6" } }, "jest-runner": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.5.tgz", - "integrity": "sha512-/irauncTfmY1WkTaRQGRWcyQLzK1g98GYG/8QvIPviHgO1Fqz1JYeEIsSfF+9mc/UTA6S+IIHFgKyvUrtiBIZg==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.6.tgz", + "integrity": "sha512-IDeFt2SG4DzqalYBZRgbbPmpwV3X0DcntjezPBERvnhwKGWTW7C5pbbA5lVkmvgteeNfdd/23gwqv3aiilpYPg==", "dev": true, "requires": { - "@jest/console": "^27.4.2", - "@jest/environment": "^27.4.4", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.5", + "@jest/console": "^27.4.6", + "@jest/environment": "^27.4.6", + "@jest/test-result": "^27.4.6", + "@jest/transform": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", "chalk": "^4.0.0", @@ -11871,51 +11740,47 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.4", "jest-docblock": "^27.4.0", - "jest-environment-jsdom": "^27.4.4", - "jest-environment-node": "^27.4.4", - "jest-haste-map": "^27.4.5", - "jest-leak-detector": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-resolve": "^27.4.5", - "jest-runtime": "^27.4.5", + "jest-environment-jsdom": "^27.4.6", + "jest-environment-node": "^27.4.6", + "jest-haste-map": "^27.4.6", + "jest-leak-detector": "^27.4.6", + "jest-message-util": "^27.4.6", + "jest-resolve": "^27.4.6", + "jest-runtime": "^27.4.6", "jest-util": "^27.4.2", - "jest-worker": "^27.4.5", + "jest-worker": "^27.4.6", "source-map-support": "^0.5.6", "throat": "^6.0.1" } }, "jest-runtime": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.5.tgz", - "integrity": "sha512-CIYqwuJQXHQtPd/idgrx4zgJ6iCb6uBjQq1RSAGQrw2S8XifDmoM1Ot8NRd80ooAm+ZNdHVwsktIMGlA1F1FAQ==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.6.tgz", + "integrity": "sha512-eXYeoR/MbIpVDrjqy5d6cGCFOYBFFDeKaNWqTp0h6E74dK0zLHzASQXJpl5a2/40euBmKnprNLJ0Kh0LCndnWQ==", "dev": true, "requires": { - "@jest/console": "^27.4.2", - "@jest/environment": "^27.4.4", - "@jest/globals": "^27.4.4", + "@jest/environment": "^27.4.6", + "@jest/fake-timers": "^27.4.6", + "@jest/globals": "^27.4.6", "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.5", + "@jest/test-result": "^27.4.6", + "@jest/transform": "^27.4.6", "@jest/types": "^27.4.2", - "@types/yargs": "^16.0.0", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "execa": "^5.0.0", - "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.5", - "jest-message-util": "^27.4.2", - "jest-mock": "^27.4.2", + "jest-haste-map": "^27.4.6", + "jest-message-util": "^27.4.6", + "jest-mock": "^27.4.6", "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.5", - "jest-snapshot": "^27.4.5", + "jest-resolve": "^27.4.6", + "jest-snapshot": "^27.4.6", "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", "slash": "^3.0.0", - "strip-bom": "^4.0.0", - "yargs": "^16.2.0" + "strip-bom": "^4.0.0" }, "dependencies": { "cross-spawn": { @@ -12001,34 +11866,32 @@ } }, "jest-snapshot": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.5.tgz", - "integrity": "sha512-eCi/iM1YJFrJWiT9de4+RpWWWBqsHiYxFG9V9o/n0WXs6GpW4lUt4FAHAgFPTLPqCUVzrMQmSmTZSgQzwqR7IQ==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.6.tgz", + "integrity": "sha512-fafUCDLQfzuNP9IRcEqaFAMzEe7u5BF7mude51wyWv7VRex60WznZIC7DfKTgSIlJa8aFzYmXclmN328aqSDmQ==", "dev": true, "requires": { "@babel/core": "^7.7.2", "@babel/generator": "^7.7.2", - "@babel/parser": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.0.0", - "@jest/transform": "^27.4.5", + "@jest/transform": "^27.4.6", "@jest/types": "^27.4.2", "@types/babel__traverse": "^7.0.4", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^27.4.2", + "expect": "^27.4.6", "graceful-fs": "^4.2.4", - "jest-diff": "^27.4.2", + "jest-diff": "^27.4.6", "jest-get-type": "^27.4.0", - "jest-haste-map": "^27.4.5", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-resolve": "^27.4.5", + "jest-haste-map": "^27.4.6", + "jest-matcher-utils": "^27.4.6", + "jest-message-util": "^27.4.6", "jest-util": "^27.4.2", "natural-compare": "^1.4.0", - "pretty-format": "^27.4.2", + "pretty-format": "^27.4.6", "semver": "^7.3.2" } }, @@ -12055,9 +11918,9 @@ } }, "jest-validate": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.4.2.tgz", - "integrity": "sha512-hWYsSUej+Fs8ZhOm5vhWzwSLmVaPAxRy+Mr+z5MzeaHm9AxUpXdoVMEW4R86y5gOobVfBsMFLk4Rb+QkiEpx1A==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.4.6.tgz", + "integrity": "sha512-872mEmCPVlBqbA5dToC57vA3yJaMRfIdpCoD3cyHWJOMx+SJwLNw0I71EkWs41oza/Er9Zno9XuTkRYCPDUJXQ==", "dev": true, "requires": { "@jest/types": "^27.4.2", @@ -12065,16 +11928,16 @@ "chalk": "^4.0.0", "jest-get-type": "^27.4.0", "leven": "^3.1.0", - "pretty-format": "^27.4.2" + "pretty-format": "^27.4.6" } }, "jest-watcher": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.4.2.tgz", - "integrity": "sha512-NJvMVyyBeXfDezhWzUOCOYZrUmkSCiatpjpm+nFUid74OZEHk6aMLrZAukIiFDwdbqp6mTM6Ui1w4oc+8EobQg==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.4.6.tgz", + "integrity": "sha512-yKQ20OMBiCDigbD0quhQKLkBO+ObGN79MO4nT7YaCuQ5SM+dkBNWE8cZX0FjU6czwMvWw6StWbe+Wv4jJPJ+fw==", "dev": true, "requires": { - "@jest/test-result": "^27.4.2", + "@jest/test-result": "^27.4.6", "@jest/types": "^27.4.2", "@types/node": "*", "ansi-escapes": "^4.2.1", @@ -12084,9 +11947,9 @@ } }, "jest-worker": { - "version": "27.4.5", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.5.tgz", - "integrity": "sha512-f2s8kEdy15cv9r7q4KkzGXvlY0JTcmCbMHZBfSQDwW77REr45IDWwd0lksDFeVHH2jJ5pqb90T77XscrjeGzzg==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.6.tgz", + "integrity": "sha512-gHWJF/6Xi5CTG5QCvROr6GcmpIqNYpDJyc8A1h/DyXqH1tD6SnRCM0d3U5msV31D2LB/U+E0M+W4oyvKV44oNw==", "dev": true, "requires": { "@types/node": "*", @@ -13105,12 +12968,11 @@ } }, "pretty-format": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.2.tgz", - "integrity": "sha512-p0wNtJ9oLuvgOQDEIZ9zQjZffK7KtyR6Si0jnXULIDwrlNF8Cuir3AZP0hHv0jmKuNN/edOnbMjnzd4uTcmWiw==", + "version": "27.4.6", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.6.tgz", + "integrity": "sha512-NblstegA1y/RJW2VyML+3LlpFjzx62cUrtBIKIWDXEDkjNeleA7Od7nrzcs/VLQvAeV4CgSYhrN39DRN88Qi/g==", "dev": true, "requires": { - "@jest/types": "^27.4.2", "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", "react-is": "^17.0.1" @@ -13373,9 +13235,9 @@ } }, "rollup": { - "version": "2.62.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.62.0.tgz", - "integrity": "sha512-cJEQq2gwB0GWMD3rYImefQTSjrPYaC6s4J9pYqnstVLJ1CHa/aZNVkD4Epuvg4iLeMA4KRiq7UM7awKK6j7jcw==", + "version": "2.66.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.66.1.tgz", + "integrity": "sha512-crSgLhSkLMnKr4s9iZ/1qJCplgAgrRY+igWv8KhG/AjKOJ0YX/WpmANyn8oxrw+zenF3BXWDLa7Xl/QZISH+7w==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -13954,9 +13816,9 @@ } }, "ts-jest": { - "version": "27.1.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.2.tgz", - "integrity": "sha512-eSOiJOWq6Hhs6Khzk5wKC5sgWIXgXqOCiIl1+3lfnearu58Hj4QpE5tUhQcA3xtZrELbcvAGCsd6HB8OsaVaTA==", + "version": "27.1.3", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.3.tgz", + "integrity": "sha512-6Nlura7s6uM9BVUAoqLH7JHyMXjz8gluryjpPXxr3IxZdAXnU6FhjvVLHFtfd1vsE1p8zD1OJfskkc0jhTSnkA==", "dev": true, "requires": { "bs-logger": "0.x", @@ -14037,9 +13899,9 @@ } }, "typescript": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz", - "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", "dev": true }, "unique-filename": { @@ -14146,9 +14008,9 @@ "dev": true }, "v8-to-istanbul": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz", - "integrity": "sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", + "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.1", diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index 2c615fce..0a2d0183 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -18,14 +18,14 @@ "devDependencies": { "@rollup/plugin-replace": "^3.0.1", "@rollup/plugin-typescript": "^8.3.0", - "@typescript-eslint/eslint-plugin": "^5.9.0", - "@typescript-eslint/parser": "^5.9.0", - "eslint": "^8.6.0", + "@typescript-eslint/eslint-plugin": "^5.10.2", + "@typescript-eslint/parser": "^5.10.2", + "eslint": "^8.8.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.5.1", - "rollup": "^2.62.0", - "typescript": "^4.5.4" + "rollup": "^2.66.1", + "typescript": "^4.5.5" }, "dependencies": { "@sora/go-wasm": "^2021.1.0" diff --git a/packages/sdk/package.json b/packages/sdk/package.json index bdddf0ea..dcb10aa1 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -9,21 +9,21 @@ }, "devDependencies": { "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-node-resolve": "^13.1.2", + "@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-replace": "^3.0.1", "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.9.0", - "@typescript-eslint/parser": "5.9.0", - "eslint": "8.6.0", + "@typescript-eslint/eslint-plugin": "5.10.2", + "@typescript-eslint/parser": "5.10.2", + "eslint": "8.8.0", "eslint-config-prettier": "8.3.0", "eslint-plugin-prettier": "4.0.0", - "jest": "^27.4.5", + "jest": "^27.4.7", "prettier": "^2.5.1", - "rollup": "^2.62.0", + "rollup": "^2.66.1", "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^27.1.2", - "typescript": "^4.5.4" + "ts-jest": "^27.1.3", + "typescript": "^4.5.5" }, "dependencies": { "@sora/e2ee": "^2021.1.0", From 4ff8fc7fd5e6918c974dde6cf6c43055477770c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Feb 2022 16:02:19 +0000 Subject: [PATCH 18/86] Bump @typescript-eslint/parser from 5.10.2 to 5.11.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.10.2 to 5.11.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.11.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/sdk/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 6fe5f838..ec4ea1f3 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -14,7 +14,7 @@ "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.10.2", - "@typescript-eslint/parser": "5.10.2", + "@typescript-eslint/parser": "5.11.0", "eslint": "8.8.0", "eslint-config-prettier": "8.3.0", "eslint-plugin-prettier": "4.0.0", From 84c5a4a5ed742b098637f2c429f36ed8a5b7bc5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Feb 2022 16:02:49 +0000 Subject: [PATCH 19/86] Bump @typescript-eslint/eslint-plugin from 5.10.2 to 5.11.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.10.2 to 5.11.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.11.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/sdk/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 6fe5f838..9d7bcc67 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -13,7 +13,7 @@ "@rollup/plugin-replace": "^3.0.1", "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.10.2", + "@typescript-eslint/eslint-plugin": "5.11.0", "@typescript-eslint/parser": "5.10.2", "eslint": "8.8.0", "eslint-config-prettier": "8.3.0", From d1990beaf9e8b6ec5be347a30ff39cee9f94148e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Feb 2022 16:03:13 +0000 Subject: [PATCH 20/86] Bump npm-check-updates from 12.2.1 to 12.3.0 Bumps [npm-check-updates](https://github.com/raineorshine/npm-check-updates) from 12.2.1 to 12.3.0. - [Release notes](https://github.com/raineorshine/npm-check-updates/releases) - [Changelog](https://github.com/raineorshine/npm-check-updates/blob/main/CHANGELOG.md) - [Commits](https://github.com/raineorshine/npm-check-updates/compare/v12.2.1...v12.3.0) --- updated-dependencies: - dependency-name: npm-check-updates dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index df6913bb..af5f4a8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5560,9 +5560,9 @@ } }, "node_modules/npm-check-updates": { - "version": "12.2.1", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.2.1.tgz", - "integrity": "sha512-fqfH2USwTLgho8HaC79i5Bl+RH3zV15AbdtJQTCaOAp9L3D2W8k+jsfuwee2vSTUrt6IUTXPbzwUIYo4/TQdYA==", + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.3.0.tgz", + "integrity": "sha512-NcVpbVYZymmr7lVCwqz1wpkAgWNQ/XyyPy/yyR2IjCHU4Dr1lpIJgIgtC0PCDobcYuYXpYSIgIWZA7RFvq8+Rw==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -5592,7 +5592,8 @@ "semver-utils": "^1.1.4", "source-map-support": "^0.5.21", "spawn-please": "^1.0.0", - "update-notifier": "^5.1.0" + "update-notifier": "^5.1.0", + "yaml": "^1.10.2" }, "bin": { "ncu": "build/src/bin/cli.js", @@ -7673,6 +7674,15 @@ "dev": true, "license": "ISC" }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -12904,9 +12914,9 @@ } }, "npm-check-updates": { - "version": "12.2.1", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.2.1.tgz", - "integrity": "sha512-fqfH2USwTLgho8HaC79i5Bl+RH3zV15AbdtJQTCaOAp9L3D2W8k+jsfuwee2vSTUrt6IUTXPbzwUIYo4/TQdYA==", + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.3.0.tgz", + "integrity": "sha512-NcVpbVYZymmr7lVCwqz1wpkAgWNQ/XyyPy/yyR2IjCHU4Dr1lpIJgIgtC0PCDobcYuYXpYSIgIWZA7RFvq8+Rw==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -12936,7 +12946,8 @@ "semver-utils": "^1.1.4", "source-map-support": "^0.5.21", "spawn-please": "^1.0.0", - "update-notifier": "^5.1.0" + "update-notifier": "^5.1.0", + "yaml": "^1.10.2" } }, "npm-install-checks": { @@ -14329,6 +14340,12 @@ "version": "4.0.0", "dev": true }, + "yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true + }, "yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", From d7b5b45108465db5ef68b464896696f87e70f0b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Feb 2022 16:02:12 +0000 Subject: [PATCH 21/86] Bump eslint from 8.8.0 to 8.9.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.8.0 to 8.9.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.8.0...v8.9.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 1359 ++++++------------------------------- packages/sdk/package.json | 2 +- 2 files changed, 191 insertions(+), 1170 deletions(-) diff --git a/package-lock.json b/package-lock.json index df6913bb..ab19a2be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -610,61 +610,39 @@ "dev": true }, "node_modules/@eslint/eslintrc": { - "version": "0.4.3", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz", + "integrity": "sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", + "debug": "^4.3.2", + "espree": "^9.3.1", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "sprintf-js": "~1.0.2" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc/node_modules/ignore": { "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true, - "license": "MIT", - "peer": true, "engines": { "node": ">= 4" } }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT", - "peer": true, "engines": { "node": ">=8" }, @@ -678,12 +656,12 @@ "license": "MIT" }, "node_modules/@humanwhocodes/config-array": { - "version": "0.5.0", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", + "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", "dev": true, - "license": "Apache-2.0", - "peer": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" }, @@ -1612,8 +1590,9 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -1686,15 +1665,6 @@ "string-width": "^4.1.0" } }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -1811,15 +1781,6 @@ "node": ">=8" } }, - "node_modules/astral-regex": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - } - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -2682,18 +2643,6 @@ "once": "^1.4.0" } }, - "node_modules/enquirer": { - "version": "2.3.6", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/env-paths": { "version": "2.2.1", "dev": true, @@ -2814,49 +2763,44 @@ } }, "node_modules/eslint": { - "version": "7.32.0", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz", + "integrity": "sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", + "@eslint/eslintrc": "^1.1.0", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", + "glob-parent": "^6.0.1", "globals": "^13.6.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -2864,7 +2808,7 @@ "eslint": "bin/eslint.js" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -2938,20 +2882,10 @@ "node": ">=10" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, "node_modules/eslint/node_modules/cross-spawn": { "version": "7.0.3", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -2965,7 +2899,6 @@ "version": "4.0.0", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=10" }, @@ -2973,57 +2906,62 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/eslint-utils": { - "version": "2.1.0", + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, - "license": "Apache-2.0", - "peer": true, "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/eslint/node_modules/ignore": { - "version": "4.0.6", + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "MIT", - "peer": true, "engines": { - "node": ">= 4" + "node": ">=4.0" } }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "3.14.1", + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "license": "MIT", - "peer": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "is-glob": "^4.0.3" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true, + "engines": { + "node": ">= 4" } }, "node_modules/eslint/node_modules/path-key": { "version": "3.1.1", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=8" } @@ -3032,7 +2970,6 @@ "version": "2.0.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -3044,7 +2981,6 @@ "version": "3.0.0", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=8" } @@ -3053,7 +2989,6 @@ "version": "3.1.1", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=8" }, @@ -3062,26 +2997,38 @@ } }, "node_modules/espree": { - "version": "7.3.1", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", + "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", "dev": true, - "license": "BSD-2-Clause", - "peer": true, "dependencies": { - "acorn": "^7.4.0", + "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/espree/node_modules/acorn": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, - "license": "Apache-2.0", - "peer": true, "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/esprima": { @@ -5155,12 +5102,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/lodash.memoize": { "version": "4.1.2", "dev": true, @@ -5171,12 +5112,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/lowercase-keys": { "version": "1.0.1", "dev": true, @@ -6715,23 +6650,6 @@ "node": ">=8" } }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, "node_modules/smart-buffer": { "version": "4.2.0", "dev": true, @@ -6962,45 +6880,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "node_modules/table": { - "version": "6.7.2", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "dependencies": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.6.3", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/tar": { "version": "6.1.11", "dev": true, @@ -7730,49 +7609,6 @@ "typescript": "^4.5.5" } }, - "packages/e2ee/node_modules/@eslint/eslintrc": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", - "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.2.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "packages/e2ee/node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "packages/e2ee/node_modules/@humanwhocodes/config-array": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", - "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=10.10.0" - } - }, "packages/e2ee/node_modules/@typescript-eslint/eslint-plugin": { "version": "5.10.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.2.tgz", @@ -7907,202 +7743,22 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "packages/e2ee/node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "packages/e2ee/node_modules/eslint-visitor-keys": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", + "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", "dev": true, - "bin": { - "acorn": "bin/acorn" - }, "engines": { - "node": ">=0.4.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "packages/e2ee/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "packages/e2ee/node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, "engines": { - "node": ">= 8" - } - }, - "packages/e2ee/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/e2ee/node_modules/eslint": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz", - "integrity": "sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ==", - "dev": true, - "dependencies": { - "@eslint/eslintrc": "^1.0.5", - "@humanwhocodes/config-array": "^0.9.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.2.0", - "espree": "^9.3.0", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.6.0", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "packages/e2ee/node_modules/eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "packages/e2ee/node_modules/eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "packages/e2ee/node_modules/espree": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", - "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", - "dev": true, - "dependencies": { - "acorn": "^8.7.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "packages/e2ee/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "packages/e2ee/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "packages/e2ee/node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "packages/e2ee/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "packages/e2ee/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "packages/e2ee/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "packages/e2ee/node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 4" } }, "packages/go-wasm": { @@ -8123,7 +7779,7 @@ "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.10.2", "@typescript-eslint/parser": "5.10.2", - "eslint": "8.8.0", + "eslint": "8.9.0", "eslint-config-prettier": "8.3.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.4.7", @@ -8134,49 +7790,6 @@ "typescript": "^4.5.5" } }, - "packages/sdk/node_modules/@eslint/eslintrc": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", - "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.2.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "packages/sdk/node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "packages/sdk/node_modules/@humanwhocodes/config-array": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", - "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=10.10.0" - } - }, "packages/sdk/node_modules/@typescript-eslint/eslint-plugin": { "version": "5.10.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.2.tgz", @@ -8311,109 +7924,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "packages/sdk/node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "packages/sdk/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "packages/sdk/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/sdk/node_modules/eslint": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz", - "integrity": "sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ==", - "dev": true, - "dependencies": { - "@eslint/eslintrc": "^1.0.5", - "@humanwhocodes/config-array": "^0.9.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.2.0", - "espree": "^9.3.0", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.6.0", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "packages/sdk/node_modules/eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "packages/sdk/node_modules/eslint-visitor-keys": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", @@ -8423,41 +7933,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "packages/sdk/node_modules/espree": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", - "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", - "dev": true, - "dependencies": { - "acorn": "^8.7.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "packages/sdk/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "packages/sdk/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "packages/sdk/node_modules/ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", @@ -8466,48 +7941,6 @@ "engines": { "node": ">= 4" } - }, - "packages/sdk/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "packages/sdk/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "packages/sdk/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "packages/sdk/node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } }, "dependencies": { @@ -8907,47 +8340,33 @@ "dev": true }, "@eslint/eslintrc": { - "version": "0.4.3", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz", + "integrity": "sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==", "dev": true, - "peer": true, "requires": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", + "debug": "^4.3.2", + "espree": "^9.3.1", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "dependencies": { - "argparse": { - "version": "1.0.10", - "dev": true, - "peer": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, "ignore": { "version": "4.0.6", - "dev": true, - "peer": true - }, - "js-yaml": { - "version": "3.14.1", - "dev": true, - "peer": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true }, "strip-json-comments": { "version": "3.1.1", - "dev": true, - "peer": true + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true } } }, @@ -8956,11 +8375,12 @@ "dev": true }, "@humanwhocodes/config-array": { - "version": "0.5.0", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", + "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", "dev": true, - "peer": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" } @@ -9410,42 +8830,6 @@ "typescript": "^4.5.5" }, "dependencies": { - "@eslint/eslintrc": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", - "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.2.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - } - } - }, - "@humanwhocodes/config-array": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", - "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, "@typescript-eslint/eslint-plugin": { "version": "5.10.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.2.tgz", @@ -9500,96 +8884,20 @@ "@typescript-eslint/types": "5.10.2", "@typescript-eslint/visitor-keys": "5.10.2", "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.2.tgz", - "integrity": "sha512-zHIhYGGGrFJvvyfwHk5M08C5B5K4bewkm+rrvNTKk1/S15YHR+SA/QUF8ZWscXSfEaB8Nn2puZj+iHcoxVOD/Q==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.10.2", - "eslint-visitor-keys": "^3.0.0" - } - }, - "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "eslint": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz", - "integrity": "sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ==", - "dev": true, - "requires": { - "@eslint/eslintrc": "^1.0.5", - "@humanwhocodes/config-array": "^0.9.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.2.0", - "espree": "^9.3.0", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.6.0", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" } }, - "eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "@typescript-eslint/visitor-keys": { + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.2.tgz", + "integrity": "sha512-zHIhYGGGrFJvvyfwHk5M08C5B5K4bewkm+rrvNTKk1/S15YHR+SA/QUF8ZWscXSfEaB8Nn2puZj+iHcoxVOD/Q==", "dev": true, "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" + "@typescript-eslint/types": "5.10.2", + "eslint-visitor-keys": "^3.0.0" } }, "eslint-visitor-keys": { @@ -9598,64 +8906,11 @@ "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", "dev": true }, - "espree": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", - "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", - "dev": true, - "requires": { - "acorn": "^8.7.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, "ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true } } }, @@ -9673,7 +8928,7 @@ "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.10.2", "@typescript-eslint/parser": "5.10.2", - "eslint": "8.8.0", + "eslint": "8.9.0", "eslint-config-prettier": "8.3.0", "eslint-plugin-prettier": "4.0.0", "fflate": "^0.7.3", @@ -9685,42 +8940,6 @@ "typescript": "^4.5.5" }, "dependencies": { - "@eslint/eslintrc": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", - "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.2.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - } - } - }, - "@humanwhocodes/config-array": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", - "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, "@typescript-eslint/eslint-plugin": { "version": "5.10.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.2.tgz", @@ -9791,146 +9010,17 @@ "eslint-visitor-keys": "^3.0.0" } }, - "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "eslint": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz", - "integrity": "sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ==", - "dev": true, - "requires": { - "@eslint/eslintrc": "^1.0.5", - "@humanwhocodes/config-array": "^0.9.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.2.0", - "espree": "^9.3.0", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.6.0", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - } - }, - "eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, "eslint-visitor-keys": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", "dev": true }, - "espree": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", - "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", - "dev": true, - "requires": { - "acorn": "^8.7.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, "ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true } } }, @@ -10175,6 +9265,8 @@ }, "acorn-jsx": { "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "requires": {} }, @@ -10225,11 +9317,6 @@ "string-width": "^4.1.0" } }, - "ansi-colors": { - "version": "4.1.1", - "dev": true, - "peer": true - }, "ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -10296,11 +9383,6 @@ "version": "2.1.0", "dev": true }, - "astral-regex": { - "version": "2.0.0", - "dev": true, - "peer": true - }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -10905,14 +9987,6 @@ "once": "^1.4.0" } }, - "enquirer": { - "version": "2.3.6", - "dev": true, - "peer": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, "env-paths": { "version": "2.2.1", "dev": true @@ -10994,64 +10068,51 @@ } }, "eslint": { - "version": "7.32.0", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz", + "integrity": "sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==", "dev": true, - "peer": true, "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", + "@eslint/eslintrc": "^1.1.0", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", + "glob-parent": "^6.0.1", "globals": "^13.6.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { - "argparse": { - "version": "1.0.10", - "dev": true, - "peer": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, "cross-spawn": { "version": "7.0.3", "dev": true, - "peer": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -11060,60 +10121,63 @@ }, "escape-string-regexp": { "version": "4.0.0", - "dev": true, - "peer": true + "dev": true }, - "eslint-utils": { - "version": "2.1.0", + "eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, - "peer": true, "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "dev": true, - "peer": true - } + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" } }, - "ignore": { - "version": "4.0.6", - "dev": true, - "peer": true + "eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true }, - "js-yaml": { - "version": "3.14.1", + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "peer": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "is-glob": "^4.0.3" } }, + "ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true + }, "path-key": { "version": "3.1.1", - "dev": true, - "peer": true + "dev": true }, "shebang-command": { "version": "2.0.0", "dev": true, - "peer": true, "requires": { "shebang-regex": "^3.0.0" } }, "shebang-regex": { "version": "3.0.0", - "dev": true, - "peer": true + "dev": true }, "strip-json-comments": { "version": "3.1.1", - "dev": true, - "peer": true + "dev": true } } }, @@ -11149,19 +10213,27 @@ "dev": true }, "espree": { - "version": "7.3.1", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", + "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", "dev": true, - "peer": true, "requires": { - "acorn": "^7.4.0", + "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "eslint-visitor-keys": "^3.3.0" }, "dependencies": { + "acorn": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "dev": true + }, "eslint-visitor-keys": { - "version": "1.3.0", - "dev": true, - "peer": true + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true } } }, @@ -12630,11 +11702,6 @@ "version": "4.17.21", "dev": true }, - "lodash.clonedeep": { - "version": "4.5.0", - "dev": true, - "peer": true - }, "lodash.memoize": { "version": "4.1.2", "dev": true @@ -12643,11 +11710,6 @@ "version": "4.6.2", "dev": true }, - "lodash.truncate": { - "version": "4.4.2", - "dev": true, - "peer": true - }, "lowercase-keys": { "version": "1.0.1", "dev": true @@ -13669,16 +12731,6 @@ "version": "3.0.0", "dev": true }, - "slice-ansi": { - "version": "4.0.0", - "dev": true, - "peer": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - }, "smart-buffer": { "version": "4.2.0", "dev": true @@ -13830,37 +12882,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "table": { - "version": "6.7.2", - "dev": true, - "peer": true, - "requires": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "ajv": { - "version": "8.6.3", - "dev": true, - "peer": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "dev": true, - "peer": true - } - } - }, "tar": { "version": "6.1.11", "dev": true, diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 6fe5f838..6d51f901 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -15,7 +15,7 @@ "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.10.2", "@typescript-eslint/parser": "5.10.2", - "eslint": "8.8.0", + "eslint": "8.9.0", "eslint-config-prettier": "8.3.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.4.7", From 5bea84179142787fa13ee313c733774fa8112d0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Feb 2022 01:07:18 +0000 Subject: [PATCH 22/86] Bump @typescript-eslint/eslint-plugin from 5.10.2 to 5.12.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.10.2 to 5.12.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.12.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- packages/sdk/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 6d51f901..c1721a8b 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -13,7 +13,7 @@ "@rollup/plugin-replace": "^3.0.1", "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.10.2", + "@typescript-eslint/eslint-plugin": "5.12.0", "@typescript-eslint/parser": "5.10.2", "eslint": "8.9.0", "eslint-config-prettier": "8.3.0", From 8fe2b67e644c7fed0cea811a5eb5d48cfe4e754b Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Wed, 16 Feb 2022 16:12:55 +0900 Subject: [PATCH 23/86] =?UTF-8?q?=E3=82=B7=E3=82=B0=E3=83=8A=E3=83=AA?= =?UTF-8?q?=E3=83=B3=E3=82=B0=E6=99=82=E3=81=AB=E4=BD=BF=E7=94=A8=E3=81=97?= =?UTF-8?q?=E3=81=9FURL=E3=82=92=E7=8A=B6=E6=85=8B=E3=81=A8=E3=81=97?= =?UTF-8?q?=E3=81=A6=E4=BF=9D=E5=AD=98=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/src/base.ts | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/packages/sdk/src/base.ts b/packages/sdk/src/base.ts index 94332fa7..c9bdcfcd 100644 --- a/packages/sdk/src/base.ts +++ b/packages/sdk/src/base.ts @@ -114,6 +114,14 @@ export default class ConnectionBase { * サイマルキャストで使用する RTCRtpEncodingParameters のリスト */ encodings: RTCRtpEncodingParameters[]; + /** + * WS シグナリングで type offer メッセージを受信したシグナリング URL + */ + connectedSignalingUrl: string; + /** + * WS シグナリングで最初に type connect を送信したシグナリング URL + */ + contactSignalingUrl: string; /** * WebSocket インスタンス */ @@ -242,6 +250,8 @@ export default class ConnectionBase { }; this.signalingSwitched = false; this.signalingOfferMessageDataChannels = {}; + this.connectedSignalingUrl = ""; + this.contactSignalingUrl = ""; } /** @@ -656,6 +666,8 @@ export default class ConnectionBase { }; this.signalingSwitched = false; this.signalingOfferMessageDataChannels = {}; + this.contactSignalingUrl = ""; + this.connectedSignalingUrl = ""; this.clearConnectionTimeout(); } @@ -1109,6 +1121,7 @@ export default class ConnectionBase { if (message.type == "offer") { this.writeWebSocketSignalingLog("onmessage-offer", message); this.signalingOnMessageTypeOffer(message); + this.connectedSignalingUrl = ws.url; resolve(message); } else if (message.type == "update") { this.writeWebSocketSignalingLog("onmessage-update", message); @@ -1166,6 +1179,11 @@ export default class ConnectionBase { ws.send(JSON.stringify(signalingMessage)); this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage); this.ws = ws; + // 初回に接続した URL を状態管理する + if (!redirect) { + this.contactSignalingUrl = ws.url; + this.writeWebSocketSignalingLog("contact-signaling-url", this.contactSignalingUrl); + } } })(); }); @@ -2206,16 +2224,6 @@ export default class ConnectionBase { return this.signalingUrlCandidates; } - /** - * 接続中のシグナリング URL - */ - get connectedSignalingUrl(): string { - if (!this.ws) { - return ""; - } - return this.ws.url; - } - /** * DataChannel メッセージング用の DataChannel 情報のリスト */ From fc467d6b6825ea8c58dd584df58086aeff056722 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Wed, 16 Feb 2022 16:13:02 +0900 Subject: [PATCH 24/86] =?UTF-8?q?CHANGES=20=E3=82=92=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 1b20f3dd..7501fbf6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,9 @@ - [UPDATE] パッケージを更新する - fflate "0.7.1" -> "0.7.2" - typescript "4.4.3" -> "4.5.4" +- [CHANGE] connectedSignalingUrl は現在接続中の WebSocket の URL ではなく type offer メッセージを受信した URL を返すようにする + - ignoreDisconnectWebSocket を使用して WebSocket を切断した場合にも URL を返すように修正する +- [UPDATE] SendRecv オブジェクト に contactSignalingUrl プロパティを追加する ## 2021.2.3 - [FIX] メッセージング機能で文字列データが送信されてきた場合にそのまま message callback に渡していた問題を修正する From 334d8238366efb1949fff88dbe557db1b1029972 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Wed, 16 Feb 2022 16:15:14 +0900 Subject: [PATCH 25/86] =?UTF-8?q?timeline=20=E3=83=AD=E3=82=B0=E3=81=AE?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=88=E3=83=AB=E3=83=9F=E3=82=B9=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/src/base.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/sdk/src/base.ts b/packages/sdk/src/base.ts index c9bdcfcd..8c4c5403 100644 --- a/packages/sdk/src/base.ts +++ b/packages/sdk/src/base.ts @@ -998,7 +998,7 @@ export default class ConnectionBase { const ws = new WebSocket(signalingUrl); // 一定時間経過しても反応がなかった場合は処理を中断する const timerId = setTimeout(() => { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "timeout", url: ws.url, }); @@ -1011,7 +1011,7 @@ export default class ConnectionBase { } }, this.signalingCandidateTimeout); ws.onclose = (event): void => { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "close", url: ws.url, message: `WebSocket closed`, @@ -1025,7 +1025,7 @@ export default class ConnectionBase { reject(); }; ws.onerror = (_): void => { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "error", url: ws.url, message: `Failed to connect WebSocket`, @@ -1041,7 +1041,7 @@ export default class ConnectionBase { if (ws) { clearInterval(timerId); if (resolved) { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "open", url: ws.url, selected: false, @@ -1052,7 +1052,7 @@ export default class ConnectionBase { ws.close(); reject(); } else { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "open", url: ws.url, selected: true, From ad27c972aae5262330f98ee4040ba19eb36cb25f Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Wed, 16 Feb 2022 16:17:01 +0900 Subject: [PATCH 26/86] 2022.1.0-canary.2 --- dist/base.d.ts | 12 ++++++++---- dist/sora.js | 35 ++++++++++++++++++----------------- dist/sora.min.js | 2 +- dist/sora.min.js.map | 2 +- dist/sora.mjs | 35 ++++++++++++++++++----------------- package-lock.json | 4 ++-- package.json | 2 +- 7 files changed, 49 insertions(+), 43 deletions(-) diff --git a/dist/base.d.ts b/dist/base.d.ts index c6e423ae..290ea942 100644 --- a/dist/base.d.ts +++ b/dist/base.d.ts @@ -72,6 +72,14 @@ export default class ConnectionBase { * サイマルキャストで使用する RTCRtpEncodingParameters のリスト */ encodings: RTCRtpEncodingParameters[]; + /** + * WS シグナリングで type offer メッセージを受信したシグナリング URL + */ + connectedSignalingUrl: string; + /** + * WS シグナリングで最初に type connect を送信したシグナリング URL + */ + contactSignalingUrl: string; /** * WebSocket インスタンス */ @@ -595,10 +603,6 @@ export default class ConnectionBase { * @deprecated */ get signalingUrl(): string | string[]; - /** - * 接続中のシグナリング URL - */ - get connectedSignalingUrl(): string; /** * DataChannel メッセージング用の DataChannel 情報のリスト */ diff --git a/dist/sora.js b/dist/sora.js index 7484038c..fa98d85c 100644 --- a/dist/sora.js +++ b/dist/sora.js @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2022.1.0-canary.1 + * @version: 2022.1.0-canary.2 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -1633,7 +1633,7 @@ } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2022.1.0-canary.1", + sora_client: "Sora JavaScript SDK 2022.1.0-canary.2", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -2018,6 +2018,8 @@ }; this.signalingSwitched = false; this.signalingOfferMessageDataChannels = {}; + this.connectedSignalingUrl = ""; + this.contactSignalingUrl = ""; } /** * SendRecv Object で発火するイベントのコールバックを設定するメソッド @@ -2414,6 +2416,8 @@ }; this.signalingSwitched = false; this.signalingOfferMessageDataChannels = {}; + this.contactSignalingUrl = ""; + this.connectedSignalingUrl = ""; this.clearConnectionTimeout(); } /** @@ -2733,7 +2737,7 @@ const ws = new WebSocket(signalingUrl); // 一定時間経過しても反応がなかった場合は処理を中断する const timerId = setTimeout(() => { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "timeout", url: ws.url, }); @@ -2746,7 +2750,7 @@ } }, this.signalingCandidateTimeout); ws.onclose = (event) => { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "close", url: ws.url, message: `WebSocket closed`, @@ -2760,7 +2764,7 @@ reject(); }; ws.onerror = (_) => { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "error", url: ws.url, message: `Failed to connect WebSocket`, @@ -2776,7 +2780,7 @@ if (ws) { clearInterval(timerId); if (resolved) { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "open", url: ws.url, selected: false, @@ -2788,7 +2792,7 @@ reject(); } else { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "open", url: ws.url, selected: true, @@ -2855,6 +2859,7 @@ if (message.type == "offer") { this.writeWebSocketSignalingLog("onmessage-offer", message); this.signalingOnMessageTypeOffer(message); + this.connectedSignalingUrl = ws.url; resolve(message); } else if (message.type == "update") { @@ -2915,6 +2920,11 @@ ws.send(JSON.stringify(signalingMessage)); this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage); this.ws = ws; + // 初回に接続した URL を状態管理する + if (!redirect) { + this.contactSignalingUrl = ws.url; + this.writeWebSocketSignalingLog("contact-signaling-url", this.contactSignalingUrl); + } } })(); }); @@ -3889,15 +3899,6 @@ get signalingUrl() { return this.signalingUrlCandidates; } - /** - * 接続中のシグナリング URL - */ - get connectedSignalingUrl() { - if (!this.ws) { - return ""; - } - return this.ws.url; - } /** * DataChannel メッセージング用の DataChannel 情報のリスト */ @@ -4418,7 +4419,7 @@ * @public */ version: function () { - return "2022.1.0-canary.1"; + return "2022.1.0-canary.2"; }, /** * WebRTC のユーティリティ関数群 diff --git a/dist/sora.min.js b/dist/sora.min.js index b8682d96..01912074 100644 --- a/dist/sora.min.js +++ b/dist/sora.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sora=t()}(this,(function(){"use strict";class e{constructor(){if(!!!RTCRtpSender.prototype.createEncodedStreams)throw new Error("E2EE is not supported in this browser.");this.worker=null,this.onWorkerDisconn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yYW1lKGVuY29kZWRGcmFtZSkgewogICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkLCByZWNlaXZlTWVzc2FnZSDlj5fkv6HliY3jga7loLTlkIgKICAgIGlmIChlbmNvZGVkRnJhbWUudHlwZSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgLy8g6Z+z5aOw44Gv5pqX5Y+35YyW44Gv44GE44KL44Go6IGe44GR44Gf44KC44Gu44GY44KD44Gq44GE44Gu44Gn572u44GN5o+b44GI44KLCiAgICAgICAgY29uc3QgbmV3RGF0YSA9IG5ldyBBcnJheUJ1ZmZlcigzKTsKICAgICAgICBjb25zdCBuZXdVaW50OCA9IG5ldyBVaW50OEFycmF5KG5ld0RhdGEpOwogICAgICAgIC8vIE9wdXMg44K144Kk44Os44Oz44K544OV44Os44O844OgCiAgICAgICAgbmV3VWludDguc2V0KFsweGQ4LCAweGZmLCAweGZlXSk7CiAgICAgICAgZW5jb2RlZEZyYW1lLmRhdGEgPSBuZXdEYXRhOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgLy8g5pig5YOP44GM5q2j5bi444GY44KD44Gq44GE44Gf44KBIFBMSSDjgrnjg4jjg7zjg6DjgYznmbrnlJ/jgZfjgabjgZfjgb7jgYYKICAgICAgICAvLyDjgZ3jga7jgZ/jgoEgMzIweDI0MCDjga7nnJ/jgaPpu5LjgarnlLvpnaLjgavnva7jgY3mj5vjgYjjgosKICAgICAgICBjb25zdCBuZXdEYXRhID0gbmV3IEFycmF5QnVmZmVyKDYwKTsKICAgICAgICBjb25zdCBuZXdVaW50OCA9IG5ldyBVaW50OEFycmF5KG5ld0RhdGEpOwogICAgICAgIC8vIHByZXR0aWVyLWlnbm9yZQogICAgICAgIG5ld1VpbnQ4LnNldChbMHhiMCwgMHgwNSwgMHgwMCwgMHg5ZCwgMHgwMSwgMHgyYSwgMHhhMCwgMHgwMCwgMHg1YSwgMHgwMCwKICAgICAgICAgICAgMHgzOSwgMHgwMywgMHgwMCwgMHgwMCw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ZyYW1lSGVhZGVyID0gbmV3IFVpbnQ4QXJyYXkoc2ZyYW1lSGVhZGVyQnVmZmVyKTsKICAgICAgICBjb25zdCBjb25uZWN0aW9uSWQgPSB0ZXh0RGVjb2Rlci5kZWNvZGUoY29ubmVjdGlvbklkQnVmZmVyKTsKICAgICAgICBjb25zdCBbcywgY291bnQsIGtleUlkXSA9IHBhcnNlU0ZyYW1lSGVhZGVyKHNmcmFtZUhlYWRlckJ1ZmZlcik7CiAgICAgICAgLy8g5LuK5Zue44GvIHMgZmxhZyDjga8gMCDjga7jgb8KICAgICAgICBpZiAocyAhPT0gMCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlVORVhQRUNURUQtUy1GTEFHIik7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGRlcml2ZUtleSA9IGdldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICBpZiAoIWRlcml2ZUtleSkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGl2ID0gZ2VuZXJhdGVJVihjb3VudCwgY29ubmVjdGlvbklkLCBrZXlJZCk7CiAgICAgICAgaWYgKCFpdikgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGZyYW1lQWRkID0gZW5jb2RlRnJhbWVBZGQoZnJhbWVNZXRhZGF0YSwgc2ZyYW1lSGVhZGVyLCBjb25uZWN0aW9uSWQpOwogICAgICAgIGNyeXB0by5zdWJ0bGUKICAgICAgICAgICAgLmRlY3J5cHQoewogICAgICAgICAgICBuYW1lOiAiQUVTLUdDTSIsCiAgICAgICAgICAgIGl2OiBpdiwKICAgICAgICAgICAgYWRkaXRpb25hbERhdGE6IGZyYW1lQWRkLAogICAgICAgIH0sIGRlcml2ZUtleSwgbmV3IFVpbnQ4QXJyYXkoZW5jcnlwdGVkRnJhbWVCdWZmZXIpKQogICAgICAgICAgICAudGhlbigocGxhaW5UZXh0KS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bWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5l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0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=");this.worker=new Worker(URL.createObjectURL(new Blob([e],{type:"application/javascript"}))),this.worker.onmessage=e=>{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var p=new t(32);for(m=0;m<32;++m)p[m]=5;var Z=A(b,9,0),w=A(b,9,1),S=A(p,5,0),V=A(p,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(2==e.BYTES_PER_ELEMENT?n:4==e.BYTES_PER_ELEMENT?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},X=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},E=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=O(s[C-1],m,0);if(u>i){a=0;var A=0,b=u-i,p=1<i))break;A+=p-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},O=function(e,t,n){return-1==e.s?Math.max(O(e.l,t,n+1),O(e.r,t,n+1)):t[e.s]=n},B=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},N=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!D[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=N(g,b)+N(r,p)+c,z=N(g,u)+N(r,f)+c+14+3*U+N(K,D)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(C,C+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=Z,j=b,Q=S,H=p;for(L=0;L255){te=l[L]>>>18&31;X(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];X(t,I,Q[ne]),I+=H[ne],ne>3&&(X(t,I,l[L]>>>5&8191),I+=a[ne])}else X(t,I,M[l[L]]),I+=j[l[L]];return X(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),J=new t(0),D=function(e,o,l,g,r){return function(e,o,l,g,r,d){var C=e.length,I=new t(g+C+5*(1+Math.ceil(C/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||C<8)for(var A=0;A<=C;A+=65535){var b=A+65535;b>=C&&(m[u>>3]=d),u=Y(m,u+1,e.subarray(A,b))}else{for(var p=L[o-1],Z=p>>>13,w=8191&p,S=(1<7e3||B>24576)&&j>423){u=K(e,m,0,v,T,X,O,B,D,A-D,u),B=E=O=0,D=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)X[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(Z,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[B++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];O+=s[ae]+a[oe],++T[257+ae],++X[oe],N=A+H,++E}else v[B++]=e[A],++T[e[A]]}}u=K(e,m,d,v,T,X,O,B,D,A-D,u),!d&&7&u&&(u=Y(m,u+1,J))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=D(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var d=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,p=i.m,Z=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,X=F+T;if(X>l){c&&v(0);break}g&&d(m+T),n.set(e.subarray(F,X),m),i.b=m+=T,i.p=I=8*X,i.f=h;continue}if(1==R)u=w,b=V,p=9,Z=5;else if(2==R){var E=y(e,I,31)+257,O=y(e,I+10,15)+4,B=E+y(e,I+5,31)+1;I+=14;for(var N=new t(B),Y=new t(19),K=0;K>>4)<16)N[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=N[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)N[K++]=M}}var Q=N.subarray(0,E),H=N.subarray(E);p=f(Q),Z=f(H),u=A(Q,p,1),b=A(H,Z,1)}else v(1);if(I>S){c&&v(0);break}}g&&d(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=C[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&d(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(J,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0-canary.1",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if("sendrecv"===t&&!0!==s.multistream)throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'");if(void 0!==i&&(o.metadata=i),a&&(o.redirect=!0),"signalingNotifyMetadata"in s&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),"multistream"in s&&!0===s.multistream&&(o.multistream=!0,"spotlight"in s&&(o.spotlight=s.spotlight,"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber)),!0===o.spotlight)){const e=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=e.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=e.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid)}if("simulcast"in s||"simulcastRid"in s){"simulcast"in s&&!0===s.simulcast&&(o.simulcast=!0);const e=["r0","r1","r2"];void 0!==s.simulcastRid&&0<=e.indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid)}"clientId"in s&&void 0!==s.clientId&&(o.client_id=s.clientId),"dataChannelSignaling"in s&&"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"ignoreDisconnectWebSocket"in s&&"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const l=["audioCodecType","audioBitRate"],g=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],r=["videoCodecType","videoBitRate"],c=Object.assign({},s);Object.keys(c).forEach((e=>{"audio"===e&&"boolean"==typeof c[e]||"video"===e&&"boolean"==typeof c[e]||0<=l.indexOf(e)&&null!==c[e]||0<=g.indexOf(e)&&null!==c[e]||0<=r.indexOf(e)&&null!==c[e]||delete c[e]})),void 0!==c.audio&&(o.audio=c.audio);const d=Object.keys(c).some((e=>0<=l.indexOf(e)));o.audio&&d&&(o.audio={},"audioCodecType"in c&&(o.audio.codec_type=c.audioCodecType),"audioBitRate"in c&&(o.audio.bit_rate=c.audioBitRate));const C=Object.keys(c).some((e=>0<=g.indexOf(e)));o.audio&&C&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in c&&(o.audio.opus_params.channels=c.audioOpusParamsChannels),"audioOpusParamsClockRate"in c&&(o.audio.opus_params.clock_rate=c.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in c&&(o.audio.opus_params.maxplaybackrate=c.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in c&&(o.audio.opus_params.stereo=c.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in c&&(o.audio.opus_params.sprop_stereo=c.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in c&&(o.audio.opus_params.minptime=c.audioOpusParamsMinptime),"audioOpusParamsPtime"in c&&(o.audio.opus_params.ptime=c.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in c&&(o.audio.opus_params.useinbandfec=c.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in c&&(o.audio.opus_params.usedtx=c.audioOpusParamsUsedtx)),void 0!==c.video&&(o.video=c.video);const h=Object.keys(c).some((e=>0<=r.indexOf(e)));if(o.video&&h&&(o.video={},"videoCodecType"in c&&(o.video.codec_type=c.videoCodecType),"videoBitRate"in c&&(o.video.bit_rate=c.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if(!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8"),o.e2ee=!0}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={}}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}stopStream(){return new Promise(((e,t)=>(this.debug&&console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."),this.stream?(this.stream.getTracks().forEach((e=>{e.stop()})),this.stream=null,e()):e())))}async signalingTerminate(){await this.stopStream();for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}async abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-canidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=async e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),await this.signalingTerminate(),s(t)},e.onmessage=async e=>{if(e.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",e.data),void this.signalingOnMessageE2EE(e.data);if("string"!=typeof e.data)throw new Error("Received invalid signaling data");const t=JSON.parse(e.data);if("offer"==t.type)this.writeWebSocketSignalingLog("onmessage-offer",t),this.signalingOnMessageTypeOffer(t),i(t);else if("update"==t.type)this.writeWebSocketSignalingLog("onmessage-update",t),await this.signalingOnMessageTypeUpdate(t);else if("re-offer"==t.type)this.writeWebSocketSignalingLog("onmessage-re-offer",t),await this.signalingOnMessageTypeReOffer(t);else if("ping"==t.type)await this.signalingOnMessageTypePing(t);else if("push"==t.type)this.callbacks.push(t,"websocket");else if("notify"==t.type)"connection.created"===t.event_type?this.writeWebSocketTimelineLog("notify-connection.created",t):"connection.destroyed"===t.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",t),this.signalingOnMessageTypeNotify(t,"websocket");else if("switched"==t.type)this.writeWebSocketSignalingLog("onmessage-switched",t),this.signalingOnMessageTypeSwitched(t);else if("redirect"==t.type){this.writeWebSocketSignalingLog("onmessage-redirect",t);try{const e=await this.signalingOnMessageTypeRedirect(t);i(e)}catch(e){s(e)}}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e)})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=async e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),await this.signalingTerminate(),t(n)},this.ws.onerror=async e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),await this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=async e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((async()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=async e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),await this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=e.target;let s;"string"==typeof e.data?s=(new TextEncoder).encode(e.data):e.data instanceof ArrayBuffer?s=e.data:console.warn("Received onmessage event data is not of type String or ArrayBuffer."),void 0!==s&&(!0===n.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(i.label,s)))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get connectedSignalingUrl(){return this.ws?this.ws.url:""}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var p=new t(32);for(m=0;m<32;++m)p[m]=5;var Z=A(b,9,0),w=A(b,9,1),S=A(p,5,0),V=A(p,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(2==e.BYTES_PER_ELEMENT?n:4==e.BYTES_PER_ELEMENT?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},X=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},E=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=O(s[C-1],m,0);if(u>i){a=0;var A=0,b=u-i,p=1<i))break;A+=p-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},O=function(e,t,n){return-1==e.s?Math.max(O(e.l,t,n+1),O(e.r,t,n+1)):t[e.s]=n},B=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},N=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!D[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=N(g,b)+N(r,p)+c,z=N(g,u)+N(r,f)+c+14+3*U+N(K,D)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(C,C+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=Z,j=b,Q=S,H=p;for(L=0;L255){te=l[L]>>>18&31;X(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];X(t,I,Q[ne]),I+=H[ne],ne>3&&(X(t,I,l[L]>>>5&8191),I+=a[ne])}else X(t,I,M[l[L]]),I+=j[l[L]];return X(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),J=new t(0),D=function(e,o,l,g,r){return function(e,o,l,g,r,d){var C=e.length,I=new t(g+C+5*(1+Math.ceil(C/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||C<8)for(var A=0;A<=C;A+=65535){var b=A+65535;b>=C&&(m[u>>3]=d),u=Y(m,u+1,e.subarray(A,b))}else{for(var p=L[o-1],Z=p>>>13,w=8191&p,S=(1<7e3||B>24576)&&j>423){u=K(e,m,0,v,T,X,O,B,D,A-D,u),B=E=O=0,D=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)X[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(Z,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[B++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];O+=s[ae]+a[oe],++T[257+ae],++X[oe],N=A+H,++E}else v[B++]=e[A],++T[e[A]]}}u=K(e,m,d,v,T,X,O,B,D,A-D,u),!d&&7&u&&(u=Y(m,u+1,J))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=D(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var d=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,p=i.m,Z=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,X=F+T;if(X>l){c&&v(0);break}g&&d(m+T),n.set(e.subarray(F,X),m),i.b=m+=T,i.p=I=8*X,i.f=h;continue}if(1==R)u=w,b=V,p=9,Z=5;else if(2==R){var E=y(e,I,31)+257,O=y(e,I+10,15)+4,B=E+y(e,I+5,31)+1;I+=14;for(var N=new t(B),Y=new t(19),K=0;K>>4)<16)N[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=N[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)N[K++]=M}}var Q=N.subarray(0,E),H=N.subarray(E);p=f(Q),Z=f(H),u=A(Q,p,1),b=A(H,Z,1)}else v(1);if(I>S){c&&v(0);break}}g&&d(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=C[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&d(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(J,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0-canary.2",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if("sendrecv"===t&&!0!==s.multistream)throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'");if(void 0!==i&&(o.metadata=i),a&&(o.redirect=!0),"signalingNotifyMetadata"in s&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),"multistream"in s&&!0===s.multistream&&(o.multistream=!0,"spotlight"in s&&(o.spotlight=s.spotlight,"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber)),!0===o.spotlight)){const e=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=e.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=e.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid)}if("simulcast"in s||"simulcastRid"in s){"simulcast"in s&&!0===s.simulcast&&(o.simulcast=!0);const e=["r0","r1","r2"];void 0!==s.simulcastRid&&0<=e.indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid)}"clientId"in s&&void 0!==s.clientId&&(o.client_id=s.clientId),"dataChannelSignaling"in s&&"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"ignoreDisconnectWebSocket"in s&&"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const l=["audioCodecType","audioBitRate"],g=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],r=["videoCodecType","videoBitRate"],c=Object.assign({},s);Object.keys(c).forEach((e=>{"audio"===e&&"boolean"==typeof c[e]||"video"===e&&"boolean"==typeof c[e]||0<=l.indexOf(e)&&null!==c[e]||0<=g.indexOf(e)&&null!==c[e]||0<=r.indexOf(e)&&null!==c[e]||delete c[e]})),void 0!==c.audio&&(o.audio=c.audio);const d=Object.keys(c).some((e=>0<=l.indexOf(e)));o.audio&&d&&(o.audio={},"audioCodecType"in c&&(o.audio.codec_type=c.audioCodecType),"audioBitRate"in c&&(o.audio.bit_rate=c.audioBitRate));const C=Object.keys(c).some((e=>0<=g.indexOf(e)));o.audio&&C&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in c&&(o.audio.opus_params.channels=c.audioOpusParamsChannels),"audioOpusParamsClockRate"in c&&(o.audio.opus_params.clock_rate=c.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in c&&(o.audio.opus_params.maxplaybackrate=c.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in c&&(o.audio.opus_params.stereo=c.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in c&&(o.audio.opus_params.sprop_stereo=c.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in c&&(o.audio.opus_params.minptime=c.audioOpusParamsMinptime),"audioOpusParamsPtime"in c&&(o.audio.opus_params.ptime=c.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in c&&(o.audio.opus_params.useinbandfec=c.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in c&&(o.audio.opus_params.usedtx=c.audioOpusParamsUsedtx)),void 0!==c.video&&(o.video=c.video);const h=Object.keys(c).some((e=>0<=r.indexOf(e)));if(o.video&&h&&(o.video={},"videoCodecType"in c&&(o.video.codec_type=c.videoCodecType),"videoBitRate"in c&&(o.video.bit_rate=c.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if(!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8"),o.e2ee=!0}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.connectedSignalingUrl="",this.contactSignalingUrl=""}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}stopStream(){return new Promise(((e,t)=>(this.debug&&console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."),this.stream?(this.stream.getTracks().forEach((e=>{e.stop()})),this.stream=null,e()):e())))}async signalingTerminate(){await this.stopStream();for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}async abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.contactSignalingUrl="",this.connectedSignalingUrl="",this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=async e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),await this.signalingTerminate(),s(t)},e.onmessage=async t=>{if(t.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",t.data),void this.signalingOnMessageE2EE(t.data);if("string"!=typeof t.data)throw new Error("Received invalid signaling data");const n=JSON.parse(t.data);if("offer"==n.type)this.writeWebSocketSignalingLog("onmessage-offer",n),this.signalingOnMessageTypeOffer(n),this.connectedSignalingUrl=e.url,i(n);else if("update"==n.type)this.writeWebSocketSignalingLog("onmessage-update",n),await this.signalingOnMessageTypeUpdate(n);else if("re-offer"==n.type)this.writeWebSocketSignalingLog("onmessage-re-offer",n),await this.signalingOnMessageTypeReOffer(n);else if("ping"==n.type)await this.signalingOnMessageTypePing(n);else if("push"==n.type)this.callbacks.push(n,"websocket");else if("notify"==n.type)"connection.created"===n.event_type?this.writeWebSocketTimelineLog("notify-connection.created",n):"connection.destroyed"===n.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",n),this.signalingOnMessageTypeNotify(n,"websocket");else if("switched"==n.type)this.writeWebSocketSignalingLog("onmessage-switched",n),this.signalingOnMessageTypeSwitched(n);else if("redirect"==n.type){this.writeWebSocketSignalingLog("onmessage-redirect",n);try{const e=await this.signalingOnMessageTypeRedirect(n);i(e)}catch(e){s(e)}}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e,t||(this.contactSignalingUrl=e.url,this.writeWebSocketSignalingLog("contact-signaling-url",this.contactSignalingUrl)))})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=async e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),await this.signalingTerminate(),t(n)},this.ws.onerror=async e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),await this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=async e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((async()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=async e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),await this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=e.target;let s;"string"==typeof e.data?s=(new TextEncoder).encode(e.data):e.data instanceof ArrayBuffer?s=e.data:console.warn("Received onmessage event data is not of type String or ArrayBuffer."),void 0!==s&&(!0===n.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(i.label,s)))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1 {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexport default function () {\n\t(() => {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") {\n\t\t\t// global already exists\n\t\t} else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t}\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t}\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t}\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t}\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t}\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t}\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t}\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});\n\t\t}\n\t})();\n}\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n // role: sendrecv で multistream: false の場合は例外を発生させる\n if (role === \"sendrecv\" && options.multistream !== true) {\n throw new Error(\"Failed to parse options. Options multistream must be true when connecting using 'sendrecv'\");\n }\n\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n\n if (redirect) {\n message.redirect = true;\n }\n\n if (\"signalingNotifyMetadata\" in options) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n\n if (\"multistream\" in options && options.multistream === true) {\n // multistream\n message.multistream = true;\n // spotlight\n if (\"spotlight\" in options) {\n message.spotlight = options.spotlight;\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n }\n if (message.spotlight === true) {\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n }\n }\n\n if (\"simulcast\" in options || \"simulcastRid\" in options) {\n // simulcast\n if (\"simulcast\" in options && options.simulcast === true) {\n message.simulcast = true;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n }\n\n // client_id\n if (\"clientId\" in options && options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n\n if (\"dataChannelSignaling\" in options && typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (\"ignoreDisconnectWebSocket\" in options && typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n message.e2ee = true;\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * stream を停止するメソッド\n */\n private stopStream(): Promise {\n return new Promise((resolve, _) => {\n if (this.debug) {\n console.warn(\n \"@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself.\"\n );\n }\n if (!this.stream) {\n return resolve();\n }\n this.stream.getTracks().forEach((t) => {\n t.stop();\n });\n this.stream = null;\n return resolve();\n });\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private async signalingTerminate(): Promise {\n await this.stopStream();\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private async abendPeerConnectionState(title: SoraAbendTitle): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-canidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = async (event): Promise => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n try {\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n } catch (error) {\n reject(error);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = async (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = async (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n await this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = async (_): Promise => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = async (_): Promise => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n await this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(async () => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n await this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n channel.bufferedAmountLowThreshold = 65536;\n channel.binaryType = \"arraybuffer\";\n this.soraDataChannels[channel.label] = channel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const dataChannel = event.target as RTCDataChannel;\n let data: ArrayBuffer | undefined = undefined;\n if (typeof event.data === \"string\") {\n data = new TextEncoder().encode(event.data);\n } else if (event.data instanceof ArrayBuffer) {\n data = event.data;\n } else {\n console.warn(\"Received onmessage event data is not of type String or ArrayBuffer.\");\n }\n\n if (data !== undefined) {\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n }\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * 接続中のシグナリング URL\n */\n get connectedSignalingUrl(): string {\n if (!this.ws) {\n return \"\";\n }\n return this.ws.url;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n // sendrecv の場合、multistream に初期値を指定する\n const sendrecvOptions: ConnectionOptions = Object.assign({ multistream: true }, options);\n return new ConnectionPublisher(\n this.signalingUrlCandidates,\n \"sendrecv\",\n channelId,\n metadata,\n sendrecvOptions,\n this.debug\n );\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","BYTES_PER_ELEMENT","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","multistream","signaling_notify_metadata","signalingNotifyMetadata","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","simulcast","simalcastRids","simulcastRid","simulcast_rid","clientId","client_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","stopStream","getTracks","dataChannel","initializeConnection","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","signalingTerminate","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","abendPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmount","bufferedAmountLowThreshold","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","target","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","connectedSignalingUrl","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","ontrack","streams","muted","onremovetrack","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendrecvOptions","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMediaStreamConstraints","mediastream","applyConstraints"],"mappings":"qOAWA,MAAMA,EACFC,cAII,MADoCC,aAAaC,UAAUC,qBAEvD,MAAM,IAAIC,MAAM,0CAEpBC,KAAKC,OAAS,KACdD,KAAKE,mBAAqB,KAG9BC,cAEI,MAAMC,EAAeC,KAfP,wjwBAgBdL,KAAKC,OAAS,IAAIK,OAAOC,IAAIC,gBAAgB,IAAIC,KAAK,CAACL,GAAe,CAAEM,KAAM,6BAC9EV,KAAKC,OAAOU,UAAaC,IACrB,MAAMC,UAAEA,GA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OAAO,IAAI6iB,GAAerN,EAAwBxV,IAOpDoC,QAAS,WACP,MAAO,qBAOTihB,QAAS,CACPC,4BCnMJ9wB,eACE+wB,EACA1N,GAEA,GAAIA,EAAYjG,OAAsC,kBAAtBiG,EAAYjG,MAC1C,IAAK,MAAM7c,KAASwwB,EAAYnM,uBACxBrkB,EAAMywB,iBAAiB3N,EAAYjG,OAG7C,GAAIiG,EAAYhG,OAAsC,kBAAtBgG,EAAYhG,MAC1C,IAAK,MAAM9c,KAASwwB,EAAY3L,uBACxB7kB,EAAMywB,iBAAiB3N,EAAYhG"} \ No newline at end of file +{"version":3,"file":"sora.min.js","sources":["../packages/e2ee/dist/sora_e2ee.mjs","../packages/go-wasm/src/wasm_exec.js","../node_modules/fflate/esm/browser.js","../packages/sdk/src/utils.ts","../packages/sdk/src/base.ts","../packages/sdk/src/publisher.ts","../packages/sdk/src/subscriber.ts","../packages/sdk/src/sora.ts","../packages/sdk/src/helpers.ts"],"sourcesContent":["/**\n * @sora/e2ee\n * WebRTC SFU Sora JavaScript E2EE Library\n * @version: 2021.1.0\n * @author: Shiguredo Inc.\n * @license: Apache-2.0\n **/\n\nimport WasmExec from '@sora/go-wasm';\n\nconst WORKER_SCRIPT = \"InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCkgPSBsb2coeCkgLyBsb2coMjU2KQogICAgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5sb2cobikgLyBNYXRoLmxvZygyICoqIDgpICsgMSk7Cn0KZnVuY3Rpb24gYXJyYXlCdWZmZXJUb051bWJlcihhcnJheUJ1ZmZlcikgewogICAgLy8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ml2ZUtleSA9IGdldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICBpZiAoIWRlcml2ZUtleSkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGl2ID0gZ2VuZXJhdGVJVihjb3VudCwgY29ubmVjdGlvbklkLCBrZXlJZCk7CiAgICAgICAgaWYgKCFpdikgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGZyYW1lQWRkID0gZW5jb2RlRnJhbWVBZGQoZnJhbWVNZXRhZGF0YSwgc2ZyYW1lSGVhZGVyLCBjb25uZWN0aW9uSWQpOwogICAgICAgIGNyeXB0by5zdWJ0bGUKICAgICAgICAgICAgLmRlY3J5cHQoewogICAgICAgICAgICBuYW1lOiAiQUVTLUdDTSIsCiAgICAgICAgICAgIGl2OiBpdiwKICAgICAgICAgICAgYWRkaXRpb25hbERhdGE6IGZyYW1lQWRkLAogICAgICAgIH0sIGRlcml2ZUtleSwgbmV3IFVpbnQ4QXJyYXkoZW5jcnlwdGVkRnJhbWVCdWZmZXIpKQogICAgICAgICAgICAudGhlbigocGxhaW5UZXh0KSA9PiB7CiAgICAgICAgICAgIGNvbnN0IG5ld0RhdGEgPSBuZXcgQXJyYXlCdWZmZXIoZnJhbWVNZXRhZGF0YUJ1ZmZlci5ieXRlTGVuZ3RoICsgcGxhaW5UZXh0LmJ5dGVMZW5ndGgpOwogICAgICAgICAgICBjb25zdCBuZXdVaW50OCA9IG5ldyBVaW50OEFycmF5KG5ld0RhdGEpOwogICAgICAgICAgICBuZXdVaW50OC5zZXQobmV3IFVpbnQ4QXJyYXkoZnJhbWVNZXRhZGF0YUJ1ZmZlciwgMCwgdW5lbmNyeXB0ZWRCeXRlc1tlbmNvZGVkRnJhbWUudHlwZV0pKTsKICAgICAgICAgICAgbmV3VWludDguc2V0KG5ldyBVaW50OEFycmF5KHBsYWluVGV4dCksIHVuZW5jcnlwdGVk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CJyYXciLCBzZWxmU2VjcmV0S2V5TWF0ZXJpYWwuYnVmZmVyLCAiSEtERiIsIGZhbHNlLCBbImRlcml2ZUJpdHMiLCAiZGVyaXZlS2V5Il0pCiAgICAgICAgICAgICAgICAudGhlbigobWF0ZXJpYWwpID0+IHsKICAgICAgICAgICAgICAgIGdlbmVyYXRlRGVyaXZlS2V5KG1hdGVyaWFsKS50aGVuKChkZXJpdmVLZXkpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRTZWxmRGVyaXZlS2V5KHNlbGZDb25uZWN0aW9uSWQsIHNlbGZLZXlJZCwgZGVyaXZlS2V5KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgZ2VuZXJhdGVXcml0ZUlWKG1hdGVyaWFsKS50aGVuKCh3cml0ZUlWKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2V0V3JpdGVJVihzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5lY3Rpb25JZCwga2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBzZXRMYXRlc3RSZW1vdGVLZXlJZChjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gInJlbW92ZVJlbW90ZURlcml2ZUtleSIpIHsKICAgICAgICBjb25zdCB7IGNvbm5lY3Rpb25JZCB9ID0gZXZlbnQuZGF0YTsKICAgICAgICByZW1vdmVEZXJpdmVLZXkoY29ubmVjdGlvbklkKTsKICAgIH0KICAgIGVsc2UgaWYgKHR5cGUgPT09ICJlbmNyeXB0IikgewogICAgICAgIGNvbnN0IHsgcmVhZGFibGVTdHJlYW0sIHdyaXRhYmxlU3RyZWFtIH0gPSBldmVudC5kYXRhOwogICAgICAgIGNvbnN0IHRyYW5zZm9ybVN0cmVhbSA9IG5ldyBUcmFuc2Zvcm1TdHJlYW0oewogICAgICAgICAgICB0cmFuc2Zvcm06IGVuY3J5cHRGdW5jdGlvbiwKICAgICAgICB9KTsKICAgICAgICByZWFkYWJsZVN0cmVhbS5waXBlVGhyb3VnaCh0cmFuc2Zvcm1TdHJlYW0pLnBpcGVUbyh3cml0YWJsZVN0cmVhbSk7CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAiZGVjcnlwdCIpIHsKICAgICAgICBjb25zdCB7IHJlYWRhYmxlU3RyZWFtLCB3cml0YWJsZVN0cmVhbSB9ID0gZXZlbnQuZGF0YTsKICAgICAgICBjb25zdCB0cmFuc2Zvcm1TdHJlYW0gPSBuZXcgVHJhbnNmb3JtU3RyZWFtKHsKICAgICAgICAgICAgdHJhbnNmb3JtOiBkZWNyeXB0RnVuY3Rpb24sCiAgICAgICAgfSk7CiAgICAgICAgcmVhZGFibGVTdHJlYW0ucGlwZVRocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=\";\nclass SoraE2EE {\n constructor() {\n // 対応しているかどうかの判断\n // @ts-ignore トライアル段階の API なので無視する\n const supportsInsertableStreams = !!RTCRtpSender.prototype.createEncodedStreams;\n if (!supportsInsertableStreams) {\n throw new Error(\"E2EE is not supported in this browser.\");\n }\n this.worker = null;\n this.onWorkerDisconnect = null;\n }\n // worker を起動する\n startWorker() {\n // ワーカーを起動する\n const workerScript = atob(WORKER_SCRIPT);\n this.worker = new Worker(URL.createObjectURL(new Blob([workerScript], { type: \"application/javascript\" })));\n this.worker.onmessage = (event) => {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexport default function () {\n\t(() => {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") {\n\t\t\t// global already exists\n\t\t} else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t}\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t}\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t}\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t}\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t}\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t}\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t}\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});\n\t\t}\n\t})();\n}\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n // role: sendrecv で multistream: false の場合は例外を発生させる\n if (role === \"sendrecv\" && options.multistream !== true) {\n throw new Error(\"Failed to parse options. Options multistream must be true when connecting using 'sendrecv'\");\n }\n\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n\n if (redirect) {\n message.redirect = true;\n }\n\n if (\"signalingNotifyMetadata\" in options) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n\n if (\"multistream\" in options && options.multistream === true) {\n // multistream\n message.multistream = true;\n // spotlight\n if (\"spotlight\" in options) {\n message.spotlight = options.spotlight;\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n }\n if (message.spotlight === true) {\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n }\n }\n\n if (\"simulcast\" in options || \"simulcastRid\" in options) {\n // simulcast\n if (\"simulcast\" in options && options.simulcast === true) {\n message.simulcast = true;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n }\n\n // client_id\n if (\"clientId\" in options && options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n\n if (\"dataChannelSignaling\" in options && typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (\"ignoreDisconnectWebSocket\" in options && typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n message.e2ee = true;\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WS シグナリングで type offer メッセージを受信したシグナリング URL\n */\n connectedSignalingUrl: string;\n /**\n * WS シグナリングで最初に type connect を送信したシグナリング URL\n */\n contactSignalingUrl: string;\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.connectedSignalingUrl = \"\";\n this.contactSignalingUrl = \"\";\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * stream を停止するメソッド\n */\n private stopStream(): Promise {\n return new Promise((resolve, _) => {\n if (this.debug) {\n console.warn(\n \"@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself.\"\n );\n }\n if (!this.stream) {\n return resolve();\n }\n this.stream.getTracks().forEach((t) => {\n t.stop();\n });\n this.stream = null;\n return resolve();\n });\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private async signalingTerminate(): Promise {\n await this.stopStream();\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private async abendPeerConnectionState(title: SoraAbendTitle): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.contactSignalingUrl = \"\";\n this.connectedSignalingUrl = \"\";\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = async (event): Promise => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n this.connectedSignalingUrl = ws.url;\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n try {\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n } catch (error) {\n reject(error);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n // 初回に接続した URL を状態管理する\n if (!redirect) {\n this.contactSignalingUrl = ws.url;\n this.writeWebSocketSignalingLog(\"contact-signaling-url\", this.contactSignalingUrl);\n }\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = async (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = async (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n await this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = async (_): Promise => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = async (_): Promise => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n await this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(async () => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n await this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n channel.bufferedAmountLowThreshold = 65536;\n channel.binaryType = \"arraybuffer\";\n this.soraDataChannels[channel.label] = channel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const dataChannel = event.target as RTCDataChannel;\n let data: ArrayBuffer | undefined = undefined;\n if (typeof event.data === \"string\") {\n data = new TextEncoder().encode(event.data);\n } else if (event.data instanceof ArrayBuffer) {\n data = event.data;\n } else {\n console.warn(\"Received onmessage event data is not of type String or ArrayBuffer.\");\n }\n\n if (data !== undefined) {\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n }\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n // sendrecv の場合、multistream に初期値を指定する\n const sendrecvOptions: ConnectionOptions = Object.assign({ multistream: true }, options);\n return new ConnectionPublisher(\n this.signalingUrlCandidates,\n \"sendrecv\",\n channelId,\n metadata,\n sendrecvOptions,\n this.debug\n );\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","BYTES_PER_ELEMENT","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","multistream","signaling_notify_metadata","signalingNotifyMetadata","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","simulcast","simalcastRids","simulcastRid","simulcast_rid","clientId","client_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","connectedSignalingUrl","contactSignalingUrl","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","stopStream","getTracks","dataChannel","initializeConnection","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","signalingTerminate","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","abendPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmount","bufferedAmountLowThreshold","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","target","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","ontrack","streams","muted","onremovetrack","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendrecvOptions","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMediaStreamConstraints","mediastream","applyConstraints"],"mappings":"qOAWA,MAAMA,EACFC,cAII,MADoCC,aAAaC,UAAUC,qBAEvD,MAAM,IAAIC,MAAM,0CAEpBC,KAAKC,OAAS,KACdD,KAAKE,mBAAqB,KAG9BC,cAEI,MAAMC,EAAeC,KAfP,wjwBAgBdL,KAAKC,OAAS,IAAIK,OAAOC,IAAIC,gBAAgB,IAAIC,KAAK,CAACL,GAAe,CAAEM,KAAM,6BAC9EV,KAAKC,OAAOU,UAAaC,IACrB,MAAMC,UAAEA,GAAcD,EAAME,KACV,eAAdD,GAAiE,mBAA5Bb,KAAKE,oBAC1CF,KAAKE,sBAKjBa,cACQf,KAAKC,QACLD,KAAKC,OAAOe,YAAY,CACpBN,KAAM,UAKlBO,kBACQjB,KAAKC,QACLD,KAAKC,OAAOiB,YAIpBC,aACI,MAAMC,aAAEA,SAAuBC,OAAOC,KAAKC,OAC3C,OAAOH,EAEXI,qBAAqBC,GACjB,IAAKA,EAAOC,MACR,OAGJ,MAAMC,EAAgBF,EAAO3B,uBACvB8B,EAAiBD,EAAcC,gBAAkBD,EAAcE,SAC/DC,EAAiBH,EAAcG,gBAAkBH,EAAcI,SACrE,IAAK/B,KAAKC,OACN,MAAM,IAAIF,MAAM,gDAEpB,MAAMiC,EAAU,CACZtB,KAAM,UACNkB,eAAgBA,EAChBE,eAAgBA,GAEpB9B,KAAKC,OAAOe,YAAYgB,EAAS,CAACJ,EAAgBE,IAEtDG,uBAAuBC,GAEnB,MAAMC,EAAkBD,EAASpC,uBAC3B8B,EAAiBO,EAAgBP,gBAAkBO,EAAgBN,SACnEC,EAAiBK,EAAgBL,gBAAkBK,EAAgBJ,SACzE,IAAK/B,KAAKC,OACN,MAAM,IAAIF,MAAM,gDAEpB,MAAMiC,EAAU,CACZtB,KAAM,UACNkB,eAAgBA,EAChBE,eAAgBA,GAEpB9B,KA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AAa,GAAQR,GAChF,OAAO,IAAI0S,GACT3wB,KAAKmkB,uBACL,WACApG,EACAC,EACA2T,EACA3xB,KAAK2O,OAqBTijB,SACE7T,EACAC,EAAqB,KACrBC,EAA6B,CAAEM,OAAO,EAAMC,OAAO,IAEnD,OAAO,IAAImS,GAAoB3wB,KAAKmkB,uBAAwB,WAAYpG,EAAWC,EAAUC,EAASje,KAAK2O,OAoB7GkjB,SACE9T,EACAC,EAAqB,KACrBC,EAA6B,CAAEM,OAAO,EAAMC,OAAO,IAEnD,OAAO,IAAI6S,GAAqBrxB,KAAKmkB,uBAAwB,WAAYpG,EAAWC,EAAUC,EAASje,KAAK2O,OAQ1Gkb,mBACF,OAAO7pB,KAAKmkB,8BAOD,CAYb2N,SAAU3wB,eAAgBuC,SAClBhE,EAASqyB,SAASruB,IAgB1BsuB,WAAY,SAAU7N,EAA2CxV,GAAQ,GACvE,OAAO,IAAI8iB,GAAetN,EAAwBxV,IAOpDoC,QAAS,WACP,MAAO,qBAOTkhB,QAAS,CACPC,4BCnMJ/wB,eACEgxB,EACA3N,GAEA,GAAIA,EAAYjG,OAAsC,kBAAtBiG,EAAYjG,MAC1C,IAAK,MAAM7c,KAASywB,EAAYlM,uBACxBvkB,EAAM0wB,iBAAiB5N,EAAYjG,OAG7C,GAAIiG,EAAYhG,OAAsC,kBAAtBgG,EAAYhG,MAC1C,IAAK,MAAM9c,KAASywB,EAAY1L,uBACxB/kB,EAAM0wB,iBAAiB5N,EAAYhG"} \ No newline at end of file diff --git a/dist/sora.mjs b/dist/sora.mjs index bb0778a7..56f53c8b 100644 --- a/dist/sora.mjs +++ b/dist/sora.mjs @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2022.1.0-canary.1 + * @version: 2022.1.0-canary.2 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -1627,7 +1627,7 @@ function createSignalingMessage(offerSDP, role, channelId, metadata, options, re } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2022.1.0-canary.1", + sora_client: "Sora JavaScript SDK 2022.1.0-canary.2", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -2012,6 +2012,8 @@ class ConnectionBase { }; this.signalingSwitched = false; this.signalingOfferMessageDataChannels = {}; + this.connectedSignalingUrl = ""; + this.contactSignalingUrl = ""; } /** * SendRecv Object で発火するイベントのコールバックを設定するメソッド @@ -2408,6 +2410,8 @@ class ConnectionBase { }; this.signalingSwitched = false; this.signalingOfferMessageDataChannels = {}; + this.contactSignalingUrl = ""; + this.connectedSignalingUrl = ""; this.clearConnectionTimeout(); } /** @@ -2727,7 +2731,7 @@ class ConnectionBase { const ws = new WebSocket(signalingUrl); // 一定時間経過しても反応がなかった場合は処理を中断する const timerId = setTimeout(() => { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "timeout", url: ws.url, }); @@ -2740,7 +2744,7 @@ class ConnectionBase { } }, this.signalingCandidateTimeout); ws.onclose = (event) => { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "close", url: ws.url, message: `WebSocket closed`, @@ -2754,7 +2758,7 @@ class ConnectionBase { reject(); }; ws.onerror = (_) => { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "error", url: ws.url, message: `Failed to connect WebSocket`, @@ -2770,7 +2774,7 @@ class ConnectionBase { if (ws) { clearInterval(timerId); if (resolved) { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "open", url: ws.url, selected: false, @@ -2782,7 +2786,7 @@ class ConnectionBase { reject(); } else { - this.writeWebSocketSignalingLog("signaling-url-canidate", { + this.writeWebSocketSignalingLog("signaling-url-candidate", { type: "open", url: ws.url, selected: true, @@ -2849,6 +2853,7 @@ class ConnectionBase { if (message.type == "offer") { this.writeWebSocketSignalingLog("onmessage-offer", message); this.signalingOnMessageTypeOffer(message); + this.connectedSignalingUrl = ws.url; resolve(message); } else if (message.type == "update") { @@ -2909,6 +2914,11 @@ class ConnectionBase { ws.send(JSON.stringify(signalingMessage)); this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage); this.ws = ws; + // 初回に接続した URL を状態管理する + if (!redirect) { + this.contactSignalingUrl = ws.url; + this.writeWebSocketSignalingLog("contact-signaling-url", this.contactSignalingUrl); + } } })(); }); @@ -3883,15 +3893,6 @@ class ConnectionBase { get signalingUrl() { return this.signalingUrlCandidates; } - /** - * 接続中のシグナリング URL - */ - get connectedSignalingUrl() { - if (!this.ws) { - return ""; - } - return this.ws.url; - } /** * DataChannel メッセージング用の DataChannel 情報のリスト */ @@ -4412,7 +4413,7 @@ var sora = { * @public */ version: function () { - return "2022.1.0-canary.1"; + return "2022.1.0-canary.2"; }, /** * WebRTC のユーティリティ関数群 diff --git a/package-lock.json b/package-lock.json index 7182c91d..583a09dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sora-js-sdk", - "version": "2022.1.0-canary.1", + "version": "2022.1.0-canary.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "sora-js-sdk", - "version": "2022.1.0-canary.1", + "version": "2022.1.0-canary.2", "license": "Apache-2.0", "workspaces": [ "packages/go-wasm", diff --git a/package.json b/package.json index 76a55257..54e515ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sora-js-sdk", - "version": "2022.1.0-canary.1", + "version": "2022.1.0-canary.2", "description": "WebRTC SFU Sora JavaScript SDK", "main": "dist/sora.min.js", "module": "dist/sora.mjs", From 2fd40a795388642e5fa0dbeb3dc664b714661e2f Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Mon, 21 Feb 2022 10:28:37 +0900 Subject: [PATCH 27/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 6504 ++++++++++++++++++++------------ package.json | 4 +- packages/e2ee/package.json | 13 +- packages/e2ee/rollup.config.js | 4 +- packages/sdk/package.json | 10 +- 5 files changed, 4093 insertions(+), 2442 deletions(-) diff --git a/package-lock.json b/package-lock.json index 583a09dc..4081be5e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,47 +14,65 @@ "packages/sdk" ], "devDependencies": { - "npm-check-updates": "^12.2.1", + "npm-check-updates": "^12.4.0", "serve": "^13.0.2", - "typedoc": "^0.22.11" + "typedoc": "^0.22.12" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", + "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.0" + }, + "engines": { + "node": ">=6.0.0" } }, "node_modules/@babel/code-frame": { - "version": "7.12.11", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/highlight": "^7.10.4" + "@babel/highlight": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.15.0", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.0.tgz", + "integrity": "sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.15.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.15.8", - "@babel/generator": "^7.15.8", - "@babel/helper-compilation-targets": "^7.15.4", - "@babel/helper-module-transforms": "^7.15.8", - "@babel/helpers": "^7.15.4", - "@babel/parser": "^7.15.8", - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.6", + "version": "7.17.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.5.tgz", + "integrity": "sha512-/BBMw4EvjmyquN5O+t5eh0+YqB3XXJkYD2cjKpYtWOfFy4lQ4UozNSmxAcWT8r2XtZs0ewG+zrfsqeR15i1ajA==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helpers": "^7.17.2", + "@babel/parser": "^7.17.3", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" + "semver": "^6.3.0" }, "engines": { "node": ">=6.9.0" @@ -64,39 +82,22 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/@babel/code-frame": { - "version": "7.15.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/core/node_modules/semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, - "node_modules/@babel/core/node_modules/source-map": { - "version": "0.5.7", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@babel/generator": { - "version": "7.15.8", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz", + "integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.15.6", + "@babel/types": "^7.17.0", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -106,20 +107,22 @@ }, "node_modules/@babel/generator/node_modules/source-map": { "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.15.4", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", + "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.15.0", - "@babel/helper-validator-option": "^7.14.5", - "browserslist": "^4.16.6", + "@babel/compat-data": "^7.16.4", + "@babel/helper-validator-option": "^7.16.7", + "browserslist": "^4.17.5", "semver": "^6.3.0" }, "engines": { @@ -131,93 +134,89 @@ }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.15.4", + "node_modules/@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-get-function-arity": "^7.15.4", - "@babel/template": "^7.15.4", - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.15.4", + "node_modules/@babel/helper-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.15.4" + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.15.4", + "node_modules/@babel/helper-get-function-arity": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.15.4", + "node_modules/@babel/helper-hoist-variables": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.15.4", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.15.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.15.4", - "@babel/helper-replace-supers": "^7.15.4", - "@babel/helper-simple-access": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "@babel/helper-validator-identifier": "^7.15.7", - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.15.4", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", + "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.15.4" + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -232,37 +231,25 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.15.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.15.4", - "@babel/helper-optimise-call-expression": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-simple-access": { - "version": "7.15.4", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", + "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.15.4", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -278,21 +265,23 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.14.5", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.15.4", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.2.tgz", + "integrity": "sha512-0Qu7RLR1dILozr/6M0xgj+DFPmi6Bnulgm9M8BVa9ZCWxDqlSnqt3cf8IDPB5m45sVXUZ0kuQAgUrdSFFH79fQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4" + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.0", + "@babel/types": "^7.17.0" }, "engines": { "node": ">=6.9.0" @@ -314,8 +303,9 @@ }, "node_modules/@babel/highlight/node_modules/ansi-styles": { "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^1.9.0" }, @@ -325,8 +315,9 @@ }, "node_modules/@babel/highlight/node_modules/chalk": { "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -338,29 +329,33 @@ }, "node_modules/@babel/highlight/node_modules/color-convert": { "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "1.1.3" } }, "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/@babel/highlight/node_modules/supports-color": { "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, @@ -369,9 +364,10 @@ } }, "node_modules/@babel/parser": { - "version": "7.15.8", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz", + "integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==", "dev": true, - "license": "MIT", "bin": { "parser": "bin/babel-parser.js" }, @@ -381,8 +377,9 @@ }, "node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -392,8 +389,9 @@ }, "node_modules/@babel/plugin-syntax-bigint": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -403,8 +401,9 @@ }, "node_modules/@babel/plugin-syntax-class-properties": { "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -414,8 +413,9 @@ }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -425,8 +425,9 @@ }, "node_modules/@babel/plugin-syntax-json-strings": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -436,8 +437,9 @@ }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -447,8 +449,9 @@ }, "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -458,8 +461,9 @@ }, "node_modules/@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -469,8 +473,9 @@ }, "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -480,8 +485,9 @@ }, "node_modules/@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -491,8 +497,9 @@ }, "node_modules/@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -502,8 +509,9 @@ }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -530,41 +538,33 @@ } }, "node_modules/@babel/template": { - "version": "7.15.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.15.8", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/highlight": "^7.14.5" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.15.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.4", - "@babel/helper-function-name": "^7.15.4", - "@babel/helper-hoist-variables": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", + "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -572,31 +572,22 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.15.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/traverse/node_modules/globals": { "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/@babel/types": { - "version": "7.15.6", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.14.9", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -629,6 +620,16 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/@eslint/eslintrc/node_modules/ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -638,6 +639,18 @@ "node": ">= 4" } }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -651,9 +664,10 @@ } }, "node_modules/@gar/promisify": { - "version": "1.1.2", - "dev": true, - "license": "MIT" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", + "dev": true }, "node_modules/@humanwhocodes/config-array": { "version": "0.9.3", @@ -669,6 +683,28 @@ "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -677,8 +713,9 @@ }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, - "license": "ISC", "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", @@ -692,24 +729,27 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" } }, "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -720,8 +760,9 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -732,8 +773,9 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -743,8 +785,9 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -757,8 +800,9 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -768,31 +812,33 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@jest/console": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.4.6.tgz", - "integrity": "sha512-jauXyacQD33n47A44KrlOVeiXHEXDqapSdfb9kTekOchH/Pd18kBIO1+xxJQRLuG+LUuljFCwTG92ra4NW7SpA==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", + "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^27.4.6", - "jest-util": "^27.4.2", + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", "slash": "^3.0.0" }, "engines": { @@ -800,35 +846,35 @@ } }, "node_modules/@jest/core": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.7.tgz", - "integrity": "sha512-n181PurSJkVMS+kClIFSX/LLvw9ExSb+4IMtD6YnfxZVerw9ANYtW0bPrm0MJu2pfe9SY9FJ9FtQ+MdZkrZwjg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", + "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", "dev": true, "dependencies": { - "@jest/console": "^27.4.6", - "@jest/reporters": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^27.5.1", + "@jest/reporters": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.8.1", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-changed-files": "^27.4.2", - "jest-config": "^27.4.7", - "jest-haste-map": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.6", - "jest-resolve-dependencies": "^27.4.6", - "jest-runner": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", - "jest-watcher": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^27.5.1", + "jest-config": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-resolve-dependencies": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "jest-watcher": "^27.5.1", "micromatch": "^4.0.4", "rimraf": "^3.0.0", "slash": "^3.0.0", @@ -847,77 +893,77 @@ } }, "node_modules/@jest/environment": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.6.tgz", - "integrity": "sha512-E6t+RXPfATEEGVidr84WngLNWZ8ffCPky8RqqRK6u1Bn0LK92INe0MDttyPl/JOzaq92BmDzOeuqk09TvM22Sg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", + "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", "dev": true, "dependencies": { - "@jest/fake-timers": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", - "jest-mock": "^27.4.6" + "jest-mock": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.6.tgz", - "integrity": "sha512-mfaethuYF8scV8ntPpiVGIHQgS0XIALbpY2jt2l7wb/bvq4Q5pDLk4EP4D7SAvYT1QrPOPVZAtbdGAOOyIgs7A==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", + "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "@sinonjs/fake-timers": "^8.0.1", "@types/node": "*", - "jest-message-util": "^27.4.6", - "jest-mock": "^27.4.6", - "jest-util": "^27.4.2" + "jest-message-util": "^27.5.1", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/@jest/globals": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.6.tgz", - "integrity": "sha512-kAiwMGZ7UxrgPzu8Yv9uvWmXXxsy0GciNejlHvfPIfWkSxChzv6bgTS3YqBkGuHcis+ouMFI2696n2t+XYIeFw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", + "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.6", - "@jest/types": "^27.4.2", - "expect": "^27.4.6" + "@jest/environment": "^27.5.1", + "@jest/types": "^27.5.1", + "expect": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/@jest/reporters": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.6.tgz", - "integrity": "sha512-+Zo9gV81R14+PSq4wzee4GC2mhAN9i9a7qgJWL90Gpx7fHYkWpTBvwWNZUXvJByYR9tAVBdc8VxDWqfJyIUrIQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", + "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.2", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-instrument": "^5.1.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-haste-map": "^27.4.6", - "jest-resolve": "^27.4.6", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.6", + "jest-haste-map": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", "slash": "^3.0.0", "source-map": "^0.6.0", "string-length": "^4.0.1", @@ -937,13 +983,13 @@ } }, "node_modules/@jest/source-map": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.4.0.tgz", - "integrity": "sha512-Ntjx9jzP26Bvhbm93z/AKcPRj/9wrkI88/gK60glXDx1q+IeI0rf7Lw2c89Ch6ofonB0On/iRDreQuQ6te9pgQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", + "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", "dev": true, "dependencies": { "callsites": "^3.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "source-map": "^0.6.0" }, "engines": { @@ -951,13 +997,13 @@ } }, "node_modules/@jest/test-result": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.4.6.tgz", - "integrity": "sha512-fi9IGj3fkOrlMmhQqa/t9xum8jaJOOAi/lZlm6JXSc55rJMXKHxNDN1oCP39B0/DhNOa2OMupF9BcKZnNtXMOQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", + "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", "dev": true, "dependencies": { - "@jest/console": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^27.5.1", + "@jest/types": "^27.5.1", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -966,36 +1012,36 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.6.tgz", - "integrity": "sha512-3GL+nsf6E1PsyNsJuvPyIz+DwFuCtBdtvPpm/LMXVkBJbdFvQYCDpccYT56qq5BGniXWlE81n2qk1sdXfZebnw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", + "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", "dev": true, "dependencies": { - "@jest/test-result": "^27.4.6", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", - "jest-runtime": "^27.4.6" + "@jest/test-result": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-runtime": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/@jest/transform": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.6.tgz", - "integrity": "sha512-9MsufmJC8t5JTpWEQJ0OcOOAXaH5ioaIX6uHVBLBMoCZPfKKQF+EqP8kACAvCZ0Y1h2Zr3uOccg8re+Dr5jxyw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", + "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", "dev": true, "dependencies": { "@babel/core": "^7.1.0", - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-util": "^27.4.2", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-util": "^27.5.1", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", @@ -1007,9 +1053,9 @@ } }, "node_modules/@jest/types": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.4.2.tgz", - "integrity": "sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, "dependencies": { "@types/istanbul-lib-coverage": "^2.0.0", @@ -1022,10 +1068,36 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", + "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", + "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz", + "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -1036,16 +1108,18 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -1055,33 +1129,49 @@ } }, "node_modules/@npmcli/fs": { - "version": "1.0.0", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", + "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", "dev": true, - "license": "ISC", "dependencies": { "@gar/promisify": "^1.0.1", "semver": "^7.3.5" } }, "node_modules/@npmcli/git": { - "version": "2.1.0", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.0.tgz", + "integrity": "sha512-xfSBJ+KBMZWWqRHFbEgIaXG/LtELHrQZMJ72Gkb3yWdHysu/7+VGOs8ME0c3td7QNQX57Ggo3kYL6ylcd70/kA==", "dev": true, - "license": "ISC", "dependencies": { "@npmcli/promise-spawn": "^1.3.2", - "lru-cache": "^6.0.0", + "lru-cache": "^7.3.1", "mkdirp": "^1.0.4", - "npm-pick-manifest": "^6.1.1", + "npm-pick-manifest": "^7.0.0", + "proc-log": "^2.0.0", "promise-inflight": "^1.0.1", "promise-retry": "^2.0.1", "semver": "^7.3.5", "which": "^2.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" + } + }, + "node_modules/@npmcli/git/node_modules/lru-cache": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.3.1.tgz", + "integrity": "sha512-nX1x4qUrKqwbIAhv4s9et4FIUVzNOpeY07bsjGUy8gwJrXH/wScImSQqXErmo/b2jZY2r0mohbLA9zVj7u1cNw==", + "dev": true, + "engines": { + "node": ">=12" } }, "node_modules/@npmcli/installed-package-contents": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", + "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", "dev": true, - "license": "ISC", "dependencies": { "npm-bundled": "^1.1.1", "npm-normalize-package-bin": "^1.0.1" @@ -1095,8 +1185,9 @@ }, "node_modules/@npmcli/move-file": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", "dev": true, - "license": "MIT", "dependencies": { "mkdirp": "^1.0.4", "rimraf": "^3.0.2" @@ -1107,21 +1198,24 @@ }, "node_modules/@npmcli/node-gyp": { "version": "1.0.3", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", + "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", + "dev": true }, "node_modules/@npmcli/promise-spawn": { "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", + "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", "dev": true, - "license": "ISC", "dependencies": { "infer-owner": "^1.0.4" } }, "node_modules/@npmcli/run-script": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-2.0.0.tgz", + "integrity": "sha512-fSan/Pu11xS/TdaTpTB0MRn9guwGU8dye+x56mEVgBEd/QsybBbYcAL0phPXi8SGWFEChkQd6M9qL4y6VOpFig==", "dev": true, - "license": "ISC", "dependencies": { "@npmcli/node-gyp": "^1.0.2", "@npmcli/promise-spawn": "^1.3.2", @@ -1131,8 +1225,9 @@ }, "node_modules/@rollup/plugin-commonjs": { "version": "21.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.1.tgz", + "integrity": "sha512-EA+g22lbNJ8p5kuZJUYyhhDK7WgJckW5g4pNN7n4mAFUM96VuwUnNT3xr2Db2iCZPI1pJPbGyfT5mS9T1dHfMg==", "dev": true, - "license": "MIT", "dependencies": { "@rollup/pluginutils": "^3.1.0", "commondir": "^1.0.1", @@ -1170,9 +1265,9 @@ } }, "node_modules/@rollup/plugin-replace": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-3.0.1.tgz", - "integrity": "sha512-989J5oRzf3mm0pO/0djTijdfEh9U3n63BIXN5X7T4U9BP+fN4oxQ6DvDuBvFaHA6scaHQRclqmKQEkBhB7k7Hg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-3.1.0.tgz", + "integrity": "sha512-pA3XRUrSKybVYqmH5TqWNZpGxF+VV+1GrYchKgCNIj2vsSOX7CVm2RCtx8p2nrC7xvkziYyK+lSi74T93MU3YA==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1202,8 +1297,9 @@ }, "node_modules/@rollup/pluginutils": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", "dev": true, - "license": "MIT", "dependencies": { "@types/estree": "0.0.39", "estree-walker": "^1.0.1", @@ -1218,13 +1314,15 @@ }, "node_modules/@rollup/pluginutils/node_modules/estree-walker": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true }, "node_modules/@sindresorhus/is": { "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -1261,8 +1359,9 @@ }, "node_modules/@szmarczak/http-timer": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", "dev": true, - "license": "MIT", "dependencies": { "defer-to-connect": "^1.0.1" }, @@ -1272,8 +1371,9 @@ }, "node_modules/@tootallnate/once": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6" } @@ -1312,16 +1412,18 @@ }, "node_modules/@types/babel__traverse": { "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.14.2.tgz", + "integrity": "sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/types": "^7.3.0" } }, "node_modules/@types/estree": { "version": "0.0.39", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true }, "node_modules/@types/graceful-fs": { "version": "4.1.5", @@ -1333,22 +1435,25 @@ } }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.3", - "dev": true, - "license": "MIT" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true }, "node_modules/@types/istanbul-lib-report": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", "dev": true, - "license": "MIT", "dependencies": { "@types/istanbul-lib-coverage": "*" } }, "node_modules/@types/istanbul-reports": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", "dev": true, - "license": "MIT", "dependencies": { "@types/istanbul-lib-report": "*" } @@ -1365,24 +1470,27 @@ }, "node_modules/@types/json-schema": { "version": "7.0.9", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true }, "node_modules/@types/node": { - "version": "16.11.6", - "dev": true, - "license": "MIT" + "version": "17.0.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.18.tgz", + "integrity": "sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA==", + "dev": true }, "node_modules/@types/prettier": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.3.tgz", - "integrity": "sha512-QzSuZMBuG5u8HqYz01qtMdg/Jfctlnvj1z/lYnIDXs/golxw0fxtRAHd9KrzjR7Yxz1qVeI00o0kiO3PmVdJ9w==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.4.tgz", + "integrity": "sha512-ReVR2rLTV1kvtlWFyuot+d1pkpG2Fw/XKE3PDAdj57rbM97ttSp9JZ2UsP+2EHTylra9cUf6JA7tGwW1INzUrA==", "dev": true }, "node_modules/@types/resolve": { "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } @@ -1395,25 +1503,33 @@ }, "node_modules/@types/yargs": { "version": "16.0.4", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", + "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", "dev": true, - "license": "MIT", "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { "version": "20.2.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", + "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", + "dev": true }, - "node_modules/@typescript-eslint/type-utils": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.10.2.tgz", - "integrity": "sha512-uRKSvw/Ccs5FYEoXW04Z5VfzF2iiZcx8Fu7DGIB7RHozuP0VbKNzP1KfZkHBTM75pCpsWxIthEH1B33dmGBKHw==", + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.0.tgz", + "integrity": "sha512-fwCMkDimwHVeIOKeBHiZhRUfJXU8n6xW1FL9diDxAyGAFvKcH4csy0v7twivOQdQdA0KC8TDr7GGRd3L4Lv0rQ==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.10.2", + "@typescript-eslint/scope-manager": "5.12.0", + "@typescript-eslint/type-utils": "5.12.0", + "@typescript-eslint/utils": "5.12.0", "debug": "^4.3.2", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.2.0", + "semver": "^7.3.5", "tsutils": "^3.21.0" }, "engines": { @@ -1424,7 +1540,8 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1432,18 +1549,16 @@ } } }, - "node_modules/@typescript-eslint/utils": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.10.2.tgz", - "integrity": "sha512-vuJaBeig1NnBRkf7q9tgMLREiYD7zsMrsN1DA3wcoMDvr3BTFiIpKjGiYZoKPllfEwN7spUjv7ZqD+JhbVjEPg==", + "node_modules/@typescript-eslint/parser": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.12.0.tgz", + "integrity": "sha512-MfSwg9JMBojMUoGjUmX+D2stoQj1CBYTCP0qnnVtu9A+YQXVKNtLjasYh+jozOcrb/wau8TCfWOkQTiOAruBog==", "dev": true, "dependencies": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.10.2", - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/typescript-estree": "5.10.2", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "@typescript-eslint/scope-manager": "5.12.0", + "@typescript-eslint/types": "5.12.0", + "@typescript-eslint/typescript-estree": "5.12.0", + "debug": "^4.3.2" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1454,16 +1569,39 @@ }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.0.tgz", + "integrity": "sha512-GAMobtIJI8FGf1sLlUWNUm2IOkIjvn7laFWyRx7CLrv6nLBI7su+B7lbStqVlK5NdLvHRFiJo2HhiDF7Ki01WQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.12.0", + "@typescript-eslint/visitor-keys": "5.12.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.2.tgz", - "integrity": "sha512-39Tm6f4RoZoVUWBYr3ekS75TYgpr5Y+X0xLZxXqcZNDWZdJdYbKd3q2IR4V9y5NxxiPu/jxJ8XP7EgHiEQtFnw==", + "node_modules/@typescript-eslint/type-utils": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.12.0.tgz", + "integrity": "sha512-9j9rli3zEBV+ae7rlbBOotJcI6zfc6SHFMdKI9M3Nc0sy458LJ79Os+TPWeBBL96J9/e36rdJOfCuyRSgFAA0Q==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/visitor-keys": "5.10.2" + "@typescript-eslint/utils": "5.12.0", + "debug": "^4.3.2", + "tsutils": "^3.21.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1471,12 +1609,20 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.2.tgz", - "integrity": "sha512-Qfp0qk/5j2Rz3p3/WhWgu4S1JtMcPgFLnmAKAW061uXxKSa7VWKZsDXVaMXh2N60CX9h6YLaBoy9PJAfCOjk3w==", + "node_modules/@typescript-eslint/types": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.0.tgz", + "integrity": "sha512-JowqbwPf93nvf8fZn5XrPGFBdIK8+yx5UEGs2QFAYFI8IWYfrzz+6zqlurGr2ctShMaJxqwsqmra3WXWjH1nRQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1486,14 +1632,14 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.2.tgz", - "integrity": "sha512-WHHw6a9vvZls6JkTgGljwCsMkv8wu8XU8WaYKeYhxhWXH/atZeiMW6uDFPLZOvzNOGmuSMvHtZKd6AuC8PrwKQ==", + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.0.tgz", + "integrity": "sha512-Dd9gVeOqt38QHR0BEA8oRaT65WYqPYbIc5tRFQPkfLquVEFPD1HAtbZT98TLBkEcCkvwDYOAvuSvAD9DnQhMfQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/visitor-keys": "5.10.2", + "@typescript-eslint/types": "5.12.0", + "@typescript-eslint/visitor-keys": "5.12.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1513,14 +1659,18 @@ } } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.2.tgz", - "integrity": "sha512-zHIhYGGGrFJvvyfwHk5M08C5B5K4bewkm+rrvNTKk1/S15YHR+SA/QUF8ZWscXSfEaB8Nn2puZj+iHcoxVOD/Q==", + "node_modules/@typescript-eslint/utils": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.12.0.tgz", + "integrity": "sha512-k4J2WovnMPGI4PzKgDtQdNrCnmBHpMUFy21qjX2CoPdoBcSBIMvVBr9P2YDP8jOqZOeK3ThOL6VO/sy6jtnvzw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.10.2", - "eslint-visitor-keys": "^3.0.0" + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.12.0", + "@typescript-eslint/types": "5.12.0", + "@typescript-eslint/typescript-estree": "5.12.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1528,21 +1678,33 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.0.tgz", + "integrity": "sha512-cFwTlgnMV6TgezQynx2c/4/tx9Tufbuo9LPzmWqyRC3QC4qTGkAG1C6pBr0/4I10PAI/FlYunI3vJjIcu+ZHMg==", "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.12.0", + "eslint-visitor-keys": "^3.0.0" + }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@zeit/schemas": { "version": "2.6.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.6.0.tgz", + "integrity": "sha512-uUrgZ8AxS+Lio0fZKAipJjAh415JyrOZowliZAzmnJSsf7piVL5w+G0+gFJ0KSu3QRhvui/7zuvpLz03YjXAhg==", + "dev": true }, "node_modules/abab": { "version": "2.0.5", @@ -1552,25 +1714,28 @@ }, "node_modules/abbrev": { "version": "1.1.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true }, "node_modules/accepts": { - "version": "1.3.7", + "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==", "dev": true, - "license": "MIT", "dependencies": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" }, "engines": { "node": ">= 0.6" } }, "node_modules/acorn": { - "version": "7.4.1", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "dev": true, - "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -1588,6 +1753,18 @@ "acorn-walk": "^7.1.1" } }, + "node_modules/acorn-globals/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -1608,8 +1785,9 @@ }, "node_modules/agent-base": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, - "license": "MIT", "dependencies": { "debug": "4" }, @@ -1618,9 +1796,10 @@ } }, "node_modules/agentkeepalive": { - "version": "4.1.4", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.0.tgz", + "integrity": "sha512-0PhAp58jZNw13UJv7NVdTGb0ZcghHUb3DrZ046JiiJY/BOaTTpbwdHq2VObPCBV8M2GPh7sgrJ3AQ8Ey468LJw==", "dev": true, - "license": "MIT", "dependencies": { "debug": "^4.1.0", "depd": "^1.1.2", @@ -1632,8 +1811,9 @@ }, "node_modules/aggregate-error": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, - "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -1644,8 +1824,9 @@ }, "node_modules/ajv": { "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1659,8 +1840,9 @@ }, "node_modules/ansi-align": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.1.0" } @@ -1694,16 +1876,18 @@ }, "node_modules/ansi-regex": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -1729,11 +1913,14 @@ }, "node_modules/aproba": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true }, "node_modules/arch": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", "dev": true, "funding": [ { @@ -1748,35 +1935,38 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/are-we-there-yet": { - "version": "2.0.0", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.0.tgz", + "integrity": "sha512-0GWpv50YSOcLXaN6/FAKY3vfRbllXWV2xvfA/oKJF8pzFhWXPV+yjhJXDBbjscDYowv7Yw1A3uigpzn5iEGTyw==", "dev": true, - "license": "ISC", "dependencies": { "delegates": "^1.0.0", "readable-stream": "^3.6.0" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16" } }, "node_modules/arg": { "version": "2.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/arg/-/arg-2.0.0.tgz", + "integrity": "sha512-XxNTUzKnz1ctK3ZIcI2XUPlD96wbHP2nGqkPKpvk/HNRlPveYrXIVSTk9m3LcqOgDPg3B1nMvdV/K8wZd7PG4w==", + "dev": true }, "node_modules/argparse": { "version": "2.0.1", - "dev": true, - "license": "Python-2.0" + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/array-union": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -1788,18 +1978,18 @@ "dev": true }, "node_modules/babel-jest": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.6.tgz", - "integrity": "sha512-qZL0JT0HS1L+lOuH+xC2DVASR3nunZi/ozGhpgauJHgmI7f8rudxf6hUjEHympdQ/J64CdKmPkgfJ+A3U6QCrg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", + "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==", "dev": true, "dependencies": { - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^27.4.0", + "babel-preset-jest": "^27.5.1", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "slash": "^3.0.0" }, "engines": { @@ -1811,8 +2001,9 @@ }, "node_modules/babel-plugin-istanbul": { "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", @@ -1825,9 +2016,9 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.4.0.tgz", - "integrity": "sha512-Jcu7qS4OX5kTWBc45Hz7BMmgXuJqRnhatqpUhnzGC3OBYpOmf2tv6jFNwZpwM7wU7MUuv2r9IPS/ZlYOuburVw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz", + "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==", "dev": true, "dependencies": { "@babel/template": "^7.3.3", @@ -1841,8 +2032,9 @@ }, "node_modules/babel-preset-current-node-syntax": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", @@ -1862,12 +2054,12 @@ } }, "node_modules/babel-preset-jest": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.4.0.tgz", - "integrity": "sha512-NK4jGYpnBvNxcGo7/ZpZJr51jCGT+3bwwpVIDY2oNfTxJJldRtB4VAcYdgp1loDE50ODuTu+yBjpMAswv5tlpg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", + "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^27.4.0", + "babel-plugin-jest-hoist": "^27.5.1", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { @@ -1879,13 +2071,15 @@ }, "node_modules/balanced-match": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/boxen": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-align": "^3.0.0", "camelcase": "^6.2.0", @@ -1904,18 +2098,19 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" } }, "node_modules/braces": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, - "license": "MIT", "dependencies": { "fill-range": "^7.0.1" }, @@ -1930,14 +2125,15 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.17.5", + "version": "4.19.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.3.tgz", + "integrity": "sha512-XK3X4xtKJ+Txj8G5c30B4gsm71s69lqXlkYui4s6EkKxuv49qjYlY6oVd+IFJ73d4YymtM3+djvvt/R/iJwwDg==", "dev": true, - "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001271", - "electron-to-chromium": "^1.3.878", + "caniuse-lite": "^1.0.30001312", + "electron-to-chromium": "^1.4.71", "escalade": "^3.1.1", - "node-releases": "^2.0.1", + "node-releases": "^2.0.2", "picocolors": "^1.0.0" }, "bin": { @@ -1953,8 +2149,9 @@ }, "node_modules/bs-logger": { "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", "dev": true, - "license": "MIT", "dependencies": { "fast-json-stable-stringify": "2.x" }, @@ -1973,13 +2170,15 @@ }, "node_modules/buffer-from": { "version": "1.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true }, "node_modules/builtin-modules": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", + "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" }, @@ -1989,21 +2188,24 @@ }, "node_modules/builtins": { "version": "1.0.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", + "dev": true }, "node_modules/bytes": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/cacache": { "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", "dev": true, - "license": "ISC", "dependencies": { "@npmcli/fs": "^1.0.0", "@npmcli/move-file": "^1.0.1", @@ -2030,8 +2232,9 @@ }, "node_modules/cacheable-request": { "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", "dev": true, - "license": "MIT", "dependencies": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", @@ -2047,8 +2250,9 @@ }, "node_modules/cacheable-request/node_modules/get-stream": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, - "license": "MIT", "dependencies": { "pump": "^3.0.0" }, @@ -2061,24 +2265,27 @@ }, "node_modules/cacheable-request/node_modules/lowercase-keys": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/callsites": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/camelcase": { - "version": "6.2.1", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -2087,9 +2294,10 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001272", + "version": "1.0.30001312", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz", + "integrity": "sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ==", "dev": true, - "license": "CC-BY-4.0", "funding": { "type": "opencollective", "url": "https://opencollective.com/browserslist" @@ -2097,8 +2305,9 @@ }, "node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2121,21 +2330,24 @@ }, "node_modules/chownr": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/ci-info": { "version": "2.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true }, "node_modules/cint": { "version": "8.2.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/cint/-/cint-8.2.1.tgz", + "integrity": "sha1-cDhrG0jidz0NYxZqVa/5TvRFahI=", + "dev": true }, "node_modules/cjs-module-lexer": { "version": "1.2.2", @@ -2145,16 +2357,18 @@ }, "node_modules/clean-stack": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/cli-boxes": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" }, @@ -2164,6 +2378,8 @@ }, "node_modules/cli-table": { "version": "0.3.11", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.11.tgz", + "integrity": "sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ==", "dev": true, "dependencies": { "colors": "1.0.3" @@ -2174,8 +2390,9 @@ }, "node_modules/clipboardy": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-2.3.0.tgz", + "integrity": "sha512-mKhiIL2DrQIsuXMgBgnfEHOZOryC7kY7YO//TN6c63wlEm3NG5tz+YgY5rVi29KCmq/QQjKYvM7a19+MDOTHOQ==", "dev": true, - "license": "MIT", "dependencies": { "arch": "^2.1.1", "execa": "^1.0.0", @@ -2198,8 +2415,9 @@ }, "node_modules/clone-response": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, - "license": "MIT", "dependencies": { "mimic-response": "^1.0.0" } @@ -2222,8 +2440,9 @@ }, "node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2233,21 +2452,24 @@ }, "node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/color-support": { "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "dev": true, - "license": "ISC", "bin": { "color-support": "bin.js" } }, "node_modules/colors": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.1.90" } @@ -2265,22 +2487,25 @@ } }, "node_modules/commander": { - "version": "8.3.0", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", + "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", "dev": true, - "license": "MIT", "engines": { - "node": ">= 12" + "node": "^12.20.0 || >=14" } }, "node_modules/commondir": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true }, "node_modules/compressible": { "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, - "license": "MIT", "dependencies": { "mime-db": ">= 1.43.0 < 2" }, @@ -2290,8 +2515,9 @@ }, "node_modules/compression": { "version": "1.7.3", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz", + "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==", "dev": true, - "license": "MIT", "dependencies": { "accepts": "~1.3.5", "bytes": "3.0.0", @@ -2307,26 +2533,30 @@ }, "node_modules/compression/node_modules/debug": { "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, - "license": "MIT", "dependencies": { "ms": "2.0.0" } }, "node_modules/compression/node_modules/ms": { "version": "2.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true }, "node_modules/concat-map": { "version": "0.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "node_modules/configstore": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "dot-prop": "^5.2.0", "graceful-fs": "^4.1.2", @@ -2341,29 +2571,33 @@ }, "node_modules/console-control-strings": { "version": "1.1.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true }, "node_modules/content-disposition": { "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/convert-source-map": { "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", "dev": true, - "license": "MIT", "dependencies": { "safe-buffer": "~5.1.1" } }, "node_modules/cross-spawn": { "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, - "license": "MIT", "dependencies": { "nice-try": "^1.0.4", "path-key": "^2.0.1", @@ -2377,16 +2611,18 @@ }, "node_modules/cross-spawn/node_modules/semver": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver" } }, "node_modules/cross-spawn/node_modules/which": { "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -2396,8 +2632,9 @@ }, "node_modules/crypto-random-string": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -2441,9 +2678,10 @@ } }, "node_modules/debug": { - "version": "4.3.2", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, - "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -2464,8 +2702,9 @@ }, "node_modules/decompress-response": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, - "license": "MIT", "dependencies": { "mimic-response": "^1.0.0" }, @@ -2481,29 +2720,33 @@ }, "node_modules/deep-extend": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4.0.0" } }, "node_modules/deep-is": { "version": "0.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true }, "node_modules/deepmerge": { "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/defer-to-connect": { "version": "1.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true }, "node_modules/delayed-stream": { "version": "1.0.0", @@ -2516,13 +2759,15 @@ }, "node_modules/delegates": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true }, "node_modules/depd": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -2537,9 +2782,9 @@ } }, "node_modules/diff-sequences": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.4.0.tgz", - "integrity": "sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", + "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==", "dev": true, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" @@ -2547,8 +2792,9 @@ }, "node_modules/dir-glob": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, - "license": "MIT", "dependencies": { "path-type": "^4.0.0" }, @@ -2558,8 +2804,9 @@ }, "node_modules/doctrine": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, - "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -2590,8 +2837,9 @@ }, "node_modules/dot-prop": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", "dev": true, - "license": "MIT", "dependencies": { "is-obj": "^2.0.0" }, @@ -2601,13 +2849,15 @@ }, "node_modules/duplexer3": { "version": "0.1.4", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.3.882", - "dev": true, - "license": "ISC" + "version": "1.4.71", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.71.tgz", + "integrity": "sha512-Hk61vXXKRb2cd3znPE9F+2pLWdIOmP7GjiTj45y6L3W/lO+hSnUSUhq+6lEaERWBdZOHbk2s3YV5c9xVl3boVw==", + "dev": true }, "node_modules/emittery": { "version": "0.8.1", @@ -2623,13 +2873,15 @@ }, "node_modules/emoji-regex": { "version": "8.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/encoding": { "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", "dev": true, - "license": "MIT", "optional": true, "dependencies": { "iconv-lite": "^0.6.2" @@ -2637,45 +2889,60 @@ }, "node_modules/end-of-stream": { "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, - "license": "MIT", "dependencies": { "once": "^1.4.0" } }, "node_modules/env-paths": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/err-code": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, - "license": "MIT" + "dependencies": { + "is-arrayish": "^0.2.1" + } }, "node_modules/escalade": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/escape-goat": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/escape-string-regexp": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.0" } @@ -2815,9 +3082,10 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.3.0", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.4.0.tgz", + "integrity": "sha512-CFotdUcMY18nGRo5KGsnNxpznzhkopOcOo0InID+sgQssPrzjvsyKZPvOgymTFeHrFuC3Tzdf2YndhXtULK9Iw==", "dev": true, - "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -2827,8 +3095,9 @@ }, "node_modules/eslint-plugin-prettier": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz", + "integrity": "sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==", "dev": true, - "license": "MIT", "dependencies": { "prettier-linter-helpers": "^1.0.0" }, @@ -2847,8 +3116,9 @@ }, "node_modules/eslint-scope": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -2859,8 +3129,9 @@ }, "node_modules/eslint-utils": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, - "license": "MIT", "dependencies": { "eslint-visitor-keys": "^2.0.0" }, @@ -2874,18 +3145,39 @@ "eslint": ">=5" } }, - "node_modules/eslint-visitor-keys": { + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=10" } }, + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/eslint/node_modules/cross-spawn": { "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -2897,8 +3189,9 @@ }, "node_modules/eslint/node_modules/escape-string-regexp": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -2919,15 +3212,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "node_modules/eslint/node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", @@ -2949,27 +3233,32 @@ "node": ">=10.13.0" } }, - "node_modules/eslint/node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">= 4" + "node": "*" } }, "node_modules/eslint/node_modules/path-key": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/eslint/node_modules/shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -2979,16 +3268,18 @@ }, "node_modules/eslint/node_modules/shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/eslint/node_modules/strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -3010,31 +3301,11 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/espree/node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "node_modules/esprima": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, - "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -3045,8 +3316,9 @@ }, "node_modules/esquery": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -3056,16 +3328,18 @@ }, "node_modules/esquery/node_modules/estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/esrecurse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -3075,37 +3349,42 @@ }, "node_modules/esrecurse/node_modules/estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/estraverse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/estree-walker": { "version": "2.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true }, "node_modules/esutils": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/execa": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "dev": true, - "license": "MIT", "dependencies": { "cross-spawn": "^6.0.0", "get-stream": "^4.0.0", @@ -3129,15 +3408,15 @@ } }, "node_modules/expect": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.4.6.tgz", - "integrity": "sha512-1M/0kAALIaj5LaG66sFJTbRsWTADnylly82cu4bspI0nl+pgP4E6Bh/aqdHlTUjul06K7xQnnrAoqfxVU0+/ag==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", + "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", - "jest-get-type": "^27.4.0", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6" + "@jest/types": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" @@ -3145,18 +3424,21 @@ }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "node_modules/fast-diff": { "version": "1.2.0", - "dev": true, - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true }, "node_modules/fast-glob": { - "version": "3.2.7", + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -3165,36 +3447,41 @@ "micromatch": "^4.0.4" }, "engines": { - "node": ">=8" + "node": ">=8.6.0" } }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true }, "node_modules/fast-memoize": { "version": "2.5.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz", + "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==", + "dev": true }, "node_modules/fast-url-parser": { "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0=", "dev": true, - "license": "MIT", "dependencies": { "punycode": "^1.3.2" } }, "node_modules/fastq": { "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, - "license": "ISC", "dependencies": { "reusify": "^1.0.4" } @@ -3210,17 +3497,20 @@ }, "node_modules/fflate": { "version": "0.7.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.3.tgz", + "integrity": "sha512-0Zz1jOzJWERhyhsimS54VTqOteCNwRtIlh8isdL0AXLo0g7xNTfTL7oWrkmCnPhZGocKIkWHBistBrrpoNH3aw==" }, "node_modules/figgy-pudding": { "version": "3.5.2", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", + "dev": true }, "node_modules/file-entry-cache": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, - "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -3230,8 +3520,9 @@ }, "node_modules/fill-range": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -3241,8 +3532,9 @@ }, "node_modules/find-up": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -3256,8 +3548,9 @@ }, "node_modules/flat-cache": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, - "license": "MIT", "dependencies": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -3267,9 +3560,10 @@ } }, "node_modules/flatted": { - "version": "3.2.2", - "dev": true, - "license": "ISC" + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", + "dev": true }, "node_modules/form-data": { "version": "3.0.1", @@ -3287,16 +3581,18 @@ }, "node_modules/fp-and-or": { "version": "0.1.3", + "resolved": "https://registry.npmjs.org/fp-and-or/-/fp-and-or-0.1.3.tgz", + "integrity": "sha512-wJaE62fLaB3jCYvY2ZHjZvmKK2iiLiiehX38rz5QZxtdN8fVPJDeZUiVvJrHStdTc+23LHlyZuSEKgFc0pxi2g==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/fs-minipass": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -3306,13 +3602,16 @@ }, "node_modules/fs.realpath": { "version": "1.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "node_modules/fsevents": { "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, - "license": "MIT", + "hasInstallScript": true, "optional": true, "os": [ "darwin" @@ -3323,18 +3622,21 @@ }, "node_modules/function-bind": { "version": "1.1.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true }, "node_modules/functional-red-black-tree": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true }, "node_modules/gauge": { - "version": "4.0.0", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.1.tgz", + "integrity": "sha512-zJ4jePUHR8cceduZ53b6temRalyGpkC2Kc2r3ecNphmL+uWNoJ3YcOcUjpbG6WwoE/Ef6/+aEZz63neI2WIa1Q==", "dev": true, - "license": "ISC", "dependencies": { "ansi-regex": "^5.0.1", "aproba": "^1.0.3 || ^2.0.0", @@ -3352,8 +3654,9 @@ }, "node_modules/gensync": { "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -3369,16 +3672,18 @@ }, "node_modules/get-package-type": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.0.0" } }, "node_modules/get-stdin": { "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -3388,8 +3693,9 @@ }, "node_modules/get-stream": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "dev": true, - "license": "MIT", "dependencies": { "pump": "^3.0.0" }, @@ -3399,8 +3705,9 @@ }, "node_modules/glob": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3418,8 +3725,9 @@ }, "node_modules/glob-parent": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -3427,10 +3735,33 @@ "node": ">= 6" } }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/global-dirs": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", "dev": true, - "license": "MIT", "dependencies": { "ini": "2.0.0" }, @@ -3443,16 +3774,18 @@ }, "node_modules/global-dirs/node_modules/ini": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/globals": { - "version": "13.12.0", + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -3464,15 +3797,16 @@ } }, "node_modules/globby": { - "version": "11.0.4", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, - "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" }, "engines": { @@ -3484,8 +3818,9 @@ }, "node_modules/got": { "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", "dev": true, - "license": "MIT", "dependencies": { "@sindresorhus/is": "^0.14.0", "@szmarczak/http-timer": "^1.1.2", @@ -3504,14 +3839,16 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.8", - "dev": true, - "license": "ISC" + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", + "dev": true }, "node_modules/has": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, - "license": "MIT", "dependencies": { "function-bind": "^1.1.1" }, @@ -3521,21 +3858,24 @@ }, "node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/has-unicode": { "version": "2.0.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true }, "node_modules/has-yarn": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -3572,13 +3912,15 @@ }, "node_modules/http-cache-semantics": { "version": "4.1.0", - "dev": true, - "license": "BSD-2-Clause" + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true }, "node_modules/http-proxy-agent": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, - "license": "MIT", "dependencies": { "@tootallnate/once": "1", "agent-base": "6", @@ -3590,8 +3932,9 @@ }, "node_modules/https-proxy-agent": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", "dev": true, - "license": "MIT", "dependencies": { "agent-base": "6", "debug": "4" @@ -3611,16 +3954,18 @@ }, "node_modules/humanize-ms": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", "dev": true, - "license": "MIT", "dependencies": { "ms": "^2.0.0" } }, "node_modules/iconv-lite": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, - "license": "MIT", "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -3630,17 +3975,19 @@ } }, "node_modules/ignore": { - "version": "5.1.8", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/ignore-walk": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-4.0.1.tgz", + "integrity": "sha512-rzDQLaW4jQbh2YrOFlJdCtX8qgJTehFRYiUB2r1osqTeDzV/3+Jh8fz1oAPzUThf3iku8Ds4IDqawI5d8mUiQw==", "dev": true, - "license": "ISC", "dependencies": { "minimatch": "^3.0.4" }, @@ -3648,10 +3995,33 @@ "node": ">=10" } }, + "node_modules/ignore-walk/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/ignore-walk/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/import-fresh": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, - "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -3665,8 +4035,9 @@ }, "node_modules/import-lazy": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -3692,29 +4063,33 @@ }, "node_modules/imurmurhash": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.19" } }, "node_modules/indent-string": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/infer-owner": { "version": "1.0.4", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true }, "node_modules/inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, - "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -3722,23 +4097,33 @@ }, "node_modules/inherits": { "version": "2.0.4", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/ini": { "version": "1.3.8", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true }, "node_modules/ip": { "version": "1.1.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true }, "node_modules/is-ci": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, - "license": "MIT", "dependencies": { "ci-info": "^2.0.0" }, @@ -3747,9 +4132,10 @@ } }, "node_modules/is-core-module": { - "version": "2.8.0", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", "dev": true, - "license": "MIT", "dependencies": { "has": "^1.0.3" }, @@ -3759,8 +4145,9 @@ }, "node_modules/is-docker": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true, - "license": "MIT", "bin": { "is-docker": "cli.js" }, @@ -3773,16 +4160,18 @@ }, "node_modules/is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -3798,8 +4187,9 @@ }, "node_modules/is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -3809,8 +4199,9 @@ }, "node_modules/is-installed-globally": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", "dev": true, - "license": "MIT", "dependencies": { "global-dirs": "^3.0.0", "is-path-inside": "^3.0.2" @@ -3824,18 +4215,21 @@ }, "node_modules/is-lambda": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU=", + "dev": true }, "node_modules/is-module": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true }, "node_modules/is-npm": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -3845,24 +4239,27 @@ }, "node_modules/is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/is-obj": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-path-inside": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -3875,29 +4272,33 @@ }, "node_modules/is-reference": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/estree": "*" } }, "node_modules/is-stream": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-typedarray": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true }, "node_modules/is-wsl": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, - "license": "MIT", "dependencies": { "is-docker": "^2.0.0" }, @@ -3907,18 +4308,21 @@ }, "node_modules/is-yarn-global": { "version": "0.3.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true }, "node_modules/isexe": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=8" } @@ -3977,9 +4381,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.3.tgz", - "integrity": "sha512-x9LtDVtfm/t1GFiLl3NffC7hz+I1ragvgX1P/Lg1NlIagifZDKUkuuaAxH/qpwj2IuEfD8G2Bs/UKp+sZ/pKkg==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", + "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -3990,14 +4394,14 @@ } }, "node_modules/jest": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.7.tgz", - "integrity": "sha512-8heYvsx7nV/m8m24Vk26Y87g73Ba6ueUd0MWed/NXMhSZIm62U/llVbS0PJe1SHunbyXjJ/BqG1z9bFjGUIvTg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", + "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==", "dev": true, "dependencies": { - "@jest/core": "^27.4.7", + "@jest/core": "^27.5.1", "import-local": "^3.0.2", - "jest-cli": "^27.4.7" + "jest-cli": "^27.5.1" }, "bin": { "jest": "bin/jest.js" @@ -4015,12 +4419,12 @@ } }, "node_modules/jest-changed-files": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.4.2.tgz", - "integrity": "sha512-/9x8MjekuzUQoPjDHbBiXbNEBauhrPU2ct7m8TfCg69ywt1y/N+yYwGh3gCpnqUS3klYWDU/lSNgv+JhoD2k1A==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz", + "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "execa": "^5.0.0", "throat": "^6.0.1" }, @@ -4132,27 +4536,27 @@ } }, "node_modules/jest-circus": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.6.tgz", - "integrity": "sha512-UA7AI5HZrW4wRM72Ro80uRR2Fg+7nR0GESbSI/2M+ambbzVuA63mn5T1p3Z/wlhntzGpIG1xx78GP2YIkf6PhQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz", + "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/environment": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^27.4.6", + "expect": "^27.5.1", "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.6", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.6", + "jest-each": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1", "slash": "^3.0.0", "stack-utils": "^2.0.3", "throat": "^6.0.1" @@ -4162,21 +4566,21 @@ } }, "node_modules/jest-cli": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.7.tgz", - "integrity": "sha512-zREYhvjjqe1KsGV15mdnxjThKNDgza1fhDT+iUsXWLCq3sxe9w5xnvyctcYVT5PcdLSjv7Y5dCwTS3FCF1tiuw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz", + "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==", "dev": true, "dependencies": { - "@jest/core": "^27.4.7", - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/core": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", "chalk": "^4.0.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^27.4.7", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", + "jest-config": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", "prompts": "^2.0.1", "yargs": "^16.2.0" }, @@ -4196,33 +4600,35 @@ } }, "node_modules/jest-config": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.7.tgz", - "integrity": "sha512-xz/o/KJJEedHMrIY9v2ParIoYSrSVY6IVeE4z5Z3i101GoA5XgfbJz+1C8EYPsv7u7f39dS8F9v46BHDhn0vlw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz", + "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==", "dev": true, "dependencies": { "@babel/core": "^7.8.0", - "@jest/test-sequencer": "^27.4.6", - "@jest/types": "^27.4.2", - "babel-jest": "^27.4.6", + "@jest/test-sequencer": "^27.5.1", + "@jest/types": "^27.5.1", + "babel-jest": "^27.5.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", - "graceful-fs": "^4.2.4", - "jest-circus": "^27.4.6", - "jest-environment-jsdom": "^27.4.6", - "jest-environment-node": "^27.4.6", - "jest-get-type": "^27.4.0", - "jest-jasmine2": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.6", - "jest-runner": "^27.4.6", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-circus": "^27.5.1", + "jest-environment-jsdom": "^27.5.1", + "jest-environment-node": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-jasmine2": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", "micromatch": "^4.0.4", - "pretty-format": "^27.4.6", - "slash": "^3.0.0" + "parse-json": "^5.2.0", + "pretty-format": "^27.5.1", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" @@ -4242,25 +4648,37 @@ "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", "dev": true }, + "node_modules/jest-config/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/jest-diff": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.6.tgz", - "integrity": "sha512-zjaB0sh0Lb13VyPsd92V7HkqF6yKRH9vm33rwBt7rPYrpQvS1nCvlIy2pICbKta+ZjWngYLNn4cCK4nyZkjS/w==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", + "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^27.4.0", - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.6" + "diff-sequences": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-docblock": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.4.0.tgz", - "integrity": "sha512-7TBazUdCKGV7svZ+gh7C8esAnweJoG+SvcF6Cjqj4l17zA2q1cMwx2JObSioubk317H+cjcHgP+7fTs60paulg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz", + "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==", "dev": true, "dependencies": { "detect-newline": "^3.0.0" @@ -4270,33 +4688,33 @@ } }, "node_modules/jest-each": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.4.6.tgz", - "integrity": "sha512-n6QDq8y2Hsmn22tRkgAk+z6MCX7MeVlAzxmZDshfS2jLcaBlyhpF3tZSJLR+kXmh23GEvS0ojMR8i6ZeRvpQcA==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz", + "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "chalk": "^4.0.0", - "jest-get-type": "^27.4.0", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.6" + "jest-get-type": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-environment-jsdom": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.6.tgz", - "integrity": "sha512-o3dx5p/kHPbUlRvSNjypEcEtgs6LmvESMzgRFQE6c+Prwl2JLA4RZ7qAnxc5VM8kutsGRTB15jXeeSbJsKN9iA==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz", + "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.6", - "@jest/fake-timers": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", - "jest-mock": "^27.4.6", - "jest-util": "^27.4.2", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1", "jsdom": "^16.6.0" }, "engines": { @@ -4304,47 +4722,47 @@ } }, "node_modules/jest-environment-node": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.6.tgz", - "integrity": "sha512-yfHlZ9m+kzTKZV0hVfhVu6GuDxKAYeFHrfulmy7Jxwsq4V7+ZK7f+c0XP/tbVDMQW7E4neG2u147hFkuVz0MlQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", + "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.6", - "@jest/fake-timers": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", - "jest-mock": "^27.4.6", - "jest-util": "^27.4.2" + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-get-type": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.4.0.tgz", - "integrity": "sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", + "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", "dev": true, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-haste-map": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.6.tgz", - "integrity": "sha512-0tNpgxg7BKurZeFkIOvGCkbmOHbLFf4LUQOxrQSMjvrQaQe3l6E8x6jYC1NuWkGo5WDdbr8FEzUxV2+LWNawKQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", + "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "@types/graceful-fs": "^4.1.2", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-regex-util": "^27.4.0", - "jest-serializer": "^27.4.0", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^27.5.1", + "jest-serializer": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", "micromatch": "^4.0.4", "walker": "^1.0.7" }, @@ -4356,27 +4774,27 @@ } }, "node_modules/jest-jasmine2": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.6.tgz", - "integrity": "sha512-uAGNXF644I/whzhsf7/qf74gqy9OuhvJ0XYp8SDecX2ooGeaPnmJMjXjKt0mqh1Rl5dtRGxJgNrHlBQIBfS5Nw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz", + "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.6", - "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/environment": "^27.5.1", + "@jest/source-map": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^27.4.6", + "expect": "^27.5.1", "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.6", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.6", + "jest-each": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1", "throat": "^6.0.1" }, "engines": { @@ -4384,46 +4802,46 @@ } }, "node_modules/jest-leak-detector": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.4.6.tgz", - "integrity": "sha512-kkaGixDf9R7CjHm2pOzfTxZTQQQ2gHTIWKY/JZSiYTc90bZp8kSZnUMS3uLAfwTZwc0tcMRoEX74e14LG1WapA==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz", + "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==", "dev": true, "dependencies": { - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.6" + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.6.tgz", - "integrity": "sha512-XD4PKT3Wn1LQnRAq7ZsTI0VRuEc9OrCPFiO1XL7bftTGmfNF0DcEwMHRgqiu7NGf8ZoZDREpGrCniDkjt79WbA==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", + "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^27.4.6", - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.6" + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-message-util": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.6.tgz", - "integrity": "sha512-0p5szriFU0U74czRSFjH6RyS7UYIAkn/ntwMuOwTGWrQIOh5NzXXrq72LOqIkJKKvFbPq+byZKuBz78fjBERBA==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", + "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^27.4.6", + "pretty-format": "^27.5.1", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -4431,25 +4849,13 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-message-util/node_modules/@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/jest-mock": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.4.6.tgz", - "integrity": "sha512-kvojdYRkst8iVSZ1EJ+vc1RRD9llueBjKzXzeCytH3dMM7zvPV/ULcfI2nr0v0VUgm3Bjt3hBCQvOeaBz+ZTHw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", + "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "@types/node": "*" }, "engines": { @@ -4474,27 +4880,27 @@ } }, "node_modules/jest-regex-util": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.4.0.tgz", - "integrity": "sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", + "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", "dev": true, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-resolve": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.6.tgz", - "integrity": "sha512-SFfITVApqtirbITKFAO7jOVN45UgFzcRdQanOFzjnbd+CACDoyeX7206JyU92l4cRr73+Qy/TlW51+4vHGt+zw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", + "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" @@ -4504,45 +4910,44 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.6.tgz", - "integrity": "sha512-W85uJZcFXEVZ7+MZqIPCscdjuctruNGXUZ3OHSXOfXR9ITgbUKeHj+uGcies+0SsvI5GtUfTw4dY7u9qjTvQOw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz", + "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", - "jest-regex-util": "^27.4.0", - "jest-snapshot": "^27.4.6" + "@jest/types": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-snapshot": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-runner": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.6.tgz", - "integrity": "sha512-IDeFt2SG4DzqalYBZRgbbPmpwV3X0DcntjezPBERvnhwKGWTW7C5pbbA5lVkmvgteeNfdd/23gwqv3aiilpYPg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz", + "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==", "dev": true, "dependencies": { - "@jest/console": "^27.4.6", - "@jest/environment": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^27.5.1", + "@jest/environment": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-docblock": "^27.4.0", - "jest-environment-jsdom": "^27.4.6", - "jest-environment-node": "^27.4.6", - "jest-haste-map": "^27.4.6", - "jest-leak-detector": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-resolve": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-docblock": "^27.5.1", + "jest-environment-jsdom": "^27.5.1", + "jest-environment-node": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-leak-detector": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", "source-map-support": "^0.5.6", "throat": "^6.0.1" }, @@ -4551,31 +4956,31 @@ } }, "node_modules/jest-runtime": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.6.tgz", - "integrity": "sha512-eXYeoR/MbIpVDrjqy5d6cGCFOYBFFDeKaNWqTp0h6E74dK0zLHzASQXJpl5a2/40euBmKnprNLJ0Kh0LCndnWQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^27.4.6", - "@jest/fake-timers": "^27.4.6", - "@jest/globals": "^27.4.6", - "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz", + "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==", + "dev": true, + "dependencies": { + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/globals": "^27.5.1", + "@jest/source-map": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "execa": "^5.0.0", "glob": "^7.1.3", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-mock": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-mock": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -4687,22 +5092,22 @@ } }, "node_modules/jest-serializer": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.4.0.tgz", - "integrity": "sha512-RDhpcn5f1JYTX2pvJAGDcnsNTnsV9bjYPU8xcV+xPwOXnUPOQwf4ZEuiU6G9H1UztH+OapMgu/ckEVwO87PwnQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", + "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", "dev": true, "dependencies": { "@types/node": "*", - "graceful-fs": "^4.2.4" + "graceful-fs": "^4.2.9" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-snapshot": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.6.tgz", - "integrity": "sha512-fafUCDLQfzuNP9IRcEqaFAMzEe7u5BF7mude51wyWv7VRex60WznZIC7DfKTgSIlJa8aFzYmXclmN328aqSDmQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz", + "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==", "dev": true, "dependencies": { "@babel/core": "^7.7.2", @@ -4710,22 +5115,22 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.0.0", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "@types/babel__traverse": "^7.0.4", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^27.4.6", - "graceful-fs": "^4.2.4", - "jest-diff": "^27.4.6", - "jest-get-type": "^27.4.0", - "jest-haste-map": "^27.4.6", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-util": "^27.4.2", + "expect": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", "natural-compare": "^1.4.0", - "pretty-format": "^27.4.6", + "pretty-format": "^27.5.1", "semver": "^7.3.2" }, "engines": { @@ -4733,16 +5138,16 @@ } }, "node_modules/jest-util": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.4.2.tgz", - "integrity": "sha512-YuxxpXU6nlMan9qyLuxHaMMOzXAl5aGZWCSzben5DhLHemYQxCc4YK+4L3ZrCutT8GPQ+ui9k5D8rUJoDioMnA==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", + "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "picomatch": "^2.2.3" }, "engines": { @@ -4750,39 +5155,40 @@ } }, "node_modules/jest-util/node_modules/ci-info": { - "version": "3.2.0", - "dev": true, - "license": "MIT" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "dev": true }, "node_modules/jest-validate": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.4.6.tgz", - "integrity": "sha512-872mEmCPVlBqbA5dToC57vA3yJaMRfIdpCoD3cyHWJOMx+SJwLNw0I71EkWs41oza/Er9Zno9XuTkRYCPDUJXQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", + "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^27.4.0", + "jest-get-type": "^27.5.1", "leven": "^3.1.0", - "pretty-format": "^27.4.6" + "pretty-format": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/jest-watcher": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.4.6.tgz", - "integrity": "sha512-yKQ20OMBiCDigbD0quhQKLkBO+ObGN79MO4nT7YaCuQ5SM+dkBNWE8cZX0FjU6czwMvWw6StWbe+Wv4jJPJ+fw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz", + "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==", "dev": true, "dependencies": { - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^27.4.2", + "jest-util": "^27.5.1", "string-length": "^4.0.1" }, "engines": { @@ -4790,9 +5196,9 @@ } }, "node_modules/jest-worker": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.6.tgz", - "integrity": "sha512-gHWJF/6Xi5CTG5QCvROr6GcmpIqNYpDJyc8A1h/DyXqH1tD6SnRCM0d3U5msV31D2LB/U+E0M+W4oyvKV44oNw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "dev": true, "dependencies": { "@types/node": "*", @@ -4820,18 +5226,21 @@ }, "node_modules/jju": { "version": "1.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", + "dev": true }, "node_modules/js-tokens": { "version": "4.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, "node_modules/js-yaml": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -4885,22 +5294,11 @@ } } }, - "node_modules/jsdom/node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/jsesc": { "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true, - "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, @@ -4910,36 +5308,42 @@ }, "node_modules/json-buffer": { "version": "3.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "node_modules/json-parse-helpfulerror": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", + "integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", "dev": true, - "license": "MIT", "dependencies": { "jju": "^1.1.0" } }, "node_modules/json-schema-traverse": { "version": "0.4.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true }, "node_modules/json5": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", "dev": true, - "license": "MIT", "dependencies": { "minimist": "^1.2.5" }, @@ -4958,37 +5362,42 @@ }, "node_modules/jsonlines": { "version": "0.1.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/jsonlines/-/jsonlines-0.1.1.tgz", + "integrity": "sha1-T80kbcXQ44aRkHxEqwAveC0dlMw=", + "dev": true }, "node_modules/jsonparse": { "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", "dev": true, "engines": [ "node >= 0.2.0" - ], - "license": "MIT" + ] }, "node_modules/keyv": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", "dev": true, - "license": "MIT", "dependencies": { "json-buffer": "3.0.0" } }, "node_modules/kleur": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/latest-version": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", "dev": true, - "license": "MIT", "dependencies": { "package-json": "^6.3.0" }, @@ -5007,8 +5416,9 @@ }, "node_modules/levn": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, - "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -5019,8 +5429,9 @@ }, "node_modules/libnpmconfig": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/libnpmconfig/-/libnpmconfig-1.2.1.tgz", + "integrity": "sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA==", "dev": true, - "license": "ISC", "dependencies": { "figgy-pudding": "^3.5.1", "find-up": "^3.0.0", @@ -5029,8 +5440,9 @@ }, "node_modules/libnpmconfig/node_modules/find-up": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^3.0.0" }, @@ -5040,8 +5452,9 @@ }, "node_modules/libnpmconfig/node_modules/locate-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -5052,8 +5465,9 @@ }, "node_modules/libnpmconfig/node_modules/p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -5066,8 +5480,9 @@ }, "node_modules/libnpmconfig/node_modules/p-locate": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^2.0.0" }, @@ -5077,16 +5492,24 @@ }, "node_modules/libnpmconfig/node_modules/path-exists": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, "node_modules/locate-path": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -5099,31 +5522,36 @@ }, "node_modules/lodash": { "version": "4.17.21", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true }, "node_modules/lodash.memoize": { "version": "4.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true }, "node_modules/lodash.merge": { "version": "4.6.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true }, "node_modules/lowercase-keys": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "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, - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -5133,21 +5561,24 @@ }, "node_modules/lunr": { "version": "2.3.9", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true }, "node_modules/magic-string": { "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", "dev": true, - "license": "MIT", "dependencies": { "sourcemap-codec": "^1.4.4" } }, "node_modules/make-dir": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, - "license": "MIT", "dependencies": { "semver": "^6.0.0" }, @@ -5160,21 +5591,24 @@ }, "node_modules/make-dir/node_modules/semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/make-error": { "version": "1.3.6", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true }, "node_modules/make-fetch-happen": { "version": "9.1.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", + "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", "dev": true, - "license": "ISC", "dependencies": { "agentkeepalive": "^4.1.3", "cacache": "^15.2.0", @@ -5220,21 +5654,24 @@ }, "node_modules/merge-stream": { "version": "2.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true }, "node_modules/merge2": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/micromatch": { "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, - "license": "MIT", "dependencies": { "braces": "^3.0.1", "picomatch": "^2.2.3" @@ -5244,19 +5681,21 @@ } }, "node_modules/mime-db": { - "version": "1.50.0", + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.33", + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", "dev": true, - "license": "MIT", "dependencies": { - "mime-db": "1.50.0" + "mime-db": "1.51.0" }, "engines": { "node": ">= 0.6" @@ -5273,32 +5712,36 @@ }, "node_modules/mimic-response": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/minimatch": { - "version": "3.0.4", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.0.tgz", + "integrity": "sha512-EU+GCVjXD00yOUf1TwAHVP7v3fBD3A8RkkPYsWWKGWesxM/572sL53wJQnHxquHlRhYUV36wHkqrN8cdikKc2g==", "dev": true, - "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=10" } }, "node_modules/minimist": { "version": "1.2.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true }, "node_modules/minipass": { - "version": "3.1.5", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", + "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", "dev": true, - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -5308,8 +5751,9 @@ }, "node_modules/minipass-collect": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -5319,8 +5763,9 @@ }, "node_modules/minipass-fetch": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", + "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", "dev": true, - "license": "MIT", "dependencies": { "minipass": "^3.1.0", "minipass-sized": "^1.0.3", @@ -5335,8 +5780,9 @@ }, "node_modules/minipass-flush": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -5346,8 +5792,9 @@ }, "node_modules/minipass-json-stream": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", + "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", "dev": true, - "license": "MIT", "dependencies": { "jsonparse": "^1.3.1", "minipass": "^3.0.0" @@ -5355,8 +5802,9 @@ }, "node_modules/minipass-pipeline": { "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -5366,8 +5814,9 @@ }, "node_modules/minipass-sized": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -5377,8 +5826,9 @@ }, "node_modules/minizlib": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "dev": true, - "license": "MIT", "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -5389,8 +5839,9 @@ }, "node_modules/mkdirp": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, - "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -5400,31 +5851,36 @@ }, "node_modules/ms": { "version": "2.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "node_modules/natural-compare": { "version": "1.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true }, "node_modules/negotiator": { - "version": "0.6.2", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/nice-try": { "version": "1.0.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true }, "node_modules/node-gyp": { "version": "8.4.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", + "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", "dev": true, - "license": "MIT", "dependencies": { "env-paths": "^2.2.0", "glob": "^7.1.4", @@ -5451,14 +5907,16 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.1", - "dev": true, - "license": "MIT" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", + "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==", + "dev": true }, "node_modules/nopt": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", "dev": true, - "license": "ISC", "dependencies": { "abbrev": "1" }, @@ -5469,6 +5927,21 @@ "node": ">=6" } }, + "node_modules/normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -5480,30 +5953,32 @@ }, "node_modules/normalize-url": { "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/npm-bundled": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", + "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", "dev": true, - "license": "ISC", "dependencies": { "npm-normalize-package-bin": "^1.0.1" } }, "node_modules/npm-check-updates": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.3.0.tgz", - "integrity": "sha512-NcVpbVYZymmr7lVCwqz1wpkAgWNQ/XyyPy/yyR2IjCHU4Dr1lpIJgIgtC0PCDobcYuYXpYSIgIWZA7RFvq8+Rw==", + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.4.0.tgz", + "integrity": "sha512-X14H74M8SVFkStmP1NDOMh0OjLB3mU2dwUeM71zyITJHkm08MASwwTcydW6YuGcNW1RUlVq1cQY2yWijv4zKUQ==", "dev": true, "dependencies": { "chalk": "^4.1.2", "cint": "^8.2.1", "cli-table": "^0.3.11", - "commander": "^8.3.0", + "commander": "^9.0.0", "fast-memoize": "^2.5.2", "find-up": "5.0.0", "fp-and-or": "^0.1.3", @@ -5514,9 +5989,9 @@ "jsonlines": "^0.1.1", "libnpmconfig": "^1.2.1", "lodash": "^4.17.21", - "minimatch": "^3.0.4", + "minimatch": "^5.0.0", "p-map": "^4.0.0", - "pacote": "^12.0.2", + "pacote": "^13.0.2", "parse-github-url": "^1.0.2", "progress": "^2.0.3", "prompts": "^2.4.2", @@ -5540,8 +6015,9 @@ }, "node_modules/npm-install-checks": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-4.0.0.tgz", + "integrity": "sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "semver": "^7.1.1" }, @@ -5551,26 +6027,29 @@ }, "node_modules/npm-normalize-package-bin": { "version": "1.0.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "dev": true }, "node_modules/npm-package-arg": { - "version": "8.1.5", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.0.tgz", + "integrity": "sha512-yhzXxeor+Zfhe5MGwPdDumz6HtNlj2pMekWB95IX3CC6uDNgde0oPKHDCLDPoJqQfd0HqAWt+y4Hs5m7CK1+9Q==", "dev": true, - "license": "ISC", "dependencies": { - "hosted-git-info": "^4.0.1", - "semver": "^7.3.4", + "hosted-git-info": "^4.1.0", + "semver": "^7.3.5", "validate-npm-package-name": "^3.0.0" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16" } }, "node_modules/npm-packlist": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-3.0.0.tgz", + "integrity": "sha512-L/cbzmutAwII5glUcf2DBRNY/d0TFd4e/FnaZigJV6JD85RHZXJFGwCndjMWiiViiWSsWt3tiOLpI3ByTnIdFQ==", "dev": true, - "license": "ISC", "dependencies": { "glob": "^7.1.6", "ignore-walk": "^4.0.1", @@ -5585,36 +6064,102 @@ } }, "node_modules/npm-pick-manifest": { - "version": "6.1.1", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.0.tgz", + "integrity": "sha512-njM1AcdioFaKd0JSGtLO09YA1WRwctjGQJbnHGmKS+u+uwP8oFvtZtOQWPYdxrnY5eJud3wn8OpH4sEIx6+GEQ==", "dev": true, - "license": "ISC", "dependencies": { "npm-install-checks": "^4.0.0", "npm-normalize-package-bin": "^1.0.1", - "npm-package-arg": "^8.1.2", - "semver": "^7.3.4" + "npm-package-arg": "^9.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" } }, "node_modules/npm-registry-fetch": { - "version": "11.0.0", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.0.0.tgz", + "integrity": "sha512-MmiMuV9DU5gRuAU0jia952Qq+E4h7ZoUaeltCXivhClcqfOVKqNLZEQsRUOb6a8WQY+um8x97JcUuaWFoPoBBw==", "dev": true, - "license": "ISC", "dependencies": { - "make-fetch-happen": "^9.0.1", - "minipass": "^3.1.3", - "minipass-fetch": "^1.3.0", + "make-fetch-happen": "^10.0.2", + "minipass": "^3.1.6", + "minipass-fetch": "^1.4.1", "minipass-json-stream": "^1.0.1", - "minizlib": "^2.0.0", - "npm-package-arg": "^8.0.0" + "minizlib": "^2.1.2", + "npm-package-arg": "^9.0.0", + "proc-log": "^2.0.0" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16" + } + }, + "node_modules/npm-registry-fetch/node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/npm-registry-fetch/node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/npm-registry-fetch/node_modules/lru-cache": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.3.1.tgz", + "integrity": "sha512-nX1x4qUrKqwbIAhv4s9et4FIUVzNOpeY07bsjGUy8gwJrXH/wScImSQqXErmo/b2jZY2r0mohbLA9zVj7u1cNw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/npm-registry-fetch/node_modules/make-fetch-happen": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.3.tgz", + "integrity": "sha512-CzarPHynPpHjhF5in/YapnO44rSZeYX5VCMfdXa99+gLwpbfFLh20CWa6dP/taV9Net9PWJwXNKtp/4ZTCQnag==", + "dev": true, + "dependencies": { + "agentkeepalive": "^4.2.0", + "cacache": "^15.3.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.3.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^1.4.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^6.1.1", + "ssri": "^8.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" } }, "node_modules/npm-run-path": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^2.0.0" }, @@ -5623,11 +6168,12 @@ } }, "node_modules/npmlog": { - "version": "6.0.0", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.1.tgz", + "integrity": "sha512-BTHDvY6nrRHuRfyjt1MAufLxYdVXZfd099H4+i1f0lPywNQyI4foeNXJRObB/uy+TYqUW0vAD9gbdSOXPst7Eg==", "dev": true, - "license": "ISC", "dependencies": { - "are-we-there-yet": "^2.0.0", + "are-we-there-yet": "^3.0.0", "console-control-strings": "^1.1.0", "gauge": "^4.0.0", "set-blocking": "^2.0.0" @@ -5644,16 +6190,18 @@ }, "node_modules/on-headers": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, - "license": "ISC", "dependencies": { "wrappy": "1" } @@ -5675,8 +6223,9 @@ }, "node_modules/optionator": { "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, - "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -5691,24 +6240,27 @@ }, "node_modules/p-cancelable": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/p-finally": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/p-limit": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -5721,8 +6273,9 @@ }, "node_modules/p-locate": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -5735,8 +6288,9 @@ }, "node_modules/p-map": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, - "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" }, @@ -5749,16 +6303,18 @@ }, "node_modules/p-try": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/package-json": { "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", "dev": true, - "license": "MIT", "dependencies": { "got": "^9.6.0", "registry-auth-token": "^4.0.0", @@ -5771,8 +6327,9 @@ }, "node_modules/package-json/node_modules/registry-auth-token": { "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", "dev": true, - "license": "MIT", "dependencies": { "rc": "^1.2.8" }, @@ -5782,8 +6339,9 @@ }, "node_modules/package-json/node_modules/registry-url": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", "dev": true, - "license": "MIT", "dependencies": { "rc": "^1.2.8" }, @@ -5793,36 +6351,40 @@ }, "node_modules/package-json/node_modules/semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/pacote": { - "version": "12.0.2", + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.0.2.tgz", + "integrity": "sha512-3LyfvDk2BSJNFQZIcDqnLNa7IsYb6KwX3H9uZPwaHJFIX6Gv5N9QHU+s7mEs/RbN4/ta6KUT39LAi2l6EkBi5A==", "dev": true, - "license": "ISC", "dependencies": { - "@npmcli/git": "^2.1.0", - "@npmcli/installed-package-contents": "^1.0.6", + "@npmcli/git": "^3.0.0", + "@npmcli/installed-package-contents": "^1.0.7", "@npmcli/promise-spawn": "^1.2.0", "@npmcli/run-script": "^2.0.0", - "cacache": "^15.0.5", + "cacache": "^15.3.0", "chownr": "^2.0.0", "fs-minipass": "^2.1.0", "infer-owner": "^1.0.4", - "minipass": "^3.1.3", - "mkdirp": "^1.0.3", - "npm-package-arg": "^8.0.1", + "minipass": "^3.1.6", + "mkdirp": "^1.0.4", + "npm-package-arg": "^9.0.0", "npm-packlist": "^3.0.0", - "npm-pick-manifest": "^6.0.0", - "npm-registry-fetch": "^11.0.0", + "npm-pick-manifest": "^7.0.0", + "npm-registry-fetch": "^13.0.0", + "proc-log": "^2.0.0", "promise-retry": "^2.0.1", - "read-package-json-fast": "^2.0.1", + "read-package-json": "^4.1.1", + "read-package-json-fast": "^2.0.3", "rimraf": "^3.0.2", "ssri": "^8.0.1", - "tar": "^6.1.0" + "tar": "^6.1.11" }, "bin": { "pacote": "lib/bin.js" @@ -5833,8 +6395,9 @@ }, "node_modules/parent-module": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, - "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -5844,8 +6407,9 @@ }, "node_modules/parse-github-url": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz", + "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==", "dev": true, - "license": "MIT", "bin": { "parse-github-url": "cli.js" }, @@ -5853,6 +6417,24 @@ "node": ">=0.10.0" } }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/parse5": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", @@ -5861,60 +6443,69 @@ }, "node_modules/path-exists": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-is-inside": { "version": "1.0.2", - "dev": true, - "license": "(WTFPL OR MIT)" + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true }, "node_modules/path-key": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/path-parse": { "version": "1.0.7", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true }, "node_modules/path-to-regexp": { "version": "2.2.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", + "dev": true }, "node_modules/path-type": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/picocolors": { "version": "1.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true }, "node_modules/picomatch": { - "version": "2.3.0", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -5933,8 +6524,9 @@ }, "node_modules/pkg-dir": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, - "license": "MIT", "dependencies": { "find-up": "^4.0.0" }, @@ -5944,8 +6536,9 @@ }, "node_modules/pkg-dir/node_modules/find-up": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -5956,8 +6549,9 @@ }, "node_modules/pkg-dir/node_modules/locate-path": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, @@ -5967,8 +6561,9 @@ }, "node_modules/pkg-dir/node_modules/p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -5981,8 +6576,9 @@ }, "node_modules/pkg-dir/node_modules/p-locate": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -5992,16 +6588,18 @@ }, "node_modules/prelude-ls": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/prepend-http": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -6020,8 +6618,9 @@ }, "node_modules/prettier-linter-helpers": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", "dev": true, - "license": "MIT", "dependencies": { "fast-diff": "^1.1.2" }, @@ -6030,9 +6629,9 @@ } }, "node_modules/pretty-format": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.6.tgz", - "integrity": "sha512-NblstegA1y/RJW2VyML+3LlpFjzx62cUrtBIKIWDXEDkjNeleA7Od7nrzcs/VLQvAeV4CgSYhrN39DRN88Qi/g==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, "dependencies": { "ansi-regex": "^5.0.1", @@ -6045,8 +6644,9 @@ }, "node_modules/pretty-format/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -6054,23 +6654,35 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/proc-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.0.tgz", + "integrity": "sha512-I/35MfCX2H8jBUhKN8JB8nmqvQo/nKdrBodBY7L3RhDSPPyvOHwLYNmPuhwuJq7a7C3vgFKWGQM+ecPStcvOHA==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" + } + }, "node_modules/progress": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/promise-inflight": { "version": "1.0.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true }, "node_modules/promise-retry": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", "dev": true, - "license": "MIT", "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" @@ -6081,8 +6693,9 @@ }, "node_modules/prompts": { "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, - "license": "MIT", "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -6099,8 +6712,9 @@ }, "node_modules/pump": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, - "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -6108,13 +6722,15 @@ }, "node_modules/punycode": { "version": "1.4.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true }, "node_modules/pupa": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", "dev": true, - "license": "MIT", "dependencies": { "escape-goat": "^2.0.0" }, @@ -6124,6 +6740,8 @@ }, "node_modules/queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -6138,29 +6756,31 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/randombytes": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/range-parser": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/rc": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -6173,8 +6793,9 @@ }, "node_modules/rc-config-loader": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.0.0.tgz", + "integrity": "sha512-//LRTblJEcqbmmro1GCmZ39qZXD+JqzuD8Y5/IZU3Dhp3A1Yr0Xn68ks8MQ6qKfKvYCWDveUmRDKDA40c+sCXw==", "dev": true, - "license": "MIT", "dependencies": { "debug": "^4.1.1", "js-yaml": "^4.0.0", @@ -6184,13 +6805,30 @@ }, "node_modules/react-is": { "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + }, + "node_modules/read-package-json": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-4.1.1.tgz", + "integrity": "sha512-P82sbZJ3ldDrWCOSKxJT0r/CXMWR0OR3KRh55SgKo3p91GSIEEC32v3lSHAvO/UcH3/IoL7uqhOFBduAnwdldw==", "dev": true, - "license": "MIT" + "dependencies": { + "glob": "^7.1.1", + "json-parse-even-better-errors": "^2.3.0", + "normalize-package-data": "^3.0.0", + "npm-normalize-package-bin": "^1.0.0" + }, + "engines": { + "node": ">=10" + } }, "node_modules/read-package-json-fast": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", + "integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==", "dev": true, - "license": "ISC", "dependencies": { "json-parse-even-better-errors": "^2.3.0", "npm-normalize-package-bin": "^1.0.1" @@ -6201,8 +6839,9 @@ }, "node_modules/readable-stream": { "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, - "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -6214,8 +6853,9 @@ }, "node_modules/regexpp": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -6225,8 +6865,9 @@ }, "node_modules/registry-auth-token": { "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, - "license": "MIT", "dependencies": { "rc": "^1.1.6", "safe-buffer": "^5.0.1" @@ -6234,8 +6875,9 @@ }, "node_modules/registry-url": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, - "license": "MIT", "dependencies": { "rc": "^1.0.1" }, @@ -6245,8 +6887,9 @@ }, "node_modules/remote-git-tags": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remote-git-tags/-/remote-git-tags-3.0.0.tgz", + "integrity": "sha512-C9hAO4eoEsX+OXA4rla66pXZQ+TLQ8T9dttgQj18yuKlPMTVkIkdYXvlMC55IuUsIkV6DpmQYi10JKFLaU+l7w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -6262,19 +6905,25 @@ }, "node_modules/require-from-string": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/resolve": { - "version": "1.20.0", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "dev": true, - "license": "MIT", "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6303,8 +6952,9 @@ }, "node_modules/resolve-from": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -6320,24 +6970,27 @@ }, "node_modules/responselike": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, - "license": "MIT", "dependencies": { "lowercase-keys": "^1.0.0" } }, "node_modules/retry": { "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/reusify": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, - "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -6345,8 +6998,9 @@ }, "node_modules/rimraf": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, - "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -6358,9 +7012,9 @@ } }, "node_modules/rollup": { - "version": "2.66.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.66.1.tgz", - "integrity": "sha512-crSgLhSkLMnKr4s9iZ/1qJCplgAgrRY+igWv8KhG/AjKOJ0YX/WpmANyn8oxrw+zenF3BXWDLa7Xl/QZISH+7w==", + "version": "2.67.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.67.3.tgz", + "integrity": "sha512-G/x1vUwbGtP6O5ZM8/sWr8+p7YfZhI18pPqMRtMYMWSbHjKZ/ajHGiM+GWNTlWyOR0EHIdT8LHU+Z4ciIZ1oBw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -6374,8 +7028,9 @@ }, "node_modules/rollup-plugin-terser": { "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/code-frame": "^7.10.4", "jest-worker": "^26.2.1", @@ -6388,8 +7043,9 @@ }, "node_modules/rollup-plugin-terser/node_modules/jest-worker": { "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -6401,6 +7057,8 @@ }, "node_modules/run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -6416,20 +7074,21 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } }, "node_modules/safe-buffer": { "version": "5.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "node_modules/safer-buffer": { "version": "2.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "node_modules/saxes": { "version": "5.0.1", @@ -6445,8 +7104,9 @@ }, "node_modules/semver": { "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -6459,8 +7119,9 @@ }, "node_modules/semver-diff": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", "dev": true, - "license": "MIT", "dependencies": { "semver": "^6.3.0" }, @@ -6470,29 +7131,33 @@ }, "node_modules/semver-diff/node_modules/semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/semver-utils": { "version": "1.1.4", - "dev": true, - "license": "APACHEv2" + "resolved": "https://registry.npmjs.org/semver-utils/-/semver-utils-1.1.4.tgz", + "integrity": "sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA==", + "dev": true }, "node_modules/serialize-javascript": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } }, "node_modules/serve": { "version": "13.0.2", + "resolved": "https://registry.npmjs.org/serve/-/serve-13.0.2.tgz", + "integrity": "sha512-71R6fKvNgKrqARAag6lYJNnxDzpH7DCNrMuvPY5PLVaC2PDhJsGTj/34o4o4tPWhTuLgEXqvgnAWbATQ9zGZTQ==", "dev": true, - "license": "MIT", "dependencies": { "@zeit/schemas": "2.6.0", "ajv": "6.12.6", @@ -6510,8 +7175,9 @@ }, "node_modules/serve-handler": { "version": "6.1.3", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", + "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", "dev": true, - "license": "MIT", "dependencies": { "bytes": "3.0.0", "content-disposition": "0.5.2", @@ -6523,18 +7189,30 @@ "range-parser": "1.2.0" } }, + "node_modules/serve-handler/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/serve-handler/node_modules/mime-db": { "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/serve-handler/node_modules/mime-types": { "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "dev": true, - "license": "MIT", "dependencies": { "mime-db": "~1.33.0" }, @@ -6542,10 +7220,23 @@ "node": ">= 0.6" } }, + "node_modules/serve-handler/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/serve/node_modules/ansi-styles": { "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^1.9.0" }, @@ -6555,8 +7246,9 @@ }, "node_modules/serve/node_modules/chalk": { "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -6568,29 +7260,33 @@ }, "node_modules/serve/node_modules/color-convert": { "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "1.1.3" } }, "node_modules/serve/node_modules/color-name": { "version": "1.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true }, "node_modules/serve/node_modules/has-flag": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/serve/node_modules/supports-color": { "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, @@ -6600,13 +7296,15 @@ }, "node_modules/set-blocking": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true }, "node_modules/shebang-command": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, - "license": "MIT", "dependencies": { "shebang-regex": "^1.0.0" }, @@ -6616,16 +7314,17 @@ }, "node_modules/shebang-regex": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/shiki": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.0.tgz", - "integrity": "sha512-iczxaIYeBFHTFrQPb9DVy2SKgYxC4Wo7Iucm7C17cCh2Ge/refnvHscUOxM85u57MfLoNOtjoEFUWt9gBexblA==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", + "integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", "dev": true, "dependencies": { "jsonc-parser": "^3.0.0", @@ -6634,39 +7333,44 @@ } }, "node_modules/signal-exit": { - "version": "3.0.5", - "dev": true, - "license": "ISC" + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true }, "node_modules/sisteransi": { "version": "1.0.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true }, "node_modules/slash": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/smart-buffer": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" } }, "node_modules/socks": { - "version": "2.6.1", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", + "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", "dev": true, - "license": "MIT", "dependencies": { "ip": "^1.1.5", - "smart-buffer": "^4.1.0" + "smart-buffer": "^4.2.0" }, "engines": { "node": ">= 10.13.0", @@ -6675,8 +7379,9 @@ }, "node_modules/socks-proxy-agent": { "version": "6.1.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz", + "integrity": "sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==", "dev": true, - "license": "MIT", "dependencies": { "agent-base": "^6.0.2", "debug": "^4.3.1", @@ -6688,16 +7393,18 @@ }, "node_modules/source-map": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/source-map-support": { "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, - "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -6705,26 +7412,62 @@ }, "node_modules/sourcemap-codec": { "version": "1.4.8", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true }, "node_modules/spawn-please": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-1.0.0.tgz", + "integrity": "sha512-Kz33ip6NRNKuyTRo3aDWyWxeGeM0ORDO552Fs6E1nj4pLWPkl37SrRtTnq+MEopVaqgmaO6bAvVS+v64BJ5M/A==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", + "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", + "dev": true + }, "node_modules/sprintf-js": { "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true }, "node_modules/ssri": { "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", "dev": true, - "license": "ISC", "dependencies": { "minipass": "^3.1.1" }, @@ -6755,14 +7498,17 @@ }, "node_modules/string_decoder": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, - "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } }, "node_modules/string_decoder/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==", "dev": true, "funding": [ { @@ -6777,8 +7523,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/string-length": { "version": "4.0.2", @@ -6795,8 +7540,9 @@ }, "node_modules/string-width": { "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -6808,8 +7554,9 @@ }, "node_modules/strip-ansi": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -6828,8 +7575,9 @@ }, "node_modules/strip-eof": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -6845,16 +7593,18 @@ }, "node_modules/strip-json-comments": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -6875,6 +7625,18 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -6883,8 +7645,9 @@ }, "node_modules/tar": { "version": "6.1.11", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", + "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", "dev": true, - "license": "ISC", "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -6914,9 +7677,10 @@ } }, "node_modules/terser": { - "version": "5.9.0", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", + "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "commander": "^2.20.0", "source-map": "~0.7.2", @@ -6927,25 +7691,36 @@ }, "engines": { "node": ">=10" + }, + "peerDependencies": { + "acorn": "^8.5.0" + }, + "peerDependenciesMeta": { + "acorn": { + "optional": true + } } }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true }, "node_modules/terser/node_modules/source-map": { "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">= 8" } }, "node_modules/test-exclude": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, - "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", @@ -6955,10 +7730,33 @@ "node": ">=8" } }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/text-table": { "version": "0.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true }, "node_modules/throat": { "version": "6.0.1", @@ -6974,24 +7772,27 @@ }, "node_modules/to-fast-properties": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/to-readable-stream": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -7088,15 +7889,17 @@ } }, "node_modules/tslib": { - "version": "2.1.0", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", "dev": true, - "license": "0BSD", "peer": true }, "node_modules/tsutils": { "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, - "license": "MIT", "dependencies": { "tslib": "^1.8.1" }, @@ -7109,13 +7912,15 @@ }, "node_modules/tsutils/node_modules/tslib": { "version": "1.14.1", - "dev": true, - "license": "0BSD" + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true }, "node_modules/type-check": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, - "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -7134,8 +7939,9 @@ }, "node_modules/type-fest": { "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -7145,16 +7951,17 @@ }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, - "license": "MIT", "dependencies": { "is-typedarray": "^1.0.0" } }, "node_modules/typedoc": { - "version": "0.22.11", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.11.tgz", - "integrity": "sha512-pVr3hh6dkS3lPPaZz1fNpvcrqLdtEvXmXayN55czlamSgvEjh+57GUqfhAI1Xsuu/hNHUT1KNSx8LH2wBP/7SA==", + "version": "0.22.12", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.12.tgz", + "integrity": "sha512-FcyC+YuaOpr3rB9QwA1IHOi9KnU2m50sPJW5vcNRPCIdecp+3bFkh7Rq5hBU1Fyn29UR2h4h/H7twZHWDhL0sw==", "dev": true, "dependencies": { "glob": "^7.2.0", @@ -7173,6 +7980,28 @@ "typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x" } }, + "node_modules/typedoc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/typedoc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/typescript": { "version": "4.5.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", @@ -7188,24 +8017,27 @@ }, "node_modules/unique-filename": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", "dev": true, - "license": "ISC", "dependencies": { "unique-slug": "^2.0.0" } }, "node_modules/unique-slug": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", "dev": true, - "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4" } }, "node_modules/unique-string": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", "dev": true, - "license": "MIT", "dependencies": { "crypto-random-string": "^2.0.0" }, @@ -7215,16 +8047,18 @@ }, "node_modules/universalify": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4.0.0" } }, "node_modules/update-check": { "version": "1.5.2", + "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.2.tgz", + "integrity": "sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ==", "dev": true, - "license": "MIT", "dependencies": { "registry-auth-token": "3.3.2", "registry-url": "3.1.0" @@ -7232,8 +8066,9 @@ }, "node_modules/update-notifier": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "boxen": "^5.0.0", "chalk": "^4.1.0", @@ -7259,24 +8094,27 @@ }, "node_modules/uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/uri-js/node_modules/punycode": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/url-parse-lax": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, - "license": "MIT", "dependencies": { "prepend-http": "^2.0.0" }, @@ -7286,13 +8124,15 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true }, "node_modules/v8-compile-cache": { "version": "2.3.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true }, "node_modules/v8-to-istanbul": { "version": "8.1.1", @@ -7317,18 +8157,30 @@ "node": ">= 8" } }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "node_modules/validate-npm-package-name": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", "dev": true, - "license": "ISC", "dependencies": { "builtins": "^1.0.3" } }, "node_modules/vary": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -7427,8 +8279,9 @@ }, "node_modules/which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -7441,16 +8294,18 @@ }, "node_modules/wide-align": { "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" } }, "node_modules/widest-line": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "dev": true, - "license": "MIT", "dependencies": { "string-width": "^4.0.0" }, @@ -7460,16 +8315,18 @@ }, "node_modules/word-wrap": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.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==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -7484,13 +8341,15 @@ }, "node_modules/wrappy": { "version": "1.0.2", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "node_modules/write-file-atomic": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, - "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", "is-typedarray": "^1.0.0", @@ -7499,9 +8358,9 @@ } }, "node_modules/ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", + "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", "dev": true, "engines": { "node": ">=8.3.0" @@ -7521,8 +8380,9 @@ }, "node_modules/xdg-basedir": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -7550,8 +8410,9 @@ }, "node_modules/yallist": { "version": "4.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "node_modules/yaml": { "version": "1.10.2", @@ -7582,16 +8443,18 @@ }, "node_modules/yargs-parser": { "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yocto-queue": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -7607,170 +8470,19 @@ "@sora/go-wasm": "^2021.1.0" }, "devDependencies": { - "@rollup/plugin-replace": "^3.0.1", + "@rollup/plugin-node-resolve": "^13.1.3", + "@rollup/plugin-replace": "^3.1.0", "@rollup/plugin-typescript": "^8.3.0", - "@typescript-eslint/eslint-plugin": "^5.10.2", - "@typescript-eslint/parser": "^5.10.2", - "eslint": "^8.8.0", - "eslint-config-prettier": "^8.3.0", + "@typescript-eslint/eslint-plugin": "^5.12.0", + "@typescript-eslint/parser": "^5.12.0", + "eslint": "^8.9.0", + "eslint-config-prettier": "^8.4.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.5.1", - "rollup": "^2.66.1", + "rollup": "^2.67.3", "typescript": "^4.5.5" } }, - "packages/e2ee/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.2.tgz", - "integrity": "sha512-4W/9lLuE+v27O/oe7hXJKjNtBLnZE8tQAFpapdxwSVHqtmIoPB1gph3+ahNwVuNL37BX7YQHyGF9Xv6XCnIX2Q==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.10.2", - "@typescript-eslint/type-utils": "5.10.2", - "@typescript-eslint/utils": "5.10.2", - "debug": "^4.3.2", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.2.0", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "packages/e2ee/node_modules/@typescript-eslint/parser": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.10.2.tgz", - "integrity": "sha512-JaNYGkaQVhP6HNF+lkdOr2cAs2wdSZBoalE22uYWq8IEv/OVH0RksSGydk+sW8cLoSeYmC+OHvRyv2i4AQ7Czg==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.10.2", - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/typescript-estree": "5.10.2", - "debug": "^4.3.2" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "packages/e2ee/node_modules/@typescript-eslint/scope-manager": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.2.tgz", - "integrity": "sha512-39Tm6f4RoZoVUWBYr3ekS75TYgpr5Y+X0xLZxXqcZNDWZdJdYbKd3q2IR4V9y5NxxiPu/jxJ8XP7EgHiEQtFnw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/visitor-keys": "5.10.2" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "packages/e2ee/node_modules/@typescript-eslint/types": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.2.tgz", - "integrity": "sha512-Qfp0qk/5j2Rz3p3/WhWgu4S1JtMcPgFLnmAKAW061uXxKSa7VWKZsDXVaMXh2N60CX9h6YLaBoy9PJAfCOjk3w==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "packages/e2ee/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.2.tgz", - "integrity": "sha512-WHHw6a9vvZls6JkTgGljwCsMkv8wu8XU8WaYKeYhxhWXH/atZeiMW6uDFPLZOvzNOGmuSMvHtZKd6AuC8PrwKQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/visitor-keys": "5.10.2", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "packages/e2ee/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.2.tgz", - "integrity": "sha512-zHIhYGGGrFJvvyfwHk5M08C5B5K4bewkm+rrvNTKk1/S15YHR+SA/QUF8ZWscXSfEaB8Nn2puZj+iHcoxVOD/Q==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.10.2", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "packages/e2ee/node_modules/eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "packages/e2ee/node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "packages/go-wasm": { "name": "@sora/go-wasm", "version": "2021.1.0" @@ -7784,312 +8496,179 @@ "devDependencies": { "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-node-resolve": "^13.1.3", - "@rollup/plugin-replace": "^3.0.1", + "@rollup/plugin-replace": "^3.1.0", "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.10.2", - "@typescript-eslint/parser": "5.10.2", + "@typescript-eslint/eslint-plugin": "5.12.0", + "@typescript-eslint/parser": "5.12.0", "eslint": "8.9.0", - "eslint-config-prettier": "8.3.0", + "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", - "jest": "^27.4.7", + "jest": "^27.5.1", "prettier": "^2.5.1", - "rollup": "^2.66.1", + "rollup": "^2.67.3", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^27.1.3", "typescript": "^4.5.5" } - }, - "packages/sdk/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.2.tgz", - "integrity": "sha512-4W/9lLuE+v27O/oe7hXJKjNtBLnZE8tQAFpapdxwSVHqtmIoPB1gph3+ahNwVuNL37BX7YQHyGF9Xv6XCnIX2Q==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.10.2", - "@typescript-eslint/type-utils": "5.10.2", - "@typescript-eslint/utils": "5.10.2", - "debug": "^4.3.2", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.2.0", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "packages/sdk/node_modules/@typescript-eslint/parser": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.10.2.tgz", - "integrity": "sha512-JaNYGkaQVhP6HNF+lkdOr2cAs2wdSZBoalE22uYWq8IEv/OVH0RksSGydk+sW8cLoSeYmC+OHvRyv2i4AQ7Czg==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.10.2", - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/typescript-estree": "5.10.2", - "debug": "^4.3.2" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "packages/sdk/node_modules/@typescript-eslint/scope-manager": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.2.tgz", - "integrity": "sha512-39Tm6f4RoZoVUWBYr3ekS75TYgpr5Y+X0xLZxXqcZNDWZdJdYbKd3q2IR4V9y5NxxiPu/jxJ8XP7EgHiEQtFnw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/visitor-keys": "5.10.2" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "packages/sdk/node_modules/@typescript-eslint/types": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.2.tgz", - "integrity": "sha512-Qfp0qk/5j2Rz3p3/WhWgu4S1JtMcPgFLnmAKAW061uXxKSa7VWKZsDXVaMXh2N60CX9h6YLaBoy9PJAfCOjk3w==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "packages/sdk/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.2.tgz", - "integrity": "sha512-WHHw6a9vvZls6JkTgGljwCsMkv8wu8XU8WaYKeYhxhWXH/atZeiMW6uDFPLZOvzNOGmuSMvHtZKd6AuC8PrwKQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/visitor-keys": "5.10.2", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "packages/sdk/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.2.tgz", - "integrity": "sha512-zHIhYGGGrFJvvyfwHk5M08C5B5K4bewkm+rrvNTKk1/S15YHR+SA/QUF8ZWscXSfEaB8Nn2puZj+iHcoxVOD/Q==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.10.2", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "packages/sdk/node_modules/eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "packages/sdk/node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "engines": { - "node": ">= 4" - } } }, "dependencies": { + "@ampproject/remapping": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", + "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.0" + } + }, "@babel/code-frame": { - "version": "7.12.11", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "dev": true, "requires": { - "@babel/highlight": "^7.10.4" + "@babel/highlight": "^7.16.7" } }, "@babel/compat-data": { - "version": "7.15.0", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.0.tgz", + "integrity": "sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==", "dev": true }, "@babel/core": { - "version": "7.15.8", - "dev": true, - "requires": { - "@babel/code-frame": "^7.15.8", - "@babel/generator": "^7.15.8", - "@babel/helper-compilation-targets": "^7.15.4", - "@babel/helper-module-transforms": "^7.15.8", - "@babel/helpers": "^7.15.4", - "@babel/parser": "^7.15.8", - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.6", + "version": "7.17.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.5.tgz", + "integrity": "sha512-/BBMw4EvjmyquN5O+t5eh0+YqB3XXJkYD2cjKpYtWOfFy4lQ4UozNSmxAcWT8r2XtZs0ewG+zrfsqeR15i1ajA==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helpers": "^7.17.2", + "@babel/parser": "^7.17.3", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" + "semver": "^6.3.0" }, "dependencies": { - "@babel/code-frame": { - "version": "7.15.8", - "dev": true, - "requires": { - "@babel/highlight": "^7.14.5" - } - }, "semver": { "version": "6.3.0", - "dev": true - }, - "source-map": { - "version": "0.5.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } }, "@babel/generator": { - "version": "7.15.8", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz", + "integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==", "dev": true, "requires": { - "@babel/types": "^7.15.6", + "@babel/types": "^7.17.0", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, "dependencies": { "source-map": { "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true } } }, "@babel/helper-compilation-targets": { - "version": "7.15.4", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", + "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", "dev": true, "requires": { - "@babel/compat-data": "^7.15.0", - "@babel/helper-validator-option": "^7.14.5", - "browserslist": "^4.16.6", + "@babel/compat-data": "^7.16.4", + "@babel/helper-validator-option": "^7.16.7", + "browserslist": "^4.17.5", "semver": "^6.3.0" }, "dependencies": { "semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } }, - "@babel/helper-function-name": { - "version": "7.15.4", + "@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.15.4", - "@babel/template": "^7.15.4", - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.7" } }, - "@babel/helper-get-function-arity": { - "version": "7.15.4", + "@babel/helper-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" } }, - "@babel/helper-hoist-variables": { - "version": "7.15.4", + "@babel/helper-get-function-arity": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.7" } }, - "@babel/helper-member-expression-to-functions": { - "version": "7.15.4", + "@babel/helper-hoist-variables": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.7" } }, "@babel/helper-module-imports": { - "version": "7.15.4", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.7" } }, "@babel/helper-module-transforms": { - "version": "7.15.8", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.15.4", - "@babel/helper-replace-supers": "^7.15.4", - "@babel/helper-simple-access": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "@babel/helper-validator-identifier": "^7.15.7", - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.6" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.15.4", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", + "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/helper-plugin-utils": { @@ -8098,28 +8677,22 @@ "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", "dev": true }, - "@babel/helper-replace-supers": { - "version": "7.15.4", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.15.4", - "@babel/helper-optimise-call-expression": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4" - } - }, "@babel/helper-simple-access": { - "version": "7.15.4", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", + "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.7" } }, "@babel/helper-split-export-declaration": { - "version": "7.15.4", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dev": true, "requires": { - "@babel/types": "^7.15.4" + "@babel/types": "^7.16.7" } }, "@babel/helper-validator-identifier": { @@ -8129,16 +8702,20 @@ "dev": true }, "@babel/helper-validator-option": { - "version": "7.14.5", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", "dev": true }, "@babel/helpers": { - "version": "7.15.4", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.2.tgz", + "integrity": "sha512-0Qu7RLR1dILozr/6M0xgj+DFPmi6Bnulgm9M8BVa9ZCWxDqlSnqt3cf8IDPB5m45sVXUZ0kuQAgUrdSFFH79fQ==", "dev": true, "requires": { - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4" + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.0", + "@babel/types": "^7.17.0" } }, "@babel/highlight": { @@ -8154,6 +8731,8 @@ "dependencies": { "ansi-styles": { "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" @@ -8161,6 +8740,8 @@ }, "chalk": { "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -8170,6 +8751,8 @@ }, "color-convert": { "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { "color-name": "1.1.3" @@ -8177,14 +8760,20 @@ }, "color-name": { "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "has-flag": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "supports-color": { "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" @@ -8193,11 +8782,15 @@ } }, "@babel/parser": { - "version": "7.15.8", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz", + "integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==", "dev": true }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -8205,6 +8798,8 @@ }, "@babel/plugin-syntax-bigint": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -8212,6 +8807,8 @@ }, "@babel/plugin-syntax-class-properties": { "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.12.13" @@ -8219,6 +8816,8 @@ }, "@babel/plugin-syntax-import-meta": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" @@ -8226,6 +8825,8 @@ }, "@babel/plugin-syntax-json-strings": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -8233,6 +8834,8 @@ }, "@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" @@ -8240,6 +8843,8 @@ }, "@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -8247,6 +8852,8 @@ }, "@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" @@ -8254,6 +8861,8 @@ }, "@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -8261,6 +8870,8 @@ }, "@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -8268,6 +8879,8 @@ }, "@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -8275,6 +8888,8 @@ }, "@babel/plugin-syntax-top-level-await": { "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.14.5" @@ -8290,56 +8905,49 @@ } }, "@babel/template": { - "version": "7.15.4", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.15.8", - "dev": true, - "requires": { - "@babel/highlight": "^7.14.5" - } - } + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/traverse": { - "version": "7.15.4", - "dev": true, - "requires": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.4", - "@babel/helper-function-name": "^7.15.4", - "@babel/helper-hoist-variables": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", + "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", "debug": "^4.1.0", "globals": "^11.1.0" }, "dependencies": { - "@babel/code-frame": { - "version": "7.15.8", - "dev": true, - "requires": { - "@babel/highlight": "^7.14.5" - } - }, "globals": { "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true } } }, "@babel/types": { - "version": "7.15.6", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.9", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" } }, @@ -8366,12 +8974,31 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -8381,7 +9008,9 @@ } }, "@gar/promisify": { - "version": "1.1.2", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", "dev": true }, "@humanwhocodes/config-array": { @@ -8393,6 +9022,27 @@ "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, "@humanwhocodes/object-schema": { @@ -8403,6 +9053,8 @@ }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, "requires": { "camelcase": "^5.3.1", @@ -8414,6 +9066,8 @@ "dependencies": { "argparse": { "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { "sprintf-js": "~1.0.2" @@ -8421,10 +9075,14 @@ }, "camelcase": { "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "find-up": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { "locate-path": "^5.0.0", @@ -8433,6 +9091,8 @@ }, "js-yaml": { "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -8441,6 +9101,8 @@ }, "locate-path": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { "p-locate": "^4.1.0" @@ -8448,6 +9110,8 @@ }, "p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -8455,6 +9119,8 @@ }, "p-locate": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { "p-limit": "^2.2.0" @@ -8462,58 +9128,62 @@ }, "resolve-from": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true } } }, "@istanbuljs/schema": { "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true }, "@jest/console": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.4.6.tgz", - "integrity": "sha512-jauXyacQD33n47A44KrlOVeiXHEXDqapSdfb9kTekOchH/Pd18kBIO1+xxJQRLuG+LUuljFCwTG92ra4NW7SpA==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", + "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", "dev": true, "requires": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^27.4.6", - "jest-util": "^27.4.2", + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", "slash": "^3.0.0" } }, "@jest/core": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.7.tgz", - "integrity": "sha512-n181PurSJkVMS+kClIFSX/LLvw9ExSb+4IMtD6YnfxZVerw9ANYtW0bPrm0MJu2pfe9SY9FJ9FtQ+MdZkrZwjg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", + "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", "dev": true, "requires": { - "@jest/console": "^27.4.6", - "@jest/reporters": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^27.5.1", + "@jest/reporters": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.8.1", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-changed-files": "^27.4.2", - "jest-config": "^27.4.7", - "jest-haste-map": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.6", - "jest-resolve-dependencies": "^27.4.6", - "jest-runner": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", - "jest-watcher": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^27.5.1", + "jest-config": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-resolve-dependencies": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "jest-watcher": "^27.5.1", "micromatch": "^4.0.4", "rimraf": "^3.0.0", "slash": "^3.0.0", @@ -8521,68 +9191,68 @@ } }, "@jest/environment": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.6.tgz", - "integrity": "sha512-E6t+RXPfATEEGVidr84WngLNWZ8ffCPky8RqqRK6u1Bn0LK92INe0MDttyPl/JOzaq92BmDzOeuqk09TvM22Sg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", + "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", "dev": true, "requires": { - "@jest/fake-timers": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", - "jest-mock": "^27.4.6" + "jest-mock": "^27.5.1" } }, "@jest/fake-timers": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.6.tgz", - "integrity": "sha512-mfaethuYF8scV8ntPpiVGIHQgS0XIALbpY2jt2l7wb/bvq4Q5pDLk4EP4D7SAvYT1QrPOPVZAtbdGAOOyIgs7A==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", + "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", "dev": true, "requires": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "@sinonjs/fake-timers": "^8.0.1", "@types/node": "*", - "jest-message-util": "^27.4.6", - "jest-mock": "^27.4.6", - "jest-util": "^27.4.2" + "jest-message-util": "^27.5.1", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" } }, "@jest/globals": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.6.tgz", - "integrity": "sha512-kAiwMGZ7UxrgPzu8Yv9uvWmXXxsy0GciNejlHvfPIfWkSxChzv6bgTS3YqBkGuHcis+ouMFI2696n2t+XYIeFw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", + "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", "dev": true, "requires": { - "@jest/environment": "^27.4.6", - "@jest/types": "^27.4.2", - "expect": "^27.4.6" + "@jest/environment": "^27.5.1", + "@jest/types": "^27.5.1", + "expect": "^27.5.1" } }, "@jest/reporters": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.6.tgz", - "integrity": "sha512-+Zo9gV81R14+PSq4wzee4GC2mhAN9i9a7qgJWL90Gpx7fHYkWpTBvwWNZUXvJByYR9tAVBdc8VxDWqfJyIUrIQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", + "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.2", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-instrument": "^5.1.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-haste-map": "^27.4.6", - "jest-resolve": "^27.4.6", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.6", + "jest-haste-map": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", "slash": "^3.0.0", "source-map": "^0.6.0", "string-length": "^4.0.1", @@ -8591,56 +9261,56 @@ } }, "@jest/source-map": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.4.0.tgz", - "integrity": "sha512-Ntjx9jzP26Bvhbm93z/AKcPRj/9wrkI88/gK60glXDx1q+IeI0rf7Lw2c89Ch6ofonB0On/iRDreQuQ6te9pgQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", + "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", "dev": true, "requires": { "callsites": "^3.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "source-map": "^0.6.0" } }, "@jest/test-result": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.4.6.tgz", - "integrity": "sha512-fi9IGj3fkOrlMmhQqa/t9xum8jaJOOAi/lZlm6JXSc55rJMXKHxNDN1oCP39B0/DhNOa2OMupF9BcKZnNtXMOQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", + "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", "dev": true, "requires": { - "@jest/console": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^27.5.1", + "@jest/types": "^27.5.1", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.6.tgz", - "integrity": "sha512-3GL+nsf6E1PsyNsJuvPyIz+DwFuCtBdtvPpm/LMXVkBJbdFvQYCDpccYT56qq5BGniXWlE81n2qk1sdXfZebnw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", + "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", "dev": true, "requires": { - "@jest/test-result": "^27.4.6", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", - "jest-runtime": "^27.4.6" + "@jest/test-result": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-runtime": "^27.5.1" } }, "@jest/transform": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.6.tgz", - "integrity": "sha512-9MsufmJC8t5JTpWEQJ0OcOOAXaH5ioaIX6uHVBLBMoCZPfKKQF+EqP8kACAvCZ0Y1h2Zr3uOccg8re+Dr5jxyw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", + "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-util": "^27.4.2", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-util": "^27.5.1", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", @@ -8649,9 +9319,9 @@ } }, "@jest/types": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.4.2.tgz", - "integrity": "sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", @@ -8661,8 +9331,32 @@ "chalk": "^4.0.0" } }, + "@jridgewell/resolve-uri": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", + "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", + "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz", + "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "requires": { "@nodelib/fs.stat": "2.0.5", @@ -8671,10 +9365,14 @@ }, "@nodelib/fs.stat": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true }, "@nodelib/fs.walk": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "requires": { "@nodelib/fs.scandir": "2.1.5", @@ -8682,7 +9380,9 @@ } }, "@npmcli/fs": { - "version": "1.0.0", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", + "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", "dev": true, "requires": { "@gar/promisify": "^1.0.1", @@ -8690,21 +9390,34 @@ } }, "@npmcli/git": { - "version": "2.1.0", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.0.tgz", + "integrity": "sha512-xfSBJ+KBMZWWqRHFbEgIaXG/LtELHrQZMJ72Gkb3yWdHysu/7+VGOs8ME0c3td7QNQX57Ggo3kYL6ylcd70/kA==", "dev": true, "requires": { "@npmcli/promise-spawn": "^1.3.2", - "lru-cache": "^6.0.0", + "lru-cache": "^7.3.1", "mkdirp": "^1.0.4", - "npm-pick-manifest": "^6.1.1", + "npm-pick-manifest": "^7.0.0", + "proc-log": "^2.0.0", "promise-inflight": "^1.0.1", "promise-retry": "^2.0.1", "semver": "^7.3.5", "which": "^2.0.2" + }, + "dependencies": { + "lru-cache": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.3.1.tgz", + "integrity": "sha512-nX1x4qUrKqwbIAhv4s9et4FIUVzNOpeY07bsjGUy8gwJrXH/wScImSQqXErmo/b2jZY2r0mohbLA9zVj7u1cNw==", + "dev": true + } } }, "@npmcli/installed-package-contents": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", + "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", "dev": true, "requires": { "npm-bundled": "^1.1.1", @@ -8713,6 +9426,8 @@ }, "@npmcli/move-file": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", "dev": true, "requires": { "mkdirp": "^1.0.4", @@ -8721,10 +9436,14 @@ }, "@npmcli/node-gyp": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", + "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", "dev": true }, "@npmcli/promise-spawn": { "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", + "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", "dev": true, "requires": { "infer-owner": "^1.0.4" @@ -8732,6 +9451,8 @@ }, "@npmcli/run-script": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-2.0.0.tgz", + "integrity": "sha512-fSan/Pu11xS/TdaTpTB0MRn9guwGU8dye+x56mEVgBEd/QsybBbYcAL0phPXi8SGWFEChkQd6M9qL4y6VOpFig==", "dev": true, "requires": { "@npmcli/node-gyp": "^1.0.2", @@ -8742,6 +9463,8 @@ }, "@rollup/plugin-commonjs": { "version": "21.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.1.tgz", + "integrity": "sha512-EA+g22lbNJ8p5kuZJUYyhhDK7WgJckW5g4pNN7n4mAFUM96VuwUnNT3xr2Db2iCZPI1pJPbGyfT5mS9T1dHfMg==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -8768,9 +9491,9 @@ } }, "@rollup/plugin-replace": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-3.0.1.tgz", - "integrity": "sha512-989J5oRzf3mm0pO/0djTijdfEh9U3n63BIXN5X7T4U9BP+fN4oxQ6DvDuBvFaHA6scaHQRclqmKQEkBhB7k7Hg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-3.1.0.tgz", + "integrity": "sha512-pA3XRUrSKybVYqmH5TqWNZpGxF+VV+1GrYchKgCNIj2vsSOX7CVm2RCtx8p2nrC7xvkziYyK+lSi74T93MU3YA==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -8789,6 +9512,8 @@ }, "@rollup/pluginutils": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", "dev": true, "requires": { "@types/estree": "0.0.39", @@ -8798,12 +9523,16 @@ "dependencies": { "estree-walker": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", "dev": true } } }, "@sindresorhus/is": { "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", "dev": true }, "@sinonjs/commons": { @@ -8827,101 +9556,18 @@ "@sora/e2ee": { "version": "file:packages/e2ee", "requires": { - "@rollup/plugin-replace": "^3.0.1", + "@rollup/plugin-node-resolve": "^13.1.3", + "@rollup/plugin-replace": "^3.1.0", "@rollup/plugin-typescript": "^8.3.0", "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^5.10.2", - "@typescript-eslint/parser": "^5.10.2", - "eslint": "^8.8.0", - "eslint-config-prettier": "^8.3.0", + "@typescript-eslint/eslint-plugin": "^5.12.0", + "@typescript-eslint/parser": "^5.12.0", + "eslint": "^8.9.0", + "eslint-config-prettier": "^8.4.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.5.1", - "rollup": "^2.66.1", + "rollup": "^2.67.3", "typescript": "^4.5.5" - }, - "dependencies": { - "@typescript-eslint/eslint-plugin": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.2.tgz", - "integrity": "sha512-4W/9lLuE+v27O/oe7hXJKjNtBLnZE8tQAFpapdxwSVHqtmIoPB1gph3+ahNwVuNL37BX7YQHyGF9Xv6XCnIX2Q==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.10.2", - "@typescript-eslint/type-utils": "5.10.2", - "@typescript-eslint/utils": "5.10.2", - "debug": "^4.3.2", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.2.0", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/parser": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.10.2.tgz", - "integrity": "sha512-JaNYGkaQVhP6HNF+lkdOr2cAs2wdSZBoalE22uYWq8IEv/OVH0RksSGydk+sW8cLoSeYmC+OHvRyv2i4AQ7Czg==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.10.2", - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/typescript-estree": "5.10.2", - "debug": "^4.3.2" - } - }, - "@typescript-eslint/scope-manager": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.2.tgz", - "integrity": "sha512-39Tm6f4RoZoVUWBYr3ekS75TYgpr5Y+X0xLZxXqcZNDWZdJdYbKd3q2IR4V9y5NxxiPu/jxJ8XP7EgHiEQtFnw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/visitor-keys": "5.10.2" - } - }, - "@typescript-eslint/types": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.2.tgz", - "integrity": "sha512-Qfp0qk/5j2Rz3p3/WhWgu4S1JtMcPgFLnmAKAW061uXxKSa7VWKZsDXVaMXh2N60CX9h6YLaBoy9PJAfCOjk3w==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.2.tgz", - "integrity": "sha512-WHHw6a9vvZls6JkTgGljwCsMkv8wu8XU8WaYKeYhxhWXH/atZeiMW6uDFPLZOvzNOGmuSMvHtZKd6AuC8PrwKQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/visitor-keys": "5.10.2", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.2.tgz", - "integrity": "sha512-zHIhYGGGrFJvvyfwHk5M08C5B5K4bewkm+rrvNTKk1/S15YHR+SA/QUF8ZWscXSfEaB8Nn2puZj+iHcoxVOD/Q==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.10.2", - "eslint-visitor-keys": "^3.0.0" - } - }, - "eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", - "dev": true - }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - } } }, "@sora/go-wasm": { @@ -8932,110 +9578,28 @@ "requires": { "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-node-resolve": "^13.1.3", - "@rollup/plugin-replace": "^3.0.1", + "@rollup/plugin-replace": "^3.1.0", "@rollup/plugin-typescript": "^8.3.0", "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.10.2", - "@typescript-eslint/parser": "5.10.2", + "@typescript-eslint/eslint-plugin": "5.12.0", + "@typescript-eslint/parser": "5.12.0", "eslint": "8.9.0", - "eslint-config-prettier": "8.3.0", + "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", "fflate": "^0.7.3", - "jest": "^27.4.7", + "jest": "^27.5.1", "prettier": "^2.5.1", - "rollup": "^2.66.1", + "rollup": "^2.67.3", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^27.1.3", "typescript": "^4.5.5" - }, - "dependencies": { - "@typescript-eslint/eslint-plugin": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.2.tgz", - "integrity": "sha512-4W/9lLuE+v27O/oe7hXJKjNtBLnZE8tQAFpapdxwSVHqtmIoPB1gph3+ahNwVuNL37BX7YQHyGF9Xv6XCnIX2Q==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.10.2", - "@typescript-eslint/type-utils": "5.10.2", - "@typescript-eslint/utils": "5.10.2", - "debug": "^4.3.2", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.2.0", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/parser": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.10.2.tgz", - "integrity": "sha512-JaNYGkaQVhP6HNF+lkdOr2cAs2wdSZBoalE22uYWq8IEv/OVH0RksSGydk+sW8cLoSeYmC+OHvRyv2i4AQ7Czg==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.10.2", - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/typescript-estree": "5.10.2", - "debug": "^4.3.2" - } - }, - "@typescript-eslint/scope-manager": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.2.tgz", - "integrity": "sha512-39Tm6f4RoZoVUWBYr3ekS75TYgpr5Y+X0xLZxXqcZNDWZdJdYbKd3q2IR4V9y5NxxiPu/jxJ8XP7EgHiEQtFnw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/visitor-keys": "5.10.2" - } - }, - "@typescript-eslint/types": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.2.tgz", - "integrity": "sha512-Qfp0qk/5j2Rz3p3/WhWgu4S1JtMcPgFLnmAKAW061uXxKSa7VWKZsDXVaMXh2N60CX9h6YLaBoy9PJAfCOjk3w==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.2.tgz", - "integrity": "sha512-WHHw6a9vvZls6JkTgGljwCsMkv8wu8XU8WaYKeYhxhWXH/atZeiMW6uDFPLZOvzNOGmuSMvHtZKd6AuC8PrwKQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/visitor-keys": "5.10.2", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.2.tgz", - "integrity": "sha512-zHIhYGGGrFJvvyfwHk5M08C5B5K4bewkm+rrvNTKk1/S15YHR+SA/QUF8ZWscXSfEaB8Nn2puZj+iHcoxVOD/Q==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.10.2", - "eslint-visitor-keys": "^3.0.0" - } - }, - "eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", - "dev": true - }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - } } }, "@szmarczak/http-timer": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", "dev": true, "requires": { "defer-to-connect": "^1.0.1" @@ -9043,6 +9607,8 @@ }, "@tootallnate/once": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true }, "@types/babel__core": { @@ -9079,6 +9645,8 @@ }, "@types/babel__traverse": { "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.14.2.tgz", + "integrity": "sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==", "dev": true, "requires": { "@babel/types": "^7.3.0" @@ -9086,6 +9654,8 @@ }, "@types/estree": { "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "dev": true }, "@types/graceful-fs": { @@ -9098,11 +9668,15 @@ } }, "@types/istanbul-lib-coverage": { - "version": "2.0.3", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", "dev": true }, "@types/istanbul-lib-report": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "*" @@ -9110,6 +9684,8 @@ }, "@types/istanbul-reports": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", "dev": true, "requires": { "@types/istanbul-lib-report": "*" @@ -9127,20 +9703,26 @@ }, "@types/json-schema": { "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", "dev": true }, "@types/node": { - "version": "16.11.6", + "version": "17.0.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.18.tgz", + "integrity": "sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA==", "dev": true }, "@types/prettier": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.3.tgz", - "integrity": "sha512-QzSuZMBuG5u8HqYz01qtMdg/Jfctlnvj1z/lYnIDXs/golxw0fxtRAHd9KrzjR7Yxz1qVeI00o0kiO3PmVdJ9w==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.4.tgz", + "integrity": "sha512-ReVR2rLTV1kvtlWFyuot+d1pkpG2Fw/XKE3PDAdj57rbM97ttSp9JZ2UsP+2EHTylra9cUf6JA7tGwW1INzUrA==", "dev": true }, "@types/resolve": { "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", "dev": true, "requires": { "@types/node": "*" @@ -9154,6 +9736,8 @@ }, "@types/yargs": { "version": "16.0.4", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", + "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -9161,84 +9745,109 @@ }, "@types/yargs-parser": { "version": "20.2.1", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", + "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", "dev": true }, + "@typescript-eslint/eslint-plugin": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.0.tgz", + "integrity": "sha512-fwCMkDimwHVeIOKeBHiZhRUfJXU8n6xW1FL9diDxAyGAFvKcH4csy0v7twivOQdQdA0KC8TDr7GGRd3L4Lv0rQ==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.12.0", + "@typescript-eslint/type-utils": "5.12.0", + "@typescript-eslint/utils": "5.12.0", + "debug": "^4.3.2", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.2.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/parser": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.12.0.tgz", + "integrity": "sha512-MfSwg9JMBojMUoGjUmX+D2stoQj1CBYTCP0qnnVtu9A+YQXVKNtLjasYh+jozOcrb/wau8TCfWOkQTiOAruBog==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.12.0", + "@typescript-eslint/types": "5.12.0", + "@typescript-eslint/typescript-estree": "5.12.0", + "debug": "^4.3.2" + } + }, + "@typescript-eslint/scope-manager": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.0.tgz", + "integrity": "sha512-GAMobtIJI8FGf1sLlUWNUm2IOkIjvn7laFWyRx7CLrv6nLBI7su+B7lbStqVlK5NdLvHRFiJo2HhiDF7Ki01WQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.12.0", + "@typescript-eslint/visitor-keys": "5.12.0" + } + }, "@typescript-eslint/type-utils": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.10.2.tgz", - "integrity": "sha512-uRKSvw/Ccs5FYEoXW04Z5VfzF2iiZcx8Fu7DGIB7RHozuP0VbKNzP1KfZkHBTM75pCpsWxIthEH1B33dmGBKHw==", + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.12.0.tgz", + "integrity": "sha512-9j9rli3zEBV+ae7rlbBOotJcI6zfc6SHFMdKI9M3Nc0sy458LJ79Os+TPWeBBL96J9/e36rdJOfCuyRSgFAA0Q==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.10.2", + "@typescript-eslint/utils": "5.12.0", "debug": "^4.3.2", "tsutils": "^3.21.0" } }, + "@typescript-eslint/types": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.0.tgz", + "integrity": "sha512-JowqbwPf93nvf8fZn5XrPGFBdIK8+yx5UEGs2QFAYFI8IWYfrzz+6zqlurGr2ctShMaJxqwsqmra3WXWjH1nRQ==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.0.tgz", + "integrity": "sha512-Dd9gVeOqt38QHR0BEA8oRaT65WYqPYbIc5tRFQPkfLquVEFPD1HAtbZT98TLBkEcCkvwDYOAvuSvAD9DnQhMfQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.12.0", + "@typescript-eslint/visitor-keys": "5.12.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, "@typescript-eslint/utils": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.10.2.tgz", - "integrity": "sha512-vuJaBeig1NnBRkf7q9tgMLREiYD7zsMrsN1DA3wcoMDvr3BTFiIpKjGiYZoKPllfEwN7spUjv7ZqD+JhbVjEPg==", + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.12.0.tgz", + "integrity": "sha512-k4J2WovnMPGI4PzKgDtQdNrCnmBHpMUFy21qjX2CoPdoBcSBIMvVBr9P2YDP8jOqZOeK3ThOL6VO/sy6jtnvzw==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.10.2", - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/typescript-estree": "5.10.2", + "@typescript-eslint/scope-manager": "5.12.0", + "@typescript-eslint/types": "5.12.0", + "@typescript-eslint/typescript-estree": "5.12.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.2.tgz", - "integrity": "sha512-39Tm6f4RoZoVUWBYr3ekS75TYgpr5Y+X0xLZxXqcZNDWZdJdYbKd3q2IR4V9y5NxxiPu/jxJ8XP7EgHiEQtFnw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/visitor-keys": "5.10.2" - } - }, - "@typescript-eslint/types": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.2.tgz", - "integrity": "sha512-Qfp0qk/5j2Rz3p3/WhWgu4S1JtMcPgFLnmAKAW061uXxKSa7VWKZsDXVaMXh2N60CX9h6YLaBoy9PJAfCOjk3w==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.2.tgz", - "integrity": "sha512-WHHw6a9vvZls6JkTgGljwCsMkv8wu8XU8WaYKeYhxhWXH/atZeiMW6uDFPLZOvzNOGmuSMvHtZKd6AuC8PrwKQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.10.2", - "@typescript-eslint/visitor-keys": "5.10.2", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.10.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.2.tgz", - "integrity": "sha512-zHIhYGGGrFJvvyfwHk5M08C5B5K4bewkm+rrvNTKk1/S15YHR+SA/QUF8ZWscXSfEaB8Nn2puZj+iHcoxVOD/Q==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.10.2", - "eslint-visitor-keys": "^3.0.0" - } - }, - "eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", - "dev": true - } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.0.tgz", + "integrity": "sha512-cFwTlgnMV6TgezQynx2c/4/tx9Tufbuo9LPzmWqyRC3QC4qTGkAG1C6pBr0/4I10PAI/FlYunI3vJjIcu+ZHMg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.12.0", + "eslint-visitor-keys": "^3.0.0" } }, "@zeit/schemas": { "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.6.0.tgz", + "integrity": "sha512-uUrgZ8AxS+Lio0fZKAipJjAh415JyrOZowliZAzmnJSsf7piVL5w+G0+gFJ0KSu3QRhvui/7zuvpLz03YjXAhg==", "dev": true }, "abab": { @@ -9249,18 +9858,24 @@ }, "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 }, "accepts": { - "version": "1.3.7", + "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==", "dev": true, "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" } }, "acorn": { - "version": "7.4.1", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "dev": true }, "acorn-globals": { @@ -9271,6 +9886,14 @@ "requires": { "acorn": "^7.1.1", "acorn-walk": "^7.1.1" + }, + "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + } } }, "acorn-jsx": { @@ -9288,13 +9911,17 @@ }, "agent-base": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, "requires": { "debug": "4" } }, "agentkeepalive": { - "version": "4.1.4", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.0.tgz", + "integrity": "sha512-0PhAp58jZNw13UJv7NVdTGb0ZcghHUb3DrZ046JiiJY/BOaTTpbwdHq2VObPCBV8M2GPh7sgrJ3AQ8Ey468LJw==", "dev": true, "requires": { "debug": "^4.1.0", @@ -9304,6 +9931,8 @@ }, "aggregate-error": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "requires": { "clean-stack": "^2.0.0", @@ -9312,6 +9941,8 @@ }, "ajv": { "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -9322,6 +9953,8 @@ }, "ansi-align": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", "dev": true, "requires": { "string-width": "^4.1.0" @@ -9346,10 +9979,14 @@ }, "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 }, "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -9367,14 +10004,20 @@ }, "aproba": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", "dev": true }, "arch": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", "dev": true }, "are-we-there-yet": { - "version": "2.0.0", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.0.tgz", + "integrity": "sha512-0GWpv50YSOcLXaN6/FAKY3vfRbllXWV2xvfA/oKJF8pzFhWXPV+yjhJXDBbjscDYowv7Yw1A3uigpzn5iEGTyw==", "dev": true, "requires": { "delegates": "^1.0.0", @@ -9383,14 +10026,20 @@ }, "arg": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arg/-/arg-2.0.0.tgz", + "integrity": "sha512-XxNTUzKnz1ctK3ZIcI2XUPlD96wbHP2nGqkPKpvk/HNRlPveYrXIVSTk9m3LcqOgDPg3B1nMvdV/K8wZd7PG4w==", "dev": true }, "argparse": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, "array-union": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, "asynckit": { @@ -9400,23 +10049,25 @@ "dev": true }, "babel-jest": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.6.tgz", - "integrity": "sha512-qZL0JT0HS1L+lOuH+xC2DVASR3nunZi/ozGhpgauJHgmI7f8rudxf6hUjEHympdQ/J64CdKmPkgfJ+A3U6QCrg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", + "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==", "dev": true, "requires": { - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^27.4.0", + "babel-preset-jest": "^27.5.1", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "slash": "^3.0.0" } }, "babel-plugin-istanbul": { "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -9427,9 +10078,9 @@ } }, "babel-plugin-jest-hoist": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.4.0.tgz", - "integrity": "sha512-Jcu7qS4OX5kTWBc45Hz7BMmgXuJqRnhatqpUhnzGC3OBYpOmf2tv6jFNwZpwM7wU7MUuv2r9IPS/ZlYOuburVw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz", + "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==", "dev": true, "requires": { "@babel/template": "^7.3.3", @@ -9440,6 +10091,8 @@ }, "babel-preset-current-node-syntax": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", "dev": true, "requires": { "@babel/plugin-syntax-async-generators": "^7.8.4", @@ -9457,21 +10110,25 @@ } }, "babel-preset-jest": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.4.0.tgz", - "integrity": "sha512-NK4jGYpnBvNxcGo7/ZpZJr51jCGT+3bwwpVIDY2oNfTxJJldRtB4VAcYdgp1loDE50ODuTu+yBjpMAswv5tlpg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", + "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^27.4.0", + "babel-plugin-jest-hoist": "^27.5.1", "babel-preset-current-node-syntax": "^1.0.0" } }, "balanced-match": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "boxen": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", "dev": true, "requires": { "ansi-align": "^3.0.0", @@ -9485,15 +10142,18 @@ } }, "brace-expansion": { - "version": "1.1.11", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" } }, "braces": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { "fill-range": "^7.0.1" @@ -9506,18 +10166,22 @@ "dev": true }, "browserslist": { - "version": "4.17.5", + "version": "4.19.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.3.tgz", + "integrity": "sha512-XK3X4xtKJ+Txj8G5c30B4gsm71s69lqXlkYui4s6EkKxuv49qjYlY6oVd+IFJ73d4YymtM3+djvvt/R/iJwwDg==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001271", - "electron-to-chromium": "^1.3.878", + "caniuse-lite": "^1.0.30001312", + "electron-to-chromium": "^1.4.71", "escalade": "^3.1.1", - "node-releases": "^2.0.1", + "node-releases": "^2.0.2", "picocolors": "^1.0.0" } }, "bs-logger": { "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", "dev": true, "requires": { "fast-json-stable-stringify": "2.x" @@ -9534,22 +10198,32 @@ }, "buffer-from": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, "builtin-modules": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", + "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", "dev": true }, "builtins": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", "dev": true }, "bytes": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", "dev": true }, "cacache": { "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", "dev": true, "requires": { "@npmcli/fs": "^1.0.0", @@ -9574,6 +10248,8 @@ }, "cacheable-request": { "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", "dev": true, "requires": { "clone-response": "^1.0.2", @@ -9587,6 +10263,8 @@ "dependencies": { "get-stream": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "requires": { "pump": "^3.0.0" @@ -9594,24 +10272,34 @@ }, "lowercase-keys": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "dev": true } } }, "callsites": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "camelcase": { - "version": "6.2.1", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, "caniuse-lite": { - "version": "1.0.30001272", + "version": "1.0.30001312", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz", + "integrity": "sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ==", "dev": true }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -9626,14 +10314,20 @@ }, "chownr": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", "dev": true }, "ci-info": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, "cint": { "version": "8.2.1", + "resolved": "https://registry.npmjs.org/cint/-/cint-8.2.1.tgz", + "integrity": "sha1-cDhrG0jidz0NYxZqVa/5TvRFahI=", "dev": true }, "cjs-module-lexer": { @@ -9644,14 +10338,20 @@ }, "clean-stack": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true }, "cli-boxes": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", "dev": true }, "cli-table": { "version": "0.3.11", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.11.tgz", + "integrity": "sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ==", "dev": true, "requires": { "colors": "1.0.3" @@ -9659,6 +10359,8 @@ }, "clipboardy": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-2.3.0.tgz", + "integrity": "sha512-mKhiIL2DrQIsuXMgBgnfEHOZOryC7kY7YO//TN6c63wlEm3NG5tz+YgY5rVi29KCmq/QQjKYvM7a19+MDOTHOQ==", "dev": true, "requires": { "arch": "^2.1.1", @@ -9679,6 +10381,8 @@ }, "clone-response": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, "requires": { "mimic-response": "^1.0.0" @@ -9698,6 +10402,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -9705,14 +10411,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "color-support": { "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "dev": true }, "colors": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, "combined-stream": { @@ -9725,15 +10437,21 @@ } }, "commander": { - "version": "8.3.0", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", + "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", "dev": true }, "commondir": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, "compressible": { "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, "requires": { "mime-db": ">= 1.43.0 < 2" @@ -9741,6 +10459,8 @@ }, "compression": { "version": "1.7.3", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz", + "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==", "dev": true, "requires": { "accepts": "~1.3.5", @@ -9754,6 +10474,8 @@ "dependencies": { "debug": { "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -9761,16 +10483,22 @@ }, "ms": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true } } }, "concat-map": { "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "configstore": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", "dev": true, "requires": { "dot-prop": "^5.2.0", @@ -9783,14 +10511,20 @@ }, "console-control-strings": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true }, "content-disposition": { "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", "dev": true }, "convert-source-map": { "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", "dev": true, "requires": { "safe-buffer": "~5.1.1" @@ -9798,6 +10532,8 @@ }, "cross-spawn": { "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { "nice-try": "^1.0.4", @@ -9809,10 +10545,14 @@ "dependencies": { "semver": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, "which": { "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -9822,6 +10562,8 @@ }, "crypto-random-string": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true }, "cssom": { @@ -9859,7 +10601,9 @@ } }, "debug": { - "version": "4.3.2", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", "dev": true, "requires": { "ms": "2.1.2" @@ -9873,6 +10617,8 @@ }, "decompress-response": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, "requires": { "mimic-response": "^1.0.0" @@ -9886,18 +10632,26 @@ }, "deep-extend": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true }, "deep-is": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "deepmerge": { "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true }, "defer-to-connect": { "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", "dev": true }, "delayed-stream": { @@ -9908,10 +10662,14 @@ }, "delegates": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true }, "depd": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "dev": true }, "detect-newline": { @@ -9921,13 +10679,15 @@ "dev": true }, "diff-sequences": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.4.0.tgz", - "integrity": "sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", + "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==", "dev": true }, "dir-glob": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "requires": { "path-type": "^4.0.0" @@ -9935,6 +10695,8 @@ }, "doctrine": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "requires": { "esutils": "^2.0.2" @@ -9959,6 +10721,8 @@ }, "dot-prop": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", "dev": true, "requires": { "is-obj": "^2.0.0" @@ -9966,10 +10730,14 @@ }, "duplexer3": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", "dev": true }, "electron-to-chromium": { - "version": "1.3.882", + "version": "1.4.71", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.71.tgz", + "integrity": "sha512-Hk61vXXKRb2cd3znPE9F+2pLWdIOmP7GjiTj45y6L3W/lO+hSnUSUhq+6lEaERWBdZOHbk2s3YV5c9xVl3boVw==", "dev": true }, "emittery": { @@ -9980,10 +10748,14 @@ }, "emoji-regex": { "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "encoding": { "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", "dev": true, "optional": true, "requires": { @@ -9992,6 +10764,8 @@ }, "end-of-stream": { "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "requires": { "once": "^1.4.0" @@ -9999,22 +10773,41 @@ }, "env-paths": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", "dev": true }, "err-code": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", "dev": true }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, "escalade": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, "escape-goat": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", "dev": true }, "escape-string-regexp": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, "escodegen": { @@ -10120,8 +10913,20 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "cross-spawn": { "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -10131,6 +10936,8 @@ }, "escape-string-regexp": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, "eslint-scope": { @@ -10143,12 +10950,6 @@ "estraverse": "^5.2.0" } }, - "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true - }, "estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", @@ -10164,18 +10965,25 @@ "is-glob": "^4.0.3" } }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } }, "path-key": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { "shebang-regex": "^3.0.0" @@ -10183,21 +10991,29 @@ }, "shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true } } }, "eslint-config-prettier": { - "version": "8.3.0", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.4.0.tgz", + "integrity": "sha512-CFotdUcMY18nGRo5KGsnNxpznzhkopOcOo0InID+sgQssPrzjvsyKZPvOgymTFeHrFuC3Tzdf2YndhXtULK9Iw==", "dev": true, "requires": {} }, "eslint-plugin-prettier": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz", + "integrity": "sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==", "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0" @@ -10205,6 +11021,8 @@ }, "eslint-scope": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -10213,13 +11031,25 @@ }, "eslint-utils": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "requires": { "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } } }, "eslint-visitor-keys": { - "version": "2.1.0", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true }, "espree": { @@ -10231,28 +11061,18 @@ "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", "eslint-visitor-keys": "^3.3.0" - }, - "dependencies": { - "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true - }, - "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true - } } }, "esprima": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "esquery": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -10260,12 +11080,16 @@ "dependencies": { "estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } }, "esrecurse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { "estraverse": "^5.2.0" @@ -10273,24 +11097,34 @@ "dependencies": { "estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } }, "estraverse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, "estree-walker": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "dev": true }, "esutils": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, "execa": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "dev": true, "requires": { "cross-spawn": "^6.0.0", @@ -10309,27 +11143,33 @@ "dev": true }, "expect": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.4.6.tgz", - "integrity": "sha512-1M/0kAALIaj5LaG66sFJTbRsWTADnylly82cu4bspI0nl+pgP4E6Bh/aqdHlTUjul06K7xQnnrAoqfxVU0+/ag==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", + "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", "dev": true, "requires": { - "@jest/types": "^27.4.2", - "jest-get-type": "^27.4.0", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6" + "@jest/types": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1" } }, "fast-deep-equal": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "fast-diff": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", "dev": true }, "fast-glob": { - "version": "3.2.7", + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -10341,18 +11181,26 @@ }, "fast-json-stable-stringify": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, "fast-levenshtein": { "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, "fast-memoize": { "version": "2.5.2", + "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz", + "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==", "dev": true }, "fast-url-parser": { "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0=", "dev": true, "requires": { "punycode": "^1.3.2" @@ -10360,6 +11208,8 @@ }, "fastq": { "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -10375,14 +11225,20 @@ } }, "fflate": { - "version": "0.7.3" + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.3.tgz", + "integrity": "sha512-0Zz1jOzJWERhyhsimS54VTqOteCNwRtIlh8isdL0AXLo0g7xNTfTL7oWrkmCnPhZGocKIkWHBistBrrpoNH3aw==" }, "figgy-pudding": { "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", "dev": true }, "file-entry-cache": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { "flat-cache": "^3.0.4" @@ -10390,6 +11246,8 @@ }, "fill-range": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { "to-regex-range": "^5.0.1" @@ -10397,6 +11255,8 @@ }, "find-up": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "requires": { "locate-path": "^6.0.0", @@ -10405,6 +11265,8 @@ }, "flat-cache": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { "flatted": "^3.1.0", @@ -10412,7 +11274,9 @@ } }, "flatted": { - "version": "3.2.2", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", "dev": true }, "form-data": { @@ -10428,10 +11292,14 @@ }, "fp-and-or": { "version": "0.1.3", + "resolved": "https://registry.npmjs.org/fp-and-or/-/fp-and-or-0.1.3.tgz", + "integrity": "sha512-wJaE62fLaB3jCYvY2ZHjZvmKK2iiLiiehX38rz5QZxtdN8fVPJDeZUiVvJrHStdTc+23LHlyZuSEKgFc0pxi2g==", "dev": true }, "fs-minipass": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "dev": true, "requires": { "minipass": "^3.0.0" @@ -10439,23 +11307,33 @@ }, "fs.realpath": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, "fsevents": { "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "optional": true }, "function-bind": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "functional-red-black-tree": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, "gauge": { - "version": "4.0.0", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.1.tgz", + "integrity": "sha512-zJ4jePUHR8cceduZ53b6temRalyGpkC2Kc2r3ecNphmL+uWNoJ3YcOcUjpbG6WwoE/Ef6/+aEZz63neI2WIa1Q==", "dev": true, "requires": { "ansi-regex": "^5.0.1", @@ -10471,6 +11349,8 @@ }, "gensync": { "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, "get-caller-file": { @@ -10481,14 +11361,20 @@ }, "get-package-type": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true }, "get-stdin": { "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", "dev": true }, "get-stream": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "dev": true, "requires": { "pump": "^3.0.0" @@ -10496,6 +11382,8 @@ }, "glob": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -10504,10 +11392,33 @@ "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, "glob-parent": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -10515,6 +11426,8 @@ }, "global-dirs": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", "dev": true, "requires": { "ini": "2.0.0" @@ -10522,31 +11435,39 @@ "dependencies": { "ini": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true } } }, "globals": { - "version": "13.12.0", + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "dev": true, "requires": { "type-fest": "^0.20.2" } }, "globby": { - "version": "11.0.4", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "requires": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" } }, "got": { "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", "dev": true, "requires": { "@sindresorhus/is": "^0.14.0", @@ -10563,11 +11484,15 @@ } }, "graceful-fs": { - "version": "4.2.8", + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "dev": true }, "has": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { "function-bind": "^1.1.1" @@ -10575,14 +11500,20 @@ }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "has-unicode": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true }, "has-yarn": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", "dev": true }, "hosted-git-info": { @@ -10611,10 +11542,14 @@ }, "http-cache-semantics": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", "dev": true }, "http-proxy-agent": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, "requires": { "@tootallnate/once": "1", @@ -10624,6 +11559,8 @@ }, "https-proxy-agent": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", "dev": true, "requires": { "agent-base": "6", @@ -10638,6 +11575,8 @@ }, "humanize-ms": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", "dev": true, "requires": { "ms": "^2.0.0" @@ -10645,6 +11584,8 @@ }, "iconv-lite": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "optional": true, "requires": { @@ -10652,18 +11593,45 @@ } }, "ignore": { - "version": "5.1.8", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, "ignore-walk": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-4.0.1.tgz", + "integrity": "sha512-rzDQLaW4jQbh2YrOFlJdCtX8qgJTehFRYiUB2r1osqTeDzV/3+Jh8fz1oAPzUThf3iku8Ds4IDqawI5d8mUiQw==", "dev": true, "requires": { "minimatch": "^3.0.4" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, "import-fresh": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -10672,6 +11640,8 @@ }, "import-lazy": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", "dev": true }, "import-local": { @@ -10686,18 +11656,26 @@ }, "imurmurhash": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, "indent-string": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true }, "infer-owner": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", "dev": true }, "inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { "once": "^1.3.0", @@ -10706,25 +11684,41 @@ }, "inherits": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "ini": { "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "ip": { "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, "is-ci": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, "requires": { "ci-info": "^2.0.0" } }, "is-core-module": { - "version": "2.8.0", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", "dev": true, "requires": { "has": "^1.0.3" @@ -10732,14 +11726,20 @@ }, "is-docker": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true }, "is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "is-generator-fn": { @@ -10750,6 +11750,8 @@ }, "is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -10757,6 +11759,8 @@ }, "is-installed-globally": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", "dev": true, "requires": { "global-dirs": "^3.0.0", @@ -10765,26 +11769,38 @@ }, "is-lambda": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU=", "dev": true }, "is-module": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", "dev": true }, "is-npm": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", "dev": true }, "is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, "is-obj": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true }, "is-path-inside": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true }, "is-potential-custom-element-name": { @@ -10795,6 +11811,8 @@ }, "is-reference": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", "dev": true, "requires": { "@types/estree": "*" @@ -10802,14 +11820,20 @@ }, "is-stream": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, "is-typedarray": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, "is-wsl": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, "requires": { "is-docker": "^2.0.0" @@ -10817,14 +11841,20 @@ }, "is-yarn-global": { "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", "dev": true }, "isexe": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, "istanbul-lib-coverage": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", "dev": true }, "istanbul-lib-instrument": { @@ -10871,9 +11901,9 @@ } }, "istanbul-reports": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.3.tgz", - "integrity": "sha512-x9LtDVtfm/t1GFiLl3NffC7hz+I1ragvgX1P/Lg1NlIagifZDKUkuuaAxH/qpwj2IuEfD8G2Bs/UKp+sZ/pKkg==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", + "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", "dev": true, "requires": { "html-escaper": "^2.0.0", @@ -10881,23 +11911,23 @@ } }, "jest": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.7.tgz", - "integrity": "sha512-8heYvsx7nV/m8m24Vk26Y87g73Ba6ueUd0MWed/NXMhSZIm62U/llVbS0PJe1SHunbyXjJ/BqG1z9bFjGUIvTg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", + "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==", "dev": true, "requires": { - "@jest/core": "^27.4.7", + "@jest/core": "^27.5.1", "import-local": "^3.0.2", - "jest-cli": "^27.4.7" + "jest-cli": "^27.5.1" } }, "jest-changed-files": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.4.2.tgz", - "integrity": "sha512-/9x8MjekuzUQoPjDHbBiXbNEBauhrPU2ct7m8TfCg69ywt1y/N+yYwGh3gCpnqUS3klYWDU/lSNgv+JhoD2k1A==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz", + "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==", "dev": true, "requires": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "execa": "^5.0.0", "throat": "^6.0.1" }, @@ -10975,80 +12005,82 @@ } }, "jest-circus": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.6.tgz", - "integrity": "sha512-UA7AI5HZrW4wRM72Ro80uRR2Fg+7nR0GESbSI/2M+ambbzVuA63mn5T1p3Z/wlhntzGpIG1xx78GP2YIkf6PhQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz", + "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==", "dev": true, "requires": { - "@jest/environment": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/environment": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^27.4.6", + "expect": "^27.5.1", "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.6", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.6", + "jest-each": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1", "slash": "^3.0.0", "stack-utils": "^2.0.3", "throat": "^6.0.1" } }, "jest-cli": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.7.tgz", - "integrity": "sha512-zREYhvjjqe1KsGV15mdnxjThKNDgza1fhDT+iUsXWLCq3sxe9w5xnvyctcYVT5PcdLSjv7Y5dCwTS3FCF1tiuw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz", + "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==", "dev": true, "requires": { - "@jest/core": "^27.4.7", - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/core": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", "chalk": "^4.0.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^27.4.7", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", + "jest-config": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", "prompts": "^2.0.1", "yargs": "^16.2.0" } }, "jest-config": { - "version": "27.4.7", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.7.tgz", - "integrity": "sha512-xz/o/KJJEedHMrIY9v2ParIoYSrSVY6IVeE4z5Z3i101GoA5XgfbJz+1C8EYPsv7u7f39dS8F9v46BHDhn0vlw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz", + "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==", "dev": true, "requires": { "@babel/core": "^7.8.0", - "@jest/test-sequencer": "^27.4.6", - "@jest/types": "^27.4.2", - "babel-jest": "^27.4.6", + "@jest/test-sequencer": "^27.5.1", + "@jest/types": "^27.5.1", + "babel-jest": "^27.5.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", - "graceful-fs": "^4.2.4", - "jest-circus": "^27.4.6", - "jest-environment-jsdom": "^27.4.6", - "jest-environment-node": "^27.4.6", - "jest-get-type": "^27.4.0", - "jest-jasmine2": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.6", - "jest-runner": "^27.4.6", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-circus": "^27.5.1", + "jest-environment-jsdom": "^27.5.1", + "jest-environment-node": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-jasmine2": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", "micromatch": "^4.0.4", - "pretty-format": "^27.4.6", - "slash": "^3.0.0" + "parse-json": "^5.2.0", + "pretty-format": "^27.5.1", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" }, "dependencies": { "ci-info": { @@ -11056,181 +12088,176 @@ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true } } }, "jest-diff": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.6.tgz", - "integrity": "sha512-zjaB0sh0Lb13VyPsd92V7HkqF6yKRH9vm33rwBt7rPYrpQvS1nCvlIy2pICbKta+ZjWngYLNn4cCK4nyZkjS/w==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", + "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^27.4.0", - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.6" + "diff-sequences": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" } }, "jest-docblock": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.4.0.tgz", - "integrity": "sha512-7TBazUdCKGV7svZ+gh7C8esAnweJoG+SvcF6Cjqj4l17zA2q1cMwx2JObSioubk317H+cjcHgP+7fTs60paulg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz", + "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==", "dev": true, "requires": { "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.4.6.tgz", - "integrity": "sha512-n6QDq8y2Hsmn22tRkgAk+z6MCX7MeVlAzxmZDshfS2jLcaBlyhpF3tZSJLR+kXmh23GEvS0ojMR8i6ZeRvpQcA==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz", + "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==", "dev": true, "requires": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "chalk": "^4.0.0", - "jest-get-type": "^27.4.0", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.6" + "jest-get-type": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1" } }, "jest-environment-jsdom": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.6.tgz", - "integrity": "sha512-o3dx5p/kHPbUlRvSNjypEcEtgs6LmvESMzgRFQE6c+Prwl2JLA4RZ7qAnxc5VM8kutsGRTB15jXeeSbJsKN9iA==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz", + "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==", "dev": true, "requires": { - "@jest/environment": "^27.4.6", - "@jest/fake-timers": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", - "jest-mock": "^27.4.6", - "jest-util": "^27.4.2", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1", "jsdom": "^16.6.0" } }, "jest-environment-node": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.6.tgz", - "integrity": "sha512-yfHlZ9m+kzTKZV0hVfhVu6GuDxKAYeFHrfulmy7Jxwsq4V7+ZK7f+c0XP/tbVDMQW7E4neG2u147hFkuVz0MlQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", + "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", "dev": true, "requires": { - "@jest/environment": "^27.4.6", - "@jest/fake-timers": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", - "jest-mock": "^27.4.6", - "jest-util": "^27.4.2" + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" } }, "jest-get-type": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.4.0.tgz", - "integrity": "sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", + "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", "dev": true }, "jest-haste-map": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.6.tgz", - "integrity": "sha512-0tNpgxg7BKurZeFkIOvGCkbmOHbLFf4LUQOxrQSMjvrQaQe3l6E8x6jYC1NuWkGo5WDdbr8FEzUxV2+LWNawKQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", + "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", "dev": true, "requires": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "@types/graceful-fs": "^4.1.2", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "fsevents": "^2.3.2", - "graceful-fs": "^4.2.4", - "jest-regex-util": "^27.4.0", - "jest-serializer": "^27.4.0", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^27.5.1", + "jest-serializer": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", "micromatch": "^4.0.4", "walker": "^1.0.7" } }, "jest-jasmine2": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.6.tgz", - "integrity": "sha512-uAGNXF644I/whzhsf7/qf74gqy9OuhvJ0XYp8SDecX2ooGeaPnmJMjXjKt0mqh1Rl5dtRGxJgNrHlBQIBfS5Nw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz", + "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==", "dev": true, "requires": { - "@jest/environment": "^27.4.6", - "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/environment": "^27.5.1", + "@jest/source-map": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^27.4.6", + "expect": "^27.5.1", "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.6", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.6", + "jest-each": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "pretty-format": "^27.5.1", "throat": "^6.0.1" } }, "jest-leak-detector": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.4.6.tgz", - "integrity": "sha512-kkaGixDf9R7CjHm2pOzfTxZTQQQ2gHTIWKY/JZSiYTc90bZp8kSZnUMS3uLAfwTZwc0tcMRoEX74e14LG1WapA==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz", + "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==", "dev": true, "requires": { - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.6" + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" } }, "jest-matcher-utils": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.6.tgz", - "integrity": "sha512-XD4PKT3Wn1LQnRAq7ZsTI0VRuEc9OrCPFiO1XL7bftTGmfNF0DcEwMHRgqiu7NGf8ZoZDREpGrCniDkjt79WbA==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", + "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^27.4.6", - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.6" + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" } }, "jest-message-util": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.6.tgz", - "integrity": "sha512-0p5szriFU0U74czRSFjH6RyS7UYIAkn/ntwMuOwTGWrQIOh5NzXXrq72LOqIkJKKvFbPq+byZKuBz78fjBERBA==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", + "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^27.4.6", + "pretty-format": "^27.5.1", "slash": "^3.0.0", "stack-utils": "^2.0.3" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", - "dev": true, - "requires": { - "@babel/highlight": "^7.16.7" - } - } } }, "jest-mock": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.4.6.tgz", - "integrity": "sha512-kvojdYRkst8iVSZ1EJ+vc1RRD9llueBjKzXzeCytH3dMM7zvPV/ULcfI2nr0v0VUgm3Bjt3hBCQvOeaBz+ZTHw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", + "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", "dev": true, "requires": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "@types/node": "*" } }, @@ -11242,96 +12269,95 @@ "requires": {} }, "jest-regex-util": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.4.0.tgz", - "integrity": "sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", + "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", "dev": true }, "jest-resolve": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.6.tgz", - "integrity": "sha512-SFfITVApqtirbITKFAO7jOVN45UgFzcRdQanOFzjnbd+CACDoyeX7206JyU92l4cRr73+Qy/TlW51+4vHGt+zw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", + "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", "dev": true, "requires": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.6", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" } }, "jest-resolve-dependencies": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.6.tgz", - "integrity": "sha512-W85uJZcFXEVZ7+MZqIPCscdjuctruNGXUZ3OHSXOfXR9ITgbUKeHj+uGcies+0SsvI5GtUfTw4dY7u9qjTvQOw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz", + "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==", "dev": true, "requires": { - "@jest/types": "^27.4.2", - "jest-regex-util": "^27.4.0", - "jest-snapshot": "^27.4.6" + "@jest/types": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-snapshot": "^27.5.1" } }, "jest-runner": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.6.tgz", - "integrity": "sha512-IDeFt2SG4DzqalYBZRgbbPmpwV3X0DcntjezPBERvnhwKGWTW7C5pbbA5lVkmvgteeNfdd/23gwqv3aiilpYPg==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz", + "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==", "dev": true, "requires": { - "@jest/console": "^27.4.6", - "@jest/environment": "^27.4.6", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/console": "^27.5.1", + "@jest/environment": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-docblock": "^27.4.0", - "jest-environment-jsdom": "^27.4.6", - "jest-environment-node": "^27.4.6", - "jest-haste-map": "^27.4.6", - "jest-leak-detector": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-resolve": "^27.4.6", - "jest-runtime": "^27.4.6", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.6", + "graceful-fs": "^4.2.9", + "jest-docblock": "^27.5.1", + "jest-environment-jsdom": "^27.5.1", + "jest-environment-node": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-leak-detector": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", "source-map-support": "^0.5.6", "throat": "^6.0.1" } }, "jest-runtime": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.6.tgz", - "integrity": "sha512-eXYeoR/MbIpVDrjqy5d6cGCFOYBFFDeKaNWqTp0h6E74dK0zLHzASQXJpl5a2/40euBmKnprNLJ0Kh0LCndnWQ==", - "dev": true, - "requires": { - "@jest/environment": "^27.4.6", - "@jest/fake-timers": "^27.4.6", - "@jest/globals": "^27.4.6", - "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.6", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz", + "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==", + "dev": true, + "requires": { + "@jest/environment": "^27.5.1", + "@jest/fake-timers": "^27.5.1", + "@jest/globals": "^27.5.1", + "@jest/source-map": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "execa": "^5.0.0", "glob": "^7.1.3", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-mock": "^27.4.6", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.6", - "jest-snapshot": "^27.4.6", - "jest-util": "^27.4.2", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-mock": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -11409,19 +12435,19 @@ } }, "jest-serializer": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.4.0.tgz", - "integrity": "sha512-RDhpcn5f1JYTX2pvJAGDcnsNTnsV9bjYPU8xcV+xPwOXnUPOQwf4ZEuiU6G9H1UztH+OapMgu/ckEVwO87PwnQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", + "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", "dev": true, "requires": { "@types/node": "*", - "graceful-fs": "^4.2.4" + "graceful-fs": "^4.2.9" } }, "jest-snapshot": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.6.tgz", - "integrity": "sha512-fafUCDLQfzuNP9IRcEqaFAMzEe7u5BF7mude51wyWv7VRex60WznZIC7DfKTgSIlJa8aFzYmXclmN328aqSDmQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz", + "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==", "dev": true, "requires": { "@babel/core": "^7.7.2", @@ -11429,78 +12455,80 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.0.0", - "@jest/transform": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "@types/babel__traverse": "^7.0.4", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^27.4.6", - "graceful-fs": "^4.2.4", - "jest-diff": "^27.4.6", - "jest-get-type": "^27.4.0", - "jest-haste-map": "^27.4.6", - "jest-matcher-utils": "^27.4.6", - "jest-message-util": "^27.4.6", - "jest-util": "^27.4.2", + "expect": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-matcher-utils": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", "natural-compare": "^1.4.0", - "pretty-format": "^27.4.6", + "pretty-format": "^27.5.1", "semver": "^7.3.2" } }, "jest-util": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.4.2.tgz", - "integrity": "sha512-YuxxpXU6nlMan9qyLuxHaMMOzXAl5aGZWCSzben5DhLHemYQxCc4YK+4L3ZrCutT8GPQ+ui9k5D8rUJoDioMnA==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", + "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", "dev": true, "requires": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "picomatch": "^2.2.3" }, "dependencies": { "ci-info": { - "version": "3.2.0", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", "dev": true } } }, "jest-validate": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.4.6.tgz", - "integrity": "sha512-872mEmCPVlBqbA5dToC57vA3yJaMRfIdpCoD3cyHWJOMx+SJwLNw0I71EkWs41oza/Er9Zno9XuTkRYCPDUJXQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", + "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", "dev": true, "requires": { - "@jest/types": "^27.4.2", + "@jest/types": "^27.5.1", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^27.4.0", + "jest-get-type": "^27.5.1", "leven": "^3.1.0", - "pretty-format": "^27.4.6" + "pretty-format": "^27.5.1" } }, "jest-watcher": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.4.6.tgz", - "integrity": "sha512-yKQ20OMBiCDigbD0quhQKLkBO+ObGN79MO4nT7YaCuQ5SM+dkBNWE8cZX0FjU6czwMvWw6StWbe+Wv4jJPJ+fw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz", + "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==", "dev": true, "requires": { - "@jest/test-result": "^27.4.6", - "@jest/types": "^27.4.2", + "@jest/test-result": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^27.4.2", + "jest-util": "^27.5.1", "string-length": "^4.0.1" } }, "jest-worker": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.6.tgz", - "integrity": "sha512-gHWJF/6Xi5CTG5QCvROr6GcmpIqNYpDJyc8A1h/DyXqH1tD6SnRCM0d3U5msV31D2LB/U+E0M+W4oyvKV44oNw==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "dev": true, "requires": { "@types/node": "*", @@ -11521,14 +12549,20 @@ }, "jju": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", "dev": true }, "js-tokens": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "js-yaml": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { "argparse": "^2.0.1" @@ -11567,30 +12601,30 @@ "whatwg-url": "^8.5.0", "ws": "^7.4.6", "xml-name-validator": "^3.0.0" - }, - "dependencies": { - "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true - } } }, "jsesc": { "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, "json-buffer": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", "dev": true }, "json-parse-even-better-errors": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, "json-parse-helpfulerror": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", + "integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", "dev": true, "requires": { "jju": "^1.1.0" @@ -11598,14 +12632,20 @@ }, "json-schema-traverse": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, "json5": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", "dev": true, "requires": { "minimist": "^1.2.5" @@ -11619,14 +12659,20 @@ }, "jsonlines": { "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsonlines/-/jsonlines-0.1.1.tgz", + "integrity": "sha1-T80kbcXQ44aRkHxEqwAveC0dlMw=", "dev": true }, "jsonparse": { "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", "dev": true }, "keyv": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", "dev": true, "requires": { "json-buffer": "3.0.0" @@ -11634,10 +12680,14 @@ }, "kleur": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, "latest-version": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", "dev": true, "requires": { "package-json": "^6.3.0" @@ -11651,6 +12701,8 @@ }, "levn": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { "prelude-ls": "^1.2.1", @@ -11659,6 +12711,8 @@ }, "libnpmconfig": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/libnpmconfig/-/libnpmconfig-1.2.1.tgz", + "integrity": "sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA==", "dev": true, "requires": { "figgy-pudding": "^3.5.1", @@ -11668,6 +12722,8 @@ "dependencies": { "find-up": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { "locate-path": "^3.0.0" @@ -11675,6 +12731,8 @@ }, "locate-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { "p-locate": "^3.0.0", @@ -11683,6 +12741,8 @@ }, "p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -11690,6 +12750,8 @@ }, "p-locate": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { "p-limit": "^2.0.0" @@ -11697,12 +12759,22 @@ }, "path-exists": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true } } }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, "locate-path": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { "p-locate": "^5.0.0" @@ -11710,22 +12782,32 @@ }, "lodash": { "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "lodash.memoize": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", "dev": true }, "lodash.merge": { "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "lowercase-keys": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", "dev": true }, "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" @@ -11733,10 +12815,14 @@ }, "lunr": { "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", "dev": true }, "magic-string": { "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", "dev": true, "requires": { "sourcemap-codec": "^1.4.4" @@ -11744,6 +12830,8 @@ }, "make-dir": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "requires": { "semver": "^6.0.0" @@ -11751,16 +12839,22 @@ "dependencies": { "semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } }, "make-error": { "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, "make-fetch-happen": { "version": "9.1.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", + "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", "dev": true, "requires": { "agentkeepalive": "^4.1.3", @@ -11798,14 +12892,20 @@ }, "merge-stream": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, "merge2": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true }, "micromatch": { "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, "requires": { "braces": "^3.0.1", @@ -11813,14 +12913,18 @@ } }, "mime-db": { - "version": "1.50.0", + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", "dev": true }, "mime-types": { - "version": "2.1.33", + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", "dev": true, "requires": { - "mime-db": "1.50.0" + "mime-db": "1.51.0" } }, "mimic-fn": { @@ -11831,21 +12935,29 @@ }, "mimic-response": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true }, "minimatch": { - "version": "3.0.4", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.0.tgz", + "integrity": "sha512-EU+GCVjXD00yOUf1TwAHVP7v3fBD3A8RkkPYsWWKGWesxM/572sL53wJQnHxquHlRhYUV36wHkqrN8cdikKc2g==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" } }, "minimist": { "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "minipass": { - "version": "3.1.5", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", + "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", "dev": true, "requires": { "yallist": "^4.0.0" @@ -11853,6 +12965,8 @@ }, "minipass-collect": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", "dev": true, "requires": { "minipass": "^3.0.0" @@ -11860,6 +12974,8 @@ }, "minipass-fetch": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", + "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", "dev": true, "requires": { "encoding": "^0.1.12", @@ -11870,6 +12986,8 @@ }, "minipass-flush": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", "dev": true, "requires": { "minipass": "^3.0.0" @@ -11877,6 +12995,8 @@ }, "minipass-json-stream": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", + "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", "dev": true, "requires": { "jsonparse": "^1.3.1", @@ -11885,6 +13005,8 @@ }, "minipass-pipeline": { "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", "dev": true, "requires": { "minipass": "^3.0.0" @@ -11892,6 +13014,8 @@ }, "minipass-sized": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", "dev": true, "requires": { "minipass": "^3.0.0" @@ -11899,6 +13023,8 @@ }, "minizlib": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "dev": true, "requires": { "minipass": "^3.0.0", @@ -11907,26 +13033,38 @@ }, "mkdirp": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true }, "ms": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "natural-compare": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, "negotiator": { - "version": "0.6.2", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true }, "nice-try": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, "node-gyp": { "version": "8.4.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", + "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", "dev": true, "requires": { "env-paths": "^2.2.0", @@ -11948,16 +13086,32 @@ "dev": true }, "node-releases": { - "version": "2.0.1", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", + "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==", "dev": true }, "nopt": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", "dev": true, "requires": { "abbrev": "1" } }, + "normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "dev": true, + "requires": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + } + }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -11966,25 +13120,29 @@ }, "normalize-url": { "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", "dev": true }, "npm-bundled": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", + "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", "dev": true, "requires": { "npm-normalize-package-bin": "^1.0.1" } }, "npm-check-updates": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.3.0.tgz", - "integrity": "sha512-NcVpbVYZymmr7lVCwqz1wpkAgWNQ/XyyPy/yyR2IjCHU4Dr1lpIJgIgtC0PCDobcYuYXpYSIgIWZA7RFvq8+Rw==", + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.4.0.tgz", + "integrity": "sha512-X14H74M8SVFkStmP1NDOMh0OjLB3mU2dwUeM71zyITJHkm08MASwwTcydW6YuGcNW1RUlVq1cQY2yWijv4zKUQ==", "dev": true, "requires": { "chalk": "^4.1.2", "cint": "^8.2.1", "cli-table": "^0.3.11", - "commander": "^8.3.0", + "commander": "^9.0.0", "fast-memoize": "^2.5.2", "find-up": "5.0.0", "fp-and-or": "^0.1.3", @@ -11995,9 +13153,9 @@ "jsonlines": "^0.1.1", "libnpmconfig": "^1.2.1", "lodash": "^4.17.21", - "minimatch": "^3.0.4", + "minimatch": "^5.0.0", "p-map": "^4.0.0", - "pacote": "^12.0.2", + "pacote": "^13.0.2", "parse-github-url": "^1.0.2", "progress": "^2.0.3", "prompts": "^2.4.2", @@ -12014,6 +13172,8 @@ }, "npm-install-checks": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-4.0.0.tgz", + "integrity": "sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w==", "dev": true, "requires": { "semver": "^7.1.1" @@ -12021,19 +13181,25 @@ }, "npm-normalize-package-bin": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", "dev": true }, "npm-package-arg": { - "version": "8.1.5", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.0.tgz", + "integrity": "sha512-yhzXxeor+Zfhe5MGwPdDumz6HtNlj2pMekWB95IX3CC6uDNgde0oPKHDCLDPoJqQfd0HqAWt+y4Hs5m7CK1+9Q==", "dev": true, "requires": { - "hosted-git-info": "^4.0.1", - "semver": "^7.3.4", + "hosted-git-info": "^4.1.0", + "semver": "^7.3.5", "validate-npm-package-name": "^3.0.0" } }, "npm-packlist": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-3.0.0.tgz", + "integrity": "sha512-L/cbzmutAwII5glUcf2DBRNY/d0TFd4e/FnaZigJV6JD85RHZXJFGwCndjMWiiViiWSsWt3tiOLpI3ByTnIdFQ==", "dev": true, "requires": { "glob": "^7.1.6", @@ -12043,39 +13209,97 @@ } }, "npm-pick-manifest": { - "version": "6.1.1", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.0.tgz", + "integrity": "sha512-njM1AcdioFaKd0JSGtLO09YA1WRwctjGQJbnHGmKS+u+uwP8oFvtZtOQWPYdxrnY5eJud3wn8OpH4sEIx6+GEQ==", "dev": true, "requires": { "npm-install-checks": "^4.0.0", "npm-normalize-package-bin": "^1.0.1", - "npm-package-arg": "^8.1.2", - "semver": "^7.3.4" + "npm-package-arg": "^9.0.0", + "semver": "^7.3.5" } }, "npm-registry-fetch": { - "version": "11.0.0", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.0.0.tgz", + "integrity": "sha512-MmiMuV9DU5gRuAU0jia952Qq+E4h7ZoUaeltCXivhClcqfOVKqNLZEQsRUOb6a8WQY+um8x97JcUuaWFoPoBBw==", "dev": true, "requires": { - "make-fetch-happen": "^9.0.1", - "minipass": "^3.1.3", - "minipass-fetch": "^1.3.0", + "make-fetch-happen": "^10.0.2", + "minipass": "^3.1.6", + "minipass-fetch": "^1.4.1", "minipass-json-stream": "^1.0.1", - "minizlib": "^2.0.0", - "npm-package-arg": "^8.0.0" + "minizlib": "^2.1.2", + "npm-package-arg": "^9.0.0", + "proc-log": "^2.0.0" + }, + "dependencies": { + "@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true + }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } + }, + "lru-cache": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.3.1.tgz", + "integrity": "sha512-nX1x4qUrKqwbIAhv4s9et4FIUVzNOpeY07bsjGUy8gwJrXH/wScImSQqXErmo/b2jZY2r0mohbLA9zVj7u1cNw==", + "dev": true + }, + "make-fetch-happen": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.3.tgz", + "integrity": "sha512-CzarPHynPpHjhF5in/YapnO44rSZeYX5VCMfdXa99+gLwpbfFLh20CWa6dP/taV9Net9PWJwXNKtp/4ZTCQnag==", + "dev": true, + "requires": { + "agentkeepalive": "^4.2.0", + "cacache": "^15.3.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.3.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^1.4.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^6.1.1", + "ssri": "^8.0.1" + } + } } }, "npm-run-path": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { "path-key": "^2.0.0" } }, "npmlog": { - "version": "6.0.0", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.1.tgz", + "integrity": "sha512-BTHDvY6nrRHuRfyjt1MAufLxYdVXZfd099H4+i1f0lPywNQyI4foeNXJRObB/uy+TYqUW0vAD9gbdSOXPst7Eg==", "dev": true, "requires": { - "are-we-there-yet": "^2.0.0", + "are-we-there-yet": "^3.0.0", "console-control-strings": "^1.1.0", "gauge": "^4.0.0", "set-blocking": "^2.0.0" @@ -12089,10 +13313,14 @@ }, "on-headers": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", "dev": true }, "once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" @@ -12109,6 +13337,8 @@ }, "optionator": { "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { "deep-is": "^0.1.3", @@ -12121,14 +13351,20 @@ }, "p-cancelable": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", "dev": true }, "p-finally": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true }, "p-limit": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { "yocto-queue": "^0.1.0" @@ -12136,6 +13372,8 @@ }, "p-locate": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { "p-limit": "^3.0.2" @@ -12143,6 +13381,8 @@ }, "p-map": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, "requires": { "aggregate-error": "^3.0.0" @@ -12150,10 +13390,14 @@ }, "p-try": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "package-json": { "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", "dev": true, "requires": { "got": "^9.6.0", @@ -12164,6 +13408,8 @@ "dependencies": { "registry-auth-token": { "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", "dev": true, "requires": { "rc": "^1.2.8" @@ -12171,6 +13417,8 @@ }, "registry-url": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", "dev": true, "requires": { "rc": "^1.2.8" @@ -12178,37 +13426,45 @@ }, "semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } }, "pacote": { - "version": "12.0.2", + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.0.2.tgz", + "integrity": "sha512-3LyfvDk2BSJNFQZIcDqnLNa7IsYb6KwX3H9uZPwaHJFIX6Gv5N9QHU+s7mEs/RbN4/ta6KUT39LAi2l6EkBi5A==", "dev": true, "requires": { - "@npmcli/git": "^2.1.0", - "@npmcli/installed-package-contents": "^1.0.6", + "@npmcli/git": "^3.0.0", + "@npmcli/installed-package-contents": "^1.0.7", "@npmcli/promise-spawn": "^1.2.0", "@npmcli/run-script": "^2.0.0", - "cacache": "^15.0.5", + "cacache": "^15.3.0", "chownr": "^2.0.0", "fs-minipass": "^2.1.0", "infer-owner": "^1.0.4", - "minipass": "^3.1.3", - "mkdirp": "^1.0.3", - "npm-package-arg": "^8.0.1", + "minipass": "^3.1.6", + "mkdirp": "^1.0.4", + "npm-package-arg": "^9.0.0", "npm-packlist": "^3.0.0", - "npm-pick-manifest": "^6.0.0", - "npm-registry-fetch": "^11.0.0", + "npm-pick-manifest": "^7.0.0", + "npm-registry-fetch": "^13.0.0", + "proc-log": "^2.0.0", "promise-retry": "^2.0.1", - "read-package-json-fast": "^2.0.1", + "read-package-json": "^4.1.1", + "read-package-json-fast": "^2.0.3", "rimraf": "^3.0.2", "ssri": "^8.0.1", - "tar": "^6.1.0" + "tar": "^6.1.11" } }, "parent-module": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "requires": { "callsites": "^3.0.0" @@ -12216,8 +13472,22 @@ }, "parse-github-url": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz", + "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==", "dev": true }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, "parse5": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", @@ -12226,38 +13496,56 @@ }, "path-exists": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, "path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "path-is-inside": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", "dev": true }, "path-key": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, "path-parse": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, "path-to-regexp": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", "dev": true }, "path-type": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, "picocolors": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", "dev": true }, "picomatch": { - "version": "2.3.0", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "pirates": { @@ -12268,6 +13556,8 @@ }, "pkg-dir": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "requires": { "find-up": "^4.0.0" @@ -12275,6 +13565,8 @@ "dependencies": { "find-up": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { "locate-path": "^5.0.0", @@ -12283,6 +13575,8 @@ }, "locate-path": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { "p-locate": "^4.1.0" @@ -12290,6 +13584,8 @@ }, "p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -12297,6 +13593,8 @@ }, "p-locate": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { "p-limit": "^2.2.0" @@ -12306,10 +13604,14 @@ }, "prelude-ls": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "prepend-http": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true }, "prettier": { @@ -12320,15 +13622,17 @@ }, "prettier-linter-helpers": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", "dev": true, "requires": { "fast-diff": "^1.1.2" } }, "pretty-format": { - "version": "27.4.6", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.6.tgz", - "integrity": "sha512-NblstegA1y/RJW2VyML+3LlpFjzx62cUrtBIKIWDXEDkjNeleA7Od7nrzcs/VLQvAeV4CgSYhrN39DRN88Qi/g==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, "requires": { "ansi-regex": "^5.0.1", @@ -12338,20 +13642,34 @@ "dependencies": { "ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true } } }, + "proc-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.0.tgz", + "integrity": "sha512-I/35MfCX2H8jBUhKN8JB8nmqvQo/nKdrBodBY7L3RhDSPPyvOHwLYNmPuhwuJq7a7C3vgFKWGQM+ecPStcvOHA==", + "dev": true + }, "progress": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, "promise-inflight": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", "dev": true }, "promise-retry": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", "dev": true, "requires": { "err-code": "^2.0.2", @@ -12360,6 +13678,8 @@ }, "prompts": { "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, "requires": { "kleur": "^3.0.3", @@ -12374,6 +13694,8 @@ }, "pump": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { "end-of-stream": "^1.1.0", @@ -12382,10 +13704,14 @@ }, "punycode": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", "dev": true }, "pupa": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", "dev": true, "requires": { "escape-goat": "^2.0.0" @@ -12393,10 +13719,14 @@ }, "queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, "randombytes": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { "safe-buffer": "^5.1.0" @@ -12404,10 +13734,14 @@ }, "range-parser": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", "dev": true }, "rc": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "requires": { "deep-extend": "^0.6.0", @@ -12418,6 +13752,8 @@ }, "rc-config-loader": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.0.0.tgz", + "integrity": "sha512-//LRTblJEcqbmmro1GCmZ39qZXD+JqzuD8Y5/IZU3Dhp3A1Yr0Xn68ks8MQ6qKfKvYCWDveUmRDKDA40c+sCXw==", "dev": true, "requires": { "debug": "^4.1.1", @@ -12428,10 +13764,26 @@ }, "react-is": { "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true }, + "read-package-json": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-4.1.1.tgz", + "integrity": "sha512-P82sbZJ3ldDrWCOSKxJT0r/CXMWR0OR3KRh55SgKo3p91GSIEEC32v3lSHAvO/UcH3/IoL7uqhOFBduAnwdldw==", + "dev": true, + "requires": { + "glob": "^7.1.1", + "json-parse-even-better-errors": "^2.3.0", + "normalize-package-data": "^3.0.0", + "npm-normalize-package-bin": "^1.0.0" + } + }, "read-package-json-fast": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", + "integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==", "dev": true, "requires": { "json-parse-even-better-errors": "^2.3.0", @@ -12440,6 +13792,8 @@ }, "readable-stream": { "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -12449,10 +13803,14 @@ }, "regexpp": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, "registry-auth-token": { "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { "rc": "^1.1.6", @@ -12461,6 +13819,8 @@ }, "registry-url": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { "rc": "^1.0.1" @@ -12468,6 +13828,8 @@ }, "remote-git-tags": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remote-git-tags/-/remote-git-tags-3.0.0.tgz", + "integrity": "sha512-C9hAO4eoEsX+OXA4rla66pXZQ+TLQ8T9dttgQj18yuKlPMTVkIkdYXvlMC55IuUsIkV6DpmQYi10JKFLaU+l7w==", "dev": true }, "require-directory": { @@ -12478,14 +13840,19 @@ }, "require-from-string": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, "resolve": { - "version": "1.20.0", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "dev": true, "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-cwd": { @@ -12507,6 +13874,8 @@ }, "resolve-from": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "resolve.exports": { @@ -12517,6 +13886,8 @@ }, "responselike": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "requires": { "lowercase-keys": "^1.0.0" @@ -12524,23 +13895,29 @@ }, "retry": { "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", "dev": true }, "reusify": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, "rimraf": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" } }, "rollup": { - "version": "2.66.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.66.1.tgz", - "integrity": "sha512-crSgLhSkLMnKr4s9iZ/1qJCplgAgrRY+igWv8KhG/AjKOJ0YX/WpmANyn8oxrw+zenF3BXWDLa7Xl/QZISH+7w==", + "version": "2.67.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.67.3.tgz", + "integrity": "sha512-G/x1vUwbGtP6O5ZM8/sWr8+p7YfZhI18pPqMRtMYMWSbHjKZ/ajHGiM+GWNTlWyOR0EHIdT8LHU+Z4ciIZ1oBw==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -12548,6 +13925,8 @@ }, "rollup-plugin-terser": { "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", @@ -12558,6 +13937,8 @@ "dependencies": { "jest-worker": { "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", "dev": true, "requires": { "@types/node": "*", @@ -12569,6 +13950,8 @@ }, "run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "requires": { "queue-microtask": "^1.2.2" @@ -12576,10 +13959,14 @@ }, "safe-buffer": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, "safer-buffer": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, "saxes": { @@ -12593,6 +13980,8 @@ }, "semver": { "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -12600,6 +13989,8 @@ }, "semver-diff": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", "dev": true, "requires": { "semver": "^6.3.0" @@ -12607,16 +13998,22 @@ "dependencies": { "semver": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } }, "semver-utils": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/semver-utils/-/semver-utils-1.1.4.tgz", + "integrity": "sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA==", "dev": true }, "serialize-javascript": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -12624,6 +14021,8 @@ }, "serve": { "version": "13.0.2", + "resolved": "https://registry.npmjs.org/serve/-/serve-13.0.2.tgz", + "integrity": "sha512-71R6fKvNgKrqARAag6lYJNnxDzpH7DCNrMuvPY5PLVaC2PDhJsGTj/34o4o4tPWhTuLgEXqvgnAWbATQ9zGZTQ==", "dev": true, "requires": { "@zeit/schemas": "2.6.0", @@ -12639,6 +14038,8 @@ "dependencies": { "ansi-styles": { "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" @@ -12646,6 +14047,8 @@ }, "chalk": { "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -12655,6 +14058,8 @@ }, "color-convert": { "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { "color-name": "1.1.3" @@ -12662,14 +14067,20 @@ }, "color-name": { "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "has-flag": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "supports-color": { "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" @@ -12679,6 +14090,8 @@ }, "serve-handler": { "version": "6.1.3", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", + "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", "dev": true, "requires": { "bytes": "3.0.0", @@ -12691,25 +14104,52 @@ "range-parser": "1.2.0" }, "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "mime-db": { "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", "dev": true }, "mime-types": { "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "dev": true, "requires": { "mime-db": "~1.33.0" } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } } } }, "set-blocking": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, "shebang-command": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { "shebang-regex": "^1.0.0" @@ -12717,12 +14157,14 @@ }, "shebang-regex": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, "shiki": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.0.tgz", - "integrity": "sha512-iczxaIYeBFHTFrQPb9DVy2SKgYxC4Wo7Iucm7C17cCh2Ge/refnvHscUOxM85u57MfLoNOtjoEFUWt9gBexblA==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", + "integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", "dev": true, "requires": { "jsonc-parser": "^3.0.0", @@ -12731,31 +14173,43 @@ } }, "signal-exit": { - "version": "3.0.5", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "sisteransi": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", "dev": true }, "slash": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, "smart-buffer": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true }, "socks": { - "version": "2.6.1", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", + "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", "dev": true, "requires": { "ip": "^1.1.5", - "smart-buffer": "^4.1.0" + "smart-buffer": "^4.2.0" } }, "socks-proxy-agent": { "version": "6.1.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz", + "integrity": "sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==", "dev": true, "requires": { "agent-base": "^6.0.2", @@ -12765,10 +14219,14 @@ }, "source-map": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, "source-map-support": { "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -12777,18 +14235,58 @@ }, "sourcemap-codec": { "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", "dev": true }, "spawn-please": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-1.0.0.tgz", + "integrity": "sha512-Kz33ip6NRNKuyTRo3aDWyWxeGeM0ORDO552Fs6E1nj4pLWPkl37SrRtTnq+MEopVaqgmaO6bAvVS+v64BJ5M/A==", + "dev": true + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", + "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", "dev": true }, "sprintf-js": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, "ssri": { "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", "dev": true, "requires": { "minipass": "^3.1.1" @@ -12813,6 +14311,8 @@ }, "string_decoder": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "requires": { "safe-buffer": "~5.2.0" @@ -12820,6 +14320,8 @@ "dependencies": { "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==", "dev": true } } @@ -12836,6 +14338,8 @@ }, "string-width": { "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { "emoji-regex": "^8.0.0", @@ -12845,6 +14349,8 @@ }, "strip-ansi": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { "ansi-regex": "^5.0.1" @@ -12858,6 +14364,8 @@ }, "strip-eof": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, "strip-final-newline": { @@ -12868,10 +14376,14 @@ }, "strip-json-comments": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -12887,6 +14399,12 @@ "supports-color": "^7.0.0" } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -12895,6 +14413,8 @@ }, "tar": { "version": "6.1.11", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", + "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", "dev": true, "requires": { "chownr": "^2.0.0", @@ -12916,7 +14436,9 @@ } }, "terser": { - "version": "5.9.0", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", + "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", "dev": true, "requires": { "commander": "^2.20.0", @@ -12926,25 +14448,54 @@ "dependencies": { "commander": { "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, "source-map": { "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", "dev": true } } }, "test-exclude": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, "requires": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", "minimatch": "^3.0.4" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, "text-table": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, "throat": { @@ -12961,14 +14512,20 @@ }, "to-fast-properties": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, "to-readable-stream": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", "dev": true }, "to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { "is-number": "^7.0.0" @@ -13027,12 +14584,16 @@ } }, "tslib": { - "version": "2.1.0", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", "dev": true, "peer": true }, "tsutils": { "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, "requires": { "tslib": "^1.8.1" @@ -13040,12 +14601,16 @@ "dependencies": { "tslib": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true } } }, "type-check": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { "prelude-ls": "^1.2.1" @@ -13059,19 +14624,23 @@ }, "type-fest": { "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, "typedarray-to-buffer": { "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, "requires": { "is-typedarray": "^1.0.0" } }, "typedoc": { - "version": "0.22.11", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.11.tgz", - "integrity": "sha512-pVr3hh6dkS3lPPaZz1fNpvcrqLdtEvXmXayN55czlamSgvEjh+57GUqfhAI1Xsuu/hNHUT1KNSx8LH2wBP/7SA==", + "version": "0.22.12", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.12.tgz", + "integrity": "sha512-FcyC+YuaOpr3rB9QwA1IHOi9KnU2m50sPJW5vcNRPCIdecp+3bFkh7Rq5hBU1Fyn29UR2h4h/H7twZHWDhL0sw==", "dev": true, "requires": { "glob": "^7.2.0", @@ -13079,6 +14648,27 @@ "marked": "^4.0.10", "minimatch": "^3.0.4", "shiki": "^0.10.0" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, "typescript": { @@ -13089,6 +14679,8 @@ }, "unique-filename": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", "dev": true, "requires": { "unique-slug": "^2.0.0" @@ -13096,6 +14688,8 @@ }, "unique-slug": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", "dev": true, "requires": { "imurmurhash": "^0.1.4" @@ -13103,6 +14697,8 @@ }, "unique-string": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", "dev": true, "requires": { "crypto-random-string": "^2.0.0" @@ -13110,10 +14706,14 @@ }, "universalify": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, "update-check": { "version": "1.5.2", + "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.2.tgz", + "integrity": "sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ==", "dev": true, "requires": { "registry-auth-token": "3.3.2", @@ -13122,6 +14722,8 @@ }, "update-notifier": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", "dev": true, "requires": { "boxen": "^5.0.0", @@ -13142,6 +14744,8 @@ }, "uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { "punycode": "^2.1.0" @@ -13149,12 +14753,16 @@ "dependencies": { "punycode": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true } } }, "url-parse-lax": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "requires": { "prepend-http": "^2.0.0" @@ -13162,10 +14770,14 @@ }, "util-deprecate": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, "v8-compile-cache": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, "v8-to-istanbul": { @@ -13187,8 +14799,20 @@ } } }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "validate-npm-package-name": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", "dev": true, "requires": { "builtins": "^1.0.3" @@ -13196,6 +14820,8 @@ }, "vary": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "dev": true }, "vscode-oniguruma": { @@ -13282,6 +14908,8 @@ }, "which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -13289,6 +14917,8 @@ }, "wide-align": { "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "dev": true, "requires": { "string-width": "^1.0.2 || 2 || 3 || 4" @@ -13296,6 +14926,8 @@ }, "widest-line": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "dev": true, "requires": { "string-width": "^4.0.0" @@ -13303,10 +14935,14 @@ }, "word-wrap": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, "wrap-ansi": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -13316,10 +14952,14 @@ }, "wrappy": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "write-file-atomic": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "requires": { "imurmurhash": "^0.1.4", @@ -13329,14 +14969,16 @@ } }, "ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", + "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", "dev": true, "requires": {} }, "xdg-basedir": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true }, "xml-name-validator": { @@ -13359,6 +15001,8 @@ }, "yallist": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, "yaml": { @@ -13384,10 +15028,14 @@ }, "yargs-parser": { "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true }, "yocto-queue": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true } } diff --git a/package.json b/package.json index 54e515ae..72632402 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ "dist" ], "devDependencies": { - "npm-check-updates": "^12.2.1", + "npm-check-updates": "^12.4.0", "serve": "^13.0.2", - "typedoc": "^0.22.11" + "typedoc": "^0.22.12" }, "resolutions": { "get-pkg-repo": "4.1.2" diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index 0a2d0183..0b316c34 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -16,15 +16,16 @@ "test": "echo \"no test\"" }, "devDependencies": { - "@rollup/plugin-replace": "^3.0.1", + "@rollup/plugin-node-resolve": "^13.1.3", + "@rollup/plugin-replace": "^3.1.0", "@rollup/plugin-typescript": "^8.3.0", - "@typescript-eslint/eslint-plugin": "^5.10.2", - "@typescript-eslint/parser": "^5.10.2", - "eslint": "^8.8.0", - "eslint-config-prettier": "^8.3.0", + "@typescript-eslint/eslint-plugin": "^5.12.0", + "@typescript-eslint/parser": "^5.12.0", + "eslint": "^8.9.0", + "eslint-config-prettier": "^8.4.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.5.1", - "rollup": "^2.66.1", + "rollup": "^2.67.3", "typescript": "^4.5.5" }, "dependencies": { diff --git a/packages/e2ee/rollup.config.js b/packages/e2ee/rollup.config.js index 8f0ba3bb..f9888b0d 100644 --- a/packages/e2ee/rollup.config.js +++ b/packages/e2ee/rollup.config.js @@ -1,5 +1,6 @@ import fs from "fs"; -import typescript from '@rollup/plugin-typescript'; +import resolve from "@rollup/plugin-node-resolve"; +import typescript from "@rollup/plugin-typescript"; import replace from "@rollup/plugin-replace"; import pkg from "./package.json"; @@ -22,6 +23,7 @@ export default [ __WORKER_SCRIPT__: workerScript, preventAssignment: true, }), + resolve(), typescript({ tsconfig: "./tsconfig.json", }), diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 7e070310..d0a6209f 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -10,17 +10,17 @@ "devDependencies": { "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-node-resolve": "^13.1.3", - "@rollup/plugin-replace": "^3.0.1", + "@rollup/plugin-replace": "^3.1.0", "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.12.0", - "@typescript-eslint/parser": "5.11.0", + "@typescript-eslint/parser": "5.12.0", "eslint": "8.9.0", - "eslint-config-prettier": "8.3.0", + "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", - "jest": "^27.4.7", + "jest": "^27.5.1", "prettier": "^2.5.1", - "rollup": "^2.66.1", + "rollup": "^2.67.3", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^27.1.3", "typescript": "^4.5.5" From ef47be0d5dc480924197dc8363e20ea101268156 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Feb 2022 16:02:14 +0000 Subject: [PATCH 28/86] Bump @typescript-eslint/parser from 5.12.0 to 5.12.1 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.12.0 to 5.12.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.12.1/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 145 ++++++++++++++++++++++++++++++++++---- packages/sdk/package.json | 2 +- 2 files changed, 132 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4081be5e..43212fad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1550,14 +1550,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.12.0.tgz", - "integrity": "sha512-MfSwg9JMBojMUoGjUmX+D2stoQj1CBYTCP0qnnVtu9A+YQXVKNtLjasYh+jozOcrb/wau8TCfWOkQTiOAruBog==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.12.1.tgz", + "integrity": "sha512-6LuVUbe7oSdHxUWoX/m40Ni8gsZMKCi31rlawBHt7VtW15iHzjbpj2WLiToG2758KjtCCiLRKZqfrOdl3cNKuw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.12.0", - "@typescript-eslint/types": "5.12.0", - "@typescript-eslint/typescript-estree": "5.12.0", + "@typescript-eslint/scope-manager": "5.12.1", + "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/typescript-estree": "5.12.1", "debug": "^4.3.2" }, "engines": { @@ -1576,6 +1576,80 @@ } } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.1.tgz", + "integrity": "sha512-J0Wrh5xS6XNkd4TkOosxdpObzlYfXjAFIm9QxYLCPOcHVv1FyyFCPom66uIh8uBr0sZCrtS+n19tzufhwab8ZQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/visitor-keys": "5.12.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.1.tgz", + "integrity": "sha512-hfcbq4qVOHV1YRdhkDldhV9NpmmAu2vp6wuFODL71Y0Ixak+FLeEU4rnPxgmZMnGreGEghlEucs9UZn5KOfHJA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.1.tgz", + "integrity": "sha512-ahOdkIY9Mgbza7L9sIi205Pe1inCkZWAHE1TV1bpxlU4RZNPtXaDZfiiFWcL9jdxvW1hDYZJXrFm+vlMkXRbBw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/visitor-keys": "5.12.1", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.1.tgz", + "integrity": "sha512-l1KSLfupuwrXx6wc0AuOmC7Ko5g14ZOQ86wJJqRbdLbXLK02pK/DPiDDqCc7BqqiiA04/eAA6ayL0bgOrAkH7A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.12.1", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.12.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.0.tgz", @@ -8500,7 +8574,7 @@ "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.12.0", - "@typescript-eslint/parser": "5.12.0", + "@typescript-eslint/parser": "5.12.1", "eslint": "8.9.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", @@ -9583,7 +9657,7 @@ "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.12.0", - "@typescript-eslint/parser": "5.12.0", + "@typescript-eslint/parser": "5.12.1", "eslint": "8.9.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", @@ -9767,15 +9841,58 @@ } }, "@typescript-eslint/parser": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.12.0.tgz", - "integrity": "sha512-MfSwg9JMBojMUoGjUmX+D2stoQj1CBYTCP0qnnVtu9A+YQXVKNtLjasYh+jozOcrb/wau8TCfWOkQTiOAruBog==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.12.1.tgz", + "integrity": "sha512-6LuVUbe7oSdHxUWoX/m40Ni8gsZMKCi31rlawBHt7VtW15iHzjbpj2WLiToG2758KjtCCiLRKZqfrOdl3cNKuw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.12.0", - "@typescript-eslint/types": "5.12.0", - "@typescript-eslint/typescript-estree": "5.12.0", + "@typescript-eslint/scope-manager": "5.12.1", + "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/typescript-estree": "5.12.1", "debug": "^4.3.2" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.1.tgz", + "integrity": "sha512-J0Wrh5xS6XNkd4TkOosxdpObzlYfXjAFIm9QxYLCPOcHVv1FyyFCPom66uIh8uBr0sZCrtS+n19tzufhwab8ZQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/visitor-keys": "5.12.1" + } + }, + "@typescript-eslint/types": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.1.tgz", + "integrity": "sha512-hfcbq4qVOHV1YRdhkDldhV9NpmmAu2vp6wuFODL71Y0Ixak+FLeEU4rnPxgmZMnGreGEghlEucs9UZn5KOfHJA==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.1.tgz", + "integrity": "sha512-ahOdkIY9Mgbza7L9sIi205Pe1inCkZWAHE1TV1bpxlU4RZNPtXaDZfiiFWcL9jdxvW1hDYZJXrFm+vlMkXRbBw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/visitor-keys": "5.12.1", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.1.tgz", + "integrity": "sha512-l1KSLfupuwrXx6wc0AuOmC7Ko5g14ZOQ86wJJqRbdLbXLK02pK/DPiDDqCc7BqqiiA04/eAA6ayL0bgOrAkH7A==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.12.1", + "eslint-visitor-keys": "^3.0.0" + } + } } }, "@typescript-eslint/scope-manager": { diff --git a/packages/sdk/package.json b/packages/sdk/package.json index d0a6209f..74569271 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -14,7 +14,7 @@ "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.12.0", - "@typescript-eslint/parser": "5.12.0", + "@typescript-eslint/parser": "5.12.1", "eslint": "8.9.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", From 6445001a0f97f80751acfb7151bef10c8c3facf1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Feb 2022 02:20:35 +0000 Subject: [PATCH 29/86] Bump @typescript-eslint/eslint-plugin from 5.12.0 to 5.12.1 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.12.0 to 5.12.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.12.1/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 245 ++++++++++---------------------------- packages/sdk/package.json | 2 +- 2 files changed, 65 insertions(+), 182 deletions(-) diff --git a/package-lock.json b/package-lock.json index 43212fad..3199a321 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1517,14 +1517,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.0.tgz", - "integrity": "sha512-fwCMkDimwHVeIOKeBHiZhRUfJXU8n6xW1FL9diDxAyGAFvKcH4csy0v7twivOQdQdA0KC8TDr7GGRd3L4Lv0rQ==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.1.tgz", + "integrity": "sha512-M499lqa8rnNK7mUv74lSFFttuUsubIRdAbHcVaP93oFcKkEmHmLqy2n7jM9C8DVmFMYK61ExrZU6dLYhQZmUpw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.12.0", - "@typescript-eslint/type-utils": "5.12.0", - "@typescript-eslint/utils": "5.12.0", + "@typescript-eslint/scope-manager": "5.12.1", + "@typescript-eslint/type-utils": "5.12.1", + "@typescript-eslint/utils": "5.12.1", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1576,7 +1576,7 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "node_modules/@typescript-eslint/scope-manager": { "version": "5.12.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.1.tgz", "integrity": "sha512-J0Wrh5xS6XNkd4TkOosxdpObzlYfXjAFIm9QxYLCPOcHVv1FyyFCPom66uIh8uBr0sZCrtS+n19tzufhwab8ZQ==", @@ -1593,87 +1593,13 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.1.tgz", - "integrity": "sha512-hfcbq4qVOHV1YRdhkDldhV9NpmmAu2vp6wuFODL71Y0Ixak+FLeEU4rnPxgmZMnGreGEghlEucs9UZn5KOfHJA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.1.tgz", - "integrity": "sha512-ahOdkIY9Mgbza7L9sIi205Pe1inCkZWAHE1TV1bpxlU4RZNPtXaDZfiiFWcL9jdxvW1hDYZJXrFm+vlMkXRbBw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/visitor-keys": "5.12.1", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.1.tgz", - "integrity": "sha512-l1KSLfupuwrXx6wc0AuOmC7Ko5g14ZOQ86wJJqRbdLbXLK02pK/DPiDDqCc7BqqiiA04/eAA6ayL0bgOrAkH7A==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.12.1", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.0.tgz", - "integrity": "sha512-GAMobtIJI8FGf1sLlUWNUm2IOkIjvn7laFWyRx7CLrv6nLBI7su+B7lbStqVlK5NdLvHRFiJo2HhiDF7Ki01WQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.12.0", - "@typescript-eslint/visitor-keys": "5.12.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.12.0.tgz", - "integrity": "sha512-9j9rli3zEBV+ae7rlbBOotJcI6zfc6SHFMdKI9M3Nc0sy458LJ79Os+TPWeBBL96J9/e36rdJOfCuyRSgFAA0Q==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.12.1.tgz", + "integrity": "sha512-Gh8feEhsNLeCz6aYqynh61Vsdy+tiNNkQtc+bN3IvQvRqHkXGUhYkUi+ePKzP0Mb42se7FDb+y2SypTbpbR/Sg==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.12.0", + "@typescript-eslint/utils": "5.12.1", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -1694,9 +1620,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.0.tgz", - "integrity": "sha512-JowqbwPf93nvf8fZn5XrPGFBdIK8+yx5UEGs2QFAYFI8IWYfrzz+6zqlurGr2ctShMaJxqwsqmra3WXWjH1nRQ==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.1.tgz", + "integrity": "sha512-hfcbq4qVOHV1YRdhkDldhV9NpmmAu2vp6wuFODL71Y0Ixak+FLeEU4rnPxgmZMnGreGEghlEucs9UZn5KOfHJA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1707,13 +1633,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.0.tgz", - "integrity": "sha512-Dd9gVeOqt38QHR0BEA8oRaT65WYqPYbIc5tRFQPkfLquVEFPD1HAtbZT98TLBkEcCkvwDYOAvuSvAD9DnQhMfQ==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.1.tgz", + "integrity": "sha512-ahOdkIY9Mgbza7L9sIi205Pe1inCkZWAHE1TV1bpxlU4RZNPtXaDZfiiFWcL9jdxvW1hDYZJXrFm+vlMkXRbBw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.12.0", - "@typescript-eslint/visitor-keys": "5.12.0", + "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/visitor-keys": "5.12.1", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1734,15 +1660,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.12.0.tgz", - "integrity": "sha512-k4J2WovnMPGI4PzKgDtQdNrCnmBHpMUFy21qjX2CoPdoBcSBIMvVBr9P2YDP8jOqZOeK3ThOL6VO/sy6jtnvzw==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.12.1.tgz", + "integrity": "sha512-Qq9FIuU0EVEsi8fS6pG+uurbhNTtoYr4fq8tKjBupsK5Bgbk2I32UGm0Sh+WOyjOPgo/5URbxxSNV6HYsxV4MQ==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.12.0", - "@typescript-eslint/types": "5.12.0", - "@typescript-eslint/typescript-estree": "5.12.0", + "@typescript-eslint/scope-manager": "5.12.1", + "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/typescript-estree": "5.12.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1758,12 +1684,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.0.tgz", - "integrity": "sha512-cFwTlgnMV6TgezQynx2c/4/tx9Tufbuo9LPzmWqyRC3QC4qTGkAG1C6pBr0/4I10PAI/FlYunI3vJjIcu+ZHMg==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.1.tgz", + "integrity": "sha512-l1KSLfupuwrXx6wc0AuOmC7Ko5g14ZOQ86wJJqRbdLbXLK02pK/DPiDDqCc7BqqiiA04/eAA6ayL0bgOrAkH7A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.12.0", + "@typescript-eslint/types": "5.12.1", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -8573,7 +8499,7 @@ "@rollup/plugin-replace": "^3.1.0", "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.12.0", + "@typescript-eslint/eslint-plugin": "5.12.1", "@typescript-eslint/parser": "5.12.1", "eslint": "8.9.0", "eslint-config-prettier": "8.4.0", @@ -9656,7 +9582,7 @@ "@rollup/plugin-typescript": "^8.3.0", "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.12.0", + "@typescript-eslint/eslint-plugin": "5.12.1", "@typescript-eslint/parser": "5.12.1", "eslint": "8.9.0", "eslint-config-prettier": "8.4.0", @@ -9824,14 +9750,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.0.tgz", - "integrity": "sha512-fwCMkDimwHVeIOKeBHiZhRUfJXU8n6xW1FL9diDxAyGAFvKcH4csy0v7twivOQdQdA0KC8TDr7GGRd3L4Lv0rQ==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.1.tgz", + "integrity": "sha512-M499lqa8rnNK7mUv74lSFFttuUsubIRdAbHcVaP93oFcKkEmHmLqy2n7jM9C8DVmFMYK61ExrZU6dLYhQZmUpw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.12.0", - "@typescript-eslint/type-utils": "5.12.0", - "@typescript-eslint/utils": "5.12.0", + "@typescript-eslint/scope-manager": "5.12.1", + "@typescript-eslint/type-utils": "5.12.1", + "@typescript-eslint/utils": "5.12.1", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -9850,86 +9776,43 @@ "@typescript-eslint/types": "5.12.1", "@typescript-eslint/typescript-estree": "5.12.1", "debug": "^4.3.2" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.1.tgz", - "integrity": "sha512-J0Wrh5xS6XNkd4TkOosxdpObzlYfXjAFIm9QxYLCPOcHVv1FyyFCPom66uIh8uBr0sZCrtS+n19tzufhwab8ZQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/visitor-keys": "5.12.1" - } - }, - "@typescript-eslint/types": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.1.tgz", - "integrity": "sha512-hfcbq4qVOHV1YRdhkDldhV9NpmmAu2vp6wuFODL71Y0Ixak+FLeEU4rnPxgmZMnGreGEghlEucs9UZn5KOfHJA==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.1.tgz", - "integrity": "sha512-ahOdkIY9Mgbza7L9sIi205Pe1inCkZWAHE1TV1bpxlU4RZNPtXaDZfiiFWcL9jdxvW1hDYZJXrFm+vlMkXRbBw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/visitor-keys": "5.12.1", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.1.tgz", - "integrity": "sha512-l1KSLfupuwrXx6wc0AuOmC7Ko5g14ZOQ86wJJqRbdLbXLK02pK/DPiDDqCc7BqqiiA04/eAA6ayL0bgOrAkH7A==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.12.1", - "eslint-visitor-keys": "^3.0.0" - } - } } }, "@typescript-eslint/scope-manager": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.0.tgz", - "integrity": "sha512-GAMobtIJI8FGf1sLlUWNUm2IOkIjvn7laFWyRx7CLrv6nLBI7su+B7lbStqVlK5NdLvHRFiJo2HhiDF7Ki01WQ==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.1.tgz", + "integrity": "sha512-J0Wrh5xS6XNkd4TkOosxdpObzlYfXjAFIm9QxYLCPOcHVv1FyyFCPom66uIh8uBr0sZCrtS+n19tzufhwab8ZQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.12.0", - "@typescript-eslint/visitor-keys": "5.12.0" + "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/visitor-keys": "5.12.1" } }, "@typescript-eslint/type-utils": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.12.0.tgz", - "integrity": "sha512-9j9rli3zEBV+ae7rlbBOotJcI6zfc6SHFMdKI9M3Nc0sy458LJ79Os+TPWeBBL96J9/e36rdJOfCuyRSgFAA0Q==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.12.1.tgz", + "integrity": "sha512-Gh8feEhsNLeCz6aYqynh61Vsdy+tiNNkQtc+bN3IvQvRqHkXGUhYkUi+ePKzP0Mb42se7FDb+y2SypTbpbR/Sg==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.12.0", + "@typescript-eslint/utils": "5.12.1", "debug": "^4.3.2", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.0.tgz", - "integrity": "sha512-JowqbwPf93nvf8fZn5XrPGFBdIK8+yx5UEGs2QFAYFI8IWYfrzz+6zqlurGr2ctShMaJxqwsqmra3WXWjH1nRQ==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.1.tgz", + "integrity": "sha512-hfcbq4qVOHV1YRdhkDldhV9NpmmAu2vp6wuFODL71Y0Ixak+FLeEU4rnPxgmZMnGreGEghlEucs9UZn5KOfHJA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.0.tgz", - "integrity": "sha512-Dd9gVeOqt38QHR0BEA8oRaT65WYqPYbIc5tRFQPkfLquVEFPD1HAtbZT98TLBkEcCkvwDYOAvuSvAD9DnQhMfQ==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.1.tgz", + "integrity": "sha512-ahOdkIY9Mgbza7L9sIi205Pe1inCkZWAHE1TV1bpxlU4RZNPtXaDZfiiFWcL9jdxvW1hDYZJXrFm+vlMkXRbBw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.12.0", - "@typescript-eslint/visitor-keys": "5.12.0", + "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/visitor-keys": "5.12.1", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -9938,26 +9821,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.12.0.tgz", - "integrity": "sha512-k4J2WovnMPGI4PzKgDtQdNrCnmBHpMUFy21qjX2CoPdoBcSBIMvVBr9P2YDP8jOqZOeK3ThOL6VO/sy6jtnvzw==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.12.1.tgz", + "integrity": "sha512-Qq9FIuU0EVEsi8fS6pG+uurbhNTtoYr4fq8tKjBupsK5Bgbk2I32UGm0Sh+WOyjOPgo/5URbxxSNV6HYsxV4MQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.12.0", - "@typescript-eslint/types": "5.12.0", - "@typescript-eslint/typescript-estree": "5.12.0", + "@typescript-eslint/scope-manager": "5.12.1", + "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/typescript-estree": "5.12.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.0.tgz", - "integrity": "sha512-cFwTlgnMV6TgezQynx2c/4/tx9Tufbuo9LPzmWqyRC3QC4qTGkAG1C6pBr0/4I10PAI/FlYunI3vJjIcu+ZHMg==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.1.tgz", + "integrity": "sha512-l1KSLfupuwrXx6wc0AuOmC7Ko5g14ZOQ86wJJqRbdLbXLK02pK/DPiDDqCc7BqqiiA04/eAA6ayL0bgOrAkH7A==", "dev": true, "requires": { - "@typescript-eslint/types": "5.12.0", + "@typescript-eslint/types": "5.12.1", "eslint-visitor-keys": "^3.0.0" } }, diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 74569271..ab386583 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -13,7 +13,7 @@ "@rollup/plugin-replace": "^3.1.0", "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.12.0", + "@typescript-eslint/eslint-plugin": "5.12.1", "@typescript-eslint/parser": "5.12.1", "eslint": "8.9.0", "eslint-config-prettier": "8.4.0", From 3086498283ffb01408762609dcdd1250f624acea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Feb 2022 02:21:20 +0000 Subject: [PATCH 30/86] Bump @rollup/plugin-replace from 3.1.0 to 4.0.0 Bumps [@rollup/plugin-replace](https://github.com/rollup/plugins/tree/HEAD/packages/replace) from 3.1.0 to 4.0.0. - [Release notes](https://github.com/rollup/plugins/releases) - [Changelog](https://github.com/rollup/plugins/blob/master/packages/replace/CHANGELOG.md) - [Commits](https://github.com/rollup/plugins/commits/url-v4.0.0/packages/replace) --- updated-dependencies: - dependency-name: "@rollup/plugin-replace" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 20 ++++++++++---------- packages/e2ee/package.json | 2 +- packages/sdk/package.json | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 43212fad..53f67bc0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1265,9 +1265,9 @@ } }, "node_modules/@rollup/plugin-replace": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-3.1.0.tgz", - "integrity": "sha512-pA3XRUrSKybVYqmH5TqWNZpGxF+VV+1GrYchKgCNIj2vsSOX7CVm2RCtx8p2nrC7xvkziYyK+lSi74T93MU3YA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-4.0.0.tgz", + "integrity": "sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -8545,7 +8545,7 @@ }, "devDependencies": { "@rollup/plugin-node-resolve": "^13.1.3", - "@rollup/plugin-replace": "^3.1.0", + "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.0", "@typescript-eslint/eslint-plugin": "^5.12.0", "@typescript-eslint/parser": "^5.12.0", @@ -8570,7 +8570,7 @@ "devDependencies": { "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-node-resolve": "^13.1.3", - "@rollup/plugin-replace": "^3.1.0", + "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.12.0", @@ -9565,9 +9565,9 @@ } }, "@rollup/plugin-replace": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-3.1.0.tgz", - "integrity": "sha512-pA3XRUrSKybVYqmH5TqWNZpGxF+VV+1GrYchKgCNIj2vsSOX7CVm2RCtx8p2nrC7xvkziYyK+lSi74T93MU3YA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-4.0.0.tgz", + "integrity": "sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -9631,7 +9631,7 @@ "version": "file:packages/e2ee", "requires": { "@rollup/plugin-node-resolve": "^13.1.3", - "@rollup/plugin-replace": "^3.1.0", + "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.0", "@sora/go-wasm": "^2021.1.0", "@typescript-eslint/eslint-plugin": "^5.12.0", @@ -9652,7 +9652,7 @@ "requires": { "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-node-resolve": "^13.1.3", - "@rollup/plugin-replace": "^3.1.0", + "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.0", "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.0", diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index 0b316c34..84e4ba1d 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@rollup/plugin-node-resolve": "^13.1.3", - "@rollup/plugin-replace": "^3.1.0", + "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.0", "@typescript-eslint/eslint-plugin": "^5.12.0", "@typescript-eslint/parser": "^5.12.0", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 74569271..8a947f62 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -10,7 +10,7 @@ "devDependencies": { "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-node-resolve": "^13.1.3", - "@rollup/plugin-replace": "^3.1.0", + "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.12.0", From 3f34892a3ca026b8c7e6f14470ca1238c6649c09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 16:00:37 +0000 Subject: [PATCH 31/86] Bump eslint from 8.9.0 to 8.10.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.9.0 to 8.10.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.9.0...v8.10.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 32 ++++++++++++++++---------------- packages/sdk/package.json | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5ec657d6..7e70871d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -601,9 +601,9 @@ "dev": true }, "node_modules/@eslint/eslintrc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz", - "integrity": "sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz", + "integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -3030,12 +3030,12 @@ } }, "node_modules/eslint": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz", - "integrity": "sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz", + "integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.1.0", + "@eslint/eslintrc": "^1.2.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -8501,7 +8501,7 @@ "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.12.1", "@typescript-eslint/parser": "5.12.1", - "eslint": "8.9.0", + "eslint": "8.10.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.5.1", @@ -8958,9 +8958,9 @@ "dev": true }, "@eslint/eslintrc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz", - "integrity": "sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz", + "integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -9584,7 +9584,7 @@ "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.12.1", "@typescript-eslint/parser": "5.12.1", - "eslint": "8.9.0", + "eslint": "8.10.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", "fflate": "^0.7.3", @@ -10871,12 +10871,12 @@ } }, "eslint": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz", - "integrity": "sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz", + "integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.1.0", + "@eslint/eslintrc": "^1.2.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 08e8130f..bdda495e 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -15,7 +15,7 @@ "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.12.1", "@typescript-eslint/parser": "5.12.1", - "eslint": "8.9.0", + "eslint": "8.10.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.5.1", From f4ac20f217358873806a5cbd1ef14f48bac3ec5d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 00:38:23 +0000 Subject: [PATCH 32/86] Bump @typescript-eslint/parser from 5.12.1 to 5.13.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.12.1 to 5.13.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.13.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 145 ++++++++++++++++++++++++++++++++++---- packages/sdk/package.json | 2 +- 2 files changed, 132 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7e70871d..618e5760 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1550,14 +1550,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.12.1.tgz", - "integrity": "sha512-6LuVUbe7oSdHxUWoX/m40Ni8gsZMKCi31rlawBHt7VtW15iHzjbpj2WLiToG2758KjtCCiLRKZqfrOdl3cNKuw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.13.0.tgz", + "integrity": "sha512-GdrU4GvBE29tm2RqWOM0P5QfCtgCyN4hXICj/X9ibKED16136l9ZpoJvCL5pSKtmJzA+NRDzQ312wWMejCVVfg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.12.1", - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/typescript-estree": "5.12.1", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/typescript-estree": "5.13.0", "debug": "^4.3.2" }, "engines": { @@ -1576,6 +1576,80 @@ } } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz", + "integrity": "sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.13.0.tgz", + "integrity": "sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz", + "integrity": "sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz", + "integrity": "sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.13.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.12.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.1.tgz", @@ -8500,7 +8574,7 @@ "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.12.1", - "@typescript-eslint/parser": "5.12.1", + "@typescript-eslint/parser": "5.13.0", "eslint": "8.10.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", @@ -9583,7 +9657,7 @@ "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.12.1", - "@typescript-eslint/parser": "5.12.1", + "@typescript-eslint/parser": "5.13.0", "eslint": "8.10.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", @@ -9767,15 +9841,58 @@ } }, "@typescript-eslint/parser": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.12.1.tgz", - "integrity": "sha512-6LuVUbe7oSdHxUWoX/m40Ni8gsZMKCi31rlawBHt7VtW15iHzjbpj2WLiToG2758KjtCCiLRKZqfrOdl3cNKuw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.13.0.tgz", + "integrity": "sha512-GdrU4GvBE29tm2RqWOM0P5QfCtgCyN4hXICj/X9ibKED16136l9ZpoJvCL5pSKtmJzA+NRDzQ312wWMejCVVfg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.12.1", - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/typescript-estree": "5.12.1", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/typescript-estree": "5.13.0", "debug": "^4.3.2" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz", + "integrity": "sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0" + } + }, + "@typescript-eslint/types": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.13.0.tgz", + "integrity": "sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz", + "integrity": "sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz", + "integrity": "sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.13.0", + "eslint-visitor-keys": "^3.0.0" + } + } } }, "@typescript-eslint/scope-manager": { diff --git a/packages/sdk/package.json b/packages/sdk/package.json index bdda495e..e7c11b9c 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -14,7 +14,7 @@ "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.12.1", - "@typescript-eslint/parser": "5.12.1", + "@typescript-eslint/parser": "5.13.0", "eslint": "8.10.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", From 831934d86f1876be2dc415e0ab4a5901a36ab9b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 00:38:44 +0000 Subject: [PATCH 33/86] Bump npm-check-updates from 12.4.0 to 12.5.0 Bumps [npm-check-updates](https://github.com/raineorshine/npm-check-updates) from 12.4.0 to 12.5.0. - [Release notes](https://github.com/raineorshine/npm-check-updates/releases) - [Changelog](https://github.com/raineorshine/npm-check-updates/blob/main/CHANGELOG.md) - [Commits](https://github.com/raineorshine/npm-check-updates/compare/v12.4.0...v12.5.0) --- updated-dependencies: - dependency-name: npm-check-updates dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7e70871d..3b8ffc72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5970,9 +5970,9 @@ } }, "node_modules/npm-check-updates": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.4.0.tgz", - "integrity": "sha512-X14H74M8SVFkStmP1NDOMh0OjLB3mU2dwUeM71zyITJHkm08MASwwTcydW6YuGcNW1RUlVq1cQY2yWijv4zKUQ==", + "version": "12.5.0", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.0.tgz", + "integrity": "sha512-nrryXO9IZdJsAIXo8LdtllrsGiTDE4IMAod7fl1jd5C38tOdZZG/crNNii4IkctxltQRmK/ziZwsMDTlhszZXg==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -13134,9 +13134,9 @@ } }, "npm-check-updates": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.4.0.tgz", - "integrity": "sha512-X14H74M8SVFkStmP1NDOMh0OjLB3mU2dwUeM71zyITJHkm08MASwwTcydW6YuGcNW1RUlVq1cQY2yWijv4zKUQ==", + "version": "12.5.0", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.0.tgz", + "integrity": "sha512-nrryXO9IZdJsAIXo8LdtllrsGiTDE4IMAod7fl1jd5C38tOdZZG/crNNii4IkctxltQRmK/ziZwsMDTlhszZXg==", "dev": true, "requires": { "chalk": "^4.1.2", From 6a08bf9e00ac211bd417919a6ee60d3e9f55dbe7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 00:41:20 +0000 Subject: [PATCH 34/86] Bump @typescript-eslint/eslint-plugin from 5.12.1 to 5.13.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.12.1 to 5.13.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.13.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 245 ++++++++++---------------------------- packages/sdk/package.json | 2 +- 2 files changed, 65 insertions(+), 182 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8db1bdef..be887751 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1517,14 +1517,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.1.tgz", - "integrity": "sha512-M499lqa8rnNK7mUv74lSFFttuUsubIRdAbHcVaP93oFcKkEmHmLqy2n7jM9C8DVmFMYK61ExrZU6dLYhQZmUpw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.13.0.tgz", + "integrity": "sha512-vLktb2Uec81fxm/cfz2Hd6QaWOs8qdmVAZXLdOBX6JFJDhf6oDZpMzZ4/LZ6SFM/5DgDcxIMIvy3F+O9yZBuiQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.12.1", - "@typescript-eslint/type-utils": "5.12.1", - "@typescript-eslint/utils": "5.12.1", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/type-utils": "5.13.0", + "@typescript-eslint/utils": "5.13.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1576,7 +1576,7 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "node_modules/@typescript-eslint/scope-manager": { "version": "5.13.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz", "integrity": "sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA==", @@ -1593,87 +1593,13 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.13.0.tgz", - "integrity": "sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz", - "integrity": "sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.13.0", - "@typescript-eslint/visitor-keys": "5.13.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz", - "integrity": "sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.13.0", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.1.tgz", - "integrity": "sha512-J0Wrh5xS6XNkd4TkOosxdpObzlYfXjAFIm9QxYLCPOcHVv1FyyFCPom66uIh8uBr0sZCrtS+n19tzufhwab8ZQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/visitor-keys": "5.12.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.12.1.tgz", - "integrity": "sha512-Gh8feEhsNLeCz6aYqynh61Vsdy+tiNNkQtc+bN3IvQvRqHkXGUhYkUi+ePKzP0Mb42se7FDb+y2SypTbpbR/Sg==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.13.0.tgz", + "integrity": "sha512-/nz7qFizaBM1SuqAKb7GLkcNn2buRdDgZraXlkhz+vUGiN1NZ9LzkA595tHHeduAiS2MsHqMNhE2zNzGdw43Yg==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.12.1", + "@typescript-eslint/utils": "5.13.0", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -1694,9 +1620,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.1.tgz", - "integrity": "sha512-hfcbq4qVOHV1YRdhkDldhV9NpmmAu2vp6wuFODL71Y0Ixak+FLeEU4rnPxgmZMnGreGEghlEucs9UZn5KOfHJA==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.13.0.tgz", + "integrity": "sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1707,13 +1633,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.1.tgz", - "integrity": "sha512-ahOdkIY9Mgbza7L9sIi205Pe1inCkZWAHE1TV1bpxlU4RZNPtXaDZfiiFWcL9jdxvW1hDYZJXrFm+vlMkXRbBw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz", + "integrity": "sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/visitor-keys": "5.12.1", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1734,15 +1660,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.12.1.tgz", - "integrity": "sha512-Qq9FIuU0EVEsi8fS6pG+uurbhNTtoYr4fq8tKjBupsK5Bgbk2I32UGm0Sh+WOyjOPgo/5URbxxSNV6HYsxV4MQ==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.13.0.tgz", + "integrity": "sha512-+9oHlPWYNl6AwwoEt5TQryEHwiKRVjz7Vk6kaBeD3/kwHE5YqTGHtm/JZY8Bo9ITOeKutFaXnBlMgSATMJALUQ==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.12.1", - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/typescript-estree": "5.12.1", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/typescript-estree": "5.13.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1758,12 +1684,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.1.tgz", - "integrity": "sha512-l1KSLfupuwrXx6wc0AuOmC7Ko5g14ZOQ86wJJqRbdLbXLK02pK/DPiDDqCc7BqqiiA04/eAA6ayL0bgOrAkH7A==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz", + "integrity": "sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/types": "5.13.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -8573,7 +8499,7 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.12.1", + "@typescript-eslint/eslint-plugin": "5.13.0", "@typescript-eslint/parser": "5.13.0", "eslint": "8.10.0", "eslint-config-prettier": "8.4.0", @@ -9656,7 +9582,7 @@ "@rollup/plugin-typescript": "^8.3.0", "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.12.1", + "@typescript-eslint/eslint-plugin": "5.13.0", "@typescript-eslint/parser": "5.13.0", "eslint": "8.10.0", "eslint-config-prettier": "8.4.0", @@ -9824,14 +9750,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.1.tgz", - "integrity": "sha512-M499lqa8rnNK7mUv74lSFFttuUsubIRdAbHcVaP93oFcKkEmHmLqy2n7jM9C8DVmFMYK61ExrZU6dLYhQZmUpw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.13.0.tgz", + "integrity": "sha512-vLktb2Uec81fxm/cfz2Hd6QaWOs8qdmVAZXLdOBX6JFJDhf6oDZpMzZ4/LZ6SFM/5DgDcxIMIvy3F+O9yZBuiQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.12.1", - "@typescript-eslint/type-utils": "5.12.1", - "@typescript-eslint/utils": "5.12.1", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/type-utils": "5.13.0", + "@typescript-eslint/utils": "5.13.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -9850,86 +9776,43 @@ "@typescript-eslint/types": "5.13.0", "@typescript-eslint/typescript-estree": "5.13.0", "debug": "^4.3.2" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz", - "integrity": "sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.13.0", - "@typescript-eslint/visitor-keys": "5.13.0" - } - }, - "@typescript-eslint/types": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.13.0.tgz", - "integrity": "sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz", - "integrity": "sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.13.0", - "@typescript-eslint/visitor-keys": "5.13.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz", - "integrity": "sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.13.0", - "eslint-visitor-keys": "^3.0.0" - } - } } }, "@typescript-eslint/scope-manager": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.1.tgz", - "integrity": "sha512-J0Wrh5xS6XNkd4TkOosxdpObzlYfXjAFIm9QxYLCPOcHVv1FyyFCPom66uIh8uBr0sZCrtS+n19tzufhwab8ZQ==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz", + "integrity": "sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/visitor-keys": "5.12.1" + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0" } }, "@typescript-eslint/type-utils": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.12.1.tgz", - "integrity": "sha512-Gh8feEhsNLeCz6aYqynh61Vsdy+tiNNkQtc+bN3IvQvRqHkXGUhYkUi+ePKzP0Mb42se7FDb+y2SypTbpbR/Sg==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.13.0.tgz", + "integrity": "sha512-/nz7qFizaBM1SuqAKb7GLkcNn2buRdDgZraXlkhz+vUGiN1NZ9LzkA595tHHeduAiS2MsHqMNhE2zNzGdw43Yg==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.12.1", + "@typescript-eslint/utils": "5.13.0", "debug": "^4.3.2", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.1.tgz", - "integrity": "sha512-hfcbq4qVOHV1YRdhkDldhV9NpmmAu2vp6wuFODL71Y0Ixak+FLeEU4rnPxgmZMnGreGEghlEucs9UZn5KOfHJA==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.13.0.tgz", + "integrity": "sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.1.tgz", - "integrity": "sha512-ahOdkIY9Mgbza7L9sIi205Pe1inCkZWAHE1TV1bpxlU4RZNPtXaDZfiiFWcL9jdxvW1hDYZJXrFm+vlMkXRbBw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz", + "integrity": "sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/visitor-keys": "5.12.1", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/visitor-keys": "5.13.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -9938,26 +9821,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.12.1.tgz", - "integrity": "sha512-Qq9FIuU0EVEsi8fS6pG+uurbhNTtoYr4fq8tKjBupsK5Bgbk2I32UGm0Sh+WOyjOPgo/5URbxxSNV6HYsxV4MQ==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.13.0.tgz", + "integrity": "sha512-+9oHlPWYNl6AwwoEt5TQryEHwiKRVjz7Vk6kaBeD3/kwHE5YqTGHtm/JZY8Bo9ITOeKutFaXnBlMgSATMJALUQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.12.1", - "@typescript-eslint/types": "5.12.1", - "@typescript-eslint/typescript-estree": "5.12.1", + "@typescript-eslint/scope-manager": "5.13.0", + "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/typescript-estree": "5.13.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.1.tgz", - "integrity": "sha512-l1KSLfupuwrXx6wc0AuOmC7Ko5g14ZOQ86wJJqRbdLbXLK02pK/DPiDDqCc7BqqiiA04/eAA6ayL0bgOrAkH7A==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz", + "integrity": "sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==", "dev": true, "requires": { - "@typescript-eslint/types": "5.12.1", + "@typescript-eslint/types": "5.13.0", "eslint-visitor-keys": "^3.0.0" } }, diff --git a/packages/sdk/package.json b/packages/sdk/package.json index e7c11b9c..522d57fb 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -13,7 +13,7 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.12.1", + "@typescript-eslint/eslint-plugin": "5.13.0", "@typescript-eslint/parser": "5.13.0", "eslint": "8.10.0", "eslint-config-prettier": "8.4.0", From 0867dd81e128574f1ec0ed0a890063ed397e7ff7 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 1 Mar 2022 09:52:33 +0900 Subject: [PATCH 35/86] Update dependabot.yml --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8abca405..e574638e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,4 +8,4 @@ updates: - package-ecosystem: "npm" # See documentation for possible values directory: "/" # Location of package manifests schedule: - interval: "daily" + interval: "weekly" From c1ef5b3350caee92645f29ce59fb5aa618bbe040 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 8 Mar 2022 15:00:21 +0900 Subject: [PATCH 36/86] =?UTF-8?q?onopen=20=E3=81=99=E3=82=8B=E5=89=8D?= =?UTF-8?q?=E3=81=AB=20datachannel=20=E4=B8=80=E8=A6=A7=E3=82=92=E4=BD=9C?= =?UTF-8?q?=E6=88=90=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/src/base.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/sdk/src/base.ts b/packages/sdk/src/base.ts index 8c4c5403..01b0819b 100644 --- a/packages/sdk/src/base.ts +++ b/packages/sdk/src/base.ts @@ -1889,6 +1889,9 @@ export default class ConnectionBase { */ private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void { const dataChannel = dataChannelEvent.channel; + dataChannel.bufferedAmountLowThreshold = 65536; + dataChannel.binaryType = "arraybuffer"; + this.soraDataChannels[dataChannel.label] = dataChannel; this.writeDataChannelTimelineLog("ondatachannel", dataChannel, createDataChannelData(dataChannel)); // onbufferedamountlow dataChannelEvent.channel.onbufferedamountlow = (event): void => { @@ -1898,9 +1901,6 @@ export default class ConnectionBase { // onopen dataChannelEvent.channel.onopen = (event): void => { const channel = event.currentTarget as RTCDataChannel; - channel.bufferedAmountLowThreshold = 65536; - channel.binaryType = "arraybuffer"; - this.soraDataChannels[channel.label] = channel; this.trace("OPEN DATA CHANNEL", channel.label); if (channel.label === "signaling" && this.ws) { this.writeDataChannelSignalingLog("onopen", channel); From d5ca4099810bad06773694ed76d4ba050b05e5b5 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 8 Mar 2022 16:44:52 +0900 Subject: [PATCH 37/86] =?UTF-8?q?=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E9=80=81=E4=BF=A1=E6=99=82=E3=81=AB=20DataChannel=20?= =?UTF-8?q?=E3=81=AE=20readyState=20=E3=82=92=E7=A2=BA=E8=AA=8D=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/src/base.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/sdk/src/base.ts b/packages/sdk/src/base.ts index 01b0819b..274c4f7d 100644 --- a/packages/sdk/src/base.ts +++ b/packages/sdk/src/base.ts @@ -2172,6 +2172,9 @@ export default class ConnectionBase { if (dataChannel === undefined) { throw new Error("Could not find DataChannel"); } + if (dataChannel.readyState !== "open") { + throw new Error("Messaging DataChannel is not open"); + } const settings = this.signalingOfferMessageDataChannels[label]; if (settings !== undefined && settings.compress === true) { const zlibMessage = zlibSync(message, {}); From 23de14736c5b2e297f33c7d5a45a00e2110b4dbb Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Wed, 9 Mar 2022 10:16:44 +0900 Subject: [PATCH 38/86] =?UTF-8?q?sora=20e2ee=20=E3=81=AE=E5=88=87=E6=96=AD?= =?UTF-8?q?=E6=99=82=E3=81=AE=20callback=20=E6=88=BB=E3=82=8A=E5=80=A4?= =?UTF-8?q?=E3=81=AE=E5=9E=8B=E3=82=92=20any=20=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/e2ee/src/sora_e2ee.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/e2ee/src/sora_e2ee.ts b/packages/e2ee/src/sora_e2ee.ts index f2fdab2e..7e0f701f 100644 --- a/packages/e2ee/src/sora_e2ee.ts +++ b/packages/e2ee/src/sora_e2ee.ts @@ -75,7 +75,8 @@ const WORKER_SCRIPT = "__WORKER_SCRIPT__"; class SoraE2EE { worker: Worker | null; - onWorkerDisconnect: (() => void) | null; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + onWorkerDisconnect: (() => any) | null; constructor() { // 対応しているかどうかの判断 From 6eaeea5121c8bbec99bf7ddb18dab89f7cf89cc6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 16:01:09 +0000 Subject: [PATCH 39/86] Bump @typescript-eslint/parser from 5.13.0 to 5.14.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.13.0 to 5.14.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.14.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 145 ++++++++++++++++++++++++++++++++++---- packages/sdk/package.json | 2 +- 2 files changed, 132 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index be887751..9b0c8307 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1550,14 +1550,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.13.0.tgz", - "integrity": "sha512-GdrU4GvBE29tm2RqWOM0P5QfCtgCyN4hXICj/X9ibKED16136l9ZpoJvCL5pSKtmJzA+NRDzQ312wWMejCVVfg==", + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.14.0.tgz", + "integrity": "sha512-aHJN8/FuIy1Zvqk4U/gcO/fxeMKyoSv/rS46UXMXOJKVsLQ+iYPuXNbpbH7cBLcpSbmyyFbwrniLx5+kutu1pw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.13.0", - "@typescript-eslint/types": "5.13.0", - "@typescript-eslint/typescript-estree": "5.13.0", + "@typescript-eslint/scope-manager": "5.14.0", + "@typescript-eslint/types": "5.14.0", + "@typescript-eslint/typescript-estree": "5.14.0", "debug": "^4.3.2" }, "engines": { @@ -1576,6 +1576,80 @@ } } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.14.0.tgz", + "integrity": "sha512-LazdcMlGnv+xUc5R4qIlqH0OWARyl2kaP8pVCS39qSL3Pd1F7mI10DbdXeARcE62sVQE4fHNvEqMWsypWO+yEw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.14.0", + "@typescript-eslint/visitor-keys": "5.14.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.14.0.tgz", + "integrity": "sha512-BR6Y9eE9360LNnW3eEUqAg6HxS9Q35kSIs4rp4vNHRdfg0s+/PgHgskvu5DFTM7G5VKAVjuyaN476LCPrdA7Mw==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.14.0.tgz", + "integrity": "sha512-QGnxvROrCVtLQ1724GLTHBTR0lZVu13izOp9njRvMkCBgWX26PKvmMP8k82nmXBRD3DQcFFq2oj3cKDwr0FaUA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.14.0", + "@typescript-eslint/visitor-keys": "5.14.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.14.0.tgz", + "integrity": "sha512-yL0XxfzR94UEkjBqyymMLgCBdojzEuy/eim7N9/RIcTNxpJudAcqsU8eRyfzBbcEzGoPWfdM3AGak3cN08WOIw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.14.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.13.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz", @@ -8500,7 +8574,7 @@ "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.13.0", - "@typescript-eslint/parser": "5.13.0", + "@typescript-eslint/parser": "5.14.0", "eslint": "8.10.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", @@ -9583,7 +9657,7 @@ "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.13.0", - "@typescript-eslint/parser": "5.13.0", + "@typescript-eslint/parser": "5.14.0", "eslint": "8.10.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", @@ -9767,15 +9841,58 @@ } }, "@typescript-eslint/parser": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.13.0.tgz", - "integrity": "sha512-GdrU4GvBE29tm2RqWOM0P5QfCtgCyN4hXICj/X9ibKED16136l9ZpoJvCL5pSKtmJzA+NRDzQ312wWMejCVVfg==", + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.14.0.tgz", + "integrity": "sha512-aHJN8/FuIy1Zvqk4U/gcO/fxeMKyoSv/rS46UXMXOJKVsLQ+iYPuXNbpbH7cBLcpSbmyyFbwrniLx5+kutu1pw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.13.0", - "@typescript-eslint/types": "5.13.0", - "@typescript-eslint/typescript-estree": "5.13.0", + "@typescript-eslint/scope-manager": "5.14.0", + "@typescript-eslint/types": "5.14.0", + "@typescript-eslint/typescript-estree": "5.14.0", "debug": "^4.3.2" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.14.0.tgz", + "integrity": "sha512-LazdcMlGnv+xUc5R4qIlqH0OWARyl2kaP8pVCS39qSL3Pd1F7mI10DbdXeARcE62sVQE4fHNvEqMWsypWO+yEw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.14.0", + "@typescript-eslint/visitor-keys": "5.14.0" + } + }, + "@typescript-eslint/types": { + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.14.0.tgz", + "integrity": "sha512-BR6Y9eE9360LNnW3eEUqAg6HxS9Q35kSIs4rp4vNHRdfg0s+/PgHgskvu5DFTM7G5VKAVjuyaN476LCPrdA7Mw==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.14.0.tgz", + "integrity": "sha512-QGnxvROrCVtLQ1724GLTHBTR0lZVu13izOp9njRvMkCBgWX26PKvmMP8k82nmXBRD3DQcFFq2oj3cKDwr0FaUA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.14.0", + "@typescript-eslint/visitor-keys": "5.14.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.14.0.tgz", + "integrity": "sha512-yL0XxfzR94UEkjBqyymMLgCBdojzEuy/eim7N9/RIcTNxpJudAcqsU8eRyfzBbcEzGoPWfdM3AGak3cN08WOIw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.14.0", + "eslint-visitor-keys": "^3.0.0" + } + } } }, "@typescript-eslint/scope-manager": { diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 522d57fb..8ec1ede9 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -14,7 +14,7 @@ "@rollup/plugin-typescript": "^8.3.0", "@types/jest": "^27.4.0", "@typescript-eslint/eslint-plugin": "5.13.0", - "@typescript-eslint/parser": "5.13.0", + "@typescript-eslint/parser": "5.14.0", "eslint": "8.10.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", From 468238048892b02b55f280526b79cb120a51de2a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 16:01:58 +0000 Subject: [PATCH 40/86] Bump npm-check-updates from 12.5.0 to 12.5.3 Bumps [npm-check-updates](https://github.com/raineorshine/npm-check-updates) from 12.5.0 to 12.5.3. - [Release notes](https://github.com/raineorshine/npm-check-updates/releases) - [Changelog](https://github.com/raineorshine/npm-check-updates/blob/main/CHANGELOG.md) - [Commits](https://github.com/raineorshine/npm-check-updates/compare/v12.5.0...v12.5.3) --- updated-dependencies: - dependency-name: npm-check-updates dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 418 ++++++++++++++++++++-------------------------- 1 file changed, 184 insertions(+), 234 deletions(-) diff --git a/package-lock.json b/package-lock.json index be887751..d30f2425 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1159,9 +1159,9 @@ } }, "node_modules/@npmcli/git/node_modules/lru-cache": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.3.1.tgz", - "integrity": "sha512-nX1x4qUrKqwbIAhv4s9et4FIUVzNOpeY07bsjGUy8gwJrXH/wScImSQqXErmo/b2jZY2r0mohbLA9zVj7u1cNw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.5.0.tgz", + "integrity": "sha512-8neUvdgNtubJ+VNNqrqOLjUoIlN+NRPFtv1Vne2rQ4uPCxhp0W4TlqntzTLnVVezGXcSSdXTrKCTYooEQA7X6g==", "dev": true, "engines": { "node": ">=12" @@ -1212,15 +1212,18 @@ } }, "node_modules/@npmcli/run-script": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-2.0.0.tgz", - "integrity": "sha512-fSan/Pu11xS/TdaTpTB0MRn9guwGU8dye+x56mEVgBEd/QsybBbYcAL0phPXi8SGWFEChkQd6M9qL4y6VOpFig==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.1.tgz", + "integrity": "sha512-o2fkld5hYwu9sKYzoXTpqEocMnDLaigobaPzLaGB63k/ExmLBTaB+KpfKlpcIePPnuP8RFR+0GDI4KopJCM6Xg==", "dev": true, "dependencies": { - "@npmcli/node-gyp": "^1.0.2", + "@npmcli/node-gyp": "^1.0.3", "@npmcli/promise-spawn": "^1.3.2", - "node-gyp": "^8.2.0", - "read-package-json-fast": "^2.0.1" + "node-gyp": "^9.0.0", + "read-package-json-fast": "^2.0.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" } }, "node_modules/@rollup/plugin-commonjs": { @@ -1796,9 +1799,9 @@ } }, "node_modules/agentkeepalive": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.0.tgz", - "integrity": "sha512-0PhAp58jZNw13UJv7NVdTGb0ZcghHUb3DrZ046JiiJY/BOaTTpbwdHq2VObPCBV8M2GPh7sgrJ3AQ8Ey468LJw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", + "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", "dev": true, "dependencies": { "debug": "^4.1.0", @@ -3633,20 +3636,19 @@ "dev": true }, "node_modules/gauge": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.1.tgz", - "integrity": "sha512-zJ4jePUHR8cceduZ53b6temRalyGpkC2Kc2r3ecNphmL+uWNoJ3YcOcUjpbG6WwoE/Ef6/+aEZz63neI2WIa1Q==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.3.tgz", + "integrity": "sha512-ICw1DhAwMtb22rYFwEHgJcx1JCwJGv3x6G0OQUq56Nge+H4Q8JEwr8iveS0XFlsUNSI67F5ffMGK25bK4Pmskw==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.1", "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", "has-unicode": "^2.0.1", - "signal-exit": "^3.0.0", + "signal-exit": "^3.0.7", "string-width": "^4.2.3", "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" + "wide-align": "^1.1.5" }, "engines": { "node": "^12.13.0 || ^14.15.0 || >=16" @@ -5605,32 +5607,64 @@ "dev": true }, "node_modules/make-fetch-happen": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", - "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.5.tgz", + "integrity": "sha512-0JQ0daMRDFEv14DelmcFlprdhSDNG7WEgInTjBeWYWZ78W0jfDqygZdPLhcrQ4s/G8skNhBrS4fiF6xA+YlFjQ==", "dev": true, "dependencies": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", + "agentkeepalive": "^4.2.1", + "cacache": "^15.3.0", "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", + "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", + "lru-cache": "^7.4.1", + "minipass": "^3.1.6", "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", + "minipass-fetch": "^2.0.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", + "negotiator": "^0.6.3", "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" + "socks-proxy-agent": "^6.1.1", + "ssri": "^8.0.1" }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" + } + }, + "node_modules/make-fetch-happen/node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true, "engines": { "node": ">= 10" } }, + "node_modules/make-fetch-happen/node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/make-fetch-happen/node_modules/lru-cache": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.5.0.tgz", + "integrity": "sha512-8neUvdgNtubJ+VNNqrqOLjUoIlN+NRPFtv1Vne2rQ4uPCxhp0W4TlqntzTLnVVezGXcSSdXTrKCTYooEQA7X6g==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -5720,9 +5754,9 @@ } }, "node_modules/minimatch": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.0.tgz", - "integrity": "sha512-EU+GCVjXD00yOUf1TwAHVP7v3fBD3A8RkkPYsWWKGWesxM/572sL53wJQnHxquHlRhYUV36wHkqrN8cdikKc2g==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -5762,20 +5796,20 @@ } }, "node_modules/minipass-fetch": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", - "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.0.3.tgz", + "integrity": "sha512-VA+eiiUtaIvpQJXISwE3OiMvQwAWrgKb97F0aXlCS1Ahikr8fEQq8m3Hf7Kv9KT3nokuHigJKsDMB6atU04olQ==", "dev": true, "dependencies": { - "minipass": "^3.1.0", + "minipass": "^3.1.6", "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" + "minizlib": "^2.1.2" }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || >=16" }, "optionalDependencies": { - "encoding": "^0.1.12" + "encoding": "^0.1.13" } }, "node_modules/minipass-flush": { @@ -5877,15 +5911,15 @@ "dev": true }, "node_modules/node-gyp": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", - "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.0.0.tgz", + "integrity": "sha512-Ma6p4s+XCTPxCuAMrOA/IJRmVy16R8Sdhtwl4PrCr7IBlj4cPawF0vg/l7nOT1jPbuNS7lIRJpBSvVsXwEZuzw==", "dev": true, "dependencies": { "env-paths": "^2.2.0", "glob": "^7.1.4", "graceful-fs": "^4.2.6", - "make-fetch-happen": "^9.1.0", + "make-fetch-happen": "^10.0.3", "nopt": "^5.0.0", "npmlog": "^6.0.0", "rimraf": "^3.0.2", @@ -5897,7 +5931,7 @@ "node-gyp": "bin/node-gyp.js" }, "engines": { - "node": ">= 10.12.0" + "node": "^12.22 || ^14.13 || >=16" } }, "node_modules/node-int64": { @@ -5970,9 +6004,9 @@ } }, "node_modules/npm-check-updates": { - "version": "12.5.0", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.0.tgz", - "integrity": "sha512-nrryXO9IZdJsAIXo8LdtllrsGiTDE4IMAod7fl1jd5C38tOdZZG/crNNii4IkctxltQRmK/ziZwsMDTlhszZXg==", + "version": "12.5.3", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.3.tgz", + "integrity": "sha512-siFg/+Un+j4tLA6GJCnk6hz2YU4Yc5bftDnOoiSRLKL6NeAS3FScB32mtKNBtITMJf2nsoZSr8vH+wdUGeP19g==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -5989,9 +6023,9 @@ "jsonlines": "^0.1.1", "libnpmconfig": "^1.2.1", "lodash": "^4.17.21", - "minimatch": "^5.0.0", + "minimatch": "^5.0.1", "p-map": "^4.0.0", - "pacote": "^13.0.2", + "pacote": "^13.0.3", "parse-github-url": "^1.0.2", "progress": "^2.0.3", "prompts": "^2.4.2", @@ -6079,14 +6113,14 @@ } }, "node_modules/npm-registry-fetch": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.0.0.tgz", - "integrity": "sha512-MmiMuV9DU5gRuAU0jia952Qq+E4h7ZoUaeltCXivhClcqfOVKqNLZEQsRUOb6a8WQY+um8x97JcUuaWFoPoBBw==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.0.1.tgz", + "integrity": "sha512-Ak+LXVtSrCLOdscFW/apUw67OPNph8waHsPKM9UOJosL7i59EF5XoSWQMEsXEOeifM9Bb4/2+WrQC4t/pd8DGg==", "dev": true, "dependencies": { - "make-fetch-happen": "^10.0.2", + "make-fetch-happen": "^10.0.3", "minipass": "^3.1.6", - "minipass-fetch": "^1.4.1", + "minipass-fetch": "^2.0.1", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", "npm-package-arg": "^9.0.0", @@ -6096,65 +6130,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/npm-registry-fetch/node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/npm-registry-fetch/node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dev": true, - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/npm-registry-fetch/node_modules/lru-cache": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.3.1.tgz", - "integrity": "sha512-nX1x4qUrKqwbIAhv4s9et4FIUVzNOpeY07bsjGUy8gwJrXH/wScImSQqXErmo/b2jZY2r0mohbLA9zVj7u1cNw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/npm-registry-fetch/node_modules/make-fetch-happen": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.3.tgz", - "integrity": "sha512-CzarPHynPpHjhF5in/YapnO44rSZeYX5VCMfdXa99+gLwpbfFLh20CWa6dP/taV9Net9PWJwXNKtp/4ZTCQnag==", - "dev": true, - "dependencies": { - "agentkeepalive": "^4.2.0", - "cacache": "^15.3.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.3.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.4.1", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.1.1", - "ssri": "^8.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" - } - }, "node_modules/npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -6359,15 +6334,15 @@ } }, "node_modules/pacote": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.0.2.tgz", - "integrity": "sha512-3LyfvDk2BSJNFQZIcDqnLNa7IsYb6KwX3H9uZPwaHJFIX6Gv5N9QHU+s7mEs/RbN4/ta6KUT39LAi2l6EkBi5A==", + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.0.3.tgz", + "integrity": "sha512-8thQ06YoO01O1k5rvSpHS/XPJZucw2DPiiT1jI+ys8QaTN6ifAyxfyoABHBa8nIt/4wPdzly4GEPqshctHFoYA==", "dev": true, "dependencies": { "@npmcli/git": "^3.0.0", "@npmcli/installed-package-contents": "^1.0.7", "@npmcli/promise-spawn": "^1.2.0", - "@npmcli/run-script": "^2.0.0", + "@npmcli/run-script": "^3.0.0", "cacache": "^15.3.0", "chownr": "^2.0.0", "fs-minipass": "^2.1.0", @@ -6810,9 +6785,9 @@ "dev": true }, "node_modules/read-package-json": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-4.1.1.tgz", - "integrity": "sha512-P82sbZJ3ldDrWCOSKxJT0r/CXMWR0OR3KRh55SgKo3p91GSIEEC32v3lSHAvO/UcH3/IoL7uqhOFBduAnwdldw==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-4.1.2.tgz", + "integrity": "sha512-Dqer4pqzamDE2O4M55xp1qZMuLPqi4ldk2ya648FOMHRjwMzFhuxVrG04wd0c38IsvkVdr3vgHI6z+QTPdAjrQ==", "dev": true, "dependencies": { "glob": "^7.1.1", @@ -9407,9 +9382,9 @@ }, "dependencies": { "lru-cache": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.3.1.tgz", - "integrity": "sha512-nX1x4qUrKqwbIAhv4s9et4FIUVzNOpeY07bsjGUy8gwJrXH/wScImSQqXErmo/b2jZY2r0mohbLA9zVj7u1cNw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.5.0.tgz", + "integrity": "sha512-8neUvdgNtubJ+VNNqrqOLjUoIlN+NRPFtv1Vne2rQ4uPCxhp0W4TlqntzTLnVVezGXcSSdXTrKCTYooEQA7X6g==", "dev": true } } @@ -9450,15 +9425,15 @@ } }, "@npmcli/run-script": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-2.0.0.tgz", - "integrity": "sha512-fSan/Pu11xS/TdaTpTB0MRn9guwGU8dye+x56mEVgBEd/QsybBbYcAL0phPXi8SGWFEChkQd6M9qL4y6VOpFig==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.1.tgz", + "integrity": "sha512-o2fkld5hYwu9sKYzoXTpqEocMnDLaigobaPzLaGB63k/ExmLBTaB+KpfKlpcIePPnuP8RFR+0GDI4KopJCM6Xg==", "dev": true, "requires": { - "@npmcli/node-gyp": "^1.0.2", + "@npmcli/node-gyp": "^1.0.3", "@npmcli/promise-spawn": "^1.3.2", - "node-gyp": "^8.2.0", - "read-package-json-fast": "^2.0.1" + "node-gyp": "^9.0.0", + "read-package-json-fast": "^2.0.3" } }, "@rollup/plugin-commonjs": { @@ -9919,9 +9894,9 @@ } }, "agentkeepalive": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.0.tgz", - "integrity": "sha512-0PhAp58jZNw13UJv7NVdTGb0ZcghHUb3DrZ046JiiJY/BOaTTpbwdHq2VObPCBV8M2GPh7sgrJ3AQ8Ey468LJw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", + "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", "dev": true, "requires": { "debug": "^4.1.0", @@ -11331,20 +11306,19 @@ "dev": true }, "gauge": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.1.tgz", - "integrity": "sha512-zJ4jePUHR8cceduZ53b6temRalyGpkC2Kc2r3ecNphmL+uWNoJ3YcOcUjpbG6WwoE/Ef6/+aEZz63neI2WIa1Q==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.3.tgz", + "integrity": "sha512-ICw1DhAwMtb22rYFwEHgJcx1JCwJGv3x6G0OQUq56Nge+H4Q8JEwr8iveS0XFlsUNSI67F5ffMGK25bK4Pmskw==", "dev": true, "requires": { - "ansi-regex": "^5.0.1", "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", "has-unicode": "^2.0.1", - "signal-exit": "^3.0.0", + "signal-exit": "^3.0.7", "string-width": "^4.2.3", "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" + "wide-align": "^1.1.5" } }, "gensync": { @@ -12852,27 +12826,52 @@ "dev": true }, "make-fetch-happen": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", - "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.5.tgz", + "integrity": "sha512-0JQ0daMRDFEv14DelmcFlprdhSDNG7WEgInTjBeWYWZ78W0jfDqygZdPLhcrQ4s/G8skNhBrS4fiF6xA+YlFjQ==", "dev": true, "requires": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", + "agentkeepalive": "^4.2.1", + "cacache": "^15.3.0", "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", + "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", + "lru-cache": "^7.4.1", + "minipass": "^3.1.6", "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", + "minipass-fetch": "^2.0.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", + "negotiator": "^0.6.3", "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" + "socks-proxy-agent": "^6.1.1", + "ssri": "^8.0.1" + }, + "dependencies": { + "@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true + }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } + }, + "lru-cache": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.5.0.tgz", + "integrity": "sha512-8neUvdgNtubJ+VNNqrqOLjUoIlN+NRPFtv1Vne2rQ4uPCxhp0W4TlqntzTLnVVezGXcSSdXTrKCTYooEQA7X6g==", + "dev": true + } } }, "makeerror": { @@ -12940,9 +12939,9 @@ "dev": true }, "minimatch": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.0.tgz", - "integrity": "sha512-EU+GCVjXD00yOUf1TwAHVP7v3fBD3A8RkkPYsWWKGWesxM/572sL53wJQnHxquHlRhYUV36wHkqrN8cdikKc2g==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -12973,15 +12972,15 @@ } }, "minipass-fetch": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", - "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.0.3.tgz", + "integrity": "sha512-VA+eiiUtaIvpQJXISwE3OiMvQwAWrgKb97F0aXlCS1Ahikr8fEQq8m3Hf7Kv9KT3nokuHigJKsDMB6atU04olQ==", "dev": true, "requires": { - "encoding": "^0.1.12", - "minipass": "^3.1.0", + "encoding": "^0.1.13", + "minipass": "^3.1.6", "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" + "minizlib": "^2.1.2" } }, "minipass-flush": { @@ -13062,15 +13061,15 @@ "dev": true }, "node-gyp": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", - "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.0.0.tgz", + "integrity": "sha512-Ma6p4s+XCTPxCuAMrOA/IJRmVy16R8Sdhtwl4PrCr7IBlj4cPawF0vg/l7nOT1jPbuNS7lIRJpBSvVsXwEZuzw==", "dev": true, "requires": { "env-paths": "^2.2.0", "glob": "^7.1.4", "graceful-fs": "^4.2.6", - "make-fetch-happen": "^9.1.0", + "make-fetch-happen": "^10.0.3", "nopt": "^5.0.0", "npmlog": "^6.0.0", "rimraf": "^3.0.2", @@ -13134,9 +13133,9 @@ } }, "npm-check-updates": { - "version": "12.5.0", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.0.tgz", - "integrity": "sha512-nrryXO9IZdJsAIXo8LdtllrsGiTDE4IMAod7fl1jd5C38tOdZZG/crNNii4IkctxltQRmK/ziZwsMDTlhszZXg==", + "version": "12.5.3", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.3.tgz", + "integrity": "sha512-siFg/+Un+j4tLA6GJCnk6hz2YU4Yc5bftDnOoiSRLKL6NeAS3FScB32mtKNBtITMJf2nsoZSr8vH+wdUGeP19g==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -13153,9 +13152,9 @@ "jsonlines": "^0.1.1", "libnpmconfig": "^1.2.1", "lodash": "^4.17.21", - "minimatch": "^5.0.0", + "minimatch": "^5.0.1", "p-map": "^4.0.0", - "pacote": "^13.0.2", + "pacote": "^13.0.3", "parse-github-url": "^1.0.2", "progress": "^2.0.3", "prompts": "^2.4.2", @@ -13221,67 +13220,18 @@ } }, "npm-registry-fetch": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.0.0.tgz", - "integrity": "sha512-MmiMuV9DU5gRuAU0jia952Qq+E4h7ZoUaeltCXivhClcqfOVKqNLZEQsRUOb6a8WQY+um8x97JcUuaWFoPoBBw==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.0.1.tgz", + "integrity": "sha512-Ak+LXVtSrCLOdscFW/apUw67OPNph8waHsPKM9UOJosL7i59EF5XoSWQMEsXEOeifM9Bb4/2+WrQC4t/pd8DGg==", "dev": true, "requires": { - "make-fetch-happen": "^10.0.2", + "make-fetch-happen": "^10.0.3", "minipass": "^3.1.6", - "minipass-fetch": "^1.4.1", + "minipass-fetch": "^2.0.1", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", "npm-package-arg": "^9.0.0", "proc-log": "^2.0.0" - }, - "dependencies": { - "@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "dev": true - }, - "http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dev": true, - "requires": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - } - }, - "lru-cache": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.3.1.tgz", - "integrity": "sha512-nX1x4qUrKqwbIAhv4s9et4FIUVzNOpeY07bsjGUy8gwJrXH/wScImSQqXErmo/b2jZY2r0mohbLA9zVj7u1cNw==", - "dev": true - }, - "make-fetch-happen": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.3.tgz", - "integrity": "sha512-CzarPHynPpHjhF5in/YapnO44rSZeYX5VCMfdXa99+gLwpbfFLh20CWa6dP/taV9Net9PWJwXNKtp/4ZTCQnag==", - "dev": true, - "requires": { - "agentkeepalive": "^4.2.0", - "cacache": "^15.3.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.3.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.4.1", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.1.1", - "ssri": "^8.0.1" - } - } } }, "npm-run-path": { @@ -13433,15 +13383,15 @@ } }, "pacote": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.0.2.tgz", - "integrity": "sha512-3LyfvDk2BSJNFQZIcDqnLNa7IsYb6KwX3H9uZPwaHJFIX6Gv5N9QHU+s7mEs/RbN4/ta6KUT39LAi2l6EkBi5A==", + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.0.3.tgz", + "integrity": "sha512-8thQ06YoO01O1k5rvSpHS/XPJZucw2DPiiT1jI+ys8QaTN6ifAyxfyoABHBa8nIt/4wPdzly4GEPqshctHFoYA==", "dev": true, "requires": { "@npmcli/git": "^3.0.0", "@npmcli/installed-package-contents": "^1.0.7", "@npmcli/promise-spawn": "^1.2.0", - "@npmcli/run-script": "^2.0.0", + "@npmcli/run-script": "^3.0.0", "cacache": "^15.3.0", "chownr": "^2.0.0", "fs-minipass": "^2.1.0", @@ -13769,9 +13719,9 @@ "dev": true }, "read-package-json": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-4.1.1.tgz", - "integrity": "sha512-P82sbZJ3ldDrWCOSKxJT0r/CXMWR0OR3KRh55SgKo3p91GSIEEC32v3lSHAvO/UcH3/IoL7uqhOFBduAnwdldw==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-4.1.2.tgz", + "integrity": "sha512-Dqer4pqzamDE2O4M55xp1qZMuLPqi4ldk2ya648FOMHRjwMzFhuxVrG04wd0c38IsvkVdr3vgHI6z+QTPdAjrQ==", "dev": true, "requires": { "glob": "^7.1.1", From 5f1a3e56e568319ee2f3e1efe121620559837fb2 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Thu, 24 Mar 2022 11:20:49 +0900 Subject: [PATCH 41/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 1464 +++++++++++++++++------------------- package.json | 4 +- packages/e2ee/package.json | 16 +- packages/sdk/package.json | 20 +- 4 files changed, 715 insertions(+), 789 deletions(-) diff --git a/package-lock.json b/package-lock.json index 50c30882..15f0a71d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,9 +14,9 @@ "packages/sdk" ], "devDependencies": { - "npm-check-updates": "^12.4.0", + "npm-check-updates": "^12.5.4", "serve": "^13.0.2", - "typedoc": "^0.22.12" + "typedoc": "^0.22.13" } }, "node_modules/@ampproject/remapping": { @@ -44,27 +44,27 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.0.tgz", - "integrity": "sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", + "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.17.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.5.tgz", - "integrity": "sha512-/BBMw4EvjmyquN5O+t5eh0+YqB3XXJkYD2cjKpYtWOfFy4lQ4UozNSmxAcWT8r2XtZs0ewG+zrfsqeR15i1ajA==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", + "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helpers": "^7.17.2", - "@babel/parser": "^7.17.3", + "@babel/generator": "^7.17.7", + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-module-transforms": "^7.17.7", + "@babel/helpers": "^7.17.8", + "@babel/parser": "^7.17.8", "@babel/template": "^7.16.7", "@babel/traverse": "^7.17.3", "@babel/types": "^7.17.0", @@ -92,9 +92,9 @@ } }, "node_modules/@babel/generator": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz", - "integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", "dev": true, "dependencies": { "@babel/types": "^7.17.0", @@ -115,12 +115,12 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", - "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", + "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.16.4", + "@babel/compat-data": "^7.17.7", "@babel/helper-validator-option": "^7.16.7", "browserslist": "^4.17.5", "semver": "^6.3.0" @@ -204,19 +204,19 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", - "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz", + "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.16.7", "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-simple-access": "^7.17.7", "@babel/helper-split-export-declaration": "^7.16.7", "@babel/helper-validator-identifier": "^7.16.7", "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0" }, "engines": { "node": ">=6.9.0" @@ -232,12 +232,12 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", - "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", + "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.17.0" }, "engines": { "node": ">=6.9.0" @@ -274,13 +274,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.17.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.2.tgz", - "integrity": "sha512-0Qu7RLR1dILozr/6M0xgj+DFPmi6Bnulgm9M8BVa9ZCWxDqlSnqt3cf8IDPB5m45sVXUZ0kuQAgUrdSFFH79fQ==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", + "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", "dev": true, "dependencies": { "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.0", + "@babel/traverse": "^7.17.3", "@babel/types": "^7.17.0" }, "engines": { @@ -364,9 +364,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz", - "integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", + "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -601,16 +601,16 @@ "dev": true }, "node_modules/@eslint/eslintrc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz", - "integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", + "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.3.1", "globals": "^13.9.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.0.4", @@ -630,15 +630,6 @@ "concat-map": "0.0.1" } }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -670,9 +661,9 @@ "dev": true }, "node_modules/@humanwhocodes/config-array": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", - "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -1129,13 +1120,16 @@ } }, "node_modules/@npmcli/fs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", - "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.0.tgz", + "integrity": "sha512-DmfBvNXGaetMxj9LTp8NAN9vEidXURrf5ZTslQzEAi/6GbW+4yjaLFQc6Tue5cpZ9Frlk4OBo/Snf1Bh/S7qTQ==", "dev": true, "dependencies": { - "@gar/promisify": "^1.0.1", + "@gar/promisify": "^1.1.3", "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/@npmcli/git": { @@ -1159,9 +1153,9 @@ } }, "node_modules/@npmcli/git/node_modules/lru-cache": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.5.0.tgz", - "integrity": "sha512-8neUvdgNtubJ+VNNqrqOLjUoIlN+NRPFtv1Vne2rQ4uPCxhp0W4TlqntzTLnVVezGXcSSdXTrKCTYooEQA7X6g==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", "dev": true, "engines": { "node": ">=12" @@ -1227,9 +1221,9 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.1.tgz", - "integrity": "sha512-EA+g22lbNJ8p5kuZJUYyhhDK7WgJckW5g4pNN7n4mAFUM96VuwUnNT3xr2Db2iCZPI1pJPbGyfT5mS9T1dHfMg==", + "version": "21.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.2.tgz", + "integrity": "sha512-d/OmjaLVO4j/aQX69bwpWPpbvI3TJkQuxoAk7BH8ew1PyoMBLTOuvJTjzG8oEoW7drIIqB0KCJtfFLu/2GClWg==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1281,9 +1275,9 @@ } }, "node_modules/@rollup/plugin-typescript": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.0.tgz", - "integrity": "sha512-I5FpSvLbtAdwJ+naznv+B4sjXZUcIvLLceYpITAn7wAP8W0wqc5noLdGIp9HGVntNhRWXctwPYrSSFQxtl0FPA==", + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.1.tgz", + "integrity": "sha512-84rExe3ICUBXzqNX48WZV2Jp3OddjTMX97O2Py6D1KJaGSwWp0mDHXj+bCGNJqWHIEKDIT2U0sDjhP4czKi6cA==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1373,18 +1367,18 @@ } }, "node_modules/@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true, "engines": { - "node": ">= 6" + "node": ">= 10" } }, "node_modules/@types/babel__core": { - "version": "7.1.18", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.18.tgz", - "integrity": "sha512-S7unDjm/C7z2A2R9NzfKCK1I+BAALDtxEmsJBwlB3EzNfb929ykjL++1CK9LO++EIp2fQrC8O+BwjKvz6UeDyQ==", + "version": "7.1.19", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", + "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", "dev": true, "dependencies": { "@babel/parser": "^7.1.0", @@ -1462,25 +1456,25 @@ } }, "node_modules/@types/jest": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.0.tgz", - "integrity": "sha512-gHl8XuC1RZ8H2j5sHv/JqsaxXkDDM9iDOgu0Wp8sjs4u/snb2PVehyWXJPr+ORA0RPpgw231mnutWI1+0hgjIQ==", + "version": "27.4.1", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.1.tgz", + "integrity": "sha512-23iPJADSmicDVrWk+HT58LMJtzLAnB2AgIzplQuq/bSrGaxCrlvRFjGbXmamnnk/mAmCdLStiGqggu28ocUyiw==", "dev": true, "dependencies": { - "jest-diff": "^27.0.0", + "jest-matcher-utils": "^27.0.0", "pretty-format": "^27.0.0" } }, "node_modules/@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "version": "7.0.10", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.10.tgz", + "integrity": "sha512-BLO9bBq59vW3fxCpD4o0N4U+DXsvwvIcl+jofw0frQo/GrBFC+/jRZj1E7kgp6dvTyNmA4y6JCV5Id/r3mNP5A==", "dev": true }, "node_modules/@types/node": { - "version": "17.0.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.18.tgz", - "integrity": "sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA==", + "version": "17.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", + "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==", "dev": true }, "node_modules/@types/prettier": { @@ -1514,20 +1508,20 @@ } }, "node_modules/@types/yargs-parser": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", - "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.13.0.tgz", - "integrity": "sha512-vLktb2Uec81fxm/cfz2Hd6QaWOs8qdmVAZXLdOBX6JFJDhf6oDZpMzZ4/LZ6SFM/5DgDcxIMIvy3F+O9yZBuiQ==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.16.0.tgz", + "integrity": "sha512-SJoba1edXvQRMmNI505Uo4XmGbxCK9ARQpkvOd00anxzri9RNQk0DDCxD+LIl+jYhkzOJiOMMKYEHnHEODjdCw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.13.0", - "@typescript-eslint/type-utils": "5.13.0", - "@typescript-eslint/utils": "5.13.0", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/type-utils": "5.16.0", + "@typescript-eslint/utils": "5.16.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1553,14 +1547,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.14.0.tgz", - "integrity": "sha512-aHJN8/FuIy1Zvqk4U/gcO/fxeMKyoSv/rS46UXMXOJKVsLQ+iYPuXNbpbH7cBLcpSbmyyFbwrniLx5+kutu1pw==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.16.0.tgz", + "integrity": "sha512-fkDq86F0zl8FicnJtdXakFs4lnuebH6ZADDw6CYQv0UZeIjHvmEw87m9/29nk2Dv5Lmdp0zQ3zDQhiMWQf/GbA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.14.0", - "@typescript-eslint/types": "5.14.0", - "@typescript-eslint/typescript-estree": "5.14.0", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/typescript-estree": "5.16.0", "debug": "^4.3.2" }, "engines": { @@ -1579,88 +1573,14 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.14.0.tgz", - "integrity": "sha512-LazdcMlGnv+xUc5R4qIlqH0OWARyl2kaP8pVCS39qSL3Pd1F7mI10DbdXeARcE62sVQE4fHNvEqMWsypWO+yEw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.14.0", - "@typescript-eslint/visitor-keys": "5.14.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.14.0.tgz", - "integrity": "sha512-BR6Y9eE9360LNnW3eEUqAg6HxS9Q35kSIs4rp4vNHRdfg0s+/PgHgskvu5DFTM7G5VKAVjuyaN476LCPrdA7Mw==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.14.0.tgz", - "integrity": "sha512-QGnxvROrCVtLQ1724GLTHBTR0lZVu13izOp9njRvMkCBgWX26PKvmMP8k82nmXBRD3DQcFFq2oj3cKDwr0FaUA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.14.0", - "@typescript-eslint/visitor-keys": "5.14.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.14.0.tgz", - "integrity": "sha512-yL0XxfzR94UEkjBqyymMLgCBdojzEuy/eim7N9/RIcTNxpJudAcqsU8eRyfzBbcEzGoPWfdM3AGak3cN08WOIw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.14.0", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz", - "integrity": "sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz", + "integrity": "sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.13.0", - "@typescript-eslint/visitor-keys": "5.13.0" + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1671,12 +1591,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.13.0.tgz", - "integrity": "sha512-/nz7qFizaBM1SuqAKb7GLkcNn2buRdDgZraXlkhz+vUGiN1NZ9LzkA595tHHeduAiS2MsHqMNhE2zNzGdw43Yg==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.16.0.tgz", + "integrity": "sha512-SKygICv54CCRl1Vq5ewwQUJV/8padIWvPgCxlWPGO/OgQLCijY9G7lDu6H+mqfQtbzDNlVjzVWQmeqbLMBLEwQ==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.13.0", + "@typescript-eslint/utils": "5.16.0", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -1697,9 +1617,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.13.0.tgz", - "integrity": "sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.16.0.tgz", + "integrity": "sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1710,13 +1630,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz", - "integrity": "sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz", + "integrity": "sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.13.0", - "@typescript-eslint/visitor-keys": "5.13.0", + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1737,15 +1657,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.13.0.tgz", - "integrity": "sha512-+9oHlPWYNl6AwwoEt5TQryEHwiKRVjz7Vk6kaBeD3/kwHE5YqTGHtm/JZY8Bo9ITOeKutFaXnBlMgSATMJALUQ==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.16.0.tgz", + "integrity": "sha512-iYej2ER6AwmejLWMWzJIHy3nPJeGDuCqf8Jnb+jAQVoPpmWzwQOfa9hWVB8GIQE5gsCv/rfN4T+AYb/V06WseQ==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.13.0", - "@typescript-eslint/types": "5.13.0", - "@typescript-eslint/typescript-estree": "5.13.0", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/typescript-estree": "5.16.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1761,12 +1681,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz", - "integrity": "sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", + "integrity": "sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/types": "5.16.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -2202,13 +2122,23 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.19.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.3.tgz", - "integrity": "sha512-XK3X4xtKJ+Txj8G5c30B4gsm71s69lqXlkYui4s6EkKxuv49qjYlY6oVd+IFJ73d4YymtM3+djvvt/R/iJwwDg==", + "version": "4.20.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", + "integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], "dependencies": { - "caniuse-lite": "^1.0.30001312", - "electron-to-chromium": "^1.4.71", + "caniuse-lite": "^1.0.30001317", + "electron-to-chromium": "^1.4.84", "escalade": "^3.1.1", "node-releases": "^2.0.2", "picocolors": "^1.0.0" @@ -2218,10 +2148,6 @@ }, "engines": { "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" } }, "node_modules/bs-logger": { @@ -2279,32 +2205,41 @@ } }, "node_modules/cacache": { - "version": "15.3.0", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", - "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.0.3.tgz", + "integrity": "sha512-eC7wYodNCVb97kuHGk5P+xZsvUJHkhSEOyNwkenqQPAsOtrTjvWOE5vSPNBpz9d8X3acIf6w2Ub5s4rvOCTs4g==", "dev": true, "dependencies": { - "@npmcli/fs": "^1.0.0", - "@npmcli/move-file": "^1.0.1", + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^1.1.2", "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", + "fs-minipass": "^2.1.0", + "glob": "^7.2.0", "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", "minipass-collect": "^1.0.2", "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", "p-map": "^4.0.0", "promise-inflight": "^1.0.1", "rimraf": "^3.0.2", "ssri": "^8.0.1", - "tar": "^6.0.2", + "tar": "^6.1.11", "unique-filename": "^1.1.1" }, "engines": { - "node": ">= 10" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/cacache/node_modules/lru-cache": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "dev": true, + "engines": { + "node": ">=12" } }, "node_modules/cacheable-request": { @@ -2371,14 +2306,20 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001312", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz", - "integrity": "sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ==", + "version": "1.0.30001319", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz", + "integrity": "sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw==", "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] }, "node_modules/chalk": { "version": "4.1.2", @@ -2564,9 +2505,9 @@ } }, "node_modules/commander": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", - "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.1.0.tgz", + "integrity": "sha512-i0/MaqBtdbnJ4XQs4Pmyb+oFQl+q0lsAmokVUH92SlSw4fkeAcG3bVon+Qt7hmtF+u3Het6o4VgrcY3qAoEB6w==", "dev": true, "engines": { "node": "^12.20.0 || >=14" @@ -2755,9 +2696,9 @@ } }, "node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -2931,9 +2872,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.71", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.71.tgz", - "integrity": "sha512-Hk61vXXKRb2cd3znPE9F+2pLWdIOmP7GjiTj45y6L3W/lO+hSnUSUhq+6lEaERWBdZOHbk2s3YV5c9xVl3boVw==", + "version": "1.4.91", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.91.tgz", + "integrity": "sha512-Z7Jkc4+ouEg8F6RrrgLOs0kkJjI0cnyFQmnGVpln8pPifuKBNbUr37GMgJsCTSwy6Z9TK7oTwW33Oe+3aERYew==", "dev": true }, "node_modules/emittery": { @@ -3107,12 +3048,12 @@ } }, "node_modules/eslint": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz", - "integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.11.0.tgz", + "integrity": "sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.2.0", + "@eslint/eslintrc": "^1.2.1", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -3159,9 +3100,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.4.0.tgz", - "integrity": "sha512-CFotdUcMY18nGRo5KGsnNxpznzhkopOcOo0InID+sgQssPrzjvsyKZPvOgymTFeHrFuC3Tzdf2YndhXtULK9Iw==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", + "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -3858,9 +3799,9 @@ } }, "node_modules/globals": { - "version": "13.12.1", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", - "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -3993,12 +3934,12 @@ "dev": true }, "node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dev": true, "dependencies": { - "@tootallnate/once": "1", + "@tootallnate/once": "2", "agent-base": "6", "debug": "4" }, @@ -5370,6 +5311,29 @@ } } }, + "node_modules/jsdom/node_modules/@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jsdom/node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "dependencies": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -5416,13 +5380,10 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, "bin": { "json5": "lib/cli.js" }, @@ -5642,12 +5603,12 @@ "dev": true }, "node_modules/magic-string": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", - "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", "dev": true, "dependencies": { - "sourcemap-codec": "^1.4.4" + "sourcemap-codec": "^1.4.8" } }, "node_modules/make-dir": { @@ -5681,21 +5642,21 @@ "dev": true }, "node_modules/make-fetch-happen": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.5.tgz", - "integrity": "sha512-0JQ0daMRDFEv14DelmcFlprdhSDNG7WEgInTjBeWYWZ78W0jfDqygZdPLhcrQ4s/G8skNhBrS4fiF6xA+YlFjQ==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.6.tgz", + "integrity": "sha512-4Gfh6lV3TLXmj7qz79hBFuvVqjYSMW6v2+sxtdX4LFQU0rK3V/txRjE0DoZb7X0IF3t9f8NO3CxPSWlvdckhVA==", "dev": true, "dependencies": { "agentkeepalive": "^4.2.1", - "cacache": "^15.3.0", + "cacache": "^16.0.0", "http-cache-semantics": "^4.1.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", - "lru-cache": "^7.4.1", + "lru-cache": "^7.5.1", "minipass": "^3.1.6", "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.2", + "minipass-fetch": "^2.0.3", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.3", @@ -5707,33 +5668,10 @@ "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/make-fetch-happen/node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/make-fetch-happen/node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dev": true, - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/make-fetch-happen/node_modules/lru-cache": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.5.0.tgz", - "integrity": "sha512-8neUvdgNtubJ+VNNqrqOLjUoIlN+NRPFtv1Vne2rQ4uPCxhp0W4TlqntzTLnVVezGXcSSdXTrKCTYooEQA7X6g==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", "dev": true, "engines": { "node": ">=12" @@ -5789,21 +5727,21 @@ } }, "node_modules/mime-db": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", - "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.34", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", - "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "dependencies": { - "mime-db": "1.51.0" + "mime-db": "1.52.0" }, "engines": { "node": ">= 0.6" @@ -5840,9 +5778,9 @@ } }, "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "node_modules/minipass": { @@ -6036,18 +5974,39 @@ } }, "node_modules/normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.0.tgz", + "integrity": "sha512-m+GL22VXJKkKbw62ZaBBjv8u6IE3UI4Mh5QakIqs3fWiKe0Xyi6L97hakwZK41/LD4R/2ly71Bayx0NLMwLA/g==", "dev": true, "dependencies": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" + "hosted-git-info": "^5.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16" + } + }, + "node_modules/normalize-package-data/node_modules/hosted-git-info": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.0.0.tgz", + "integrity": "sha512-rRnjWu0Bxj+nIfUOkz0695C0H6tRrN5iYIzYejb0tDEefe2AekHu/U5Kn9pEie5vsJqpNQU02az7TGSH3qpz4Q==", + "dev": true, + "dependencies": { + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" + } + }, + "node_modules/normalize-package-data/node_modules/lru-cache": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "dev": true, + "engines": { + "node": ">=12" } }, "node_modules/normalize-path": { @@ -6078,9 +6037,9 @@ } }, "node_modules/npm-check-updates": { - "version": "12.5.3", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.3.tgz", - "integrity": "sha512-siFg/+Un+j4tLA6GJCnk6hz2YU4Yc5bftDnOoiSRLKL6NeAS3FScB32mtKNBtITMJf2nsoZSr8vH+wdUGeP19g==", + "version": "12.5.4", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.4.tgz", + "integrity": "sha512-4+27zaTdieWgvPLaCZ/A6Q2WC1cYVcrc2SqVmLFYgkWBrKw1QkwpeV16FSvkFGZr3OdFyr7Dpjw8JRn4H2QxFw==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -6140,12 +6099,12 @@ "dev": true }, "node_modules/npm-package-arg": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.0.tgz", - "integrity": "sha512-yhzXxeor+Zfhe5MGwPdDumz6HtNlj2pMekWB95IX3CC6uDNgde0oPKHDCLDPoJqQfd0HqAWt+y4Hs5m7CK1+9Q==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.1.tgz", + "integrity": "sha512-Xs9wznfEAmZAR61qsYH3iN24V/qMYYkvAR5CRQNMvC6PjN2fHtO8y9XP/xdp5K+Icx+u1wMBMgWRPCmAEChSog==", "dev": true, "dependencies": { - "hosted-git-info": "^4.1.0", + "hosted-git-info": "^5.0.0", "semver": "^7.3.5", "validate-npm-package-name": "^3.0.0" }, @@ -6153,22 +6112,43 @@ "node": "^12.13.0 || ^14.15.0 || >=16" } }, + "node_modules/npm-package-arg/node_modules/hosted-git-info": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.0.0.tgz", + "integrity": "sha512-rRnjWu0Bxj+nIfUOkz0695C0H6tRrN5iYIzYejb0tDEefe2AekHu/U5Kn9pEie5vsJqpNQU02az7TGSH3qpz4Q==", + "dev": true, + "dependencies": { + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" + } + }, + "node_modules/npm-package-arg/node_modules/lru-cache": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/npm-packlist": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-3.0.0.tgz", - "integrity": "sha512-L/cbzmutAwII5glUcf2DBRNY/d0TFd4e/FnaZigJV6JD85RHZXJFGwCndjMWiiViiWSsWt3tiOLpI3ByTnIdFQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-4.0.0.tgz", + "integrity": "sha512-gL6XC/iw9YSmqArmZOGSkyy+yIZf2f7uH0p4Vmxef/irn73vd9/rDkCtvm+a9rh/QK2xGYfCAMOghM06ymzC0A==", "dev": true, "dependencies": { - "glob": "^7.1.6", + "glob": "^7.2.0", "ignore-walk": "^4.0.1", - "npm-bundled": "^1.1.1", + "npm-bundled": "^1.1.2", "npm-normalize-package-bin": "^1.0.1" }, "bin": { "npm-packlist": "bin/index.js" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16" } }, "node_modules/npm-pick-manifest": { @@ -6187,21 +6167,21 @@ } }, "node_modules/npm-registry-fetch": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.0.1.tgz", - "integrity": "sha512-Ak+LXVtSrCLOdscFW/apUw67OPNph8waHsPKM9UOJosL7i59EF5XoSWQMEsXEOeifM9Bb4/2+WrQC4t/pd8DGg==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.1.0.tgz", + "integrity": "sha512-TIYL5X8CcwDhbFMXFDShNcpG6OMCYK6VzvSr6MUWP20tCU2DJ4ao2qQg3DT+3Pet8mO6/cgbZpon4LMh3duYLg==", "dev": true, "dependencies": { - "make-fetch-happen": "^10.0.3", + "make-fetch-happen": "^10.0.6", "minipass": "^3.1.6", - "minipass-fetch": "^2.0.1", + "minipass-fetch": "^2.0.3", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", - "npm-package-arg": "^9.0.0", + "npm-package-arg": "^9.0.1", "proc-log": "^2.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/npm-run-path": { @@ -6408,28 +6388,28 @@ } }, "node_modules/pacote": { - "version": "13.0.3", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.0.3.tgz", - "integrity": "sha512-8thQ06YoO01O1k5rvSpHS/XPJZucw2DPiiT1jI+ys8QaTN6ifAyxfyoABHBa8nIt/4wPdzly4GEPqshctHFoYA==", + "version": "13.0.5", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.0.5.tgz", + "integrity": "sha512-6CYfot3/rUAn3qqzF2d/jrrXm5HlBtvaSgfmg0VtOUAdJ8fbSq21BJwftMGArkL71yXHIbUJ7Bt5B04547HELA==", "dev": true, "dependencies": { "@npmcli/git": "^3.0.0", "@npmcli/installed-package-contents": "^1.0.7", "@npmcli/promise-spawn": "^1.2.0", - "@npmcli/run-script": "^3.0.0", - "cacache": "^15.3.0", + "@npmcli/run-script": "^3.0.1", + "cacache": "^16.0.0", "chownr": "^2.0.0", "fs-minipass": "^2.1.0", "infer-owner": "^1.0.4", "minipass": "^3.1.6", "mkdirp": "^1.0.4", "npm-package-arg": "^9.0.0", - "npm-packlist": "^3.0.0", + "npm-packlist": "^4.0.0", "npm-pick-manifest": "^7.0.0", - "npm-registry-fetch": "^13.0.0", + "npm-registry-fetch": "^13.0.1", "proc-log": "^2.0.0", "promise-retry": "^2.0.1", - "read-package-json": "^4.1.1", + "read-package-json": "^5.0.0", "read-package-json-fast": "^2.0.3", "rimraf": "^3.0.2", "ssri": "^8.0.1", @@ -6654,15 +6634,18 @@ } }, "node_modules/prettier": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", - "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.0.tgz", + "integrity": "sha512-m2FgJibYrBGGgQXNzfd0PuDGShJgRavjUoRCw1mZERIWVSXF0iLzLm+aOqTAbLnC3n6JzUhAA8uZnFVghHJ86A==", "dev": true, "bin": { "prettier": "bin-prettier.js" }, "engines": { "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/prettier-linter-helpers": { @@ -6859,18 +6842,18 @@ "dev": true }, "node_modules/read-package-json": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-4.1.2.tgz", - "integrity": "sha512-Dqer4pqzamDE2O4M55xp1qZMuLPqi4ldk2ya648FOMHRjwMzFhuxVrG04wd0c38IsvkVdr3vgHI6z+QTPdAjrQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.0.tgz", + "integrity": "sha512-1cjk2MV5ONDMn34uxSID3X8NY7VKsXfJnjbcVdFMvHEnJOBzU6MJ7/3yg6QFVZDq5/1yFNrKBUK9kGnonyGP2Q==", "dev": true, "dependencies": { - "glob": "^7.1.1", - "json-parse-even-better-errors": "^2.3.0", - "normalize-package-data": "^3.0.0", - "npm-normalize-package-bin": "^1.0.0" + "glob": "^7.2.0", + "json-parse-even-better-errors": "^2.3.1", + "normalize-package-data": "^4.0.0", + "npm-normalize-package-bin": "^1.0.1" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16" } }, "node_modules/read-package-json-fast": { @@ -7061,9 +7044,9 @@ } }, "node_modules/rollup": { - "version": "2.67.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.67.3.tgz", - "integrity": "sha512-G/x1vUwbGtP6O5ZM8/sWr8+p7YfZhI18pPqMRtMYMWSbHjKZ/ajHGiM+GWNTlWyOR0EHIdT8LHU+Z4ciIZ1oBw==", + "version": "2.70.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.1.tgz", + "integrity": "sha512-CRYsI5EuzLbXdxC6RnYhOuRdtz4bhejPMSWjsFLfVM/7w/85n2szZv6yExqUXsBdz5KT8eoubeyDUDjhLHEslA==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -7726,11 +7709,12 @@ } }, "node_modules/terser": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", - "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.12.1.tgz", + "integrity": "sha512-NXbs+7nisos5E+yXwAD+y7zrcTkMqb0dEJxIGtSKPdCBzopf7ni4odPul2aechpV7EXNvOudYOX2bb5tln1jbQ==", "dev": true, "dependencies": { + "acorn": "^8.5.0", "commander": "^2.20.0", "source-map": "~0.7.2", "source-map-support": "~0.5.20" @@ -7740,14 +7724,6 @@ }, "engines": { "node": ">=10" - }, - "peerDependencies": { - "acorn": "^8.5.0" - }, - "peerDependenciesMeta": { - "acorn": { - "optional": true - } } }, "node_modules/terser/node_modules/commander": { @@ -8008,16 +7984,16 @@ } }, "node_modules/typedoc": { - "version": "0.22.12", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.12.tgz", - "integrity": "sha512-FcyC+YuaOpr3rB9QwA1IHOi9KnU2m50sPJW5vcNRPCIdecp+3bFkh7Rq5hBU1Fyn29UR2h4h/H7twZHWDhL0sw==", + "version": "0.22.13", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.13.tgz", + "integrity": "sha512-NHNI7Dr6JHa/I3+c62gdRNXBIyX7P33O9TafGLd07ur3MqzcKgwTvpg18EtvCLHJyfeSthAtCLpM7WkStUmDuQ==", "dev": true, "dependencies": { "glob": "^7.2.0", "lunr": "^2.3.9", - "marked": "^4.0.10", - "minimatch": "^3.0.4", - "shiki": "^0.10.0" + "marked": "^4.0.12", + "minimatch": "^5.0.1", + "shiki": "^0.10.1" }, "bin": { "typedoc": "bin/typedoc" @@ -8026,35 +8002,13 @@ "node": ">= 12.10.0" }, "peerDependencies": { - "typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x" - } - }, - "node_modules/typedoc/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/typedoc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" + "typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x || 4.6.x" } }, "node_modules/typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz", + "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -8235,9 +8189,9 @@ } }, "node_modules/vscode-oniguruma": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.1.tgz", - "integrity": "sha512-vc4WhSIaVpgJ0jJIejjYxPvURJavX6QG41vu0mGhqywMkQqulezEqEQ3cO3gc8GvcOpX6ycmKGqRoROEMBNXTQ==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", + "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", "dev": true }, "node_modules/vscode-textmate": { @@ -8521,15 +8475,15 @@ "devDependencies": { "@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.0", - "@typescript-eslint/eslint-plugin": "^5.12.0", - "@typescript-eslint/parser": "^5.12.0", - "eslint": "^8.9.0", - "eslint-config-prettier": "^8.4.0", + "@rollup/plugin-typescript": "^8.3.1", + "@typescript-eslint/eslint-plugin": "^5.16.0", + "@typescript-eslint/parser": "^5.16.0", + "eslint": "^8.11.0", + "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.5.1", - "rollup": "^2.67.3", - "typescript": "^4.5.5" + "prettier": "^2.6.0", + "rollup": "^2.70.1", + "typescript": "^4.6.2" } }, "packages/go-wasm": { @@ -8543,22 +8497,22 @@ "fflate": "^0.7.3" }, "devDependencies": { - "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-commonjs": "^21.0.2", "@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.0", - "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.13.0", - "@typescript-eslint/parser": "5.14.0", - "eslint": "8.10.0", - "eslint-config-prettier": "8.4.0", + "@rollup/plugin-typescript": "^8.3.1", + "@types/jest": "^27.4.1", + "@typescript-eslint/eslint-plugin": "5.16.0", + "@typescript-eslint/parser": "5.16.0", + "eslint": "8.11.0", + "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.5.1", - "prettier": "^2.5.1", - "rollup": "^2.67.3", + "prettier": "^2.6.0", + "rollup": "^2.70.1", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^27.1.3", - "typescript": "^4.5.5" + "typescript": "^4.6.2" } } }, @@ -8582,24 +8536,24 @@ } }, "@babel/compat-data": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.0.tgz", - "integrity": "sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", + "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", "dev": true }, "@babel/core": { - "version": "7.17.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.5.tgz", - "integrity": "sha512-/BBMw4EvjmyquN5O+t5eh0+YqB3XXJkYD2cjKpYtWOfFy4lQ4UozNSmxAcWT8r2XtZs0ewG+zrfsqeR15i1ajA==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", + "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", "dev": true, "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helpers": "^7.17.2", - "@babel/parser": "^7.17.3", + "@babel/generator": "^7.17.7", + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-module-transforms": "^7.17.7", + "@babel/helpers": "^7.17.8", + "@babel/parser": "^7.17.8", "@babel/template": "^7.16.7", "@babel/traverse": "^7.17.3", "@babel/types": "^7.17.0", @@ -8619,9 +8573,9 @@ } }, "@babel/generator": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz", - "integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", "dev": true, "requires": { "@babel/types": "^7.17.0", @@ -8638,12 +8592,12 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", - "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", + "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", "dev": true, "requires": { - "@babel/compat-data": "^7.16.4", + "@babel/compat-data": "^7.17.7", "@babel/helper-validator-option": "^7.16.7", "browserslist": "^4.17.5", "semver": "^6.3.0" @@ -8705,19 +8659,19 @@ } }, "@babel/helper-module-transforms": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", - "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz", + "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==", "dev": true, "requires": { "@babel/helper-environment-visitor": "^7.16.7", "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-simple-access": "^7.17.7", "@babel/helper-split-export-declaration": "^7.16.7", "@babel/helper-validator-identifier": "^7.16.7", "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0" } }, "@babel/helper-plugin-utils": { @@ -8727,12 +8681,12 @@ "dev": true }, "@babel/helper-simple-access": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", - "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", + "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.17.0" } }, "@babel/helper-split-export-declaration": { @@ -8757,13 +8711,13 @@ "dev": true }, "@babel/helpers": { - "version": "7.17.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.2.tgz", - "integrity": "sha512-0Qu7RLR1dILozr/6M0xgj+DFPmi6Bnulgm9M8BVa9ZCWxDqlSnqt3cf8IDPB5m45sVXUZ0kuQAgUrdSFFH79fQ==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", + "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", "dev": true, "requires": { "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.0", + "@babel/traverse": "^7.17.3", "@babel/types": "^7.17.0" } }, @@ -8831,9 +8785,9 @@ } }, "@babel/parser": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz", - "integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", + "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -9007,16 +8961,16 @@ "dev": true }, "@eslint/eslintrc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz", - "integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", + "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.3.1", "globals": "^13.9.0", - "ignore": "^4.0.6", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.0.4", @@ -9033,12 +8987,6 @@ "concat-map": "0.0.1" } }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -9063,9 +9011,9 @@ "dev": true }, "@humanwhocodes/config-array": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", - "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -9429,12 +9377,12 @@ } }, "@npmcli/fs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", - "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.0.tgz", + "integrity": "sha512-DmfBvNXGaetMxj9LTp8NAN9vEidXURrf5ZTslQzEAi/6GbW+4yjaLFQc6Tue5cpZ9Frlk4OBo/Snf1Bh/S7qTQ==", "dev": true, "requires": { - "@gar/promisify": "^1.0.1", + "@gar/promisify": "^1.1.3", "semver": "^7.3.5" } }, @@ -9456,9 +9404,9 @@ }, "dependencies": { "lru-cache": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.5.0.tgz", - "integrity": "sha512-8neUvdgNtubJ+VNNqrqOLjUoIlN+NRPFtv1Vne2rQ4uPCxhp0W4TlqntzTLnVVezGXcSSdXTrKCTYooEQA7X6g==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", "dev": true } } @@ -9511,9 +9459,9 @@ } }, "@rollup/plugin-commonjs": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.1.tgz", - "integrity": "sha512-EA+g22lbNJ8p5kuZJUYyhhDK7WgJckW5g4pNN7n4mAFUM96VuwUnNT3xr2Db2iCZPI1pJPbGyfT5mS9T1dHfMg==", + "version": "21.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.2.tgz", + "integrity": "sha512-d/OmjaLVO4j/aQX69bwpWPpbvI3TJkQuxoAk7BH8ew1PyoMBLTOuvJTjzG8oEoW7drIIqB0KCJtfFLu/2GClWg==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -9550,9 +9498,9 @@ } }, "@rollup/plugin-typescript": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.0.tgz", - "integrity": "sha512-I5FpSvLbtAdwJ+naznv+B4sjXZUcIvLLceYpITAn7wAP8W0wqc5noLdGIp9HGVntNhRWXctwPYrSSFQxtl0FPA==", + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.1.tgz", + "integrity": "sha512-84rExe3ICUBXzqNX48WZV2Jp3OddjTMX97O2Py6D1KJaGSwWp0mDHXj+bCGNJqWHIEKDIT2U0sDjhP4czKi6cA==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -9607,16 +9555,16 @@ "requires": { "@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.0", + "@rollup/plugin-typescript": "^8.3.1", "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^5.12.0", - "@typescript-eslint/parser": "^5.12.0", - "eslint": "^8.9.0", - "eslint-config-prettier": "^8.4.0", + "@typescript-eslint/eslint-plugin": "^5.16.0", + "@typescript-eslint/parser": "^5.16.0", + "eslint": "^8.11.0", + "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.5.1", - "rollup": "^2.67.3", - "typescript": "^4.5.5" + "prettier": "^2.6.0", + "rollup": "^2.70.1", + "typescript": "^4.6.2" } }, "@sora/go-wasm": { @@ -9625,24 +9573,24 @@ "@sora/sdk": { "version": "file:packages/sdk", "requires": { - "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-commonjs": "^21.0.2", "@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.0", + "@rollup/plugin-typescript": "^8.3.1", "@sora/e2ee": "^2021.1.0", - "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.13.0", - "@typescript-eslint/parser": "5.14.0", - "eslint": "8.10.0", - "eslint-config-prettier": "8.4.0", + "@types/jest": "^27.4.1", + "@typescript-eslint/eslint-plugin": "5.16.0", + "@typescript-eslint/parser": "5.16.0", + "eslint": "8.11.0", + "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "fflate": "^0.7.3", "jest": "^27.5.1", - "prettier": "^2.5.1", - "rollup": "^2.67.3", + "prettier": "^2.6.0", + "rollup": "^2.70.1", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^27.1.3", - "typescript": "^4.5.5" + "typescript": "^4.6.2" } }, "@szmarczak/http-timer": { @@ -9655,15 +9603,15 @@ } }, "@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true }, "@types/babel__core": { - "version": "7.1.18", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.18.tgz", - "integrity": "sha512-S7unDjm/C7z2A2R9NzfKCK1I+BAALDtxEmsJBwlB3EzNfb929ykjL++1CK9LO++EIp2fQrC8O+BwjKvz6UeDyQ==", + "version": "7.1.19", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", + "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -9741,25 +9689,25 @@ } }, "@types/jest": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.0.tgz", - "integrity": "sha512-gHl8XuC1RZ8H2j5sHv/JqsaxXkDDM9iDOgu0Wp8sjs4u/snb2PVehyWXJPr+ORA0RPpgw231mnutWI1+0hgjIQ==", + "version": "27.4.1", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.1.tgz", + "integrity": "sha512-23iPJADSmicDVrWk+HT58LMJtzLAnB2AgIzplQuq/bSrGaxCrlvRFjGbXmamnnk/mAmCdLStiGqggu28ocUyiw==", "dev": true, "requires": { - "jest-diff": "^27.0.0", + "jest-matcher-utils": "^27.0.0", "pretty-format": "^27.0.0" } }, "@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "version": "7.0.10", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.10.tgz", + "integrity": "sha512-BLO9bBq59vW3fxCpD4o0N4U+DXsvwvIcl+jofw0frQo/GrBFC+/jRZj1E7kgp6dvTyNmA4y6JCV5Id/r3mNP5A==", "dev": true }, "@types/node": { - "version": "17.0.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.18.tgz", - "integrity": "sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA==", + "version": "17.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", + "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==", "dev": true }, "@types/prettier": { @@ -9793,20 +9741,20 @@ } }, "@types/yargs-parser": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", - "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.13.0.tgz", - "integrity": "sha512-vLktb2Uec81fxm/cfz2Hd6QaWOs8qdmVAZXLdOBX6JFJDhf6oDZpMzZ4/LZ6SFM/5DgDcxIMIvy3F+O9yZBuiQ==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.16.0.tgz", + "integrity": "sha512-SJoba1edXvQRMmNI505Uo4XmGbxCK9ARQpkvOd00anxzri9RNQk0DDCxD+LIl+jYhkzOJiOMMKYEHnHEODjdCw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.13.0", - "@typescript-eslint/type-utils": "5.13.0", - "@typescript-eslint/utils": "5.13.0", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/type-utils": "5.16.0", + "@typescript-eslint/utils": "5.16.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -9816,95 +9764,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.14.0.tgz", - "integrity": "sha512-aHJN8/FuIy1Zvqk4U/gcO/fxeMKyoSv/rS46UXMXOJKVsLQ+iYPuXNbpbH7cBLcpSbmyyFbwrniLx5+kutu1pw==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.16.0.tgz", + "integrity": "sha512-fkDq86F0zl8FicnJtdXakFs4lnuebH6ZADDw6CYQv0UZeIjHvmEw87m9/29nk2Dv5Lmdp0zQ3zDQhiMWQf/GbA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.14.0", - "@typescript-eslint/types": "5.14.0", - "@typescript-eslint/typescript-estree": "5.14.0", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/typescript-estree": "5.16.0", "debug": "^4.3.2" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.14.0.tgz", - "integrity": "sha512-LazdcMlGnv+xUc5R4qIlqH0OWARyl2kaP8pVCS39qSL3Pd1F7mI10DbdXeARcE62sVQE4fHNvEqMWsypWO+yEw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.14.0", - "@typescript-eslint/visitor-keys": "5.14.0" - } - }, - "@typescript-eslint/types": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.14.0.tgz", - "integrity": "sha512-BR6Y9eE9360LNnW3eEUqAg6HxS9Q35kSIs4rp4vNHRdfg0s+/PgHgskvu5DFTM7G5VKAVjuyaN476LCPrdA7Mw==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.14.0.tgz", - "integrity": "sha512-QGnxvROrCVtLQ1724GLTHBTR0lZVu13izOp9njRvMkCBgWX26PKvmMP8k82nmXBRD3DQcFFq2oj3cKDwr0FaUA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.14.0", - "@typescript-eslint/visitor-keys": "5.14.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.14.0.tgz", - "integrity": "sha512-yL0XxfzR94UEkjBqyymMLgCBdojzEuy/eim7N9/RIcTNxpJudAcqsU8eRyfzBbcEzGoPWfdM3AGak3cN08WOIw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.14.0", - "eslint-visitor-keys": "^3.0.0" - } - } } }, "@typescript-eslint/scope-manager": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz", - "integrity": "sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz", + "integrity": "sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.13.0", - "@typescript-eslint/visitor-keys": "5.13.0" + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0" } }, "@typescript-eslint/type-utils": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.13.0.tgz", - "integrity": "sha512-/nz7qFizaBM1SuqAKb7GLkcNn2buRdDgZraXlkhz+vUGiN1NZ9LzkA595tHHeduAiS2MsHqMNhE2zNzGdw43Yg==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.16.0.tgz", + "integrity": "sha512-SKygICv54CCRl1Vq5ewwQUJV/8padIWvPgCxlWPGO/OgQLCijY9G7lDu6H+mqfQtbzDNlVjzVWQmeqbLMBLEwQ==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.13.0", + "@typescript-eslint/utils": "5.16.0", "debug": "^4.3.2", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.13.0.tgz", - "integrity": "sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.16.0.tgz", + "integrity": "sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz", - "integrity": "sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz", + "integrity": "sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.13.0", - "@typescript-eslint/visitor-keys": "5.13.0", + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -9913,26 +9818,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.13.0.tgz", - "integrity": "sha512-+9oHlPWYNl6AwwoEt5TQryEHwiKRVjz7Vk6kaBeD3/kwHE5YqTGHtm/JZY8Bo9ITOeKutFaXnBlMgSATMJALUQ==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.16.0.tgz", + "integrity": "sha512-iYej2ER6AwmejLWMWzJIHy3nPJeGDuCqf8Jnb+jAQVoPpmWzwQOfa9hWVB8GIQE5gsCv/rfN4T+AYb/V06WseQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.13.0", - "@typescript-eslint/types": "5.13.0", - "@typescript-eslint/typescript-estree": "5.13.0", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/typescript-estree": "5.16.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz", - "integrity": "sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", + "integrity": "sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==", "dev": true, "requires": { - "@typescript-eslint/types": "5.13.0", + "@typescript-eslint/types": "5.16.0", "eslint-visitor-keys": "^3.0.0" } }, @@ -10258,13 +10163,13 @@ "dev": true }, "browserslist": { - "version": "4.19.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.3.tgz", - "integrity": "sha512-XK3X4xtKJ+Txj8G5c30B4gsm71s69lqXlkYui4s6EkKxuv49qjYlY6oVd+IFJ73d4YymtM3+djvvt/R/iJwwDg==", + "version": "4.20.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", + "integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001312", - "electron-to-chromium": "^1.4.71", + "caniuse-lite": "^1.0.30001317", + "electron-to-chromium": "^1.4.84", "escalade": "^3.1.1", "node-releases": "^2.0.2", "picocolors": "^1.0.0" @@ -10313,29 +10218,37 @@ "dev": true }, "cacache": { - "version": "15.3.0", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", - "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.0.3.tgz", + "integrity": "sha512-eC7wYodNCVb97kuHGk5P+xZsvUJHkhSEOyNwkenqQPAsOtrTjvWOE5vSPNBpz9d8X3acIf6w2Ub5s4rvOCTs4g==", "dev": true, "requires": { - "@npmcli/fs": "^1.0.0", - "@npmcli/move-file": "^1.0.1", + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^1.1.2", "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", + "fs-minipass": "^2.1.0", + "glob": "^7.2.0", "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", "minipass-collect": "^1.0.2", "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", "p-map": "^4.0.0", "promise-inflight": "^1.0.1", "rimraf": "^3.0.2", "ssri": "^8.0.1", - "tar": "^6.0.2", + "tar": "^6.1.11", "unique-filename": "^1.1.1" + }, + "dependencies": { + "lru-cache": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "dev": true + } } }, "cacheable-request": { @@ -10383,9 +10296,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001312", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz", - "integrity": "sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ==", + "version": "1.0.30001319", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz", + "integrity": "sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw==", "dev": true }, "chalk": { @@ -10529,9 +10442,9 @@ } }, "commander": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", - "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.1.0.tgz", + "integrity": "sha512-i0/MaqBtdbnJ4XQs4Pmyb+oFQl+q0lsAmokVUH92SlSw4fkeAcG3bVon+Qt7hmtF+u3Het6o4VgrcY3qAoEB6w==", "dev": true }, "commondir": { @@ -10693,9 +10606,9 @@ } }, "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -10827,9 +10740,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.71", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.71.tgz", - "integrity": "sha512-Hk61vXXKRb2cd3znPE9F+2pLWdIOmP7GjiTj45y6L3W/lO+hSnUSUhq+6lEaERWBdZOHbk2s3YV5c9xVl3boVw==", + "version": "1.4.91", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.91.tgz", + "integrity": "sha512-Z7Jkc4+ouEg8F6RrrgLOs0kkJjI0cnyFQmnGVpln8pPifuKBNbUr37GMgJsCTSwy6Z9TK7oTwW33Oe+3aERYew==", "dev": true }, "emittery": { @@ -10963,12 +10876,12 @@ } }, "eslint": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz", - "integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.11.0.tgz", + "integrity": "sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.2.0", + "@eslint/eslintrc": "^1.2.1", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -11096,9 +11009,9 @@ } }, "eslint-config-prettier": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.4.0.tgz", - "integrity": "sha512-CFotdUcMY18nGRo5KGsnNxpznzhkopOcOo0InID+sgQssPrzjvsyKZPvOgymTFeHrFuC3Tzdf2YndhXtULK9Iw==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", + "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", "dev": true, "requires": {} }, @@ -11533,9 +11446,9 @@ } }, "globals": { - "version": "13.12.1", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", - "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -11638,12 +11551,12 @@ "dev": true }, "http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dev": true, "requires": { - "@tootallnate/once": "1", + "@tootallnate/once": "2", "agent-base": "6", "debug": "4" } @@ -12692,6 +12605,25 @@ "whatwg-url": "^8.5.0", "ws": "^7.4.6", "xml-name-validator": "^3.0.0" + }, + "dependencies": { + "@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true + }, + "http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "requires": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + } + } } }, "jsesc": { @@ -12734,13 +12666,10 @@ "dev": true }, "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true }, "jsonc-parser": { "version": "3.0.0", @@ -12911,12 +12840,12 @@ "dev": true }, "magic-string": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", - "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", "dev": true, "requires": { - "sourcemap-codec": "^1.4.4" + "sourcemap-codec": "^1.4.8" } }, "make-dir": { @@ -12943,21 +12872,21 @@ "dev": true }, "make-fetch-happen": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.5.tgz", - "integrity": "sha512-0JQ0daMRDFEv14DelmcFlprdhSDNG7WEgInTjBeWYWZ78W0jfDqygZdPLhcrQ4s/G8skNhBrS4fiF6xA+YlFjQ==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.6.tgz", + "integrity": "sha512-4Gfh6lV3TLXmj7qz79hBFuvVqjYSMW6v2+sxtdX4LFQU0rK3V/txRjE0DoZb7X0IF3t9f8NO3CxPSWlvdckhVA==", "dev": true, "requires": { "agentkeepalive": "^4.2.1", - "cacache": "^15.3.0", + "cacache": "^16.0.0", "http-cache-semantics": "^4.1.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", - "lru-cache": "^7.4.1", + "lru-cache": "^7.5.1", "minipass": "^3.1.6", "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.2", + "minipass-fetch": "^2.0.3", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.3", @@ -12966,27 +12895,10 @@ "ssri": "^8.0.1" }, "dependencies": { - "@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "dev": true - }, - "http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dev": true, - "requires": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - } - }, "lru-cache": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.5.0.tgz", - "integrity": "sha512-8neUvdgNtubJ+VNNqrqOLjUoIlN+NRPFtv1Vne2rQ4uPCxhp0W4TlqntzTLnVVezGXcSSdXTrKCTYooEQA7X6g==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", "dev": true } } @@ -13029,18 +12941,18 @@ } }, "mime-db": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", - "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true }, "mime-types": { - "version": "2.1.34", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", - "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "requires": { - "mime-db": "1.51.0" + "mime-db": "1.52.0" } }, "mimic-fn": { @@ -13065,9 +12977,9 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "minipass": { @@ -13217,15 +13129,32 @@ } }, "normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.0.tgz", + "integrity": "sha512-m+GL22VXJKkKbw62ZaBBjv8u6IE3UI4Mh5QakIqs3fWiKe0Xyi6L97hakwZK41/LD4R/2ly71Bayx0NLMwLA/g==", "dev": true, "requires": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" + "hosted-git-info": "^5.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "dependencies": { + "hosted-git-info": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.0.0.tgz", + "integrity": "sha512-rRnjWu0Bxj+nIfUOkz0695C0H6tRrN5iYIzYejb0tDEefe2AekHu/U5Kn9pEie5vsJqpNQU02az7TGSH3qpz4Q==", + "dev": true, + "requires": { + "lru-cache": "^7.5.1" + } + }, + "lru-cache": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "dev": true + } } }, "normalize-path": { @@ -13250,9 +13179,9 @@ } }, "npm-check-updates": { - "version": "12.5.3", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.3.tgz", - "integrity": "sha512-siFg/+Un+j4tLA6GJCnk6hz2YU4Yc5bftDnOoiSRLKL6NeAS3FScB32mtKNBtITMJf2nsoZSr8vH+wdUGeP19g==", + "version": "12.5.4", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.4.tgz", + "integrity": "sha512-4+27zaTdieWgvPLaCZ/A6Q2WC1cYVcrc2SqVmLFYgkWBrKw1QkwpeV16FSvkFGZr3OdFyr7Dpjw8JRn4H2QxFw==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -13302,25 +13231,42 @@ "dev": true }, "npm-package-arg": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.0.tgz", - "integrity": "sha512-yhzXxeor+Zfhe5MGwPdDumz6HtNlj2pMekWB95IX3CC6uDNgde0oPKHDCLDPoJqQfd0HqAWt+y4Hs5m7CK1+9Q==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.1.tgz", + "integrity": "sha512-Xs9wznfEAmZAR61qsYH3iN24V/qMYYkvAR5CRQNMvC6PjN2fHtO8y9XP/xdp5K+Icx+u1wMBMgWRPCmAEChSog==", "dev": true, "requires": { - "hosted-git-info": "^4.1.0", + "hosted-git-info": "^5.0.0", "semver": "^7.3.5", "validate-npm-package-name": "^3.0.0" + }, + "dependencies": { + "hosted-git-info": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.0.0.tgz", + "integrity": "sha512-rRnjWu0Bxj+nIfUOkz0695C0H6tRrN5iYIzYejb0tDEefe2AekHu/U5Kn9pEie5vsJqpNQU02az7TGSH3qpz4Q==", + "dev": true, + "requires": { + "lru-cache": "^7.5.1" + } + }, + "lru-cache": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "dev": true + } } }, "npm-packlist": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-3.0.0.tgz", - "integrity": "sha512-L/cbzmutAwII5glUcf2DBRNY/d0TFd4e/FnaZigJV6JD85RHZXJFGwCndjMWiiViiWSsWt3tiOLpI3ByTnIdFQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-4.0.0.tgz", + "integrity": "sha512-gL6XC/iw9YSmqArmZOGSkyy+yIZf2f7uH0p4Vmxef/irn73vd9/rDkCtvm+a9rh/QK2xGYfCAMOghM06ymzC0A==", "dev": true, "requires": { - "glob": "^7.1.6", + "glob": "^7.2.0", "ignore-walk": "^4.0.1", - "npm-bundled": "^1.1.1", + "npm-bundled": "^1.1.2", "npm-normalize-package-bin": "^1.0.1" } }, @@ -13337,17 +13283,17 @@ } }, "npm-registry-fetch": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.0.1.tgz", - "integrity": "sha512-Ak+LXVtSrCLOdscFW/apUw67OPNph8waHsPKM9UOJosL7i59EF5XoSWQMEsXEOeifM9Bb4/2+WrQC4t/pd8DGg==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.1.0.tgz", + "integrity": "sha512-TIYL5X8CcwDhbFMXFDShNcpG6OMCYK6VzvSr6MUWP20tCU2DJ4ao2qQg3DT+3Pet8mO6/cgbZpon4LMh3duYLg==", "dev": true, "requires": { - "make-fetch-happen": "^10.0.3", + "make-fetch-happen": "^10.0.6", "minipass": "^3.1.6", - "minipass-fetch": "^2.0.1", + "minipass-fetch": "^2.0.3", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", - "npm-package-arg": "^9.0.0", + "npm-package-arg": "^9.0.1", "proc-log": "^2.0.0" } }, @@ -13500,28 +13446,28 @@ } }, "pacote": { - "version": "13.0.3", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.0.3.tgz", - "integrity": "sha512-8thQ06YoO01O1k5rvSpHS/XPJZucw2DPiiT1jI+ys8QaTN6ifAyxfyoABHBa8nIt/4wPdzly4GEPqshctHFoYA==", + "version": "13.0.5", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.0.5.tgz", + "integrity": "sha512-6CYfot3/rUAn3qqzF2d/jrrXm5HlBtvaSgfmg0VtOUAdJ8fbSq21BJwftMGArkL71yXHIbUJ7Bt5B04547HELA==", "dev": true, "requires": { "@npmcli/git": "^3.0.0", "@npmcli/installed-package-contents": "^1.0.7", "@npmcli/promise-spawn": "^1.2.0", - "@npmcli/run-script": "^3.0.0", - "cacache": "^15.3.0", + "@npmcli/run-script": "^3.0.1", + "cacache": "^16.0.0", "chownr": "^2.0.0", "fs-minipass": "^2.1.0", "infer-owner": "^1.0.4", "minipass": "^3.1.6", "mkdirp": "^1.0.4", "npm-package-arg": "^9.0.0", - "npm-packlist": "^3.0.0", + "npm-packlist": "^4.0.0", "npm-pick-manifest": "^7.0.0", - "npm-registry-fetch": "^13.0.0", + "npm-registry-fetch": "^13.0.1", "proc-log": "^2.0.0", "promise-retry": "^2.0.1", - "read-package-json": "^4.1.1", + "read-package-json": "^5.0.0", "read-package-json-fast": "^2.0.3", "rimraf": "^3.0.2", "ssri": "^8.0.1", @@ -13682,9 +13628,9 @@ "dev": true }, "prettier": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", - "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.0.tgz", + "integrity": "sha512-m2FgJibYrBGGgQXNzfd0PuDGShJgRavjUoRCw1mZERIWVSXF0iLzLm+aOqTAbLnC3n6JzUhAA8uZnFVghHJ86A==", "dev": true }, "prettier-linter-helpers": { @@ -13836,15 +13782,15 @@ "dev": true }, "read-package-json": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-4.1.2.tgz", - "integrity": "sha512-Dqer4pqzamDE2O4M55xp1qZMuLPqi4ldk2ya648FOMHRjwMzFhuxVrG04wd0c38IsvkVdr3vgHI6z+QTPdAjrQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.0.tgz", + "integrity": "sha512-1cjk2MV5ONDMn34uxSID3X8NY7VKsXfJnjbcVdFMvHEnJOBzU6MJ7/3yg6QFVZDq5/1yFNrKBUK9kGnonyGP2Q==", "dev": true, "requires": { - "glob": "^7.1.1", - "json-parse-even-better-errors": "^2.3.0", - "normalize-package-data": "^3.0.0", - "npm-normalize-package-bin": "^1.0.0" + "glob": "^7.2.0", + "json-parse-even-better-errors": "^2.3.1", + "normalize-package-data": "^4.0.0", + "npm-normalize-package-bin": "^1.0.1" } }, "read-package-json-fast": { @@ -13982,9 +13928,9 @@ } }, "rollup": { - "version": "2.67.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.67.3.tgz", - "integrity": "sha512-G/x1vUwbGtP6O5ZM8/sWr8+p7YfZhI18pPqMRtMYMWSbHjKZ/ajHGiM+GWNTlWyOR0EHIdT8LHU+Z4ciIZ1oBw==", + "version": "2.70.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.1.tgz", + "integrity": "sha512-CRYsI5EuzLbXdxC6RnYhOuRdtz4bhejPMSWjsFLfVM/7w/85n2szZv6yExqUXsBdz5KT8eoubeyDUDjhLHEslA==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -14503,11 +14449,12 @@ } }, "terser": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", - "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.12.1.tgz", + "integrity": "sha512-NXbs+7nisos5E+yXwAD+y7zrcTkMqb0dEJxIGtSKPdCBzopf7ni4odPul2aechpV7EXNvOudYOX2bb5tln1jbQ==", "dev": true, "requires": { + "acorn": "^8.5.0", "commander": "^2.20.0", "source-map": "~0.7.2", "source-map-support": "~0.5.20" @@ -14705,43 +14652,22 @@ } }, "typedoc": { - "version": "0.22.12", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.12.tgz", - "integrity": "sha512-FcyC+YuaOpr3rB9QwA1IHOi9KnU2m50sPJW5vcNRPCIdecp+3bFkh7Rq5hBU1Fyn29UR2h4h/H7twZHWDhL0sw==", + "version": "0.22.13", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.13.tgz", + "integrity": "sha512-NHNI7Dr6JHa/I3+c62gdRNXBIyX7P33O9TafGLd07ur3MqzcKgwTvpg18EtvCLHJyfeSthAtCLpM7WkStUmDuQ==", "dev": true, "requires": { "glob": "^7.2.0", "lunr": "^2.3.9", - "marked": "^4.0.10", - "minimatch": "^3.0.4", - "shiki": "^0.10.0" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } + "marked": "^4.0.12", + "minimatch": "^5.0.1", + "shiki": "^0.10.1" } }, "typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz", + "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==", "dev": true }, "unique-filename": { @@ -14892,9 +14818,9 @@ "dev": true }, "vscode-oniguruma": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.1.tgz", - "integrity": "sha512-vc4WhSIaVpgJ0jJIejjYxPvURJavX6QG41vu0mGhqywMkQqulezEqEQ3cO3gc8GvcOpX6ycmKGqRoROEMBNXTQ==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", + "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", "dev": true }, "vscode-textmate": { diff --git a/package.json b/package.json index 72632402..d63b248c 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ "dist" ], "devDependencies": { - "npm-check-updates": "^12.4.0", + "npm-check-updates": "^12.5.4", "serve": "^13.0.2", - "typedoc": "^0.22.12" + "typedoc": "^0.22.13" }, "resolutions": { "get-pkg-repo": "4.1.2" diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index 84e4ba1d..c5e8af97 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -18,15 +18,15 @@ "devDependencies": { "@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.0", - "@typescript-eslint/eslint-plugin": "^5.12.0", - "@typescript-eslint/parser": "^5.12.0", - "eslint": "^8.9.0", - "eslint-config-prettier": "^8.4.0", + "@rollup/plugin-typescript": "^8.3.1", + "@typescript-eslint/eslint-plugin": "^5.16.0", + "@typescript-eslint/parser": "^5.16.0", + "eslint": "^8.11.0", + "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.5.1", - "rollup": "^2.67.3", - "typescript": "^4.5.5" + "prettier": "^2.6.0", + "rollup": "^2.70.1", + "typescript": "^4.6.2" }, "dependencies": { "@sora/go-wasm": "^2021.1.0" diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 8ec1ede9..2ba6d34e 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -8,22 +8,22 @@ "test": "jest --detectOpenHandles --forceExit" }, "devDependencies": { - "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-commonjs": "^21.0.2", "@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.0", - "@types/jest": "^27.4.0", - "@typescript-eslint/eslint-plugin": "5.13.0", - "@typescript-eslint/parser": "5.14.0", - "eslint": "8.10.0", - "eslint-config-prettier": "8.4.0", + "@rollup/plugin-typescript": "^8.3.1", + "@types/jest": "^27.4.1", + "@typescript-eslint/eslint-plugin": "5.16.0", + "@typescript-eslint/parser": "5.16.0", + "eslint": "8.11.0", + "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.5.1", - "prettier": "^2.5.1", - "rollup": "^2.67.3", + "prettier": "^2.6.0", + "rollup": "^2.70.1", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^27.1.3", - "typescript": "^4.5.5" + "typescript": "^4.6.2" }, "dependencies": { "@sora/e2ee": "^2021.1.0", From 6cb57da4e59a26fedd1e51ba76e085db4edc27bb Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Thu, 24 Mar 2022 11:34:12 +0900 Subject: [PATCH 42/86] =?UTF-8?q?lint=20=E5=AF=BE=E5=BF=9C=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/src/publisher.ts | 1 + packages/sdk/src/subscriber.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/packages/sdk/src/publisher.ts b/packages/sdk/src/publisher.ts index bbd9236f..658a644f 100644 --- a/packages/sdk/src/publisher.ts +++ b/packages/sdk/src/publisher.ts @@ -95,6 +95,7 @@ export default class ConnectionPublisher extends ConnectionBase { return; } const data = { + // eslint-disable-next-line @typescript-eslint/naming-convention "stream.id": stream.id, id: event.track.id, label: event.track.label, diff --git a/packages/sdk/src/subscriber.ts b/packages/sdk/src/subscriber.ts index 625a8a93..0249f62a 100644 --- a/packages/sdk/src/subscriber.ts +++ b/packages/sdk/src/subscriber.ts @@ -65,6 +65,7 @@ export default class ConnectionSubscriber extends ConnectionBase { return; } const data = { + // eslint-disable-next-line @typescript-eslint/naming-convention "stream.id": streamId, id: event.track.id, label: event.track.label, @@ -131,6 +132,7 @@ export default class ConnectionSubscriber extends ConnectionBase { return; } const data = { + // eslint-disable-next-line @typescript-eslint/naming-convention "stream.id": stream.id, id: event.track.id, label: event.track.label, From 7031b8a9a04da44e11bab4d5e7fd0b147fd93f57 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Thu, 24 Mar 2022 11:35:14 +0900 Subject: [PATCH 43/86] =?UTF-8?q?typedoc=20=E3=82=B3=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/src/base.ts | 3 --- packages/sdk/src/subscriber.ts | 6 ------ 2 files changed, 9 deletions(-) diff --git a/packages/sdk/src/base.ts b/packages/sdk/src/base.ts index 274c4f7d..91ecdd10 100644 --- a/packages/sdk/src/base.ts +++ b/packages/sdk/src/base.ts @@ -1627,9 +1627,6 @@ export default class ConnectionBase { /** * createOffer 処理をするメソッド * - * @param eventType - イベントタイプ - * @param data - イベントデータ - * * @returns * 生成した RTCSessionDescription を返します */ diff --git a/packages/sdk/src/subscriber.ts b/packages/sdk/src/subscriber.ts index 0249f62a..3d160b90 100644 --- a/packages/sdk/src/subscriber.ts +++ b/packages/sdk/src/subscriber.ts @@ -13,8 +13,6 @@ export default class ConnectionSubscriber extends ConnectionBase { * await recvonly.connect(); * ``` * - * @param stream - メディアストリーム - * * @public */ async connect(): Promise { @@ -47,8 +45,6 @@ export default class ConnectionSubscriber extends ConnectionBase { /** * シングルストリームで Sora へ接続するメソッド - * - * @param stream - メディアストリーム */ private async singleStream(): Promise { await this.disconnect(); @@ -112,8 +108,6 @@ export default class ConnectionSubscriber extends ConnectionBase { /** * マルチストリームで Sora へ接続するメソッド - * - * @param stream - メディアストリーム */ private async multiStream(): Promise { await this.disconnect(); From 80c1c3ecc6ce02a16cec5ea75bd748c305463618 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Mon, 28 Mar 2022 15:11:07 +0900 Subject: [PATCH 44/86] =?UTF-8?q?bundleId=20=E3=82=92=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/src/types.ts | 3 +++ packages/sdk/src/utils.ts | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/sdk/src/types.ts b/packages/sdk/src/types.ts index bd00bd96..55b3f078 100644 --- a/packages/sdk/src/types.ts +++ b/packages/sdk/src/types.ts @@ -52,6 +52,7 @@ export type SignalingConnectMessage = { role: Role; channel_id: string; client_id?: string; + bundle_id?: string; metadata?: JSONType; signaling_notify_metadata?: JSONType; multistream?: boolean; @@ -95,6 +96,7 @@ export type SignalingOfferMessage = { sdp: string; client_id: string; connection_id: string; + bundle_id?: string; metadata?: JSONType; config?: RTCConfiguration; encodings?: RTCRtpEncodingParameters[]; @@ -296,6 +298,7 @@ export type ConnectionOptions = { disconnectWaitTimeout?: number; signalingCandidateTimeout?: number; dataChannels?: DataChannelConfiguration[]; + bundleId?: string; }; export type Callbacks = { diff --git a/packages/sdk/src/utils.ts b/packages/sdk/src/utils.ts index 481886b2..8f6fb56c 100644 --- a/packages/sdk/src/utils.ts +++ b/packages/sdk/src/utils.ts @@ -176,11 +176,14 @@ export function createSignalingMessage( } } - // client_id if ("clientId" in options && options.clientId !== undefined) { message.client_id = options.clientId; } + if ("bundleId" in options && options.bundleId !== undefined) { + message.bundle_id = options.bundleId; + } + if ("dataChannelSignaling" in options && typeof options.dataChannelSignaling === "boolean") { message.data_channel_signaling = options.dataChannelSignaling; } From 7374ccbedb628ded2a2938a02312a7676fc5230a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 16:01:08 +0000 Subject: [PATCH 45/86] Bump eslint from 8.11.0 to 8.12.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.11.0 to 8.12.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.11.0...v8.12.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 16 ++++++++-------- packages/sdk/package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 15f0a71d..c95bd604 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3048,9 +3048,9 @@ } }, "node_modules/eslint": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.11.0.tgz", - "integrity": "sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.12.0.tgz", + "integrity": "sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.2.1", @@ -8504,7 +8504,7 @@ "@types/jest": "^27.4.1", "@typescript-eslint/eslint-plugin": "5.16.0", "@typescript-eslint/parser": "5.16.0", - "eslint": "8.11.0", + "eslint": "8.12.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.5.1", @@ -9581,7 +9581,7 @@ "@types/jest": "^27.4.1", "@typescript-eslint/eslint-plugin": "5.16.0", "@typescript-eslint/parser": "5.16.0", - "eslint": "8.11.0", + "eslint": "8.12.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "fflate": "^0.7.3", @@ -10876,9 +10876,9 @@ } }, "eslint": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.11.0.tgz", - "integrity": "sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.12.0.tgz", + "integrity": "sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q==", "dev": true, "requires": { "@eslint/eslintrc": "^1.2.1", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 2ba6d34e..fcc0c4a3 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -15,7 +15,7 @@ "@types/jest": "^27.4.1", "@typescript-eslint/eslint-plugin": "5.16.0", "@typescript-eslint/parser": "5.16.0", - "eslint": "8.11.0", + "eslint": "8.12.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.5.1", From cdae3edb1eeea712a95196a1de693ae46807fca6 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 29 Mar 2022 10:48:03 +0900 Subject: [PATCH 46/86] =?UTF-8?q?bundleId=20=E3=81=AE=E3=83=86=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/tests/utils.test.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/packages/sdk/tests/utils.test.ts b/packages/sdk/tests/utils.test.ts index 78d20c31..236c8e99 100644 --- a/packages/sdk/tests/utils.test.ts +++ b/packages/sdk/tests/utils.test.ts @@ -523,3 +523,28 @@ test("createSignalingMessage dataChannels option", () => { Object.assign({}, baseExpectedMessage, diff5) ); }); + +test("createSignalingMessage bundleId option", () => { + const option1 = { + bundleId: "bundleId", + }; + const diff1 = { + bundle_id: option1.bundleId, + }; + expect(createSignalingMessage(sdp, role, channelId, null, option1, false)).toEqual( + Object.assign({}, baseExpectedMessage, diff1) + ); + const option2 = { + bundleId: "", + }; + const diff2 = { + bundle_id: option2.bundleId, + }; + expect(createSignalingMessage(sdp, role, channelId, null, option2, false)).toEqual( + Object.assign({}, baseExpectedMessage, diff2) + ); + const option3 = { + bundleId: undefined, + }; + expect(createSignalingMessage(sdp, role, channelId, null, option3, false)).toEqual(baseExpectedMessage); +}); From c22b47627445024565152c257ea7376a5bfe3282 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 29 Mar 2022 11:17:11 +0900 Subject: [PATCH 47/86] 2022.1.0-canary.3 --- CHANGES.md | 7 +++++++ dist/base.d.ts | 3 --- dist/sora.js | 43 ++++++++++++++++++++----------------------- dist/sora.min.js | 2 +- dist/sora.min.js.map | 2 +- dist/sora.mjs | 43 ++++++++++++++++++++----------------------- dist/subscriber.d.ts | 6 ------ package-lock.json | 4 ++-- package.json | 2 +- 9 files changed, 52 insertions(+), 60 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7501fbf6..df734738 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,14 +10,21 @@ - バグ修正 ## develop +- [ADD] sendrecv オブジェクトのオプションに bundle_id を追加する + - @yuitowest - [UPDATE] sendrecv API を使用して接続する場合に multistream option の初期値が true になるよう修正する + - @yuitowest - [UPDATE] sendrecv API を使用して multistream: false で接続した場合、Sora との接続前に例外が発生するように修正する + - @yuitowest - [UPDATE] パッケージを更新する - fflate "0.7.1" -> "0.7.2" - typescript "4.4.3" -> "4.5.4" + - @yuitowest - [CHANGE] connectedSignalingUrl は現在接続中の WebSocket の URL ではなく type offer メッセージを受信した URL を返すようにする - ignoreDisconnectWebSocket を使用して WebSocket を切断した場合にも URL を返すように修正する + - @yuitowest - [UPDATE] SendRecv オブジェクト に contactSignalingUrl プロパティを追加する + - @yuitowest ## 2021.2.3 - [FIX] メッセージング機能で文字列データが送信されてきた場合にそのまま message callback に渡していた問題を修正する diff --git a/dist/base.d.ts b/dist/base.d.ts index 290ea942..48209550 100644 --- a/dist/base.d.ts +++ b/dist/base.d.ts @@ -460,9 +460,6 @@ export default class ConnectionBase { /** * createOffer 処理をするメソッド * - * @param eventType - イベントタイプ - * @param data - イベントデータ - * * @returns * 生成した RTCSessionDescription を返します */ diff --git a/dist/sora.js b/dist/sora.js index fa98d85c..92058ebe 100644 --- a/dist/sora.js +++ b/dist/sora.js @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2022.1.0-canary.2 + * @version: 2022.1.0-canary.3 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -12,6 +12,14 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Sora = factory()); })(this, (function () { 'use strict'; + /** + * @sora/e2ee + * WebRTC SFU Sora JavaScript E2EE Library + * @version: 2021.1.0 + * @author: Shiguredo Inc. + * @license: Apache-2.0 + **/ + // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -601,14 +609,6 @@ })(); } - /** - * @sora/e2ee - * WebRTC SFU Sora JavaScript E2EE Library - * @version: 2021.1.0 - * @author: Shiguredo Inc. - * @license: Apache-2.0 - **/ - const WORKER_SCRIPT = "InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCkgPSBsb2coeCkgLyBsb2coMjU2KQogICAgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5sb2cobikgLyBNYXRoLmxvZygyICoqIDgpICsgMSk7Cn0KZnVuY3Rpb24gYXJyYXlCdWZmZXJUb051bWJlcihhcnJheUJ1ZmZlcikgewogICAgLy8gMzJiaXQg44G+44Gn44KS5oOz5a6aIChCaWdJbnQg44G444Gu5pu444GN5o+b44GI5pmC44Gr6KaB5L+u5q2jKQogICAgY29uc3QgbmV3QXJyYXlCdWZmZXIgPSBuZXcgQXJyYXlCdWZmZXIoVWludDMyQXJyYXkuQllURVNfUEVSX0VMRU1FTlQpOwogICAgY29uc3QgbmV3RGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcobmV3QXJyYXlCdWZmZXIpOwogICAgY29uc3QgZGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcoYXJyYXlCdWZmZXIpOwogICAgY29uc3QgcGF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ZlS2V5KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgZ2VuZXJhdGVXcml0ZUlWKG1hdGVyaWFsKS50aGVuKCh3cml0ZUlWKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2V0V3JpdGVJVihzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5lY3Rpb25JZCwga2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBzZXRMYXRlc3RSZW1vdGVLZXlJZChjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gInJlbW92ZVJlbW90ZURlcml2ZUtleSIpIHsKICAgICAgICBjb25zdCB7IGNvbm5lY3Rpb25JZCB9ID0gZXZlbnQuZGF0YTsKICAgICAgICByZW1vdmVEZXJpdmVLZXkoY29ubmVjdGlvbklkKTsKICAgIH0KICAgIGVsc2UgaWYgKHR5cGUgPT09ICJlbmNyeXB0IikgewogICAgICAgIGNvbnN0IHsgcmVhZGFibGVTdHJlYW0sIHdyaXRhYmxlU3RyZWFtIH0gPSBldmVudC5kYXRhOwogICAgICAgIGNvbnN0IHRyYW5zZm9ybVN0cmVhbSA9IG5ldyBUcmFuc2Zvcm1TdHJlYW0oewogICAgICAgICAgICB0cmFuc2Zvcm06IGVuY3J5cHRGdW5jdGlvbiwKICAgICAgICB9KTsKICAgICAgICByZWFkYWJsZVN0cmVhbS5waXBlVGhyb3VnaCh0cmFuc2Zvcm1TdHJlYW0pLnBpcGVUbyh3cml0YWJsZVN0cmVhbSk7CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAiZGVjcnlwdCIpIHsKICAgICAgICBjb25zdCB7IHJlYWRhYmxlU3RyZWFtLCB3cml0YWJsZVN0cmVhbSB9ID0gZXZlbnQuZGF0YTsKICAgICAgICBjb25zdCB0cmFuc2Zvcm1TdHJlYW0gPSBuZXcgVHJhbnNmb3JtU3RyZWFtKHsKICAgICAgICAgICAgdHJhbnNmb3JtOiBkZWNyeXB0RnVuY3Rpb24sCiAgICAgICAgfSk7CiAgICAgICAgcmVhZGFibGVTdHJlYW0ucGlwZVRocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo="; class SoraE2EE { constructor() { @@ -1633,7 +1633,7 @@ } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2022.1.0-canary.2", + sora_client: "Sora JavaScript SDK 2022.1.0-canary.3", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -3341,9 +3341,6 @@ /** * createOffer 処理をするメソッド * - * @param eventType - イベントタイプ - * @param data - イベントデータ - * * @returns * 生成した RTCSessionDescription を返します */ @@ -3583,6 +3580,9 @@ */ onDataChannel(dataChannelEvent) { const dataChannel = dataChannelEvent.channel; + dataChannel.bufferedAmountLowThreshold = 65536; + dataChannel.binaryType = "arraybuffer"; + this.soraDataChannels[dataChannel.label] = dataChannel; this.writeDataChannelTimelineLog("ondatachannel", dataChannel, createDataChannelData(dataChannel)); // onbufferedamountlow dataChannelEvent.channel.onbufferedamountlow = (event) => { @@ -3592,9 +3592,6 @@ // onopen dataChannelEvent.channel.onopen = (event) => { const channel = event.currentTarget; - channel.bufferedAmountLowThreshold = 65536; - channel.binaryType = "arraybuffer"; - this.soraDataChannels[channel.label] = channel; this.trace("OPEN DATA CHANNEL", channel.label); if (channel.label === "signaling" && this.ws) { this.writeDataChannelSignalingLog("onopen", channel); @@ -3852,6 +3849,9 @@ if (dataChannel === undefined) { throw new Error("Could not find DataChannel"); } + if (dataChannel.readyState !== "open") { + throw new Error("Messaging DataChannel is not open"); + } const settings = this.signalingOfferMessageDataChannels[label]; if (settings !== undefined && settings.compress === true) { const zlibMessage = zlibSync(message, {}); @@ -4032,6 +4032,7 @@ return; } const data = { + // eslint-disable-next-line @typescript-eslint/naming-convention "stream.id": stream.id, id: event.track.id, label: event.track.label, @@ -4108,8 +4109,6 @@ * await recvonly.connect(); * ``` * - * @param stream - メディアストリーム - * * @public */ async connect() { @@ -4142,8 +4141,6 @@ } /** * シングルストリームで Sora へ接続するメソッド - * - * @param stream - メディアストリーム */ async singleStream() { await this.disconnect(); @@ -4160,6 +4157,7 @@ return; } const data = { + // eslint-disable-next-line @typescript-eslint/naming-convention "stream.id": streamId, id: event.track.id, label: event.track.label, @@ -4205,8 +4203,6 @@ } /** * マルチストリームで Sora へ接続するメソッド - * - * @param stream - メディアストリーム */ async multiStream() { await this.disconnect(); @@ -4225,6 +4221,7 @@ return; } const data = { + // eslint-disable-next-line @typescript-eslint/naming-convention "stream.id": stream.id, id: event.track.id, label: event.track.label, @@ -4419,7 +4416,7 @@ * @public */ version: function () { - return "2022.1.0-canary.2"; + return "2022.1.0-canary.3"; }, /** * WebRTC のユーティリティ関数群 diff --git a/dist/sora.min.js b/dist/sora.min.js index 01912074..dd0528e2 100644 --- a/dist/sora.min.js +++ b/dist/sora.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sora=t()}(this,(function(){"use strict";class e{constructor(){if(!!!RTCRtpSender.prototype.createEncodedStreams)throw new Error("E2EE is not supported in this browser.");this.worker=null,this.onWorkerDisconnect=null}startWorker(){const e=atob("InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCkgPSBsb2coeCkgLyBsb2coMjU2KQogICAgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5sb2cobikgLyBNYXRoLmxvZygyICoqIDgpICsgMSk7Cn0KZnVuY3Rpb24gYXJyYXlCdWZmZXJUb051bWJlcihhcnJheUJ1ZmZlcikgewogICAgLy8gMzJiaXQg44G+44Gn44KS5oOz5a6aIChCaWdJbnQg44G444Gu5pu444GN5o+b44GI5pmC44Gr6KaB5L+u5q2jKQogICAgY29uc3QgbmV3QXJyYXlCdWZmZXIgPSBuZXcgQXJyYXlCdWZmZXIoVWludDMyQXJyYXkuQllURVNfUEVSX0VMRU1FTlQpOwogICAgY29uc3QgbmV3RGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcobmV3QXJyYXlCdWZmZXIpOwogICAgY29uc3QgZGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcoYXJyYXlCdWZmZXIpOwogICAgY29uc3QgcGFkZGluZ0xlbmd0aCA9IFVpbnQzMkFycmF5LkJZVEVTX1BFUl9FTEVNRU5UIC0gZGF0YVZpZXcuYnl0ZUxlbmd0aDsKICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcGFkZGluZ0xlbmd0aDsgaSArPSAxKSB7CiAgICAgICAgbmV3RGF0YVZpZXcuc2V0VWludDgoaSwgMCk7CiAgICB9CiAgICBmb3IgKGxldCBpID0gcGFkZGluZ0xlbmd0aCwgaiA9ID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ZXNbZW5jb2RlZEZyYW1lLnR5cGVdKSk7CiAgICAgICAgY29uc3Qgc2ZyYW1lSGVhZGVyID0gbmV3IFVpbnQ4QXJyYXkoc2ZyYW1lSGVhZGVyQnVmZmVyKTsKICAgICAgICBjb25zdCBjb25uZWN0aW9uSWQgPSB0ZXh0RGVjb2Rlci5kZWNvZGUoY29ubmVjdGlvbklkQnVmZmVyKTsKICAgICAgICBjb25zdCBbcywgY291bnQsIGtleUlkXSA9IHBhcnNlU0ZyYW1lSGVhZGVyKHNmcmFtZUhlYWRlckJ1ZmZlcik7CiAgICAgICAgLy8g5LuK5Zue44GvIHMgZmxhZyDjga8gMCDjga7jgb8KICAgICAgICBpZiAocyAhPT0gMCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlVORVhQRUNURUQtUy1GTEFHIik7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGRlcml2ZUtleSA9IGdldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICBpZiAoIWRlcml2ZUtleSkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGl2ID0gZ2VuZXJhdGVJVihjb3VudCwgY29ubmVjdGlvbklkLCBrZXlJZCk7CiAgICAgICAgaWYgKCFpdikgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGZyYW1lQWRkID0gZW5jb2RlRnJhbWVBZGQoZnJhbWVNZXRhZGF0YSwgc2ZyYW1lSGVhZGVyLCBjb25uZWN0aW9uSWQpOwogICAgICAgIGNyeXB0by5zdWJ0bGUKICAgICAgICAgICAgLmRlY3J5cHQoewogICAgICAgICAgICBuYW1lOiAiQUVTLUdDTSIsCiAgICAgICAgICAgIGl2OiBpdiwKICAgICAgICAgICAgYWRkaXRpb25hbERhdGE6IGZyYW1lQWRkLAogICAgICAgIH0sIGRlcml2ZUtleSwgbmV3IFVpbnQ4QXJyYXkoZW5jcnlw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GltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaX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Rocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=");this.worker=new Worker(URL.createObjectURL(new Blob([e],{type:"application/javascript"}))),this.worker.onmessage=e=>{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var p=new t(32);for(m=0;m<32;++m)p[m]=5;var Z=A(b,9,0),w=A(b,9,1),S=A(p,5,0),V=A(p,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(2==e.BYTES_PER_ELEMENT?n:4==e.BYTES_PER_ELEMENT?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},X=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},E=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=O(s[C-1],m,0);if(u>i){a=0;var A=0,b=u-i,p=1<i))break;A+=p-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},O=function(e,t,n){return-1==e.s?Math.max(O(e.l,t,n+1),O(e.r,t,n+1)):t[e.s]=n},B=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},N=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!D[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=N(g,b)+N(r,p)+c,z=N(g,u)+N(r,f)+c+14+3*U+N(K,D)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(C,C+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=Z,j=b,Q=S,H=p;for(L=0;L255){te=l[L]>>>18&31;X(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];X(t,I,Q[ne]),I+=H[ne],ne>3&&(X(t,I,l[L]>>>5&8191),I+=a[ne])}else X(t,I,M[l[L]]),I+=j[l[L]];return X(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),J=new t(0),D=function(e,o,l,g,r){return function(e,o,l,g,r,d){var C=e.length,I=new t(g+C+5*(1+Math.ceil(C/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||C<8)for(var A=0;A<=C;A+=65535){var b=A+65535;b>=C&&(m[u>>3]=d),u=Y(m,u+1,e.subarray(A,b))}else{for(var p=L[o-1],Z=p>>>13,w=8191&p,S=(1<7e3||B>24576)&&j>423){u=K(e,m,0,v,T,X,O,B,D,A-D,u),B=E=O=0,D=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)X[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(Z,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[B++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];O+=s[ae]+a[oe],++T[257+ae],++X[oe],N=A+H,++E}else v[B++]=e[A],++T[e[A]]}}u=K(e,m,d,v,T,X,O,B,D,A-D,u),!d&&7&u&&(u=Y(m,u+1,J))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=D(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var d=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,p=i.m,Z=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,X=F+T;if(X>l){c&&v(0);break}g&&d(m+T),n.set(e.subarray(F,X),m),i.b=m+=T,i.p=I=8*X,i.f=h;continue}if(1==R)u=w,b=V,p=9,Z=5;else if(2==R){var E=y(e,I,31)+257,O=y(e,I+10,15)+4,B=E+y(e,I+5,31)+1;I+=14;for(var N=new t(B),Y=new t(19),K=0;K>>4)<16)N[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=N[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)N[K++]=M}}var Q=N.subarray(0,E),H=N.subarray(E);p=f(Q),Z=f(H),u=A(Q,p,1),b=A(H,Z,1)}else v(1);if(I>S){c&&v(0);break}}g&&d(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=C[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&d(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(J,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0-canary.2",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if("sendrecv"===t&&!0!==s.multistream)throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'");if(void 0!==i&&(o.metadata=i),a&&(o.redirect=!0),"signalingNotifyMetadata"in s&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),"multistream"in s&&!0===s.multistream&&(o.multistream=!0,"spotlight"in s&&(o.spotlight=s.spotlight,"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber)),!0===o.spotlight)){const e=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=e.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=e.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid)}if("simulcast"in s||"simulcastRid"in s){"simulcast"in s&&!0===s.simulcast&&(o.simulcast=!0);const e=["r0","r1","r2"];void 0!==s.simulcastRid&&0<=e.indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid)}"clientId"in s&&void 0!==s.clientId&&(o.client_id=s.clientId),"dataChannelSignaling"in s&&"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"ignoreDisconnectWebSocket"in s&&"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const l=["audioCodecType","audioBitRate"],g=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],r=["videoCodecType","videoBitRate"],c=Object.assign({},s);Object.keys(c).forEach((e=>{"audio"===e&&"boolean"==typeof c[e]||"video"===e&&"boolean"==typeof c[e]||0<=l.indexOf(e)&&null!==c[e]||0<=g.indexOf(e)&&null!==c[e]||0<=r.indexOf(e)&&null!==c[e]||delete c[e]})),void 0!==c.audio&&(o.audio=c.audio);const d=Object.keys(c).some((e=>0<=l.indexOf(e)));o.audio&&d&&(o.audio={},"audioCodecType"in c&&(o.audio.codec_type=c.audioCodecType),"audioBitRate"in c&&(o.audio.bit_rate=c.audioBitRate));const C=Object.keys(c).some((e=>0<=g.indexOf(e)));o.audio&&C&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in c&&(o.audio.opus_params.channels=c.audioOpusParamsChannels),"audioOpusParamsClockRate"in c&&(o.audio.opus_params.clock_rate=c.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in c&&(o.audio.opus_params.maxplaybackrate=c.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in c&&(o.audio.opus_params.stereo=c.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in c&&(o.audio.opus_params.sprop_stereo=c.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in c&&(o.audio.opus_params.minptime=c.audioOpusParamsMinptime),"audioOpusParamsPtime"in c&&(o.audio.opus_params.ptime=c.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in c&&(o.audio.opus_params.useinbandfec=c.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in c&&(o.audio.opus_params.usedtx=c.audioOpusParamsUsedtx)),void 0!==c.video&&(o.video=c.video);const h=Object.keys(c).some((e=>0<=r.indexOf(e)));if(o.video&&h&&(o.video={},"videoCodecType"in c&&(o.video.codec_type=c.videoCodecType),"videoBitRate"in c&&(o.video.bit_rate=c.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if(!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8"),o.e2ee=!0}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.connectedSignalingUrl="",this.contactSignalingUrl=""}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}stopStream(){return new Promise(((e,t)=>(this.debug&&console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."),this.stream?(this.stream.getTracks().forEach((e=>{e.stop()})),this.stream=null,e()):e())))}async signalingTerminate(){await this.stopStream();for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}async abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.contactSignalingUrl="",this.connectedSignalingUrl="",this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=async e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),await this.signalingTerminate(),s(t)},e.onmessage=async t=>{if(t.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",t.data),void this.signalingOnMessageE2EE(t.data);if("string"!=typeof t.data)throw new Error("Received invalid signaling data");const n=JSON.parse(t.data);if("offer"==n.type)this.writeWebSocketSignalingLog("onmessage-offer",n),this.signalingOnMessageTypeOffer(n),this.connectedSignalingUrl=e.url,i(n);else if("update"==n.type)this.writeWebSocketSignalingLog("onmessage-update",n),await this.signalingOnMessageTypeUpdate(n);else if("re-offer"==n.type)this.writeWebSocketSignalingLog("onmessage-re-offer",n),await this.signalingOnMessageTypeReOffer(n);else if("ping"==n.type)await this.signalingOnMessageTypePing(n);else if("push"==n.type)this.callbacks.push(n,"websocket");else if("notify"==n.type)"connection.created"===n.event_type?this.writeWebSocketTimelineLog("notify-connection.created",n):"connection.destroyed"===n.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",n),this.signalingOnMessageTypeNotify(n,"websocket");else if("switched"==n.type)this.writeWebSocketSignalingLog("onmessage-switched",n),this.signalingOnMessageTypeSwitched(n);else if("redirect"==n.type){this.writeWebSocketSignalingLog("onmessage-redirect",n);try{const e=await this.signalingOnMessageTypeRedirect(n);i(e)}catch(e){s(e)}}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e,t||(this.contactSignalingUrl=e.url,this.writeWebSocketSignalingLog("contact-signaling-url",this.contactSignalingUrl)))})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=async e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),await this.signalingTerminate(),t(n)},this.ws.onerror=async e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),await this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=async e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((async()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=async e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),await this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=e.target;let s;"string"==typeof e.data?s=(new TextEncoder).encode(e.data):e.data instanceof ArrayBuffer?s=e.data:console.warn("Received onmessage event data is not of type String or ArrayBuffer."),void 0!==s&&(!0===n.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(i.label,s)))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var p=new t(32);for(m=0;m<32;++m)p[m]=5;var Z=A(b,9,0),w=A(b,9,1),S=A(p,5,0),V=A(p,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(2==e.BYTES_PER_ELEMENT?n:4==e.BYTES_PER_ELEMENT?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},E=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},X=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=O(s[C-1],m,0);if(u>i){a=0;var A=0,b=u-i,p=1<i))break;A+=p-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},O=function(e,t,n){return-1==e.s?Math.max(O(e.l,t,n+1),O(e.r,t,n+1)):t[e.s]=n},B=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},N=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!J[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=N(g,b)+N(r,p)+c,z=N(g,u)+N(r,f)+c+14+3*U+N(K,J)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(C,C+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=Z,j=b,Q=S,H=p;for(L=0;L255){te=l[L]>>>18&31;E(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];E(t,I,Q[ne]),I+=H[ne],ne>3&&(E(t,I,l[L]>>>5&8191),I+=a[ne])}else E(t,I,M[l[L]]),I+=j[l[L]];return E(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),D=new t(0),J=function(e,o,l,g,r){return function(e,o,l,g,r,d){var C=e.length,I=new t(g+C+5*(1+Math.ceil(C/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||C<8)for(var A=0;A<=C;A+=65535){var b=A+65535;b>=C&&(m[u>>3]=d),u=Y(m,u+1,e.subarray(A,b))}else{for(var p=L[o-1],Z=p>>>13,w=8191&p,S=(1<7e3||B>24576)&&j>423){u=K(e,m,0,v,T,E,O,B,J,A-J,u),B=X=O=0,J=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)E[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(Z,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[B++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];O+=s[ae]+a[oe],++T[257+ae],++E[oe],N=A+H,++X}else v[B++]=e[A],++T[e[A]]}}u=K(e,m,d,v,T,E,O,B,J,A-J,u),!d&&7&u&&(u=Y(m,u+1,D))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=J(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var d=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,p=i.m,Z=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,E=F+T;if(E>l){c&&v(0);break}g&&d(m+T),n.set(e.subarray(F,E),m),i.b=m+=T,i.p=I=8*E,i.f=h;continue}if(1==R)u=w,b=V,p=9,Z=5;else if(2==R){var X=y(e,I,31)+257,O=y(e,I+10,15)+4,B=X+y(e,I+5,31)+1;I+=14;for(var N=new t(B),Y=new t(19),K=0;K>>4)<16)N[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=N[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)N[K++]=M}}var Q=N.subarray(0,X),H=N.subarray(X);p=f(Q),Z=f(H),u=A(Q,p,1),b=A(H,Z,1)}else v(1);if(I>S){c&&v(0);break}}g&&d(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=C[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&d(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(D,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0-canary.3",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if("sendrecv"===t&&!0!==s.multistream)throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'");if(void 0!==i&&(o.metadata=i),a&&(o.redirect=!0),"signalingNotifyMetadata"in s&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),"multistream"in s&&!0===s.multistream&&(o.multistream=!0,"spotlight"in s&&(o.spotlight=s.spotlight,"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber)),!0===o.spotlight)){const e=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=e.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=e.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid)}if("simulcast"in s||"simulcastRid"in s){"simulcast"in s&&!0===s.simulcast&&(o.simulcast=!0);const e=["r0","r1","r2"];void 0!==s.simulcastRid&&0<=e.indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid)}"clientId"in s&&void 0!==s.clientId&&(o.client_id=s.clientId),"dataChannelSignaling"in s&&"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"ignoreDisconnectWebSocket"in s&&"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const l=["audioCodecType","audioBitRate"],g=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],r=["videoCodecType","videoBitRate"],c=Object.assign({},s);Object.keys(c).forEach((e=>{"audio"===e&&"boolean"==typeof c[e]||"video"===e&&"boolean"==typeof c[e]||0<=l.indexOf(e)&&null!==c[e]||0<=g.indexOf(e)&&null!==c[e]||0<=r.indexOf(e)&&null!==c[e]||delete c[e]})),void 0!==c.audio&&(o.audio=c.audio);const d=Object.keys(c).some((e=>0<=l.indexOf(e)));o.audio&&d&&(o.audio={},"audioCodecType"in c&&(o.audio.codec_type=c.audioCodecType),"audioBitRate"in c&&(o.audio.bit_rate=c.audioBitRate));const C=Object.keys(c).some((e=>0<=g.indexOf(e)));o.audio&&C&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in c&&(o.audio.opus_params.channels=c.audioOpusParamsChannels),"audioOpusParamsClockRate"in c&&(o.audio.opus_params.clock_rate=c.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in c&&(o.audio.opus_params.maxplaybackrate=c.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in c&&(o.audio.opus_params.stereo=c.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in c&&(o.audio.opus_params.sprop_stereo=c.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in c&&(o.audio.opus_params.minptime=c.audioOpusParamsMinptime),"audioOpusParamsPtime"in c&&(o.audio.opus_params.ptime=c.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in c&&(o.audio.opus_params.useinbandfec=c.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in c&&(o.audio.opus_params.usedtx=c.audioOpusParamsUsedtx)),void 0!==c.video&&(o.video=c.video);const h=Object.keys(c).some((e=>0<=r.indexOf(e)));if(o.video&&h&&(o.video={},"videoCodecType"in c&&(o.video.codec_type=c.videoCodecType),"videoBitRate"in c&&(o.video.bit_rate=c.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if(!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8"),o.e2ee=!0}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.connectedSignalingUrl="",this.contactSignalingUrl=""}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}stopStream(){return new Promise(((e,t)=>(this.debug&&console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."),this.stream?(this.stream.getTracks().forEach((e=>{e.stop()})),this.stream=null,e()):e())))}async signalingTerminate(){await this.stopStream();for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}async abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.contactSignalingUrl="",this.connectedSignalingUrl="",this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=async e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),await this.signalingTerminate(),s(t)},e.onmessage=async t=>{if(t.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",t.data),void this.signalingOnMessageE2EE(t.data);if("string"!=typeof t.data)throw new Error("Received invalid signaling data");const n=JSON.parse(t.data);if("offer"==n.type)this.writeWebSocketSignalingLog("onmessage-offer",n),this.signalingOnMessageTypeOffer(n),this.connectedSignalingUrl=e.url,i(n);else if("update"==n.type)this.writeWebSocketSignalingLog("onmessage-update",n),await this.signalingOnMessageTypeUpdate(n);else if("re-offer"==n.type)this.writeWebSocketSignalingLog("onmessage-re-offer",n),await this.signalingOnMessageTypeReOffer(n);else if("ping"==n.type)await this.signalingOnMessageTypePing(n);else if("push"==n.type)this.callbacks.push(n,"websocket");else if("notify"==n.type)"connection.created"===n.event_type?this.writeWebSocketTimelineLog("notify-connection.created",n):"connection.destroyed"===n.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",n),this.signalingOnMessageTypeNotify(n,"websocket");else if("switched"==n.type)this.writeWebSocketSignalingLog("onmessage-switched",n),this.signalingOnMessageTypeSwitched(n);else if("redirect"==n.type){this.writeWebSocketSignalingLog("onmessage-redirect",n);try{const e=await this.signalingOnMessageTypeRedirect(n);i(e)}catch(e){s(e)}}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e,t||(this.contactSignalingUrl=e.url,this.writeWebSocketSignalingLog("contact-signaling-url",this.contactSignalingUrl)))})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=async e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),await this.signalingTerminate(),t(n)},this.ws.onerror=async e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),await this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=async e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((async()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=async e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),await this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=e.target;let s;"string"==typeof e.data?s=(new TextEncoder).encode(e.data):e.data instanceof ArrayBuffer?s=e.data:console.warn("Received onmessage event data is not of type String or ArrayBuffer."),void 0!==s&&(!0===n.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(i.label,s)))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");if("open"!==n.readyState)throw new Error("Messaging DataChannel is not open");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1 {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nexport default function () {\n\t(() => {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") {\n\t\t\t// global already exists\n\t\t} else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t}\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t}\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t}\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t}\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t}\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t}\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t}\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});\n\t\t}\n\t})();\n}\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n // role: sendrecv で multistream: false の場合は例外を発生させる\n if (role === \"sendrecv\" && options.multistream !== true) {\n throw new Error(\"Failed to parse options. Options multistream must be true when connecting using 'sendrecv'\");\n }\n\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n\n if (redirect) {\n message.redirect = true;\n }\n\n if (\"signalingNotifyMetadata\" in options) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n\n if (\"multistream\" in options && options.multistream === true) {\n // multistream\n message.multistream = true;\n // spotlight\n if (\"spotlight\" in options) {\n message.spotlight = options.spotlight;\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n }\n if (message.spotlight === true) {\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n }\n }\n\n if (\"simulcast\" in options || \"simulcastRid\" in options) {\n // simulcast\n if (\"simulcast\" in options && options.simulcast === true) {\n message.simulcast = true;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n }\n\n // client_id\n if (\"clientId\" in options && options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n\n if (\"dataChannelSignaling\" in options && typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (\"ignoreDisconnectWebSocket\" in options && typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n message.e2ee = true;\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WS シグナリングで type offer メッセージを受信したシグナリング URL\n */\n connectedSignalingUrl: string;\n /**\n * WS シグナリングで最初に type connect を送信したシグナリング URL\n */\n contactSignalingUrl: string;\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.connectedSignalingUrl = \"\";\n this.contactSignalingUrl = \"\";\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * stream を停止するメソッド\n */\n private stopStream(): Promise {\n return new Promise((resolve, _) => {\n if (this.debug) {\n console.warn(\n \"@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself.\"\n );\n }\n if (!this.stream) {\n return resolve();\n }\n this.stream.getTracks().forEach((t) => {\n t.stop();\n });\n this.stream = null;\n return resolve();\n });\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private async signalingTerminate(): Promise {\n await this.stopStream();\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private async abendPeerConnectionState(title: SoraAbendTitle): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.contactSignalingUrl = \"\";\n this.connectedSignalingUrl = \"\";\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = async (event): Promise => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n this.connectedSignalingUrl = ws.url;\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n try {\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n } catch (error) {\n reject(error);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n // 初回に接続した URL を状態管理する\n if (!redirect) {\n this.contactSignalingUrl = ws.url;\n this.writeWebSocketSignalingLog(\"contact-signaling-url\", this.contactSignalingUrl);\n }\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = async (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = async (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n await this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = async (_): Promise => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = async (_): Promise => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n await this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(async () => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n await this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n channel.bufferedAmountLowThreshold = 65536;\n channel.binaryType = \"arraybuffer\";\n this.soraDataChannels[channel.label] = channel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const dataChannel = event.target as RTCDataChannel;\n let data: ArrayBuffer | undefined = undefined;\n if (typeof event.data === \"string\") {\n data = new TextEncoder().encode(event.data);\n } else if (event.data instanceof ArrayBuffer) {\n data = event.data;\n } else {\n console.warn(\"Received onmessage event data is not of type String or ArrayBuffer.\");\n }\n\n if (data !== undefined) {\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n }\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n // sendrecv の場合、multistream に初期値を指定する\n const sendrecvOptions: ConnectionOptions = Object.assign({ multistream: true }, options);\n return new ConnectionPublisher(\n this.signalingUrlCandidates,\n \"sendrecv\",\n channelId,\n metadata,\n sendrecvOptions,\n this.debug\n );\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","BYTES_PER_ELEMENT","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","multistream","signaling_notify_metadata","signalingNotifyMetadata","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","simulcast","simalcastRids","simulcastRid","simulcast_rid","clientId","client_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","connectedSignalingUrl","contactSignalingUrl","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","stopStream","getTracks","dataChannel","initializeConnection","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","signalingTerminate","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","abendPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmount","bufferedAmountLowThreshold","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","target","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","ontrack","streams","muted","onremovetrack","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendrecvOptions","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMediaStreamConstraints","mediastream","applyConstraints"],"mappings":"qOAWA,MAAMA,EACFC,cAII,MADoCC,aAAaC,UAAUC,qBAEvD,MAAM,IAAIC,MAAM,0CAEpBC,KAAKC,OAAS,KACdD,KAAKE,mBAAqB,KAG9BC,cAEI,MAAMC,EAAeC,KAfP,wjwBAgBdL,KAAKC,OAAS,IAAIK,OAAOC,IAAIC,gBAAgB,IAAIC,KAAK,CAACL,GAAe,CAAEM,KAAM,6BAC9EV,KAAKC,OAAOU,UAAaC,IACrB,MAAMC,UAAEA,GAAcD,EAAME,KACV,eAAdD,GAAiE,mBAA5Bb,KAAKE,oBAC1CF,KAAKE,sBAKjBa,cACQf,KAAKC,QACLD,KAAKC,OAAOe,YAAY,CACpBN,KAAM,UAKlBO,kBACQjB,KAAKC,QACLD,KAAKC,OAAOiB,YAIpBC,aACI,MAAMC,aAAEA,SAAuBC,OAAOC,KAAKC,OAC3C,OAAOH,EAEXI,qBAAqBC,GACjB,IAAKA,EAAOC,MACR,OAGJ,MAAMC,EAAgBF,EAAO3B,uBACvB8B,EAAiBD,EAAcC,gBAAkBD,EAAcE,SAC/DC,EAAiBH,EAAcG,gBAAkBH,EAAcI,SACrE,IAAK/B,KAAKC,OACN,MAAM,IAAIF,MAAM,gDAEpB,MAAMiC,EAAU,CACZtB,KAAM,UACNkB,eAAgBA,EAChBE,eAAgBA,GAEpB9B,KAAKC,OAAOe,YAAYgB,EAAS,CAACJ,EAAgBE,IAEtDG,uBAAuBC,GAEnB,MAAMC,EAAkBD,EAASpC,uBAC3B8B,EAAiBO,EAAgBP,gBAAkBO,EAAgBN,SACnEC,EAAiBK,EAAgBL,gBAAkBK,EAAgBJ,SACzE,IAAK/B,KAAKC,OACN,MAAM,IAAIF,MAAM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A6B,CAAEM,OAAO,EAAMC,OAAO,IAGnD,MAAMmT,EAAqCztB,OAAOkM,OAAO,CAAEqO,aAAa,GAAQR,GAChF,OAAO,IAAI0S,GACT3wB,KAAKmkB,uBACL,WACApG,EACAC,EACA2T,EACA3xB,KAAK2O,OAqBTijB,SACE7T,EACAC,EAAqB,KACrBC,EAA6B,CAAEM,OAAO,EAAMC,OAAO,IAEnD,OAAO,IAAImS,GAAoB3wB,KAAKmkB,uBAAwB,WAAYpG,EAAWC,EAAUC,EAASje,KAAK2O,OAoB7GkjB,SACE9T,EACAC,EAAqB,KACrBC,EAA6B,CAAEM,OAAO,EAAMC,OAAO,IAEnD,OAAO,IAAI6S,GAAqBrxB,KAAKmkB,uBAAwB,WAAYpG,EAAWC,EAAUC,EAASje,KAAK2O,OAQ1Gkb,mBACF,OAAO7pB,KAAKmkB,8BAOD,CAYb2N,SAAU3wB,eAAgBuC,SAClBhE,EAASqyB,SAASruB,IAgB1BsuB,WAAY,SAAU7N,EAA2CxV,GAAQ,GACvE,OAAO,IAAI8iB,GAAetN,EAAwBxV,IAOpDoC,QAAS,WACP,MAAO,qBAOTkhB,QAAS,CACPC,4BCnMJ/wB,eACEgxB,EACA3N,GAEA,GAAIA,EAAYjG,OAAsC,kBAAtBiG,EAAYjG,MAC1C,IAAK,MAAM7c,KAASywB,EAAYlM,uBACxBvkB,EAAM0wB,iBAAiB5N,EAAYjG,OAG7C,GAAIiG,EAAYhG,OAAsC,kBAAtBgG,EAAYhG,MAC1C,IAAK,MAAM9c,KAASywB,EAAY1L,uBACxB/kB,EAAM0wB,iBAAiB5N,EAAYhG"} \ No newline at end of file +{"version":3,"file":"sora.min.js","sources":["../packages/e2ee/dist/sora_e2ee.mjs","../node_modules/fflate/esm/browser.js","../packages/sdk/src/utils.ts","../packages/sdk/src/base.ts","../packages/sdk/src/publisher.ts","../packages/sdk/src/subscriber.ts","../packages/sdk/src/sora.ts","../packages/sdk/src/helpers.ts"],"sourcesContent":["/**\n * @sora/e2ee\n * WebRTC SFU Sora JavaScript E2EE Library\n * @version: 2021.1.0\n * @author: Shiguredo Inc.\n * @license: Apache-2.0\n **/\n\n// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nfunction WasmExec () {\n\t(() => {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") ; else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t};\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t};\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t};\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});\n\t\t}\n\t})();\n}\n\nconst WORKER_SCRIPT = \"InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCkgPSBsb2coeCkgLyBsb2coMjU2KQogICAgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5sb2cobikgLyBNYXRoLmxvZygyICoqIDgpICsgMSk7Cn0KZnVuY3Rpb24gYXJyYXlCdWZmZXJUb051bWJlcihhcnJheUJ1ZmZlcikgewogICAgLy8gMzJiaXQg44G+44Gn44KS5oOz5a6aIChCaWdJbnQg44G444Gu5pu444GN5o+b44GI5pmC44Gr6KaB5L+u5q2jKQogICAgY29uc3QgbmV3QXJyYXlCdWZmZXIgPSBuZXcgQXJyYXlCdWZmZXIoVWludDMyQXJyYXkuQllURVNfUEVSX0VMRU1FTlQpOwogICAgY29uc3QgbmV3RGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcobmV3QXJyYXlCdWZmZXIpOwogICAgY29uc3QgZGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcoYXJyYXl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WQsIHNlbGZLZXlJZCwgZGVyaXZlS2V5KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgZ2VuZXJhdGVXcml0ZUlWKG1hdGVyaWFsKS50aGVuKCh3cml0ZUlWKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2V0V3JpdGVJVihzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5lY3Rpb25JZCwga2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBzZXRMYXRlc3RSZW1vdGVLZXlJZChjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gInJlbW92ZVJlbW90ZURlcml2ZUtleSIpIHsKICAgICAgICBjb25zdCB7IGNvbm5lY3Rpb25JZCB9ID0gZXZlbnQuZGF0YTsKICAgICAgICByZW1vdmVEZXJpdmVLZXkoY29ubmVjdGlvbklkKTsKICAgIH0KICAgIGVsc2UgaWYgKHR5cGUgPT09ICJlbmNyeXB0IikgewogICAgICAgIGNvbnN0IHsgcmVhZGFibGVTdHJlYW0sIHdyaXRhYmxlU3RyZWFtIH0gPSBldmVudC5kYXRhOwogICAgICAgIGNvbnN0IHRyYW5zZm9ybVN0cmVhbSA9IG5ldyBUcmFuc2Zvcm1TdHJlYW0oewogICAgICAgICAgICB0cmFuc2Zvcm06IGVuY3J5cHRGdW5jdGlvbiwKICAgICAgICB9KTsKICAgICAgICByZWFkYWJsZVN0cmVhbS5waXBlVGhyb3VnaCh0cmFuc2Zvcm1TdHJlYW0pLnBpcGVUbyh3cml0YWJsZVN0cmVhbSk7CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAiZGVjcnlwdCIpIHsKICAgICAgICBjb25zdCB7IHJlYWRhYmxlU3RyZWFtLCB3cml0YWJsZVN0cmVhbSB9ID0gZXZlbnQuZGF0YTsKICAgICAgICBjb25zdCB0cmFuc2Zvcm1TdHJlYW0gPSBuZXcgVHJhbnNmb3JtU3RyZWFtKHsKICAgICAgICAgICAgdHJhbnNmb3JtOiBkZWNyeXB0RnVuY3Rpb24sCiAgICAgICAgfSk7CiAgICAgICAgcmVhZGFibGVTdHJlYW0ucGlwZVRocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=\";\nclass SoraE2EE {\n constructor() {\n // 対応しているかどうかの判断\n // @ts-ignore トライアル段階の API なので無視する\n const supportsInsertableStreams = !!RTCRtpSender.prototype.createEncodedStreams;\n if (!supportsInsertableStreams) {\n throw new Error(\"E2EE is not supported in this browser.\");\n }\n this.worker = null;\n this.onWorkerDisconnect = null;\n }\n // worker を起動する\n startWorker() {\n // ワーカーを起動する\n const workerScript = atob(WORKER_SCRIPT);\n this.worker = new Worker(URL.createObjectURL(new Blob([workerScript], { type: \"application/javascript\" })));\n this.worker.onmessage = (event) => {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n // role: sendrecv で multistream: false の場合は例外を発生させる\n if (role === \"sendrecv\" && options.multistream !== true) {\n throw new Error(\"Failed to parse options. Options multistream must be true when connecting using 'sendrecv'\");\n }\n\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n\n if (redirect) {\n message.redirect = true;\n }\n\n if (\"signalingNotifyMetadata\" in options) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n\n if (\"multistream\" in options && options.multistream === true) {\n // multistream\n message.multistream = true;\n // spotlight\n if (\"spotlight\" in options) {\n message.spotlight = options.spotlight;\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n }\n if (message.spotlight === true) {\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n }\n }\n\n if (\"simulcast\" in options || \"simulcastRid\" in options) {\n // simulcast\n if (\"simulcast\" in options && options.simulcast === true) {\n message.simulcast = true;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n }\n\n // client_id\n if (\"clientId\" in options && options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n\n if (\"dataChannelSignaling\" in options && typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (\"ignoreDisconnectWebSocket\" in options && typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n message.e2ee = true;\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WS シグナリングで type offer メッセージを受信したシグナリング URL\n */\n connectedSignalingUrl: string;\n /**\n * WS シグナリングで最初に type connect を送信したシグナリング URL\n */\n contactSignalingUrl: string;\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.connectedSignalingUrl = \"\";\n this.contactSignalingUrl = \"\";\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * stream を停止するメソッド\n */\n private stopStream(): Promise {\n return new Promise((resolve, _) => {\n if (this.debug) {\n console.warn(\n \"@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself.\"\n );\n }\n if (!this.stream) {\n return resolve();\n }\n this.stream.getTracks().forEach((t) => {\n t.stop();\n });\n this.stream = null;\n return resolve();\n });\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private async signalingTerminate(): Promise {\n await this.stopStream();\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private async abendPeerConnectionState(title: SoraAbendTitle): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.contactSignalingUrl = \"\";\n this.connectedSignalingUrl = \"\";\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = async (event): Promise => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n this.connectedSignalingUrl = ws.url;\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n try {\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n } catch (error) {\n reject(error);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n // 初回に接続した URL を状態管理する\n if (!redirect) {\n this.contactSignalingUrl = ws.url;\n this.writeWebSocketSignalingLog(\"contact-signaling-url\", this.contactSignalingUrl);\n }\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = async (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = async (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n await this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = async (_): Promise => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = async (_): Promise => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n await this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(async () => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n await this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n dataChannel.bufferedAmountLowThreshold = 65536;\n dataChannel.binaryType = \"arraybuffer\";\n this.soraDataChannels[dataChannel.label] = dataChannel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const dataChannel = event.target as RTCDataChannel;\n let data: ArrayBuffer | undefined = undefined;\n if (typeof event.data === \"string\") {\n data = new TextEncoder().encode(event.data);\n } else if (event.data instanceof ArrayBuffer) {\n data = event.data;\n } else {\n console.warn(\"Received onmessage event data is not of type String or ArrayBuffer.\");\n }\n\n if (data !== undefined) {\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n }\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n if (dataChannel.readyState !== \"open\") {\n throw new Error(\"Messaging DataChannel is not open\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n // sendrecv の場合、multistream に初期値を指定する\n const sendrecvOptions: ConnectionOptions = Object.assign({ multistream: true }, options);\n return new ConnectionPublisher(\n this.signalingUrlCandidates,\n \"sendrecv\",\n channelId,\n metadata,\n sendrecvOptions,\n this.debug\n );\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","BYTES_PER_ELEMENT","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","multistream","signaling_notify_metadata","signalingNotifyMetadata","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","simulcast","simalcastRids","simulcastRid","simulcast_rid","clientId","client_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","connectedSignalingUrl","contactSignalingUrl","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","stopStream","getTracks","dataChannel","initializeConnection","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","signalingTerminate","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","abendPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmountLowThreshold","bufferedAmount","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","target","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","ontrack","streams","muted","onremovetrack","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendrecvOptions","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMediaStreamConstraints","mediastream","applyConstraints"],"mappings":"qOAslBA,MAAMA,EACFC,cAII,MADoCC,aAAaC,UAAUC,qBAEvD,MAAM,IAAIC,MAAM,0CAEpBC,KAAKC,OAAS,KACdD,KAAKE,mBAAqB,KAG9BC,cAEI,MAAMC,EAAeC,KAfP,wjwBAgBdL,KAAKC,OAAS,IAAIK,OAAOC,IAAIC,gBAAgB,IAAIC,KAAK,CAACL,GAAe,CAAEM,KAAM,6BAC9EV,KAAKC,OAAOU,UAAaC,IACrB,MAAMC,UAAEA,GAAcD,EAAME,KACV,eAAdD,GAAiE,mBAA5Bb,KAAKE,oBAC1CF,KAAKE,sBAKjBa,cACQf,KAAKC,QACLD,KAAKC,OAAOe,YAAY,CACpBN,KAAM,UAKlBO,kBACQjB,KAAKC,QACLD,KAAKC,OAAOiB,YAIpBC,aACI,M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8BAOD,CAYb2N,SAAU3wB,eAAgBuC,SAClBhE,EAASqyB,SAASruB,IAgB1BsuB,WAAY,SAAU7N,EAA2CxV,GAAQ,GACvE,OAAO,IAAI8iB,GAAetN,EAAwBxV,IAOpDoC,QAAS,WACP,MAAO,qBAOTkhB,QAAS,CACPC,4BCnMJ/wB,eACEgxB,EACA3N,GAEA,GAAIA,EAAYjG,OAAsC,kBAAtBiG,EAAYjG,MAC1C,IAAK,MAAM7c,KAASywB,EAAYlM,uBACxBvkB,EAAM0wB,iBAAiB5N,EAAYjG,OAG7C,GAAIiG,EAAYhG,OAAsC,kBAAtBgG,EAAYhG,MAC1C,IAAK,MAAM9c,KAASywB,EAAY1L,uBACxB/kB,EAAM0wB,iBAAiB5N,EAAYhG"} \ No newline at end of file diff --git a/dist/sora.mjs b/dist/sora.mjs index 56f53c8b..60fe0605 100644 --- a/dist/sora.mjs +++ b/dist/sora.mjs @@ -1,7 +1,15 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2022.1.0-canary.2 + * @version: 2022.1.0-canary.3 + * @author: Shiguredo Inc. + * @license: Apache-2.0 + **/ + +/** + * @sora/e2ee + * WebRTC SFU Sora JavaScript E2EE Library + * @version: 2021.1.0 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -595,14 +603,6 @@ function WasmExec () { })(); } -/** - * @sora/e2ee - * WebRTC SFU Sora JavaScript E2EE Library - * @version: 2021.1.0 - * @author: Shiguredo Inc. - * @license: Apache-2.0 - **/ - const WORKER_SCRIPT = "InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCk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AgICAgLy8g5LuK5Zue44GvIHMgZmxhZyDjga8gMCDjga7jgb8KICAgICAgICBpZiAocyAhPT0gMCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlVORVhQRUNURUQtUy1GTEFHIik7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGRlcml2ZUtleSA9IGdldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICBpZiAoIWRlcml2ZUtleSkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGl2ID0gZ2VuZXJhdGVJVihjb3VudCwgY29ubmVjdGlvbklkLCBrZXlJZCk7CiAgICAgICAgaWYgKCFpdikgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGZyYW1lQWRkID0gZW5jb2RlRnJhbWVBZGQoZnJhbWVNZXRhZGF0YSwgc2ZyYW1lSGVhZGVyLCBjb25uZWN0aW9uSWQpOwogICAgICAgIGNyeXB0by5zdWJ0bGUKICAgICAgICAgICAgLmRlY3J5cHQoewogICAgICAgICAgICBuYW1lOiAiQUVTLUdDTSIsCiAgICAgICAgICAgIGl2OiBpdiwKICAgICAgICAgICAgYWRkaXRpb25hbERhdGE6IGZyYW1lQWRkLAogICAgICAgIH0sIGRlcml2ZUtleSwgbmV3IFVpbnQ4QXJyYXkoZW5jcnlwdGVkRnJhbWVCdWZmZXIpKQogICAgICAgICAgICAudGhlbigocGxhaW5UZXh0KSA9PiB7CiAgICAgICAgICAgIGNvbnN0IG5ld0RhdGEgPSBuZXcgQXJyYXlCdWZmZXIoZnJhbWVNZXRhZGF0YUJ1ZmZlci5ieXRlTGVuZ3RoICsgcGxhaW5UZXh0LmJ5dGVMZW5ndGgpOwogICAgICAgICAgICBjb25zdCBuZXdVaW50OCA9IG5ldyBVaW50OEFycmF5KG5ld0RhdGEpOwogICAgICAgICAgICBuZXdVaW50OC5zZXQobmV3IFVpbnQ4QXJyY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xmS2V5SWQsIHdhaXRpbmdUaW1lIH0gPSBldmVudC5kYXRhOwogICAgICAgIGNvbnN0IHRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWxmU2VjcmV0S2V5TWF0ZXJpYWwuYnVmZmVyLCAiSEtERiIsIGZhbHNlLCBbImRlcml2ZUJpdHMiLCAiZGVyaXZlS2V5Il0pCiAgICAgICAgICAgICAgICAudGhlbigobWF0ZXJpYWwpID0+IHsKICAgICAgICAgICAgICAgIGdlbmVyYXRlRGVyaXZlS2V5KG1hdGVyaWFsKS50aGVuKChkZXJpdmVLZXkpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRTZWxmRGVyaXZlS2V5KHNlbGZDb25uZWN0aW9uSWQsIHNlbGZLZXlJZCwgZGVyaXZlS2V5KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgZ2VuZXJhdGVXcml0ZUlWKG1hdGVyaWFsKS50aGVuKCh3cml0ZUlWKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2V0V3JpdGVJVihzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5lY3Rpb25JZCwga2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBzZXRMYXRlc3RSZW1vdGVLZXlJZChjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gInJlbW92ZVJlbW90ZURlcml2ZUtleSIpIHsKICAgICAgICBjb25zdCB7IGNvbm5lY3R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fQp9Owo="; class SoraE2EE { constructor() { @@ -1627,7 +1627,7 @@ function createSignalingMessage(offerSDP, role, channelId, metadata, options, re } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2022.1.0-canary.2", + sora_client: "Sora JavaScript SDK 2022.1.0-canary.3", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -3335,9 +3335,6 @@ class ConnectionBase { /** * createOffer 処理をするメソッド * - * @param eventType - イベントタイプ - * @param data - イベントデータ - * * @returns * 生成した RTCSessionDescription を返します */ @@ -3577,6 +3574,9 @@ class ConnectionBase { */ onDataChannel(dataChannelEvent) { const dataChannel = dataChannelEvent.channel; + dataChannel.bufferedAmountLowThreshold = 65536; + dataChannel.binaryType = "arraybuffer"; + this.soraDataChannels[dataChannel.label] = dataChannel; this.writeDataChannelTimelineLog("ondatachannel", dataChannel, createDataChannelData(dataChannel)); // onbufferedamountlow dataChannelEvent.channel.onbufferedamountlow = (event) => { @@ -3586,9 +3586,6 @@ class ConnectionBase { // onopen dataChannelEvent.channel.onopen = (event) => { const channel = event.currentTarget; - channel.bufferedAmountLowThreshold = 65536; - channel.binaryType = "arraybuffer"; - this.soraDataChannels[channel.label] = channel; this.trace("OPEN DATA CHANNEL", channel.label); if (channel.label === "signaling" && this.ws) { this.writeDataChannelSignalingLog("onopen", channel); @@ -3846,6 +3843,9 @@ class ConnectionBase { if (dataChannel === undefined) { throw new Error("Could not find DataChannel"); } + if (dataChannel.readyState !== "open") { + throw new Error("Messaging DataChannel is not open"); + } const settings = this.signalingOfferMessageDataChannels[label]; if (settings !== undefined && settings.compress === true) { const zlibMessage = zlibSync(message, {}); @@ -4026,6 +4026,7 @@ class ConnectionPublisher extends ConnectionBase { return; } const data = { + // eslint-disable-next-line @typescript-eslint/naming-convention "stream.id": stream.id, id: event.track.id, label: event.track.label, @@ -4102,8 +4103,6 @@ class ConnectionSubscriber extends ConnectionBase { * await recvonly.connect(); * ``` * - * @param stream - メディアストリーム - * * @public */ async connect() { @@ -4136,8 +4135,6 @@ class ConnectionSubscriber extends ConnectionBase { } /** * シングルストリームで Sora へ接続するメソッド - * - * @param stream - メディアストリーム */ async singleStream() { await this.disconnect(); @@ -4154,6 +4151,7 @@ class ConnectionSubscriber extends ConnectionBase { return; } const data = { + // eslint-disable-next-line @typescript-eslint/naming-convention "stream.id": streamId, id: event.track.id, label: event.track.label, @@ -4199,8 +4197,6 @@ class ConnectionSubscriber extends ConnectionBase { } /** * マルチストリームで Sora へ接続するメソッド - * - * @param stream - メディアストリーム */ async multiStream() { await this.disconnect(); @@ -4219,6 +4215,7 @@ class ConnectionSubscriber extends ConnectionBase { return; } const data = { + // eslint-disable-next-line @typescript-eslint/naming-convention "stream.id": stream.id, id: event.track.id, label: event.track.label, @@ -4413,7 +4410,7 @@ var sora = { * @public */ version: function () { - return "2022.1.0-canary.2"; + return "2022.1.0-canary.3"; }, /** * WebRTC のユーティリティ関数群 diff --git a/dist/subscriber.d.ts b/dist/subscriber.d.ts index 5f5368e4..9a5d22df 100644 --- a/dist/subscriber.d.ts +++ b/dist/subscriber.d.ts @@ -12,21 +12,15 @@ export default class ConnectionSubscriber extends ConnectionBase { * await recvonly.connect(); * ``` * - * @param stream - メディアストリーム - * * @public */ connect(): Promise; /** * シングルストリームで Sora へ接続するメソッド - * - * @param stream - メディアストリーム */ private singleStream; /** * マルチストリームで Sora へ接続するメソッド - * - * @param stream - メディアストリーム */ private multiStream; } diff --git a/package-lock.json b/package-lock.json index 15f0a71d..c70a7bf3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sora-js-sdk", - "version": "2022.1.0-canary.2", + "version": "2022.1.0-canary.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "sora-js-sdk", - "version": "2022.1.0-canary.2", + "version": "2022.1.0-canary.3", "license": "Apache-2.0", "workspaces": [ "packages/go-wasm", diff --git a/package.json b/package.json index d63b248c..166af896 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sora-js-sdk", - "version": "2022.1.0-canary.2", + "version": "2022.1.0-canary.3", "description": "WebRTC SFU Sora JavaScript SDK", "main": "dist/sora.min.js", "module": "dist/sora.mjs", From 804c8d45fc2649413728b5322b70a63730070b09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Mar 2022 02:30:53 +0000 Subject: [PATCH 48/86] Bump @typescript-eslint/eslint-plugin from 5.16.0 to 5.17.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.16.0 to 5.17.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.17.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 272 ++++++++++++++++++++++++++++++++------ packages/sdk/package.json | 2 +- 2 files changed, 233 insertions(+), 41 deletions(-) diff --git a/package-lock.json b/package-lock.json index c70a7bf3..71547865 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1466,9 +1466,9 @@ } }, "node_modules/@types/json-schema": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.10.tgz", - "integrity": "sha512-BLO9bBq59vW3fxCpD4o0N4U+DXsvwvIcl+jofw0frQo/GrBFC+/jRZj1E7kgp6dvTyNmA4y6JCV5Id/r3mNP5A==", + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, "node_modules/@types/node": { @@ -1514,14 +1514,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.16.0.tgz", - "integrity": "sha512-SJoba1edXvQRMmNI505Uo4XmGbxCK9ARQpkvOd00anxzri9RNQk0DDCxD+LIl+jYhkzOJiOMMKYEHnHEODjdCw==", + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz", + "integrity": "sha512-qVstvQilEd89HJk3qcbKt/zZrfBZ+9h2ynpAGlWjWiizA7m/MtLT9RoX6gjtpE500vfIg8jogAkDzdCxbsFASQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.16.0", - "@typescript-eslint/type-utils": "5.16.0", - "@typescript-eslint/utils": "5.16.0", + "@typescript-eslint/scope-manager": "5.17.0", + "@typescript-eslint/type-utils": "5.17.0", + "@typescript-eslint/utils": "5.17.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1546,6 +1546,53 @@ } } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz", + "integrity": "sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.17.0", + "@typescript-eslint/visitor-keys": "5.17.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.17.0.tgz", + "integrity": "sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz", + "integrity": "sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.17.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/parser": { "version": "5.16.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.16.0.tgz", @@ -1591,12 +1638,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.16.0.tgz", - "integrity": "sha512-SKygICv54CCRl1Vq5ewwQUJV/8padIWvPgCxlWPGO/OgQLCijY9G7lDu6H+mqfQtbzDNlVjzVWQmeqbLMBLEwQ==", + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz", + "integrity": "sha512-3hU0RynUIlEuqMJA7dragb0/75gZmwNwFf/QJokWzPehTZousP/MNifVSgjxNcDCkM5HI2K22TjQWUmmHUINSg==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.16.0", + "@typescript-eslint/utils": "5.17.0", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -1657,15 +1704,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.16.0.tgz", - "integrity": "sha512-iYej2ER6AwmejLWMWzJIHy3nPJeGDuCqf8Jnb+jAQVoPpmWzwQOfa9hWVB8GIQE5gsCv/rfN4T+AYb/V06WseQ==", + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.17.0.tgz", + "integrity": "sha512-DVvndq1QoxQH+hFv+MUQHrrWZ7gQ5KcJzyjhzcqB1Y2Xes1UQQkTRPUfRpqhS8mhTWsSb2+iyvDW1Lef5DD7vA==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.16.0", - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/typescript-estree": "5.16.0", + "@typescript-eslint/scope-manager": "5.17.0", + "@typescript-eslint/types": "5.17.0", + "@typescript-eslint/typescript-estree": "5.17.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1680,6 +1727,80 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz", + "integrity": "sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.17.0", + "@typescript-eslint/visitor-keys": "5.17.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.17.0.tgz", + "integrity": "sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz", + "integrity": "sha512-X1gtjEcmM7Je+qJRhq7ZAAaNXYhTgqMkR10euC4Si6PIjb+kwEQHSxGazXUQXFyqfEXdkGf6JijUu5R0uceQzg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.17.0", + "@typescript-eslint/visitor-keys": "5.17.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz", + "integrity": "sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.17.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/visitor-keys": { "version": "5.16.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", @@ -8502,7 +8623,7 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.1", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.16.0", + "@typescript-eslint/eslint-plugin": "5.17.0", "@typescript-eslint/parser": "5.16.0", "eslint": "8.11.0", "eslint-config-prettier": "8.5.0", @@ -9579,7 +9700,7 @@ "@rollup/plugin-typescript": "^8.3.1", "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.16.0", + "@typescript-eslint/eslint-plugin": "5.17.0", "@typescript-eslint/parser": "5.16.0", "eslint": "8.11.0", "eslint-config-prettier": "8.5.0", @@ -9699,9 +9820,9 @@ } }, "@types/json-schema": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.10.tgz", - "integrity": "sha512-BLO9bBq59vW3fxCpD4o0N4U+DXsvwvIcl+jofw0frQo/GrBFC+/jRZj1E7kgp6dvTyNmA4y6JCV5Id/r3mNP5A==", + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, "@types/node": { @@ -9747,20 +9868,48 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.16.0.tgz", - "integrity": "sha512-SJoba1edXvQRMmNI505Uo4XmGbxCK9ARQpkvOd00anxzri9RNQk0DDCxD+LIl+jYhkzOJiOMMKYEHnHEODjdCw==", + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz", + "integrity": "sha512-qVstvQilEd89HJk3qcbKt/zZrfBZ+9h2ynpAGlWjWiizA7m/MtLT9RoX6gjtpE500vfIg8jogAkDzdCxbsFASQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.16.0", - "@typescript-eslint/type-utils": "5.16.0", - "@typescript-eslint/utils": "5.16.0", + "@typescript-eslint/scope-manager": "5.17.0", + "@typescript-eslint/type-utils": "5.17.0", + "@typescript-eslint/utils": "5.17.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", "regexpp": "^3.2.0", "semver": "^7.3.5", "tsutils": "^3.21.0" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz", + "integrity": "sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.17.0", + "@typescript-eslint/visitor-keys": "5.17.0" + } + }, + "@typescript-eslint/types": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.17.0.tgz", + "integrity": "sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==", + "dev": true + }, + "@typescript-eslint/visitor-keys": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz", + "integrity": "sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.17.0", + "eslint-visitor-keys": "^3.0.0" + } + } } }, "@typescript-eslint/parser": { @@ -9786,12 +9935,12 @@ } }, "@typescript-eslint/type-utils": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.16.0.tgz", - "integrity": "sha512-SKygICv54CCRl1Vq5ewwQUJV/8padIWvPgCxlWPGO/OgQLCijY9G7lDu6H+mqfQtbzDNlVjzVWQmeqbLMBLEwQ==", + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz", + "integrity": "sha512-3hU0RynUIlEuqMJA7dragb0/75gZmwNwFf/QJokWzPehTZousP/MNifVSgjxNcDCkM5HI2K22TjQWUmmHUINSg==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.16.0", + "@typescript-eslint/utils": "5.17.0", "debug": "^4.3.2", "tsutils": "^3.21.0" } @@ -9818,17 +9967,60 @@ } }, "@typescript-eslint/utils": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.16.0.tgz", - "integrity": "sha512-iYej2ER6AwmejLWMWzJIHy3nPJeGDuCqf8Jnb+jAQVoPpmWzwQOfa9hWVB8GIQE5gsCv/rfN4T+AYb/V06WseQ==", + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.17.0.tgz", + "integrity": "sha512-DVvndq1QoxQH+hFv+MUQHrrWZ7gQ5KcJzyjhzcqB1Y2Xes1UQQkTRPUfRpqhS8mhTWsSb2+iyvDW1Lef5DD7vA==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.16.0", - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/typescript-estree": "5.16.0", + "@typescript-eslint/scope-manager": "5.17.0", + "@typescript-eslint/types": "5.17.0", + "@typescript-eslint/typescript-estree": "5.17.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz", + "integrity": "sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.17.0", + "@typescript-eslint/visitor-keys": "5.17.0" + } + }, + "@typescript-eslint/types": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.17.0.tgz", + "integrity": "sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz", + "integrity": "sha512-X1gtjEcmM7Je+qJRhq7ZAAaNXYhTgqMkR10euC4Si6PIjb+kwEQHSxGazXUQXFyqfEXdkGf6JijUu5R0uceQzg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.17.0", + "@typescript-eslint/visitor-keys": "5.17.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz", + "integrity": "sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.17.0", + "eslint-visitor-keys": "^3.0.0" + } + } } }, "@typescript-eslint/visitor-keys": { diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 2ba6d34e..4a73d1a8 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -13,7 +13,7 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.1", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.16.0", + "@typescript-eslint/eslint-plugin": "5.17.0", "@typescript-eslint/parser": "5.16.0", "eslint": "8.11.0", "eslint-config-prettier": "8.5.0", From acce700c230241bbfd2923a9db8887ee82ff1a3c Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 29 Mar 2022 11:39:00 +0900 Subject: [PATCH 49/86] 2022.1.0-canary.4 --- dist/sora.js | 10 ++++++---- dist/sora.min.js | 2 +- dist/sora.min.js.map | 2 +- dist/sora.mjs | 10 ++++++---- dist/types.d.ts | 3 +++ package-lock.json | 4 ++-- package.json | 2 +- 7 files changed, 20 insertions(+), 13 deletions(-) diff --git a/dist/sora.js b/dist/sora.js index 92058ebe..aae0bfd4 100644 --- a/dist/sora.js +++ b/dist/sora.js @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2022.1.0-canary.3 + * @version: 2022.1.0-canary.4 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -1633,7 +1633,7 @@ } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2022.1.0-canary.3", + sora_client: "Sora JavaScript SDK 2022.1.0-canary.4", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -1684,10 +1684,12 @@ message.simulcast_rid = options.simulcastRid; } } - // client_id if ("clientId" in options && options.clientId !== undefined) { message.client_id = options.clientId; } + if ("bundleId" in options && options.bundleId !== undefined) { + message.bundle_id = options.bundleId; + } if ("dataChannelSignaling" in options && typeof options.dataChannelSignaling === "boolean") { message.data_channel_signaling = options.dataChannelSignaling; } @@ -4416,7 +4418,7 @@ * @public */ version: function () { - return "2022.1.0-canary.3"; + return "2022.1.0-canary.4"; }, /** * WebRTC のユーティリティ関数群 diff --git a/dist/sora.min.js b/dist/sora.min.js index dd0528e2..ef896251 100644 --- a/dist/sora.min.js +++ b/dist/sora.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sora=t()}(this,(function(){"use strict";class e{constructor(){if(!!!RTCRtpSender.prototype.createEncodedStreams)throw new Error("E2EE is not supported in this browser.");this.worker=null,this.onWorkerDisconnect=null}startWorker(){const e=atob("InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCkgPSBsb2coeCkgLyBsb2coMjU2KQogICAgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5sb2cobikgLyBNYXRoLmxvZygyICoqIDgpICsgMSk7Cn0KZnVuY3Rpb24gYXJyYXlCdWZmZXJUb051bWJlcihhcnJheUJ1ZmZlcikgewogICAgLy8gMzJiaXQg44G+44Gn44KS5oOz5a6aIChCaWdJbnQg44G444Gu5pu444GN5o+b44GI5pmC44Gr6KaB5L+u5q2jKQogICAgY29uc3QgbmV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aXZlS2V5Il0pCiAgICAgICAgICAgICAgICAudGhlbigobWF0ZXJpYWwpID0+IHsKICAgICAgICAgICAgICAgIGdlbmVyYXRlRGVyaXZlS2V5KG1hdGVyaWFsKS50aGVuKChkZXJpdmVLZXkpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRTZWxmRGVyaXZlS2V5KHNlbGZDb25uZWN0aW9uSWQsIHNlbGZLZXlJZCwgZGVyaXZlS2V5KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgZ2VuZXJhdGVXcml0ZUlWKG1hdGVyaWFsKS50aGVuKCh3cml0ZUlWKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2V0V3JpdGVJVihzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5lY3Rpb25JZCwga2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBzZXRMYXRlc3RSZW1vdGVLZXlJZChjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gInJlbW92ZVJlbW90ZURlcml2ZUtleSIpIHsKICAgICAgICBjb25zdCB7IGNvbm5lY3Rpb25JZCB9ID0gZXZlbnQuZGF0YTsKICAgICAgICByZW1vdmVEZXJpdmVLZXkoY29ubmVjdGlvbklkKTsKICAgIH0KICAgIGVsc2UgaWYgKHR5cGUgPT09ICJlbmNyeXB0IikgewogICAgICAgIGNvbnN0IHsgcmVhZGFibGVTdHJlYW0sIHdyaXRhYmxlU3RyZWFtIH0gPSBldmVudC5kYXRhOwogICAgICAgIGNvbnN0IHRyYW5zZm9ybVN0cmVhbSA9IG5ldyBUcmFuc2Zvcm1TdHJlYW0oewogICAgICAgICAgICB0cmFuc2Zvcm06IGVuY3J5cHRGdW5jdGlvbiwKICAgICAgICB9KTsKICAgICAgICByZWFkYWJsZVN0cmVhbS5waXBlVGhyb3VnaCh0cmFuc2Zvcm1TdHJlYW0pLnBpcGVUbyh3cml0YWJsZVN0cmVhbSk7CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAiZGVjcnlwdCIpIHsKICAgICAgICBjb25zdCB7IHJlYWRhYmxlU3RyZWFtLCB3cml0YWJsZVN0cmVhbSB9ID0gZXZlbnQuZGF0YTsKICAgICAgICBjb25zdCB0cmFuc2Zvcm1TdHJlYW0gPSBuZXcgVHJhbnNmb3JtU3RyZWFtKHsKICAgICAgICAgICAgdHJhbnNmb3JtOiBkZWNyeXB0RnVuY3Rpb24sCiAgICAgICAgfSk7CiAgICAgICAgcmVhZGFibGVTdHJlYW0ucGlwZVRocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=");this.worker=new Worker(URL.createObjectURL(new Blob([e],{type:"application/javascript"}))),this.worker.onmessage=e=>{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var p=new t(32);for(m=0;m<32;++m)p[m]=5;var Z=A(b,9,0),w=A(b,9,1),S=A(p,5,0),V=A(p,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(2==e.BYTES_PER_ELEMENT?n:4==e.BYTES_PER_ELEMENT?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},E=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},X=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=O(s[C-1],m,0);if(u>i){a=0;var A=0,b=u-i,p=1<i))break;A+=p-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},O=function(e,t,n){return-1==e.s?Math.max(O(e.l,t,n+1),O(e.r,t,n+1)):t[e.s]=n},B=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},N=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!J[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=N(g,b)+N(r,p)+c,z=N(g,u)+N(r,f)+c+14+3*U+N(K,J)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(C,C+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=Z,j=b,Q=S,H=p;for(L=0;L255){te=l[L]>>>18&31;E(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];E(t,I,Q[ne]),I+=H[ne],ne>3&&(E(t,I,l[L]>>>5&8191),I+=a[ne])}else E(t,I,M[l[L]]),I+=j[l[L]];return E(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),D=new t(0),J=function(e,o,l,g,r){return function(e,o,l,g,r,d){var C=e.length,I=new t(g+C+5*(1+Math.ceil(C/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||C<8)for(var A=0;A<=C;A+=65535){var b=A+65535;b>=C&&(m[u>>3]=d),u=Y(m,u+1,e.subarray(A,b))}else{for(var p=L[o-1],Z=p>>>13,w=8191&p,S=(1<7e3||B>24576)&&j>423){u=K(e,m,0,v,T,E,O,B,J,A-J,u),B=X=O=0,J=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)E[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(Z,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[B++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];O+=s[ae]+a[oe],++T[257+ae],++E[oe],N=A+H,++X}else v[B++]=e[A],++T[e[A]]}}u=K(e,m,d,v,T,E,O,B,J,A-J,u),!d&&7&u&&(u=Y(m,u+1,D))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=J(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var d=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,p=i.m,Z=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,E=F+T;if(E>l){c&&v(0);break}g&&d(m+T),n.set(e.subarray(F,E),m),i.b=m+=T,i.p=I=8*E,i.f=h;continue}if(1==R)u=w,b=V,p=9,Z=5;else if(2==R){var X=y(e,I,31)+257,O=y(e,I+10,15)+4,B=X+y(e,I+5,31)+1;I+=14;for(var N=new t(B),Y=new t(19),K=0;K>>4)<16)N[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=N[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)N[K++]=M}}var Q=N.subarray(0,X),H=N.subarray(X);p=f(Q),Z=f(H),u=A(Q,p,1),b=A(H,Z,1)}else v(1);if(I>S){c&&v(0);break}}g&&d(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=C[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&d(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(D,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0-canary.3",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if("sendrecv"===t&&!0!==s.multistream)throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'");if(void 0!==i&&(o.metadata=i),a&&(o.redirect=!0),"signalingNotifyMetadata"in s&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),"multistream"in s&&!0===s.multistream&&(o.multistream=!0,"spotlight"in s&&(o.spotlight=s.spotlight,"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber)),!0===o.spotlight)){const e=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=e.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=e.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid)}if("simulcast"in s||"simulcastRid"in s){"simulcast"in s&&!0===s.simulcast&&(o.simulcast=!0);const e=["r0","r1","r2"];void 0!==s.simulcastRid&&0<=e.indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid)}"clientId"in s&&void 0!==s.clientId&&(o.client_id=s.clientId),"dataChannelSignaling"in s&&"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"ignoreDisconnectWebSocket"in s&&"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const l=["audioCodecType","audioBitRate"],g=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],r=["videoCodecType","videoBitRate"],c=Object.assign({},s);Object.keys(c).forEach((e=>{"audio"===e&&"boolean"==typeof c[e]||"video"===e&&"boolean"==typeof c[e]||0<=l.indexOf(e)&&null!==c[e]||0<=g.indexOf(e)&&null!==c[e]||0<=r.indexOf(e)&&null!==c[e]||delete c[e]})),void 0!==c.audio&&(o.audio=c.audio);const d=Object.keys(c).some((e=>0<=l.indexOf(e)));o.audio&&d&&(o.audio={},"audioCodecType"in c&&(o.audio.codec_type=c.audioCodecType),"audioBitRate"in c&&(o.audio.bit_rate=c.audioBitRate));const C=Object.keys(c).some((e=>0<=g.indexOf(e)));o.audio&&C&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in c&&(o.audio.opus_params.channels=c.audioOpusParamsChannels),"audioOpusParamsClockRate"in c&&(o.audio.opus_params.clock_rate=c.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in c&&(o.audio.opus_params.maxplaybackrate=c.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in c&&(o.audio.opus_params.stereo=c.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in c&&(o.audio.opus_params.sprop_stereo=c.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in c&&(o.audio.opus_params.minptime=c.audioOpusParamsMinptime),"audioOpusParamsPtime"in c&&(o.audio.opus_params.ptime=c.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in c&&(o.audio.opus_params.useinbandfec=c.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in c&&(o.audio.opus_params.usedtx=c.audioOpusParamsUsedtx)),void 0!==c.video&&(o.video=c.video);const h=Object.keys(c).some((e=>0<=r.indexOf(e)));if(o.video&&h&&(o.video={},"videoCodecType"in c&&(o.video.codec_type=c.videoCodecType),"videoBitRate"in c&&(o.video.bit_rate=c.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if(!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8"),o.e2ee=!0}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.connectedSignalingUrl="",this.contactSignalingUrl=""}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}stopStream(){return new Promise(((e,t)=>(this.debug&&console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."),this.stream?(this.stream.getTracks().forEach((e=>{e.stop()})),this.stream=null,e()):e())))}async signalingTerminate(){await this.stopStream();for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}async abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.contactSignalingUrl="",this.connectedSignalingUrl="",this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=async e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),await this.signalingTerminate(),s(t)},e.onmessage=async t=>{if(t.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",t.data),void this.signalingOnMessageE2EE(t.data);if("string"!=typeof t.data)throw new Error("Received invalid signaling data");const n=JSON.parse(t.data);if("offer"==n.type)this.writeWebSocketSignalingLog("onmessage-offer",n),this.signalingOnMessageTypeOffer(n),this.connectedSignalingUrl=e.url,i(n);else if("update"==n.type)this.writeWebSocketSignalingLog("onmessage-update",n),await this.signalingOnMessageTypeUpdate(n);else if("re-offer"==n.type)this.writeWebSocketSignalingLog("onmessage-re-offer",n),await this.signalingOnMessageTypeReOffer(n);else if("ping"==n.type)await this.signalingOnMessageTypePing(n);else if("push"==n.type)this.callbacks.push(n,"websocket");else if("notify"==n.type)"connection.created"===n.event_type?this.writeWebSocketTimelineLog("notify-connection.created",n):"connection.destroyed"===n.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",n),this.signalingOnMessageTypeNotify(n,"websocket");else if("switched"==n.type)this.writeWebSocketSignalingLog("onmessage-switched",n),this.signalingOnMessageTypeSwitched(n);else if("redirect"==n.type){this.writeWebSocketSignalingLog("onmessage-redirect",n);try{const e=await this.signalingOnMessageTypeRedirect(n);i(e)}catch(e){s(e)}}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e,t||(this.contactSignalingUrl=e.url,this.writeWebSocketSignalingLog("contact-signaling-url",this.contactSignalingUrl)))})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=async e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),await this.signalingTerminate(),t(n)},this.ws.onerror=async e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),await this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=async e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((async()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=async e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),await this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=e.target;let s;"string"==typeof e.data?s=(new TextEncoder).encode(e.data):e.data instanceof ArrayBuffer?s=e.data:console.warn("Received onmessage event data is not of type String or ArrayBuffer."),void 0!==s&&(!0===n.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(i.label,s)))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");if("open"!==n.readyState)throw new Error("Messaging DataChannel is not open");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var p=new t(32);for(m=0;m<32;++m)p[m]=5;var Z=A(b,9,0),w=A(b,9,1),S=A(p,5,0),V=A(p,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(2==e.BYTES_PER_ELEMENT?n:4==e.BYTES_PER_ELEMENT?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},E=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},X=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=O(s[C-1],m,0);if(u>i){a=0;var A=0,b=u-i,p=1<i))break;A+=p-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},O=function(e,t,n){return-1==e.s?Math.max(O(e.l,t,n+1),O(e.r,t,n+1)):t[e.s]=n},B=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},N=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!J[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=N(g,b)+N(r,p)+c,z=N(g,u)+N(r,f)+c+14+3*U+N(K,J)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(C,C+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=Z,j=b,Q=S,H=p;for(L=0;L255){te=l[L]>>>18&31;E(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];E(t,I,Q[ne]),I+=H[ne],ne>3&&(E(t,I,l[L]>>>5&8191),I+=a[ne])}else E(t,I,M[l[L]]),I+=j[l[L]];return E(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),D=new t(0),J=function(e,o,l,g,r){return function(e,o,l,g,r,d){var C=e.length,I=new t(g+C+5*(1+Math.ceil(C/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||C<8)for(var A=0;A<=C;A+=65535){var b=A+65535;b>=C&&(m[u>>3]=d),u=Y(m,u+1,e.subarray(A,b))}else{for(var p=L[o-1],Z=p>>>13,w=8191&p,S=(1<7e3||B>24576)&&j>423){u=K(e,m,0,v,T,E,O,B,J,A-J,u),B=X=O=0,J=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)E[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(Z,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[B++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];O+=s[ae]+a[oe],++T[257+ae],++E[oe],N=A+H,++X}else v[B++]=e[A],++T[e[A]]}}u=K(e,m,d,v,T,E,O,B,J,A-J,u),!d&&7&u&&(u=Y(m,u+1,D))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=J(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var d=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,p=i.m,Z=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,E=F+T;if(E>l){c&&v(0);break}g&&d(m+T),n.set(e.subarray(F,E),m),i.b=m+=T,i.p=I=8*E,i.f=h;continue}if(1==R)u=w,b=V,p=9,Z=5;else if(2==R){var X=y(e,I,31)+257,O=y(e,I+10,15)+4,B=X+y(e,I+5,31)+1;I+=14;for(var N=new t(B),Y=new t(19),K=0;K>>4)<16)N[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=N[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)N[K++]=M}}var Q=N.subarray(0,X),H=N.subarray(X);p=f(Q),Z=f(H),u=A(Q,p,1),b=A(H,Z,1)}else v(1);if(I>S){c&&v(0);break}}g&&d(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=C[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&d(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(D,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0-canary.4",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if("sendrecv"===t&&!0!==s.multistream)throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'");if(void 0!==i&&(o.metadata=i),a&&(o.redirect=!0),"signalingNotifyMetadata"in s&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),"multistream"in s&&!0===s.multistream&&(o.multistream=!0,"spotlight"in s&&(o.spotlight=s.spotlight,"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber)),!0===o.spotlight)){const e=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=e.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=e.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid)}if("simulcast"in s||"simulcastRid"in s){"simulcast"in s&&!0===s.simulcast&&(o.simulcast=!0);const e=["r0","r1","r2"];void 0!==s.simulcastRid&&0<=e.indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid)}"clientId"in s&&void 0!==s.clientId&&(o.client_id=s.clientId),"bundleId"in s&&void 0!==s.bundleId&&(o.bundle_id=s.bundleId),"dataChannelSignaling"in s&&"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"ignoreDisconnectWebSocket"in s&&"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const l=["audioCodecType","audioBitRate"],g=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],r=["videoCodecType","videoBitRate"],c=Object.assign({},s);Object.keys(c).forEach((e=>{"audio"===e&&"boolean"==typeof c[e]||"video"===e&&"boolean"==typeof c[e]||0<=l.indexOf(e)&&null!==c[e]||0<=g.indexOf(e)&&null!==c[e]||0<=r.indexOf(e)&&null!==c[e]||delete c[e]})),void 0!==c.audio&&(o.audio=c.audio);const d=Object.keys(c).some((e=>0<=l.indexOf(e)));o.audio&&d&&(o.audio={},"audioCodecType"in c&&(o.audio.codec_type=c.audioCodecType),"audioBitRate"in c&&(o.audio.bit_rate=c.audioBitRate));const C=Object.keys(c).some((e=>0<=g.indexOf(e)));o.audio&&C&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in c&&(o.audio.opus_params.channels=c.audioOpusParamsChannels),"audioOpusParamsClockRate"in c&&(o.audio.opus_params.clock_rate=c.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in c&&(o.audio.opus_params.maxplaybackrate=c.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in c&&(o.audio.opus_params.stereo=c.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in c&&(o.audio.opus_params.sprop_stereo=c.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in c&&(o.audio.opus_params.minptime=c.audioOpusParamsMinptime),"audioOpusParamsPtime"in c&&(o.audio.opus_params.ptime=c.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in c&&(o.audio.opus_params.useinbandfec=c.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in c&&(o.audio.opus_params.usedtx=c.audioOpusParamsUsedtx)),void 0!==c.video&&(o.video=c.video);const h=Object.keys(c).some((e=>0<=r.indexOf(e)));if(o.video&&h&&(o.video={},"videoCodecType"in c&&(o.video.codec_type=c.videoCodecType),"videoBitRate"in c&&(o.video.bit_rate=c.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if(!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8"),o.e2ee=!0}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.connectedSignalingUrl="",this.contactSignalingUrl=""}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}stopStream(){return new Promise(((e,t)=>(this.debug&&console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."),this.stream?(this.stream.getTracks().forEach((e=>{e.stop()})),this.stream=null,e()):e())))}async signalingTerminate(){await this.stopStream();for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}async abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.contactSignalingUrl="",this.connectedSignalingUrl="",this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=async e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),await this.signalingTerminate(),s(t)},e.onmessage=async t=>{if(t.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",t.data),void this.signalingOnMessageE2EE(t.data);if("string"!=typeof t.data)throw new Error("Received invalid signaling data");const n=JSON.parse(t.data);if("offer"==n.type)this.writeWebSocketSignalingLog("onmessage-offer",n),this.signalingOnMessageTypeOffer(n),this.connectedSignalingUrl=e.url,i(n);else if("update"==n.type)this.writeWebSocketSignalingLog("onmessage-update",n),await this.signalingOnMessageTypeUpdate(n);else if("re-offer"==n.type)this.writeWebSocketSignalingLog("onmessage-re-offer",n),await this.signalingOnMessageTypeReOffer(n);else if("ping"==n.type)await this.signalingOnMessageTypePing(n);else if("push"==n.type)this.callbacks.push(n,"websocket");else if("notify"==n.type)"connection.created"===n.event_type?this.writeWebSocketTimelineLog("notify-connection.created",n):"connection.destroyed"===n.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",n),this.signalingOnMessageTypeNotify(n,"websocket");else if("switched"==n.type)this.writeWebSocketSignalingLog("onmessage-switched",n),this.signalingOnMessageTypeSwitched(n);else if("redirect"==n.type){this.writeWebSocketSignalingLog("onmessage-redirect",n);try{const e=await this.signalingOnMessageTypeRedirect(n);i(e)}catch(e){s(e)}}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e,t||(this.contactSignalingUrl=e.url,this.writeWebSocketSignalingLog("contact-signaling-url",this.contactSignalingUrl)))})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=async e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),await this.signalingTerminate(),t(n)},this.ws.onerror=async e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),await this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=async e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((async()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=async e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),await this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=e.target;let s;"string"==typeof e.data?s=(new TextEncoder).encode(e.data):e.data instanceof ArrayBuffer?s=e.data:console.warn("Received onmessage event data is not of type String or ArrayBuffer."),void 0!==s&&(!0===n.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(i.label,s)))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");if("open"!==n.readyState)throw new Error("Messaging DataChannel is not open");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1 {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") ; else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t};\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t};\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t};\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});\n\t\t}\n\t})();\n}\n\nconst WORKER_SCRIPT = \"InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVj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ZWNvZGUoY29ubmVjdGlvbklkQnVmZmVyKTsKICAgICAgICBjb25zdCBbcywgY291bnQsIGtleUlkXSA9IHBhcnNlU0ZyYW1lSGVhZGVyKHNmcmFtZUhlYWRlckJ1ZmZlcik7CiAgICAgICAgLy8g5LuK5Zue44GvIHMgZmxhZyDjga8gMCDjga7jgb8KICAgICAgICBpZiAocyAhPT0gMCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlVORVhQRUNURUQtUy1GTEFHIik7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGRlcml2ZUtleSA9IGdldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICBpZiAoIWRlcml2ZUtleSkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGl2ID0gZ2VuZXJhdGVJVihjb3VudCwgY29ubmVjdGlvbklkLCBrZXlJZCk7CiAgICAgICAgaWYgKCFpdikgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGZyYW1lQWRkID0gZW5jb2RlRnJhbWVBZGQoZnJhbWVNZXRhZGF0YSwgc2ZyYW1lSGVhZGVyLCBjb25uZWN0aW9uSWQpOwogICAgICAgIGNyeXB0by5zdWJ0bGUKICAgICAgICAgICAgLmRlY3J5cHQoewogICAgICAgICAgICBuYW1lOiAiQUVTLUdDTSIsCiAgICAgICAgICAgIGl2OiBpdiwKICAgICAgICAgICAgYWRkaXRpb25hbERhdGE6IGZyYW1lQWRkLAogICAgICAgIH0sIGRlcml2ZUtleSwgbmV3IFVpbnQ4QXJyYXkoZW5jcnlwdGVkRnJhbWVCdWZmZXIpKQogICAgICAgICAgICAudGhlbigocGxhaW5UZXh0KSA9PiB7CiAgICAgICAgICAgIGNvbnN0IG5ld0RhdGEgPSBuZXcgQXJyYXlCdWZmZXIoZnJhbWVNZXRhZGF0YUJ1ZmZlci5ieXRlTGVuZ3RoICsgcGxhaW5UZXh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0YTsKICAgIGlmICh0eXBlID09PSAic2VsZlNlY3JldEtleU1hdGVyaWFsIikgewogICAgICAgIGNvbnN0IHsgc2VsZlNlY3JldEtleU1hdGVyaWFsLCBzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdhaXRpbmdUaW1lIH0gPSBldmVudC5kYXRhOwogICAgICAgIGNvbnN0IHRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWxmU2VjcmV0S2V5TWF0ZXJpYWwuYnVmZmVyLCAiSEtERiIsIGZhbHNlLCBbImRlcml2ZUJpdHMiLCAiZGVyaXZlS2V5Il0pCiAgICAgICAgICAgICAgICAudGhlbigobWF0ZXJpYWwpID0+IHsKICAgICAgICAgICAgICAgIGdlbmVyYXRlRGVyaXZlS2V5KG1hdGVyaWFsKS50aGVuKChkZXJpdmVLZXkpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRTZWxmRGVyaXZlS2V5KHNlbGZDb25uZWN0aW9uSWQsIHNlbGZLZXlJZCwgZGVyaXZlS2V5KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgZ2VuZXJhdGVXcml0ZUlWKG1hdGVyaWFsKS50aGVuKCh3cml0ZUlWKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2V0V3JpdGVJVihzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5lY3Rpb25JZCwga2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBzZXRMYXRlc3RSZW1vdGVLZXlJZChjb25uZWN0aW9uSWQsIGtleU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gIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=\";\nclass SoraE2EE {\n constructor() {\n // 対応しているかどうかの判断\n // @ts-ignore トライアル段階の API なので無視する\n const supportsInsertableStreams = !!RTCRtpSender.prototype.createEncodedStreams;\n if (!supportsInsertableStreams) {\n throw new Error(\"E2EE is not supported in this browser.\");\n }\n this.worker = null;\n this.onWorkerDisconnect = null;\n }\n // worker を起動する\n startWorker() {\n // ワーカーを起動する\n const workerScript = atob(WORKER_SCRIPT);\n this.worker = new Worker(URL.createObjectURL(new Blob([workerScript], { type: \"application/javascript\" })));\n this.worker.onmessage = (event) => {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n // role: sendrecv で multistream: false の場合は例外を発生させる\n if (role === \"sendrecv\" && options.multistream !== true) {\n throw new Error(\"Failed to parse options. Options multistream must be true when connecting using 'sendrecv'\");\n }\n\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n\n if (redirect) {\n message.redirect = true;\n }\n\n if (\"signalingNotifyMetadata\" in options) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n\n if (\"multistream\" in options && options.multistream === true) {\n // multistream\n message.multistream = true;\n // spotlight\n if (\"spotlight\" in options) {\n message.spotlight = options.spotlight;\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n }\n if (message.spotlight === true) {\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n }\n }\n\n if (\"simulcast\" in options || \"simulcastRid\" in options) {\n // simulcast\n if (\"simulcast\" in options && options.simulcast === true) {\n message.simulcast = true;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n }\n\n // client_id\n if (\"clientId\" in options && options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n\n if (\"dataChannelSignaling\" in options && typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (\"ignoreDisconnectWebSocket\" in options && typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n message.e2ee = true;\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WS シグナリングで type offer メッセージを受信したシグナリング URL\n */\n connectedSignalingUrl: string;\n /**\n * WS シグナリングで最初に type connect を送信したシグナリング URL\n */\n contactSignalingUrl: string;\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.connectedSignalingUrl = \"\";\n this.contactSignalingUrl = \"\";\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * stream を停止するメソッド\n */\n private stopStream(): Promise {\n return new Promise((resolve, _) => {\n if (this.debug) {\n console.warn(\n \"@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself.\"\n );\n }\n if (!this.stream) {\n return resolve();\n }\n this.stream.getTracks().forEach((t) => {\n t.stop();\n });\n this.stream = null;\n return resolve();\n });\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private async signalingTerminate(): Promise {\n await this.stopStream();\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private async abendPeerConnectionState(title: SoraAbendTitle): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.contactSignalingUrl = \"\";\n this.connectedSignalingUrl = \"\";\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = async (event): Promise => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n this.connectedSignalingUrl = ws.url;\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n try {\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n } catch (error) {\n reject(error);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n // 初回に接続した URL を状態管理する\n if (!redirect) {\n this.contactSignalingUrl = ws.url;\n this.writeWebSocketSignalingLog(\"contact-signaling-url\", this.contactSignalingUrl);\n }\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = async (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = async (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n await this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = async (_): Promise => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = async (_): Promise => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n await this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(async () => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n await this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n dataChannel.bufferedAmountLowThreshold = 65536;\n dataChannel.binaryType = \"arraybuffer\";\n this.soraDataChannels[dataChannel.label] = dataChannel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const dataChannel = event.target as RTCDataChannel;\n let data: ArrayBuffer | undefined = undefined;\n if (typeof event.data === \"string\") {\n data = new TextEncoder().encode(event.data);\n } else if (event.data instanceof ArrayBuffer) {\n data = event.data;\n } else {\n console.warn(\"Received onmessage event data is not of type String or ArrayBuffer.\");\n }\n\n if (data !== undefined) {\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n }\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n if (dataChannel.readyState !== \"open\") {\n throw new Error(\"Messaging DataChannel is not open\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n // sendrecv の場合、multistream に初期値を指定する\n const sendrecvOptions: ConnectionOptions = Object.assign({ multistream: true }, options);\n return new ConnectionPublisher(\n this.signalingUrlCandidates,\n \"sendrecv\",\n channelId,\n metadata,\n sendrecvOptions,\n this.debug\n );\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","BYTES_PER_ELEMENT","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","multistream","signaling_notify_metadata","signalingNotifyMetadata","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","simulcast","simalcastRids","simulcastRid","simulcast_rid","clientId","client_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","connectedSignalingUrl","contactSignalingUrl","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","stopStream","getTracks","dataChannel","initializeConnection","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","signalingTerminate","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","abendPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmountLowThreshold","bufferedAmount","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","target","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","ontrack","streams","muted","onremovetrack","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendrecvOptions","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMediaStreamConstraints","mediastream","applyConstraints"],"mappings":"qOAslBA,MAAMA,EACFC,cAII,MADoCC,aAAaC,UAAUC,qBAEvD,MAAM,IAAIC,MAAM,0CAEpBC,KAAKC,OAAS,KACdD,KAAKE,mBAAqB,KAG9BC,cAEI,MAAMC,EAAeC,KAfP,wjwBAgBdL,KAAKC,OAAS,IAAIK,OAAOC,IAAIC,gBAAgB,IAAIC,KAAK,CAACL,GAAe,CAAEM,KAAM,6BAC9EV,KAAKC,OAAOU,UAAaC,IACrB,MAAMC,UAAEA,GAAcD,EAAME,KACV,eAAdD,GAAiE,mBAA5Bb,KAAKE,oBAC1CF,KAAKE,sBAKjBa,cACQf,KAAKC,QACLD,KAAKC,OAAOe,YAAY,CACpBN,KAAM,UAKlBO,kBACQjB,KAAKC,QACLD,KAAKC,OAAOiB,YAIpBC,aACI,MAAMC,aAAEA,SAAuBC,OAAOC,KAAKC,OAC3C,OAAOH,EAEXI,qBAAqBC,GACjB,IAAKA,EAAOC,MACR,OAGJ,MAAMC,EAAgBF,EAAO3B,uBACvB8B,EAAiBD,EAAcC,gBAAkBD,EAAcE,SAC/DC,EAAiBH,EAAcG,gBAAkBH,EAAcI,SACrE,IAAK/B,KAAKC,OACN,MAAM,IAAIF,MAAM,gDAEpB,MAAMiC,EAAU,CACZtB,KAAM,UACNkB,eAAgBA,EAChBE,eAAgBA,GAEpB9B,KAAKC,OAAOe,YAAYgB,EAAS,CAACJ,EAAgBE,IAEtDG,uBAAuBC,GAEnB,MAAMC,EAAkBD,EAASpC,uBAC3B8B,EAAiBO,EAAgBP,gBAAkBO,EAAgBN,SACnEC,EAAiBK,EAAgBL,gBAAkBK,EAAgBJ,SACzE,IAAK/B,KAAKC,OAC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js","../node_modules/fflate/esm/browser.js","../packages/sdk/src/utils.ts","../packages/sdk/src/base.ts","../packages/sdk/src/publisher.ts","../packages/sdk/src/subscriber.ts","../packages/sdk/src/sora.ts","../packages/sdk/src/helpers.ts"],"sourcesContent":["/**\n * @sora/e2ee\n * WebRTC SFU Sora JavaScript E2EE Library\n * @version: 2021.1.0\n * @author: Shiguredo Inc.\n * @license: Apache-2.0\n **/\n\n// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nfunction WasmExec () {\n\t(() => {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") ; else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t};\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t};\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t};\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});\n\t\t}\n\t})();\n}\n\nconst WORKER_SCRIPT = \"InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCkgPSBsb2coeCkgLyBsb2coMjU2KQogICAgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5sb2cobikgLyBNYXRoLmxvZygyICoqIDgpICsgMSk7Cn0KZnVuY3Rpb24gYXJyYXlCdWZmZXJUb051bWJlcihhcnJheUJ1ZmZlcikgewogICAgLy8gMzJiaXQg44G+44Gn44KS5oOz5a6aIChCaWdJbnQg44G444Gu5pu444GN5o+b44GI5pmC44Gr6KaB5L+u5q2jKQogICAgY29uc3QgbmV3QXJyYXlCdWZmZXIgPSBuZXcgQXJyYXlCdWZmZXIoVWludDMyQXJyYXkuQllUR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XkpIHsKICAgICAgICBpZiAoY3VycmVudFNlbGZEZXJpdmVLZXlbImtleUlkIl0gPCBrZXlJZCkgewogICAgICAgICAgICBjb25zdCBuZXh0U2VsZkRlcml2ZUtleSA9IHsgY29ubmVjdGlvbklkLCBrZXlJZCwgZGVyaXZlS2V5IH07CiAgICAgICAgICAgIHNlbGZEZXJpdmVLZXlNYXAuc2V0KCJsYXRlc3QiLCBuZXh0U2VsZkRlcml2ZUtleSk7CiAgICAgICAgfQogICAgfQogICAgZWxzZSB7CiAgICAgICAgY29uc3QgbmV4dFNlbGZEZXJpdmVLZXkgPSB7IGNvbm5lY3Rpb25JZCwga2V5SWQsIGRlcml2ZUtleSB9OwogICAgICAgIHNlbGZEZXJpdmVLZXlNYXAuc2V0KCJsYXRlc3QiLCBuZXh0U2VsZkRlcml2ZUtleSk7CiAgICB9Cn0KZnVuY3Rpb24gc2lsZW5jZUZyYW1lKGVuY29kZWRGcmFtZSkgewogICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkLCByZWNlaXZlTWVzc2FnZSDlj5fkv6HliY3jga7loLTlkIgKICAgIGlmIChlbmNvZGVkRnJhbWUudHlwZSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgLy8g6Z+z5aOw44Gv5pqX5Y+35YyW44Gv44GE44KL44Go6IGe44GR44Gf44KC44Gu44GY44KD44Gq44GE44Gu44Gn572u44GN5o+b44GI44KLCiAgICAgICAgY29uc3QgbmV3RGF0YSA9IG5ldyBBcnJheUJ1ZmZlcigzKTsKICAgICAgICBjb25zdCBuZXdVaW50OCA9IG5ldyBVaW50OEFycmF5KG5ld0RhdGEpOwogICAgICAgIC8vIE9wdXMg44K144Kk44Os44Oz44K544OV44Os44O844OgCiAgICAgICAgbmV3VWludDguc2V0KFsweGQ4LCAweGZmLCAweGZlXSk7CiAgICAgICAgZW5jb2RlZEZyYW1lLmRhdGEgPSBuZXdEYXRhOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgLy8g5pig5YOP44GM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gICAgICAgICAgICAgIGdlbmVyYXRlRGVyaXZlS2V5KG1hdGVyaWFsKS50aGVuKChkZXJpdmVLZXkpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRTZWxmRGVyaXZlS2V5KHNlbGZDb25uZWN0aW9uSWQsIHNlbGZLZXlJZCwgZGVyaXZlS2V5KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgZ2VuZXJhdGVXcml0ZUlWKG1hdGVyaWFsKS50aGVuKCh3cml0ZUlWKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2V0V3JpdGVJVihzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5lY3Rpb25JZCwga2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBzZXRMYXRlc3RSZW1vdGVLZXlJZChjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gInJlbW92ZVJlbW90ZURlcml2ZUtleSIpIHsKICAgICAgICBjb25zdCB7IGNvbm5lY3Rpb25JZCB9ID0gZXZlbnQuZGF0YTsKICAgICAgICByZW1vdmVEZXJpdmVLZXkoY29ubmVjdGlvbklkKTsKICAgIH0KICAgIGVsc2UgaWYgKHR5cGUgPT09ICJlbmNyeXB0IikgewogICAgICAgIGNvbnN0IHsgcmVhZGFibGVTdHJlYW0sIHdyaXRhYmxlU3RyZWFtIH0gPSBldmVudC5kYXRhOwogICAgICAgIGNvbnN0IHRyYW5zZm9ybVN0cmVhbSA9IG5ldyBUcmFuc2Zvcm1TdHJlYW0oewogICAgICAgICAgICB0cmFuc2Zvcm06IGVuY3J5cHRGdW5jdGlvbiwKICAgICAgICB9KTsKICAgICAgICByZWFkYWJsZVN0cmVhbS5waXBlVGhyb3VnaCh0cmFuc2Zvcm1TdHJlYW0pLnBpcGVUbyh3cml0YWJsZVN0cmVhbSk7CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAiZGVjcnlwdCIpIHsKICAgICAgICBjb25zdCB7IHJlYWRhYmxlU3RyZWFtLCB3cml0YWJsZVN0cmVhbSB9ID0gZXZlbnQuZGF0YTsKICAgICAgICBjb25zdCB0cmFuc2Zvcm1TdHJlYW0gPSBuZXcgVHJhbnNmb3JtU3RyZWFtKHsKICAgICAgICAgICAgdHJhbnNmb3JtOiBkZWNyeXB0RnVuY3Rpb24sCiAgICAgICAgfSk7CiAgICAgICAgcmVhZGFibGVTdHJlYW0ucGlwZVRocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=\";\nclass SoraE2EE {\n constructor() {\n // 対応しているかどうかの判断\n // @ts-ignore トライアル段階の API なので無視する\n const supportsInsertableStreams = !!RTCRtpSender.prototype.createEncodedStreams;\n if (!supportsInsertableStreams) {\n throw new Error(\"E2EE is not supported in this browser.\");\n }\n this.worker = null;\n this.onWorkerDisconnect = null;\n }\n // worker を起動する\n startWorker() {\n // ワーカーを起動する\n const workerScript = atob(WORKER_SCRIPT);\n this.worker = new Worker(URL.createObjectURL(new Blob([workerScript], { type: \"application/javascript\" })));\n this.worker.onmessage = (event) => {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n // role: sendrecv で multistream: false の場合は例外を発生させる\n if (role === \"sendrecv\" && options.multistream !== true) {\n throw new Error(\"Failed to parse options. Options multistream must be true when connecting using 'sendrecv'\");\n }\n\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n\n if (redirect) {\n message.redirect = true;\n }\n\n if (\"signalingNotifyMetadata\" in options) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n\n if (\"multistream\" in options && options.multistream === true) {\n // multistream\n message.multistream = true;\n // spotlight\n if (\"spotlight\" in options) {\n message.spotlight = options.spotlight;\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n }\n if (message.spotlight === true) {\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n }\n }\n\n if (\"simulcast\" in options || \"simulcastRid\" in options) {\n // simulcast\n if (\"simulcast\" in options && options.simulcast === true) {\n message.simulcast = true;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n }\n\n if (\"clientId\" in options && options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n\n if (\"bundleId\" in options && options.bundleId !== undefined) {\n message.bundle_id = options.bundleId;\n }\n\n if (\"dataChannelSignaling\" in options && typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (\"ignoreDisconnectWebSocket\" in options && typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n message.e2ee = true;\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WS シグナリングで type offer メッセージを受信したシグナリング URL\n */\n connectedSignalingUrl: string;\n /**\n * WS シグナリングで最初に type connect を送信したシグナリング URL\n */\n contactSignalingUrl: string;\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.connectedSignalingUrl = \"\";\n this.contactSignalingUrl = \"\";\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * stream を停止するメソッド\n */\n private stopStream(): Promise {\n return new Promise((resolve, _) => {\n if (this.debug) {\n console.warn(\n \"@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself.\"\n );\n }\n if (!this.stream) {\n return resolve();\n }\n this.stream.getTracks().forEach((t) => {\n t.stop();\n });\n this.stream = null;\n return resolve();\n });\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private async signalingTerminate(): Promise {\n await this.stopStream();\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private async abendPeerConnectionState(title: SoraAbendTitle): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.contactSignalingUrl = \"\";\n this.connectedSignalingUrl = \"\";\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = async (event): Promise => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n this.connectedSignalingUrl = ws.url;\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n try {\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n } catch (error) {\n reject(error);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n // 初回に接続した URL を状態管理する\n if (!redirect) {\n this.contactSignalingUrl = ws.url;\n this.writeWebSocketSignalingLog(\"contact-signaling-url\", this.contactSignalingUrl);\n }\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = async (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = async (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n await this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = async (_): Promise => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = async (_): Promise => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n await this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(async () => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n await this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n dataChannel.bufferedAmountLowThreshold = 65536;\n dataChannel.binaryType = \"arraybuffer\";\n this.soraDataChannels[dataChannel.label] = dataChannel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const dataChannel = event.target as RTCDataChannel;\n let data: ArrayBuffer | undefined = undefined;\n if (typeof event.data === \"string\") {\n data = new TextEncoder().encode(event.data);\n } else if (event.data instanceof ArrayBuffer) {\n data = event.data;\n } else {\n console.warn(\"Received onmessage event data is not of type String or ArrayBuffer.\");\n }\n\n if (data !== undefined) {\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n }\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n if (dataChannel.readyState !== \"open\") {\n throw new Error(\"Messaging DataChannel is not open\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n // sendrecv の場合、multistream に初期値を指定する\n const sendrecvOptions: ConnectionOptions = Object.assign({ multistream: true }, options);\n return new ConnectionPublisher(\n this.signalingUrlCandidates,\n \"sendrecv\",\n channelId,\n metadata,\n sendrecvOptions,\n this.debug\n );\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","BYTES_PER_ELEMENT","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","multistream","signaling_notify_metadata","signalingNotifyMetadata","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","simulcast","simalcastRids","simulcastRid","simulcast_rid","clientId","client_id","bundleId","bundle_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","connectedSignalingUrl","contactSignalingUrl","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","stopStream","getTracks","dataChannel","initializeConnection","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","signalingTerminate","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","abendPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmountLowThreshold","bufferedAmount","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","target","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","ontrack","streams","muted","onremovetrack","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendrecvOptions","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMediaStreamConstraints","mediastream","applyConstraints"],"mappings":"qOAslBA,MAAMA,EACFC,cAII,MADoCC,aAAaC,UAAUC,qBAEvD,MAAM,IAAIC,MAAM,0CAEpBC,KAAKC,OAAS,KACdD,KAAKE,mBAAqB,KAG9BC,cAEI,MAAMC,EAAeC,KAfP,wjwBAgBdL,KAAKC,OAAS,IAAIK,OAAOC,IAAIC,gBAAgB,IAAIC,KAAK,CAACL,GAAe,CAAEM,KAAM,6BAC9EV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F,OAAO,IAAI4S,GACT7wB,KAAKqkB,uBACL,WACAtG,EACAC,EACA6T,EACA7xB,KAAK2O,OAqBTmjB,SACE/T,EACAC,EAAqB,KACrBC,EAA6B,CAAEM,OAAO,EAAMC,OAAO,IAEnD,OAAO,IAAIqS,GAAoB7wB,KAAKqkB,uBAAwB,WAAYtG,EAAWC,EAAUC,EAASje,KAAK2O,OAoB7GojB,SACEhU,EACAC,EAAqB,KACrBC,EAA6B,CAAEM,OAAO,EAAMC,OAAO,IAEnD,OAAO,IAAI+S,GAAqBvxB,KAAKqkB,uBAAwB,WAAYtG,EAAWC,EAAUC,EAASje,KAAK2O,OAQ1Gob,mBACF,OAAO/pB,KAAKqkB,8BAOD,CAYb2N,SAAU7wB,eAAgBuC,SAClBhE,EAASuyB,SAASvuB,IAgB1BwuB,WAAY,SAAU7N,EAA2C1V,GAAQ,GACvE,OAAO,IAAIgjB,GAAetN,EAAwB1V,IAOpDoC,QAAS,WACP,MAAO,qBAOTohB,QAAS,CACPC,4BCnMJjxB,eACEkxB,EACA3N,GAEA,GAAIA,EAAYnG,OAAsC,kBAAtBmG,EAAYnG,MAC1C,IAAK,MAAM7c,KAAS2wB,EAAYlM,uBACxBzkB,EAAM4wB,iBAAiB5N,EAAYnG,OAG7C,GAAImG,EAAYlG,OAAsC,kBAAtBkG,EAAYlG,MAC1C,IAAK,MAAM9c,KAAS2wB,EAAY1L,uBACxBjlB,EAAM4wB,iBAAiB5N,EAAYlG"} \ No newline at end of file diff --git a/dist/sora.mjs b/dist/sora.mjs index 60fe0605..88153730 100644 --- a/dist/sora.mjs +++ b/dist/sora.mjs @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2022.1.0-canary.3 + * @version: 2022.1.0-canary.4 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -1627,7 +1627,7 @@ function createSignalingMessage(offerSDP, role, channelId, metadata, options, re } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2022.1.0-canary.3", + sora_client: "Sora JavaScript SDK 2022.1.0-canary.4", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -1678,10 +1678,12 @@ function createSignalingMessage(offerSDP, role, channelId, metadata, options, re message.simulcast_rid = options.simulcastRid; } } - // client_id if ("clientId" in options && options.clientId !== undefined) { message.client_id = options.clientId; } + if ("bundleId" in options && options.bundleId !== undefined) { + message.bundle_id = options.bundleId; + } if ("dataChannelSignaling" in options && typeof options.dataChannelSignaling === "boolean") { message.data_channel_signaling = options.dataChannelSignaling; } @@ -4410,7 +4412,7 @@ var sora = { * @public */ version: function () { - return "2022.1.0-canary.3"; + return "2022.1.0-canary.4"; }, /** * WebRTC のユーティリティ関数群 diff --git a/dist/types.d.ts b/dist/types.d.ts index bc48588c..260e24bd 100644 --- a/dist/types.d.ts +++ b/dist/types.d.ts @@ -42,6 +42,7 @@ export declare type SignalingConnectMessage = { role: Role; channel_id: string; client_id?: string; + bundle_id?: string; metadata?: JSONType; signaling_notify_metadata?: JSONType; multistream?: boolean; @@ -73,6 +74,7 @@ export declare type SignalingOfferMessage = { sdp: string; client_id: string; connection_id: string; + bundle_id?: string; metadata?: JSONType; config?: RTCConfiguration; encodings?: RTCRtpEncodingParameters[]; @@ -248,6 +250,7 @@ export declare type ConnectionOptions = { disconnectWaitTimeout?: number; signalingCandidateTimeout?: number; dataChannels?: DataChannelConfiguration[]; + bundleId?: string; }; export declare type Callbacks = { disconnect: (event: SoraCloseEvent) => void; diff --git a/package-lock.json b/package-lock.json index c70a7bf3..3981a14d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sora-js-sdk", - "version": "2022.1.0-canary.3", + "version": "2022.1.0-canary.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "sora-js-sdk", - "version": "2022.1.0-canary.3", + "version": "2022.1.0-canary.4", "license": "Apache-2.0", "workspaces": [ "packages/go-wasm", diff --git a/package.json b/package.json index 166af896..e2c79d9d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sora-js-sdk", - "version": "2022.1.0-canary.3", + "version": "2022.1.0-canary.4", "description": "WebRTC SFU Sora JavaScript SDK", "main": "dist/sora.min.js", "module": "dist/sora.mjs", From acea30512156b24da09c158e8160627756aaf18d Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Mon, 4 Apr 2022 15:11:59 +0900 Subject: [PATCH 50/86] =?UTF-8?q?type:=20connect=20=E3=82=B7=E3=82=B0?= =?UTF-8?q?=E3=83=8A=E3=83=AA=E3=83=B3=E3=82=B0=E3=83=A1=E3=83=83=E3=82=BB?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=82=92=E7=94=9F=E6=88=90=E3=81=99=E3=82=8B?= =?UTF-8?q?=E4=BB=95=E7=B5=84=E3=81=BF=E3=82=92=E5=A4=89=E6=9B=B4=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/src/utils.ts | 82 ++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 48 deletions(-) diff --git a/packages/sdk/src/utils.ts b/packages/sdk/src/utils.ts index 8f6fb56c..6bc55b46 100644 --- a/packages/sdk/src/utils.ts +++ b/packages/sdk/src/utils.ts @@ -131,64 +131,49 @@ export function createSignalingMessage( if (role === "sendrecv" && options.multistream !== true) { throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'"); } - - if (metadata !== undefined) { - message.metadata = metadata; - } - - if (redirect) { + if (redirect === true) { message.redirect = true; } - - if ("signalingNotifyMetadata" in options) { - message.signaling_notify_metadata = options.signalingNotifyMetadata; + if (typeof options.multistream === "boolean") { + message.multistream = options.multistream; } - - if ("multistream" in options && options.multistream === true) { - // multistream - message.multistream = true; - // spotlight - if ("spotlight" in options) { - message.spotlight = options.spotlight; - if ("spotlightNumber" in options) { - message.spotlight_number = options.spotlightNumber; - } - } - if (message.spotlight === true) { - const spotlightFocusRids = ["none", "r0", "r1", "r2"]; - if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) { - message.spotlight_focus_rid = options.spotlightFocusRid; - } - if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) { - message.spotlight_unfocus_rid = options.spotlightUnfocusRid; - } - } + if (typeof options.simulcast === "boolean") { + message.simulcast = options.simulcast; } - - if ("simulcast" in options || "simulcastRid" in options) { - // simulcast - if ("simulcast" in options && options.simulcast === true) { - message.simulcast = true; - } - const simalcastRids = ["r0", "r1", "r2"]; - if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) { - message.simulcast_rid = options.simulcastRid; - } + const simalcastRids = ["r0", "r1", "r2"]; + if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) { + message.simulcast_rid = options.simulcastRid; } - - if ("clientId" in options && options.clientId !== undefined) { + if (typeof options.spotlight === "boolean") { + message.spotlight = options.spotlight; + } + if ("spotlightNumber" in options) { + message.spotlight_number = options.spotlightNumber; + } + const spotlightFocusRids = ["none", "r0", "r1", "r2"]; + if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) { + message.spotlight_focus_rid = options.spotlightFocusRid; + } + if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) { + message.spotlight_unfocus_rid = options.spotlightUnfocusRid; + } + if (metadata !== undefined) { + message.metadata = metadata; + } + if (options.signalingNotifyMetadata !== undefined) { + message.signaling_notify_metadata = options.signalingNotifyMetadata; + } + if (options.clientId !== undefined) { message.client_id = options.clientId; } - - if ("bundleId" in options && options.bundleId !== undefined) { + if (options.bundleId !== undefined) { message.bundle_id = options.bundleId; } - - if ("dataChannelSignaling" in options && typeof options.dataChannelSignaling === "boolean") { + if (typeof options.dataChannelSignaling === "boolean") { message.data_channel_signaling = options.dataChannelSignaling; } - if ("ignoreDisconnectWebSocket" in options && typeof options.ignoreDisconnectWebSocket === "boolean") { + if (typeof options.ignoreDisconnectWebSocket === "boolean") { message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket; } @@ -297,7 +282,9 @@ export function createSignalingMessage( if (message.simulcast && !enabledSimulcast() && role !== "recvonly") { throw new Error("Simulcast can not be used with this browser"); } - + if (typeof options.e2ee === "boolean") { + message.e2ee = options.e2ee; + } if (options.e2ee === true) { if (message.signaling_notify_metadata === undefined) { message.signaling_notify_metadata = {}; @@ -311,7 +298,6 @@ export function createSignalingMessage( if (message.video) { message.video["codec_type"] = "VP8"; } - message.e2ee = true; } if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) { From 722a4af4b3126c40c529cb98a1b8dd6b6833b924 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Mon, 4 Apr 2022 15:12:17 +0900 Subject: [PATCH 51/86] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/tests/utils.test.ts | 823 ++++++++++++++++++------------- 1 file changed, 470 insertions(+), 353 deletions(-) diff --git a/packages/sdk/tests/utils.test.ts b/packages/sdk/tests/utils.test.ts index 236c8e99..7e8ad71a 100644 --- a/packages/sdk/tests/utils.test.ts +++ b/packages/sdk/tests/utils.test.ts @@ -2,11 +2,13 @@ import { createSignalingMessage } from "../src/utils"; import { AudioCodecType, DataChannelDirection, VideoCodecType } from "../src/types"; const channelId = "7N3fsMHob"; -const role = "sendonly"; const metadata = "PG9A6RXgYqiqWKOVO"; +const clientId = "clientId"; const sdp = "v=0..."; const userAgent = window.navigator.userAgent; const soraClient = "Sora JavaScript SDK __SORA_JS_SDK_VERSION__"; +const audioCodecType: AudioCodecType = "OPUS"; +const videoCodecType: VideoCodecType = "VP9"; const baseExpectedMessage = Object.freeze({ type: "connect", sora_client: soraClient, @@ -14,484 +16,494 @@ const baseExpectedMessage = Object.freeze({ sdp: sdp, audio: true, video: true, - role: role, - metadata: null, + role: "sendonly", channel_id: channelId, }); -test("createSignalingMessage simple", () => { - // sendonly - expect(createSignalingMessage(sdp, role, channelId, null, {}, false)).toEqual(baseExpectedMessage); +/** + * role test + */ +test("createSignalingMessage simple sendonly", () => { + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, {}, false)).toEqual(baseExpectedMessage); +}); - // recvonly - const diff = { - role: "recvonly", - }; - expect(createSignalingMessage(sdp, "recvonly", channelId, null, {}, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff) - ); +test("createSignalingMessage simple recvonly", () => { + const expectedMessage = Object.assign({}, baseExpectedMessage, { role: "recvonly" }); + expect(createSignalingMessage(sdp, "recvonly", channelId, undefined, {}, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage simple sendrecv", () => { + const expectedMessage = Object.assign({}, baseExpectedMessage, { role: "sendrecv", multistream: true }); + expect(createSignalingMessage(sdp, "sendrecv", channelId, undefined, { multistream: true }, false)).toEqual(expectedMessage); }); -test("createSignalingMessage role", () => { +test("createSignalingMessage invalid role", () => { expect(() => { createSignalingMessage(sdp, "test", channelId, metadata, {}, false); }).toThrow(Error("Unknown role type")); }); -test("createSignalingMessage channelId", () => { +test("createSignalingMessage sendrecv and multistream: false", () => { expect(() => { - createSignalingMessage(sdp, role, null, metadata, {}, false); + createSignalingMessage(sdp, "sendrecv", channelId, metadata, {}, false); + }).toThrow(Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'")); +}); + +/** + * channelId test + */ +test("createSignalingMessage channelId: null", () => { + expect(() => { + createSignalingMessage(sdp, "sendonly", null, undefined, {}, false); }).toThrow(Error("channelId can not be null or undefined")); +}); + +test("createSignalingMessage channelId: undefined", () => { expect(() => { - createSignalingMessage(sdp, role, undefined, metadata, {}, false); + createSignalingMessage(sdp, "sendonly", undefined, undefined, {}, false); }).toThrow(Error("channelId can not be null or undefined")); }); +/** + * metadata test + */ test("createSignalingMessage metadata", () => { - const diff = { - metadata: metadata, - }; - expect(createSignalingMessage(sdp, role, channelId, metadata, {}, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff) - ); - expect(createSignalingMessage(sdp, role, channelId, null, {}, false)).toEqual(baseExpectedMessage); + const expectedMessage = Object.assign({}, baseExpectedMessage, { metadata: metadata }); + expect(createSignalingMessage(sdp, "sendonly", channelId, metadata, {}, false)).toEqual(expectedMessage); }); -test("createSignalingMessage clientId option", () => { - const option1 = { - clientId: "clientId", - }; - const diff1 = { - client_id: option1.clientId, - }; - expect(createSignalingMessage(sdp, role, channelId, null, option1, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff1) - ); - const option2 = { - clientId: "", - }; - const diff2 = { - client_id: option2.clientId, - }; - expect(createSignalingMessage(sdp, role, channelId, null, option2, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff2) - ); - const option3 = { - clientId: undefined, - }; - expect(createSignalingMessage(sdp, role, channelId, null, option3, false)).toEqual(baseExpectedMessage); +test("createSignalingMessage metadata: null", () => { + const expectedMessage = Object.assign({}, baseExpectedMessage, { metadata: null }); + expect(createSignalingMessage(sdp, "sendonly", channelId, null, {}, false)).toEqual(expectedMessage); }); -test("createSignalingMessage multistream option", () => { - // multistream - const options1 = { - multistream: true, - }; - const diff1 = { - multistream: true, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options1, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff1) - ); +test("createSignalingMessage metadata: undefined", () => { + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, {}, false)).toEqual(baseExpectedMessage); +}); + +/** + * clientId test + */ +test("createSignalingMessage clientId", () => { + const options = { clientId: clientId } + const expectedMessage = Object.assign({}, baseExpectedMessage, { client_id: options.clientId }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage clientId: empty string", () => { + const options = { clientId: "" } + const expectedMessage = Object.assign({}, baseExpectedMessage, { client_id: options.clientId }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage clientId: undefined", () => { + const options = { clientId: undefined } + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(baseExpectedMessage); +}); + +/** + * multistream test + */ +test("createSignalingMessage multistream: true", () => { + const options = { multistream: true } + const expectedMessage = Object.assign({}, baseExpectedMessage, { multistream: options.multistream }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); }); -test("createSignalingMessage audio option", () => { - const audioCodecType: AudioCodecType = "OPUS"; - const options1 = { +test("createSignalingMessage multistream: false", () => { + const options = { multistream: false } + const expectedMessage = Object.assign({}, baseExpectedMessage, { multistream: options.multistream }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +/** + * audio test + */ +test("createSignalingMessage audio: false", () => { + const options = { audio: false, audioCodecType: audioCodecType, audioBitRate: 100, }; - const diff1 = { - audio: false, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options1, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff1) - ); - const options2 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { audio: false }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage audio: true", () => { + const options = { audio: true, }; - expect(createSignalingMessage(sdp, role, channelId, null, options2, false)).toEqual(baseExpectedMessage); - const options3 = { + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(baseExpectedMessage); +}); + +test("createSignalingMessage audio: undefined", () => { + const options = { audio: undefined, }; - expect(createSignalingMessage(sdp, role, channelId, null, options3, false)).toEqual(baseExpectedMessage); - const options4 = { + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(baseExpectedMessage); +}); + +test("createSignalingMessage audio parameters", () => { + const options = { audioCodecType: audioCodecType, audioBitRate: 100, }; - const diff4 = { - audio: { - codec_type: options4.audioCodecType, - bit_rate: options4.audioBitRate, - }, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options4, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff4) - ); + const expectedMessage = Object.assign({}, baseExpectedMessage, { audio: { + codec_type: options.audioCodecType, + bit_rate: options.audioBitRate, + }}); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); }); -test("createSignalingMessage audio opus params option", () => { - const options1 = { - audio: false, +test("createSignalingMessage audioOpusParamsChannels", () => { + const options = { audioOpusParamsChannels: 2, }; - const diff1 = { - audio: false, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options1, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff1) - ); - - const options2 = { - audioOpusParamsChannels: 2, - }; - const diff2 = { - audio: { - opus_params: { - channels: 2, - }, + const expectedMessage = Object.assign({}, baseExpectedMessage, { audio: { + opus_params: { + channels: options.audioOpusParamsChannels, }, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options2, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff2) - ); + }}); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); - const options3 = { +test("createSignalingMessage audioOpusParamsClockRate", () => { + const options = { audioOpusParamsClockRate: 48000, }; - const diff3 = { - audio: { - opus_params: { - clock_rate: 48000, - }, + const expectedMessage = Object.assign({}, baseExpectedMessage, { audio: { + opus_params: { + clock_rate: options.audioOpusParamsClockRate, }, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options3, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff3) - ); + }}); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); - const options4 = { +test("createSignalingMessage audioOpusParamsMaxplaybackrate", () => { + const options = { audioOpusParamsMaxplaybackrate: 48000, }; - const diff4 = { - audio: { - opus_params: { - maxplaybackrate: 48000, - }, + const expectedMessage = Object.assign({}, baseExpectedMessage, { audio: { + opus_params: { + maxplaybackrate: options.audioOpusParamsMaxplaybackrate, }, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options4, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff4) - ); + }}); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); - const options5 = { +test("createSignalingMessage audioOpusParamsStereo", () => { + const options = { audioOpusParamsStereo: true, }; - const diff5 = { - audio: { - opus_params: { - stereo: true, - }, + const expectedMessage = Object.assign({}, baseExpectedMessage, { audio: { + opus_params: { + stereo: options.audioOpusParamsStereo, }, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options5, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff5) - ); + }}); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); - const options6 = { +test("createSignalingMessage audioOpusParamsSpropStereo", () => { + const options = { audioOpusParamsSpropStereo: true, }; - const diff6 = { - audio: { - opus_params: { - sprop_stereo: true, - }, + const expectedMessage = Object.assign({}, baseExpectedMessage, { audio: { + opus_params: { + sprop_stereo: options.audioOpusParamsSpropStereo, }, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options6, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff6) - ); + }}); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); - const options7 = { +test("createSignalingMessage audioOpusParamsMinptime", () => { + const options = { audioOpusParamsMinptime: 10, }; - const diff7 = { - audio: { - opus_params: { - minptime: 10, - }, + const expectedMessage = Object.assign({}, baseExpectedMessage, { audio: { + opus_params: { + minptime: options.audioOpusParamsMinptime, }, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options7, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff7) - ); + }}); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); - const options8 = { +test("createSignalingMessage audioOpusParamsPtime", () => { + const options = { audioOpusParamsPtime: 20, }; - const diff8 = { - audio: { - opus_params: { - ptime: 20, - }, + const expectedMessage = Object.assign({}, baseExpectedMessage, { audio: { + opus_params: { + ptime: options.audioOpusParamsPtime, }, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options8, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff8) - ); + }}); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); - const options9 = { +test("createSignalingMessage audioOpusParamsUseinbandfec", () => { + const options = { audioOpusParamsUseinbandfec: true, }; - const diff9 = { - audio: { - opus_params: { - useinbandfec: true, - }, + const expectedMessage = Object.assign({}, baseExpectedMessage, { audio: { + opus_params: { + useinbandfec: options.audioOpusParamsUseinbandfec, }, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options9, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff9) - ); + }}); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); - const options10 = { +test("createSignalingMessage audioOpusParamsUsedtx", () => { + const options = { audioOpusParamsUsedtx: false, }; - const diff10 = { - audio: { - opus_params: { - usedtx: false, - }, + const expectedMessage = Object.assign({}, baseExpectedMessage, { audio: { + opus_params: { + usedtx: options.audioOpusParamsUsedtx, }, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options10, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff10) - ); + }}); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); }); -test("createSignalingMessage video option", () => { - const videoCodecType: VideoCodecType = "VP9"; - const options1 = { +/** + * video test + */ +test("createSignalingMessage video: false", () => { + const options = { video: false, videoCodecType: videoCodecType, videoBitRate: 100, }; - const diff1 = { - video: false, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options1, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff1) - ); - const options2 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { video: false }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage video: true", () => { + const options = { video: true, }; - expect(createSignalingMessage(sdp, role, channelId, null, options2, false)).toEqual(baseExpectedMessage); - const options3 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { video: true }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage video: undefined", () => { + const options = { video: undefined, }; - expect(createSignalingMessage(sdp, role, channelId, null, options3, false)).toEqual(baseExpectedMessage); - const options4 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { video: true }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage video parameters", () => { + const options = { videoCodecType: videoCodecType, videoBitRate: 100, }; - const diff4 = { - video: { - codec_type: options4.videoCodecType, - bit_rate: options4.videoBitRate, - }, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options4, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff4) - ); + const expectedMessage = Object.assign({}, baseExpectedMessage, { video: { + codec_type: options.videoCodecType, + bit_rate: options.videoBitRate, + }}); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); }); -test("createSignalingMessage e2ee option", () => { - const options1 = { +/** + * e2ee test + */ +test("createSignalingMessage e2ee: true", () => { + const options = { e2ee: true, e2eeWasmUrl: "wasm", }; - const diff1 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { e2ee: true, video: { - codec_type: "VP8", + codec_type: "VP8" }, signaling_notify_metadata: {}, + }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage e2ee: false", () => { + const options = { + e2ee: false, }; - expect(createSignalingMessage(sdp, role, channelId, null, options1, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff1) - ); - const options2 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { e2ee: false, }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage e2ee: true, video: false", () => { + const options = { e2ee: true, e2eeWasmUrl: "wasm", video: false, }; - const diff2 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { e2ee: true, video: false, signaling_notify_metadata: {}, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options2, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff2) - ); - const options3 = { - e2ee: true, - e2eeWasmUrl: "wasm", - video: true, - }; - const diff3 = { - e2ee: true, - video: { - codec_type: "VP8", - }, - signaling_notify_metadata: {}, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options3, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff3) - ); - const options4 = { + }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage e2ee: true, videoCodecType: 'VP9'", () => { + const options = { e2ee: true, e2eeWasmUrl: "wasm", VideoCodecType: "VP9", }; - const diff4 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { e2ee: true, video: { - codec_type: "VP8", + codec_type: "VP8" }, signaling_notify_metadata: {}, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options4, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff4) - ); + }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); }); -test("createSignalingMessage signalingMetadata option", () => { - const options1 = { - signalingNotifyMetadata: "metadata", - }; - const diff1 = { - signaling_notify_metadata: "metadata", +/** + * signalingNotifyMetadata test + */ +test("createSignalingMessage signalingMetadata", () => { + const options = { + signalingNotifyMetadata: "signalingNotifyMetadata", + }; + const expectedMessage = Object.assign({}, baseExpectedMessage, { signaling_notify_metadata: options.signalingNotifyMetadata }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage signalingMetadata: empty string", () => { + const options = { + signalingNotifyMetadata: "", }; - expect(createSignalingMessage(sdp, role, channelId, null, options1, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff1) - ); - const options2 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { signaling_notify_metadata: options.signalingNotifyMetadata }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage signalingMetadata: object", () => { + const options = { signalingNotifyMetadata: { key: "value" }, }; - const diff2 = { - signaling_notify_metadata: { key: "value" }, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options2, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff2) - ); - const options3 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { signaling_notify_metadata: options.signalingNotifyMetadata }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage signalingMetadata: null", () => { + const options = { signalingNotifyMetadata: null, }; - const diff3 = { - signaling_notify_metadata: null, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options3, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff3) - ); + const expectedMessage = Object.assign({}, baseExpectedMessage, { signaling_notify_metadata: options.signalingNotifyMetadata }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); }); -test("createSignalingMessage dataChannelSignaling option", () => { - const options1 = { +/** + * dataChannelSignaling test + */ +test("createSignalingMessage dataChannelSignaling: true", () => { + const options = { dataChannelSignaling: true, }; - const diff1 = { - data_channel_signaling: true, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options1, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff1) - ); - const options2 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { data_channel_signaling: options.dataChannelSignaling }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage dataChannelSignaling: false", () => { + const options = { dataChannelSignaling: false, }; - const diff2 = { - data_channel_signaling: false, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options2, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff2) - ); - const options3 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { data_channel_signaling: options.dataChannelSignaling }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage dataChannelSignaling: undefined", () => { + const options = { dataChannelSignaling: undefined, }; - const diff3 = {}; - expect(createSignalingMessage(sdp, role, channelId, null, options3, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff3) - ); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(baseExpectedMessage); }); -test("createSignalingMessage ignoreDisconnectWebSocket option", () => { - const options1 = { +/** + * ignoreDisconnectWebSocket test + */ +test("createSignalingMessage ignoreDisconnectWebSocket: true", () => { + const options = { ignoreDisconnectWebSocket: true, }; - const diff1 = { - ignore_disconnect_websocket: true, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options1, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff1) - ); - const options2 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { ignore_disconnect_websocket: options.ignoreDisconnectWebSocket }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage ignoreDisconnectWebSocket: false", () => { + const options = { ignoreDisconnectWebSocket: false, }; - const diff2 = { - ignore_disconnect_websocket: false, - }; - expect(createSignalingMessage(sdp, role, channelId, null, options2, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff2) - ); - const options3 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { ignore_disconnect_websocket: options.ignoreDisconnectWebSocket }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage ignoreDisconnectWebSocket: undefined", () => { + const options = { ignoreDisconnectWebSocket: undefined, }; - const diff3 = {}; - expect(createSignalingMessage(sdp, role, channelId, null, options3, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff3) - ); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(baseExpectedMessage); +}); + +/** + * redirect test + */ +test("createSignalingMessage redirect: true", () => { + const expectedMessage = Object.assign({}, baseExpectedMessage, { redirect: true }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, {}, true)).toEqual(expectedMessage); }); -test("createSignalingMessage redirect", () => { - expect(createSignalingMessage(sdp, role, channelId, null, {}, true)).toEqual( - Object.assign({}, baseExpectedMessage, { redirect: true }) - ); +test("createSignalingMessage redirect: false", () => { + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, {}, false)).toEqual(baseExpectedMessage); }); -test("createSignalingMessage dataChannels option", () => { - // array 以外の場合は無視 - const options1 = { +/** + * dataChannels test + */ +test("createSignalingMessage dataChannels: invalid value", () => { + // array 以外の場合は追加されない + const options = { dataChannels: "test", }; // @ts-ignore option で指定されている型以外を引数に指定する - expect(createSignalingMessage(sdp, role, channelId, null, options1, false)).toEqual(baseExpectedMessage); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(baseExpectedMessage); +}); +test("createSignalingMessage dataChannels: empty array ", () => { // array が空の場合は追加されない - const options2 = { + const options = { dataChannels: [], }; - expect(createSignalingMessage(sdp, role, channelId, null, options2, false)).toEqual(baseExpectedMessage); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(baseExpectedMessage); +}); +test("createSignalingMessage dataChannels: invalid array", () => { // dataChannel に object 以外が含まれる場合は例外が発生する - const options3 = { + const options = { dataChannels: [{ label: "test", direction: "sendrecv" }, "test"], }; expect(() => { // @ts-ignore option で指定されている型以外を引数に指定する - createSignalingMessage(sdp, role, channelId, null, options3, false); + createSignalingMessage(sdp, "sendonly", channelId, null, options, false); }).toThrow("Failed to parse options dataChannels. Options dataChannels element must be type 'object'"); +}); +test("createSignalingMessage dataChannels: invalid array(null in array)", () => { // dataChannel に null が含まれる場合は例外が発生する - const options4 = { + const options = { dataChannels: [{ label: "test", direction: "sendrecv" }, null], }; expect(() => { // @ts-ignore option で指定されている型以外を引数に指定する - createSignalingMessage(sdp, role, channelId, null, options4, false); + createSignalingMessage(sdp, "sendonly", channelId, null, options, false); }).toThrow("Failed to parse options dataChannels. Options dataChannels element must be type 'object'"); +}); +test("createSignalingMessage dataChannels", () => { // 正常系 - const options5 = { + const options = { dataChannels: [ { label: "test", direction: "sendrecv" as DataChannelDirection }, { @@ -505,46 +517,151 @@ test("createSignalingMessage dataChannels option", () => { }, ], }; - const diff5 = { - data_channels: [ - { label: "test", direction: "sendrecv" }, - { - label: "test2", - direction: "sendonly", - ordered: true, - max_packet_life_time: 100, - max_retransmits: 100, - protocol: "protocol", - compress: false, - }, - ], - }; - expect(createSignalingMessage(sdp, role, channelId, null, options5, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff5) - ); + const expectedMessage = Object.assign({}, baseExpectedMessage, { data_channels: [ + { label: "test", direction: "sendrecv" }, + { + label: "test2", + direction: "sendonly", + ordered: true, + max_packet_life_time: 100, + max_retransmits: 100, + protocol: "protocol", + compress: false, + }, + ]}); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); }); -test("createSignalingMessage bundleId option", () => { - const option1 = { +/** + * bundleId test + */ +test("createSignalingMessage bundleId", () => { + const options = { bundleId: "bundleId", }; - const diff1 = { - bundle_id: option1.bundleId, - }; - expect(createSignalingMessage(sdp, role, channelId, null, option1, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff1) - ); - const option2 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { bundle_id: options.bundleId }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage bundleId: empty string", () => { + const options = { bundleId: "", }; - const diff2 = { - bundle_id: option2.bundleId, - }; - expect(createSignalingMessage(sdp, role, channelId, null, option2, false)).toEqual( - Object.assign({}, baseExpectedMessage, diff2) - ); - const option3 = { + const expectedMessage = Object.assign({}, baseExpectedMessage, { bundle_id: options.bundleId }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage bundleId: undefined", () => { + const options = { bundleId: undefined, }; - expect(createSignalingMessage(sdp, role, channelId, null, option3, false)).toEqual(baseExpectedMessage); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(baseExpectedMessage); +}); + +/** + * simulcastRid test + */ +test("createSignalingMessage simulcastRid", () => { + const options = { + simulcastRid: "r0", + }; + const expectedMessage = Object.assign({}, baseExpectedMessage, { simulcast_rid: options.simulcastRid }); + // @ts-ignore option で指定されている型以外を引数に指定する + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage simulcastRid: unknown string", () => { + // "r0", "r1", "r2" 以外の場合は追加されない + const options = { + simulcastRid: "", + }; + // @ts-ignore option で指定されている型以外を引数に指定する + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(baseExpectedMessage); +}); + +/** + * spotlight test + */ +test("createSignalingMessage spotlight: true", () => { + const options = { + spotlight: true, + }; + const expectedMessage = Object.assign({}, baseExpectedMessage, { spotlight: options.spotlight }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage spotlight: false", () => { + const options = { + spotlight: false, + }; + const expectedMessage = Object.assign({}, baseExpectedMessage, { spotlight: options.spotlight }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +/** + * spotlightFocusRid test + */ +test("createSignalingMessage spotlightFocusRid", () => { + const options = { + spotlightFocusRid: "r0", + }; + const expectedMessage = Object.assign({}, baseExpectedMessage, { spotlight_focus_rid: options.spotlightFocusRid }); + // @ts-ignore option で指定されている型以外を引数に指定する + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage spotlightFocusRid: unknown string", () => { + // "none", "r0", "r1", "r2" 以外の場合は追加されない + const options = { + spotlightFocusRid: "", + }; + // @ts-ignore option で指定されている型以外を引数に指定する + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(baseExpectedMessage); +}); + +/** + * spotlightUnfocusRid test + */ +test("createSignalingMessage spotlightUnfocusRid", () => { + const options = { + spotlightUnfocusRid: "r0", + }; + const expectedMessage = Object.assign({}, baseExpectedMessage, { spotlight_unfocus_rid: options.spotlightUnfocusRid }); + // @ts-ignore option で指定されている型以外を引数に指定する + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage spotlightFocusRid: unknown string", () => { + // "none", "r0", "r1", "r2" 以外の場合は追加されない + const options = { + spotlightUnfocusRid: "", + }; + // @ts-ignore option で指定されている型以外を引数に指定する + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(baseExpectedMessage); +}); + +/** + * spotlightNumber test + */ +test("createSignalingMessage spotlightNumber", () => { + const options = { + spotlightNumber: 5, + }; + const expectedMessage = Object.assign({}, baseExpectedMessage, { spotlight_number: options.spotlightNumber }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage spotlightNumber: 0", () => { + const options = { + spotlightNumber: 0, + }; + const expectedMessage = Object.assign({}, baseExpectedMessage, { spotlight_number: options.spotlightNumber }); + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(expectedMessage); +}); + +test("createSignalingMessage spotlightNumber: undefined", () => { + const options = { + spotlightNumber: undefined, + }; + expect(createSignalingMessage(sdp, "sendonly", channelId, undefined, options, false)).toEqual(baseExpectedMessage); }); From 5a46d8820974948dab55a3151ea9cec53d4d2148 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Mon, 4 Apr 2022 15:22:07 +0900 Subject: [PATCH 52/86] =?UTF-8?q?CHANGES=20=E3=82=92=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index df734738..bc47137f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,14 @@ - バグ修正 ## develop +- [CHANGE] ConnectionOptions からシグナリング type: connect メッセージを生成する仕組みを変更する + - multistream オプションが false の場合、シグナリングメッセージに multistream: false を含めるように変更する + - spotlight オプションは multistream: true の場合のみシグナリングメッセージに含まれていたが、multistream フラグに関係なく含まれるように変更する + - spotlightFocusRid オプションは spotlight: true の場合のみシグナリングメッセージに含まれていたが、spotlight フラグに関係なく含まれるように変更する + - spotlightUnfocusRid オプションは spotlight: true の場合のみシグナリングメッセージに含まれていたが、spotlight フラグに関係なく含まれるように変更する + - spotlightNumber オプションは spotlight: true の場合のみシグナリングメッセージに含まれていたが、spotlight フラグに関係なく含まれるように変更する + - simulcastRid オプションは simulcast: true の場合のみシグナリングメッセージに含まれていたが、simulcast フラグに関係なく含まれるように変更する + - [ADD] sendrecv オブジェクトのオプションに bundle_id を追加する - @yuitowest - [UPDATE] sendrecv API を使用して接続する場合に multistream option の初期値が true になるよう修正する From 6a84516df628883c1a8f17e227cb20d2bd2aec7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 16:00:58 +0000 Subject: [PATCH 53/86] Bump npm-check-updates from 12.5.4 to 12.5.7 Bumps [npm-check-updates](https://github.com/raineorshine/npm-check-updates) from 12.5.4 to 12.5.7. - [Release notes](https://github.com/raineorshine/npm-check-updates/releases) - [Changelog](https://github.com/raineorshine/npm-check-updates/blob/main/CHANGELOG.md) - [Commits](https://github.com/raineorshine/npm-check-updates/compare/v12.5.4...v12.5.7) --- updated-dependencies: - dependency-name: npm-check-updates dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 151 ++++++++++++++-------------------------------- 1 file changed, 46 insertions(+), 105 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3981a14d..69516918 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3898,15 +3898,24 @@ } }, "node_modules/hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.0.0.tgz", + "integrity": "sha512-rRnjWu0Bxj+nIfUOkz0695C0H6tRrN5iYIzYejb0tDEefe2AekHu/U5Kn9pEie5vsJqpNQU02az7TGSH3qpz4Q==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" + "lru-cache": "^7.5.1" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16" + } + }, + "node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.3.tgz", + "integrity": "sha512-WY9wjJNQt9+PZilnLbuFKM+SwDull9+6IAguOrarOMoOHTcJ9GnXSO11+Gw6c7xtDkBkthR57OZMtZKYr+1CEw==", + "dev": true, + "engines": { + "node": ">=12" } }, "node_modules/html-encoding-sniffer": { @@ -5988,27 +5997,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/normalize-package-data/node_modules/hosted-git-info": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.0.0.tgz", - "integrity": "sha512-rRnjWu0Bxj+nIfUOkz0695C0H6tRrN5iYIzYejb0tDEefe2AekHu/U5Kn9pEie5vsJqpNQU02az7TGSH3qpz4Q==", - "dev": true, - "dependencies": { - "lru-cache": "^7.5.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" - } - }, - "node_modules/normalize-package-data/node_modules/lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -6037,32 +6025,32 @@ } }, "node_modules/npm-check-updates": { - "version": "12.5.4", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.4.tgz", - "integrity": "sha512-4+27zaTdieWgvPLaCZ/A6Q2WC1cYVcrc2SqVmLFYgkWBrKw1QkwpeV16FSvkFGZr3OdFyr7Dpjw8JRn4H2QxFw==", + "version": "12.5.7", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.7.tgz", + "integrity": "sha512-WDkqPBevmgphV1UH3FImsDEpTAq2UFvnMZC3GdXPknE2VL701kfKylnae8IA9ZeYfm/uU0249N9gjMXqA/9y3w==", "dev": true, "dependencies": { "chalk": "^4.1.2", "cint": "^8.2.1", "cli-table": "^0.3.11", - "commander": "^9.0.0", + "commander": "^9.1.0", "fast-memoize": "^2.5.2", "find-up": "5.0.0", "fp-and-or": "^0.1.3", "get-stdin": "^8.0.0", "globby": "^11.0.4", - "hosted-git-info": "^4.1.0", + "hosted-git-info": "^5.0.0", "json-parse-helpfulerror": "^1.0.3", "jsonlines": "^0.1.1", "libnpmconfig": "^1.2.1", "lodash": "^4.17.21", "minimatch": "^5.0.1", "p-map": "^4.0.0", - "pacote": "^13.0.3", + "pacote": "^13.0.5", "parse-github-url": "^1.0.2", "progress": "^2.0.3", "prompts": "^2.4.2", - "rc-config-loader": "^4.0.0", + "rc-config-loader": "^4.1.0", "remote-git-tags": "^3.0.0", "rimraf": "^3.0.2", "semver": "^7.3.5", @@ -6112,27 +6100,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/npm-package-arg/node_modules/hosted-git-info": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.0.0.tgz", - "integrity": "sha512-rRnjWu0Bxj+nIfUOkz0695C0H6tRrN5iYIzYejb0tDEefe2AekHu/U5Kn9pEie5vsJqpNQU02az7TGSH3qpz4Q==", - "dev": true, - "dependencies": { - "lru-cache": "^7.5.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" - } - }, - "node_modules/npm-package-arg/node_modules/lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/npm-packlist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-4.0.0.tgz", @@ -6824,9 +6791,9 @@ } }, "node_modules/rc-config-loader": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.0.0.tgz", - "integrity": "sha512-//LRTblJEcqbmmro1GCmZ39qZXD+JqzuD8Y5/IZU3Dhp3A1Yr0Xn68ks8MQ6qKfKvYCWDveUmRDKDA40c+sCXw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.0.tgz", + "integrity": "sha512-aW+kX4qy0CiM9L4fG4Us3oEOpIrOrXzWykAn+xldD07Y9PXWjTH744oHbv0Kc9ZwWaylw3jMjxaf14RgStrNrA==", "dev": true, "dependencies": { "debug": "^4.1.1", @@ -11521,12 +11488,20 @@ "dev": true }, "hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.0.0.tgz", + "integrity": "sha512-rRnjWu0Bxj+nIfUOkz0695C0H6tRrN5iYIzYejb0tDEefe2AekHu/U5Kn9pEie5vsJqpNQU02az7TGSH3qpz4Q==", "dev": true, "requires": { - "lru-cache": "^6.0.0" + "lru-cache": "^7.5.1" + }, + "dependencies": { + "lru-cache": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.3.tgz", + "integrity": "sha512-WY9wjJNQt9+PZilnLbuFKM+SwDull9+6IAguOrarOMoOHTcJ9GnXSO11+Gw6c7xtDkBkthR57OZMtZKYr+1CEw==", + "dev": true + } } }, "html-encoding-sniffer": { @@ -13138,23 +13113,6 @@ "is-core-module": "^2.8.1", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" - }, - "dependencies": { - "hosted-git-info": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.0.0.tgz", - "integrity": "sha512-rRnjWu0Bxj+nIfUOkz0695C0H6tRrN5iYIzYejb0tDEefe2AekHu/U5Kn9pEie5vsJqpNQU02az7TGSH3qpz4Q==", - "dev": true, - "requires": { - "lru-cache": "^7.5.1" - } - }, - "lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", - "dev": true - } } }, "normalize-path": { @@ -13179,32 +13137,32 @@ } }, "npm-check-updates": { - "version": "12.5.4", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.4.tgz", - "integrity": "sha512-4+27zaTdieWgvPLaCZ/A6Q2WC1cYVcrc2SqVmLFYgkWBrKw1QkwpeV16FSvkFGZr3OdFyr7Dpjw8JRn4H2QxFw==", + "version": "12.5.7", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.7.tgz", + "integrity": "sha512-WDkqPBevmgphV1UH3FImsDEpTAq2UFvnMZC3GdXPknE2VL701kfKylnae8IA9ZeYfm/uU0249N9gjMXqA/9y3w==", "dev": true, "requires": { "chalk": "^4.1.2", "cint": "^8.2.1", "cli-table": "^0.3.11", - "commander": "^9.0.0", + "commander": "^9.1.0", "fast-memoize": "^2.5.2", "find-up": "5.0.0", "fp-and-or": "^0.1.3", "get-stdin": "^8.0.0", "globby": "^11.0.4", - "hosted-git-info": "^4.1.0", + "hosted-git-info": "^5.0.0", "json-parse-helpfulerror": "^1.0.3", "jsonlines": "^0.1.1", "libnpmconfig": "^1.2.1", "lodash": "^4.17.21", "minimatch": "^5.0.1", "p-map": "^4.0.0", - "pacote": "^13.0.3", + "pacote": "^13.0.5", "parse-github-url": "^1.0.2", "progress": "^2.0.3", "prompts": "^2.4.2", - "rc-config-loader": "^4.0.0", + "rc-config-loader": "^4.1.0", "remote-git-tags": "^3.0.0", "rimraf": "^3.0.2", "semver": "^7.3.5", @@ -13239,23 +13197,6 @@ "hosted-git-info": "^5.0.0", "semver": "^7.3.5", "validate-npm-package-name": "^3.0.0" - }, - "dependencies": { - "hosted-git-info": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.0.0.tgz", - "integrity": "sha512-rRnjWu0Bxj+nIfUOkz0695C0H6tRrN5iYIzYejb0tDEefe2AekHu/U5Kn9pEie5vsJqpNQU02az7TGSH3qpz4Q==", - "dev": true, - "requires": { - "lru-cache": "^7.5.1" - } - }, - "lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", - "dev": true - } } }, "npm-packlist": { @@ -13764,9 +13705,9 @@ } }, "rc-config-loader": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.0.0.tgz", - "integrity": "sha512-//LRTblJEcqbmmro1GCmZ39qZXD+JqzuD8Y5/IZU3Dhp3A1Yr0Xn68ks8MQ6qKfKvYCWDveUmRDKDA40c+sCXw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.0.tgz", + "integrity": "sha512-aW+kX4qy0CiM9L4fG4Us3oEOpIrOrXzWykAn+xldD07Y9PXWjTH744oHbv0Kc9ZwWaylw3jMjxaf14RgStrNrA==", "dev": true, "requires": { "debug": "^4.1.1", From 2ef97c55ecb915816142ab85276b40682fb881ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Apr 2022 01:12:31 +0000 Subject: [PATCH 54/86] Bump @typescript-eslint/parser from 5.16.0 to 5.18.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.16.0 to 5.18.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.18.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 96 +++++++++++++++++++-------------------- packages/sdk/package.json | 2 +- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/package-lock.json b/package-lock.json index e84541ff..e47e071c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1594,14 +1594,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.16.0.tgz", - "integrity": "sha512-fkDq86F0zl8FicnJtdXakFs4lnuebH6ZADDw6CYQv0UZeIjHvmEw87m9/29nk2Dv5Lmdp0zQ3zDQhiMWQf/GbA==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.18.0.tgz", + "integrity": "sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.16.0", - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/typescript-estree": "5.16.0", + "@typescript-eslint/scope-manager": "5.18.0", + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/typescript-estree": "5.18.0", "debug": "^4.3.2" }, "engines": { @@ -1621,13 +1621,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz", - "integrity": "sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.18.0.tgz", + "integrity": "sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/visitor-keys": "5.16.0" + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/visitor-keys": "5.18.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1664,9 +1664,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.16.0.tgz", - "integrity": "sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.18.0.tgz", + "integrity": "sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1677,13 +1677,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz", - "integrity": "sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz", + "integrity": "sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/visitor-keys": "5.16.0", + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/visitor-keys": "5.18.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1802,12 +1802,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", - "integrity": "sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz", + "integrity": "sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/types": "5.18.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -8591,7 +8591,7 @@ "@rollup/plugin-typescript": "^8.3.1", "@types/jest": "^27.4.1", "@typescript-eslint/eslint-plugin": "5.17.0", - "@typescript-eslint/parser": "5.16.0", + "@typescript-eslint/parser": "5.18.0", "eslint": "8.12.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", @@ -9668,7 +9668,7 @@ "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.1", "@typescript-eslint/eslint-plugin": "5.17.0", - "@typescript-eslint/parser": "5.16.0", + "@typescript-eslint/parser": "5.18.0", "eslint": "8.12.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", @@ -9880,25 +9880,25 @@ } }, "@typescript-eslint/parser": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.16.0.tgz", - "integrity": "sha512-fkDq86F0zl8FicnJtdXakFs4lnuebH6ZADDw6CYQv0UZeIjHvmEw87m9/29nk2Dv5Lmdp0zQ3zDQhiMWQf/GbA==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.18.0.tgz", + "integrity": "sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.16.0", - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/typescript-estree": "5.16.0", + "@typescript-eslint/scope-manager": "5.18.0", + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/typescript-estree": "5.18.0", "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz", - "integrity": "sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.18.0.tgz", + "integrity": "sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/visitor-keys": "5.16.0" + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/visitor-keys": "5.18.0" } }, "@typescript-eslint/type-utils": { @@ -9913,19 +9913,19 @@ } }, "@typescript-eslint/types": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.16.0.tgz", - "integrity": "sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.18.0.tgz", + "integrity": "sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz", - "integrity": "sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz", + "integrity": "sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/visitor-keys": "5.16.0", + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/visitor-keys": "5.18.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -9991,12 +9991,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", - "integrity": "sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz", + "integrity": "sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/types": "5.18.0", "eslint-visitor-keys": "^3.0.0" } }, diff --git a/packages/sdk/package.json b/packages/sdk/package.json index a52716e8..67920c44 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -14,7 +14,7 @@ "@rollup/plugin-typescript": "^8.3.1", "@types/jest": "^27.4.1", "@typescript-eslint/eslint-plugin": "5.17.0", - "@typescript-eslint/parser": "5.16.0", + "@typescript-eslint/parser": "5.18.0", "eslint": "8.12.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", From 0f7f15e8d71e256449abce6f394ea606e815a8a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Apr 2022 01:29:36 +0000 Subject: [PATCH 55/86] Bump @typescript-eslint/eslint-plugin from 5.16.0 to 5.18.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.16.0 to 5.18.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.18.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 260 +++++--------------------------------- packages/sdk/package.json | 2 +- 2 files changed, 35 insertions(+), 227 deletions(-) diff --git a/package-lock.json b/package-lock.json index e47e071c..5200b875 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1514,14 +1514,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz", - "integrity": "sha512-qVstvQilEd89HJk3qcbKt/zZrfBZ+9h2ynpAGlWjWiizA7m/MtLT9RoX6gjtpE500vfIg8jogAkDzdCxbsFASQ==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.18.0.tgz", + "integrity": "sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.17.0", - "@typescript-eslint/type-utils": "5.17.0", - "@typescript-eslint/utils": "5.17.0", + "@typescript-eslint/scope-manager": "5.18.0", + "@typescript-eslint/type-utils": "5.18.0", + "@typescript-eslint/utils": "5.18.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1546,53 +1546,6 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz", - "integrity": "sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.17.0", - "@typescript-eslint/visitor-keys": "5.17.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.17.0.tgz", - "integrity": "sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz", - "integrity": "sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.17.0", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@typescript-eslint/parser": { "version": "5.18.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.18.0.tgz", @@ -1638,12 +1591,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz", - "integrity": "sha512-3hU0RynUIlEuqMJA7dragb0/75gZmwNwFf/QJokWzPehTZousP/MNifVSgjxNcDCkM5HI2K22TjQWUmmHUINSg==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.18.0.tgz", + "integrity": "sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.17.0", + "@typescript-eslint/utils": "5.18.0", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -1704,15 +1657,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.17.0.tgz", - "integrity": "sha512-DVvndq1QoxQH+hFv+MUQHrrWZ7gQ5KcJzyjhzcqB1Y2Xes1UQQkTRPUfRpqhS8mhTWsSb2+iyvDW1Lef5DD7vA==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.18.0.tgz", + "integrity": "sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.17.0", - "@typescript-eslint/types": "5.17.0", - "@typescript-eslint/typescript-estree": "5.17.0", + "@typescript-eslint/scope-manager": "5.18.0", + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/typescript-estree": "5.18.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1727,80 +1680,6 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz", - "integrity": "sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.17.0", - "@typescript-eslint/visitor-keys": "5.17.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.17.0.tgz", - "integrity": "sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz", - "integrity": "sha512-X1gtjEcmM7Je+qJRhq7ZAAaNXYhTgqMkR10euC4Si6PIjb+kwEQHSxGazXUQXFyqfEXdkGf6JijUu5R0uceQzg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.17.0", - "@typescript-eslint/visitor-keys": "5.17.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz", - "integrity": "sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.17.0", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@typescript-eslint/visitor-keys": { "version": "5.18.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz", @@ -8590,7 +8469,7 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.1", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.17.0", + "@typescript-eslint/eslint-plugin": "5.18.0", "@typescript-eslint/parser": "5.18.0", "eslint": "8.12.0", "eslint-config-prettier": "8.5.0", @@ -9667,7 +9546,7 @@ "@rollup/plugin-typescript": "^8.3.1", "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.17.0", + "@typescript-eslint/eslint-plugin": "5.18.0", "@typescript-eslint/parser": "5.18.0", "eslint": "8.12.0", "eslint-config-prettier": "8.5.0", @@ -9835,48 +9714,20 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz", - "integrity": "sha512-qVstvQilEd89HJk3qcbKt/zZrfBZ+9h2ynpAGlWjWiizA7m/MtLT9RoX6gjtpE500vfIg8jogAkDzdCxbsFASQ==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.18.0.tgz", + "integrity": "sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.17.0", - "@typescript-eslint/type-utils": "5.17.0", - "@typescript-eslint/utils": "5.17.0", + "@typescript-eslint/scope-manager": "5.18.0", + "@typescript-eslint/type-utils": "5.18.0", + "@typescript-eslint/utils": "5.18.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", "regexpp": "^3.2.0", "semver": "^7.3.5", "tsutils": "^3.21.0" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz", - "integrity": "sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.17.0", - "@typescript-eslint/visitor-keys": "5.17.0" - } - }, - "@typescript-eslint/types": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.17.0.tgz", - "integrity": "sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==", - "dev": true - }, - "@typescript-eslint/visitor-keys": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz", - "integrity": "sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.17.0", - "eslint-visitor-keys": "^3.0.0" - } - } } }, "@typescript-eslint/parser": { @@ -9902,12 +9753,12 @@ } }, "@typescript-eslint/type-utils": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz", - "integrity": "sha512-3hU0RynUIlEuqMJA7dragb0/75gZmwNwFf/QJokWzPehTZousP/MNifVSgjxNcDCkM5HI2K22TjQWUmmHUINSg==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.18.0.tgz", + "integrity": "sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.17.0", + "@typescript-eslint/utils": "5.18.0", "debug": "^4.3.2", "tsutils": "^3.21.0" } @@ -9934,60 +9785,17 @@ } }, "@typescript-eslint/utils": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.17.0.tgz", - "integrity": "sha512-DVvndq1QoxQH+hFv+MUQHrrWZ7gQ5KcJzyjhzcqB1Y2Xes1UQQkTRPUfRpqhS8mhTWsSb2+iyvDW1Lef5DD7vA==", + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.18.0.tgz", + "integrity": "sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.17.0", - "@typescript-eslint/types": "5.17.0", - "@typescript-eslint/typescript-estree": "5.17.0", + "@typescript-eslint/scope-manager": "5.18.0", + "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/typescript-estree": "5.18.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz", - "integrity": "sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.17.0", - "@typescript-eslint/visitor-keys": "5.17.0" - } - }, - "@typescript-eslint/types": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.17.0.tgz", - "integrity": "sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz", - "integrity": "sha512-X1gtjEcmM7Je+qJRhq7ZAAaNXYhTgqMkR10euC4Si6PIjb+kwEQHSxGazXUQXFyqfEXdkGf6JijUu5R0uceQzg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.17.0", - "@typescript-eslint/visitor-keys": "5.17.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz", - "integrity": "sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.17.0", - "eslint-visitor-keys": "^3.0.0" - } - } } }, "@typescript-eslint/visitor-keys": { diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 67920c44..078f093e 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -13,7 +13,7 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.1", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.17.0", + "@typescript-eslint/eslint-plugin": "5.18.0", "@typescript-eslint/parser": "5.18.0", "eslint": "8.12.0", "eslint-config-prettier": "8.5.0", From 4835cb9259e01a2cee724f0594bc470064924142 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 5 Apr 2022 11:40:03 +0900 Subject: [PATCH 56/86] 2022.1.0-canary.5 --- dist/sora.js | 79 +++++++++++++++++++++----------------------- dist/sora.min.js | 2 +- dist/sora.min.js.map | 2 +- dist/sora.mjs | 79 +++++++++++++++++++++----------------------- package-lock.json | 4 +-- package.json | 2 +- 6 files changed, 79 insertions(+), 89 deletions(-) diff --git a/dist/sora.js b/dist/sora.js index aae0bfd4..db7c0b45 100644 --- a/dist/sora.js +++ b/dist/sora.js @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2022.1.0-canary.4 + * @version: 2022.1.0-canary.5 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -1633,7 +1633,7 @@ } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2022.1.0-canary.4", + sora_client: "Sora JavaScript SDK 2022.1.0-canary.5", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -1645,55 +1645,48 @@ if (role === "sendrecv" && options.multistream !== true) { throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'"); } - if (metadata !== undefined) { - message.metadata = metadata; - } - if (redirect) { + if (redirect === true) { message.redirect = true; } - if ("signalingNotifyMetadata" in options) { - message.signaling_notify_metadata = options.signalingNotifyMetadata; + if (typeof options.multistream === "boolean") { + message.multistream = options.multistream; } - if ("multistream" in options && options.multistream === true) { - // multistream - message.multistream = true; - // spotlight - if ("spotlight" in options) { - message.spotlight = options.spotlight; - if ("spotlightNumber" in options) { - message.spotlight_number = options.spotlightNumber; - } - } - if (message.spotlight === true) { - const spotlightFocusRids = ["none", "r0", "r1", "r2"]; - if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) { - message.spotlight_focus_rid = options.spotlightFocusRid; - } - if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) { - message.spotlight_unfocus_rid = options.spotlightUnfocusRid; - } - } + if (typeof options.simulcast === "boolean") { + message.simulcast = options.simulcast; } - if ("simulcast" in options || "simulcastRid" in options) { - // simulcast - if ("simulcast" in options && options.simulcast === true) { - message.simulcast = true; - } - const simalcastRids = ["r0", "r1", "r2"]; - if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) { - message.simulcast_rid = options.simulcastRid; - } + const simalcastRids = ["r0", "r1", "r2"]; + if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) { + message.simulcast_rid = options.simulcastRid; } - if ("clientId" in options && options.clientId !== undefined) { + if (typeof options.spotlight === "boolean") { + message.spotlight = options.spotlight; + } + if ("spotlightNumber" in options) { + message.spotlight_number = options.spotlightNumber; + } + const spotlightFocusRids = ["none", "r0", "r1", "r2"]; + if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) { + message.spotlight_focus_rid = options.spotlightFocusRid; + } + if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) { + message.spotlight_unfocus_rid = options.spotlightUnfocusRid; + } + if (metadata !== undefined) { + message.metadata = metadata; + } + if (options.signalingNotifyMetadata !== undefined) { + message.signaling_notify_metadata = options.signalingNotifyMetadata; + } + if (options.clientId !== undefined) { message.client_id = options.clientId; } - if ("bundleId" in options && options.bundleId !== undefined) { + if (options.bundleId !== undefined) { message.bundle_id = options.bundleId; } - if ("dataChannelSignaling" in options && typeof options.dataChannelSignaling === "boolean") { + if (typeof options.dataChannelSignaling === "boolean") { message.data_channel_signaling = options.dataChannelSignaling; } - if ("ignoreDisconnectWebSocket" in options && typeof options.ignoreDisconnectWebSocket === "boolean") { + if (typeof options.ignoreDisconnectWebSocket === "boolean") { message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket; } // parse options @@ -1798,6 +1791,9 @@ if (message.simulcast && !enabledSimulcast() && role !== "recvonly") { throw new Error("Simulcast can not be used with this browser"); } + if (typeof options.e2ee === "boolean") { + message.e2ee = options.e2ee; + } if (options.e2ee === true) { if (message.signaling_notify_metadata === undefined) { message.signaling_notify_metadata = {}; @@ -1811,7 +1807,6 @@ if (message.video) { message.video["codec_type"] = "VP8"; } - message.e2ee = true; } if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) { message.data_channels = parseDataChannelConfigurations(options.dataChannels); @@ -4418,7 +4413,7 @@ * @public */ version: function () { - return "2022.1.0-canary.4"; + return "2022.1.0-canary.5"; }, /** * WebRTC のユーティリティ関数群 diff --git a/dist/sora.min.js b/dist/sora.min.js index ef896251..f6ea7cdc 100644 --- a/dist/sora.min.js +++ b/dist/sora.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sora=t()}(this,(function(){"use strict";class e{constructor(){if(!!!RTCRtpSender.prototype.createEncodedStreams)throw new Error("E2EE is not supported in this browser.");this.worker=null,this.onWorkerDisconnect=null}startWorker(){const e=atob("InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCkgPSBsb2coeCkgLyBsb2coMjU2KQogICAgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5sb2cobikgLyBNYXRoLmxvZygyICoqIDgpICsgMSk7Cn0KZnVuY3Rpb24gYXJyYXlCdWZmZXJUb051bWJlcihhcnJheUJ1ZmZlcikgewogICAgLy8gMzJiaXQg44G+44Gn44KS5oOz5a6aIChCaWdJbnQg44G444Gu5pu444GN5o+b44GI5pmC44Gr6KaB5L+u5q2jKQogICAgY29uc3QgbmV3QXJyYXlCdWZmZXIgPSBuZXcgQXJyYXlCdWZmZXIoVWludDMyQXJyYXkuQllURVNfUEVSX0VMRU1FTlQpOwogICAgY29uc3QgbmV3RGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcobmV3QXJyYXlCdWZmZXIpOwogICAgY29uc3QgZGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcoYXJyYXlCdWZmZXIpOwogICAgY29uc3QgcGFkZGluZ0xlbmd0aCA9IFVpbnQzMkFycmF5LkJZVEVTX1BFUl9FTEVNRU5UIC0gZGF0YVZpZXcuYnl0ZUxlbmd0aDsKICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcGFkZGluZ0xlbmd0aDsgaSArPSAxKSB7CiAgICAgICAgbmV3RGF0YVZpZXcuc2V0VWludDgoaSwgMCk7CiAgICB9CiAgICBmb3IgKGxldCBpID0gcGFkZGlu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HVuZW5jcnlwdGVkQnl0ZXNbZW5jb2RlZEZyYW1lLnR5cGVdKSk7CiAgICAgICAgY29uc3Qgc2ZyYW1lSGVhZGVyID0gbmV3IFVpbnQ4QXJyYXkoc2ZyYW1lSGVhZGVyQnVmZmVyKTsKICAgICAgICBjb25zdCBjb25uZWN0aW9uSWQgPSB0ZXh0RGVjb2Rlci5kZWNvZGUoY29ubmVjdGlvbklkQnVmZmVyKTsKICAgICAgICBjb25zdCBbcywgY291bnQsIGtleUlkXSA9IHBhcnNlU0ZyYW1lSGVhZGVyKHNmcmFtZUhlYWRlckJ1ZmZlcik7CiAgICAgICAgLy8g5LuK5Zue44GvIHMgZmxhZyDjga8gMCDjga7jgb8KICAgICAgICBpZiAocyAhPT0gMCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlVORVhQRUNURUQtUy1GTEFHIik7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGRlcml2ZUtleSA9IGdldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICBpZiAoIWRlcml2ZUtleSkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGl2ID0gZ2VuZXJhdGVJVihjb3VudCwgY29ubmVjdGlvbklkLCBrZXlJZCk7CiAgICAgICAgaWYgKCFpdikgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGZyYW1lQWRkID0gZW5jb2RlRnJhbWVBZGQoZnJhbWVNZXRhZGF0YSwgc2ZyYW1lSGVhZGVyLCBjb25uZWN0aW9uSWQpOwogICAgICAgIGNyeXB0by5zdWJ0bGUKICAgICAgICAgICAgLmRlY3J5cHQoewogICAgICAgICAgICBuYW1lOiAiQUVTLUdDTSIsCiAgICAgICAgICAgIGl2OiBpdiwKICAgICAgICAgICAgYWRkaXRpb25hbERhdGE6IGZyYW1lQWRkLAogICAgICAgIH0sIGRlcml2ZUtleSwgbmV3IFVpbn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gICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJ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FibGVTdHJlYW0ucGlwZVRocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=");this.worker=new Worker(URL.createObjectURL(new Blob([e],{type:"application/javascript"}))),this.worker.onmessage=e=>{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var p=new t(32);for(m=0;m<32;++m)p[m]=5;var Z=A(b,9,0),w=A(b,9,1),S=A(p,5,0),V=A(p,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(2==e.BYTES_PER_ELEMENT?n:4==e.BYTES_PER_ELEMENT?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},E=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},X=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=O(s[C-1],m,0);if(u>i){a=0;var A=0,b=u-i,p=1<i))break;A+=p-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},O=function(e,t,n){return-1==e.s?Math.max(O(e.l,t,n+1),O(e.r,t,n+1)):t[e.s]=n},B=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},N=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!J[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=N(g,b)+N(r,p)+c,z=N(g,u)+N(r,f)+c+14+3*U+N(K,J)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(C,C+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=Z,j=b,Q=S,H=p;for(L=0;L255){te=l[L]>>>18&31;E(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];E(t,I,Q[ne]),I+=H[ne],ne>3&&(E(t,I,l[L]>>>5&8191),I+=a[ne])}else E(t,I,M[l[L]]),I+=j[l[L]];return E(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),D=new t(0),J=function(e,o,l,g,r){return function(e,o,l,g,r,d){var C=e.length,I=new t(g+C+5*(1+Math.ceil(C/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||C<8)for(var A=0;A<=C;A+=65535){var b=A+65535;b>=C&&(m[u>>3]=d),u=Y(m,u+1,e.subarray(A,b))}else{for(var p=L[o-1],Z=p>>>13,w=8191&p,S=(1<7e3||B>24576)&&j>423){u=K(e,m,0,v,T,E,O,B,J,A-J,u),B=X=O=0,J=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)E[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(Z,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[B++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];O+=s[ae]+a[oe],++T[257+ae],++E[oe],N=A+H,++X}else v[B++]=e[A],++T[e[A]]}}u=K(e,m,d,v,T,E,O,B,J,A-J,u),!d&&7&u&&(u=Y(m,u+1,D))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=J(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var d=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,p=i.m,Z=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,E=F+T;if(E>l){c&&v(0);break}g&&d(m+T),n.set(e.subarray(F,E),m),i.b=m+=T,i.p=I=8*E,i.f=h;continue}if(1==R)u=w,b=V,p=9,Z=5;else if(2==R){var X=y(e,I,31)+257,O=y(e,I+10,15)+4,B=X+y(e,I+5,31)+1;I+=14;for(var N=new t(B),Y=new t(19),K=0;K>>4)<16)N[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=N[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)N[K++]=M}}var Q=N.subarray(0,X),H=N.subarray(X);p=f(Q),Z=f(H),u=A(Q,p,1),b=A(H,Z,1)}else v(1);if(I>S){c&&v(0);break}}g&&d(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=C[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&d(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(D,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0-canary.4",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if("sendrecv"===t&&!0!==s.multistream)throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'");if(void 0!==i&&(o.metadata=i),a&&(o.redirect=!0),"signalingNotifyMetadata"in s&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),"multistream"in s&&!0===s.multistream&&(o.multistream=!0,"spotlight"in s&&(o.spotlight=s.spotlight,"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber)),!0===o.spotlight)){const e=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=e.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=e.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid)}if("simulcast"in s||"simulcastRid"in s){"simulcast"in s&&!0===s.simulcast&&(o.simulcast=!0);const e=["r0","r1","r2"];void 0!==s.simulcastRid&&0<=e.indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid)}"clientId"in s&&void 0!==s.clientId&&(o.client_id=s.clientId),"bundleId"in s&&void 0!==s.bundleId&&(o.bundle_id=s.bundleId),"dataChannelSignaling"in s&&"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"ignoreDisconnectWebSocket"in s&&"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const l=["audioCodecType","audioBitRate"],g=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],r=["videoCodecType","videoBitRate"],c=Object.assign({},s);Object.keys(c).forEach((e=>{"audio"===e&&"boolean"==typeof c[e]||"video"===e&&"boolean"==typeof c[e]||0<=l.indexOf(e)&&null!==c[e]||0<=g.indexOf(e)&&null!==c[e]||0<=r.indexOf(e)&&null!==c[e]||delete c[e]})),void 0!==c.audio&&(o.audio=c.audio);const d=Object.keys(c).some((e=>0<=l.indexOf(e)));o.audio&&d&&(o.audio={},"audioCodecType"in c&&(o.audio.codec_type=c.audioCodecType),"audioBitRate"in c&&(o.audio.bit_rate=c.audioBitRate));const C=Object.keys(c).some((e=>0<=g.indexOf(e)));o.audio&&C&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in c&&(o.audio.opus_params.channels=c.audioOpusParamsChannels),"audioOpusParamsClockRate"in c&&(o.audio.opus_params.clock_rate=c.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in c&&(o.audio.opus_params.maxplaybackrate=c.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in c&&(o.audio.opus_params.stereo=c.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in c&&(o.audio.opus_params.sprop_stereo=c.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in c&&(o.audio.opus_params.minptime=c.audioOpusParamsMinptime),"audioOpusParamsPtime"in c&&(o.audio.opus_params.ptime=c.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in c&&(o.audio.opus_params.useinbandfec=c.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in c&&(o.audio.opus_params.usedtx=c.audioOpusParamsUsedtx)),void 0!==c.video&&(o.video=c.video);const h=Object.keys(c).some((e=>0<=r.indexOf(e)));if(o.video&&h&&(o.video={},"videoCodecType"in c&&(o.video.codec_type=c.videoCodecType),"videoBitRate"in c&&(o.video.bit_rate=c.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if(!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8"),o.e2ee=!0}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.connectedSignalingUrl="",this.contactSignalingUrl=""}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}stopStream(){return new Promise(((e,t)=>(this.debug&&console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."),this.stream?(this.stream.getTracks().forEach((e=>{e.stop()})),this.stream=null,e()):e())))}async signalingTerminate(){await this.stopStream();for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}async abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.contactSignalingUrl="",this.connectedSignalingUrl="",this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=async e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),await this.signalingTerminate(),s(t)},e.onmessage=async t=>{if(t.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",t.data),void this.signalingOnMessageE2EE(t.data);if("string"!=typeof t.data)throw new Error("Received invalid signaling data");const n=JSON.parse(t.data);if("offer"==n.type)this.writeWebSocketSignalingLog("onmessage-offer",n),this.signalingOnMessageTypeOffer(n),this.connectedSignalingUrl=e.url,i(n);else if("update"==n.type)this.writeWebSocketSignalingLog("onmessage-update",n),await this.signalingOnMessageTypeUpdate(n);else if("re-offer"==n.type)this.writeWebSocketSignalingLog("onmessage-re-offer",n),await this.signalingOnMessageTypeReOffer(n);else if("ping"==n.type)await this.signalingOnMessageTypePing(n);else if("push"==n.type)this.callbacks.push(n,"websocket");else if("notify"==n.type)"connection.created"===n.event_type?this.writeWebSocketTimelineLog("notify-connection.created",n):"connection.destroyed"===n.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",n),this.signalingOnMessageTypeNotify(n,"websocket");else if("switched"==n.type)this.writeWebSocketSignalingLog("onmessage-switched",n),this.signalingOnMessageTypeSwitched(n);else if("redirect"==n.type){this.writeWebSocketSignalingLog("onmessage-redirect",n);try{const e=await this.signalingOnMessageTypeRedirect(n);i(e)}catch(e){s(e)}}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e,t||(this.contactSignalingUrl=e.url,this.writeWebSocketSignalingLog("contact-signaling-url",this.contactSignalingUrl)))})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=async e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),await this.signalingTerminate(),t(n)},this.ws.onerror=async e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),await this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=async e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((async()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=async e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),await this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=e.target;let s;"string"==typeof e.data?s=(new TextEncoder).encode(e.data):e.data instanceof ArrayBuffer?s=e.data:console.warn("Received onmessage event data is not of type String or ArrayBuffer."),void 0!==s&&(!0===n.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(i.label,s)))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");if("open"!==n.readyState)throw new Error("Messaging DataChannel is not open");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var p=new t(32);for(m=0;m<32;++m)p[m]=5;var Z=A(b,9,0),w=A(b,9,1),S=A(p,5,0),V=A(p,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(2==e.BYTES_PER_ELEMENT?n:4==e.BYTES_PER_ELEMENT?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},E=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},X=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=O(s[C-1],m,0);if(u>i){a=0;var A=0,b=u-i,p=1<i))break;A+=p-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},O=function(e,t,n){return-1==e.s?Math.max(O(e.l,t,n+1),O(e.r,t,n+1)):t[e.s]=n},B=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},N=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!D[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=N(g,b)+N(r,p)+c,z=N(g,u)+N(r,f)+c+14+3*U+N(K,D)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(C,C+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=Z,j=b,Q=S,H=p;for(L=0;L255){te=l[L]>>>18&31;E(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];E(t,I,Q[ne]),I+=H[ne],ne>3&&(E(t,I,l[L]>>>5&8191),I+=a[ne])}else E(t,I,M[l[L]]),I+=j[l[L]];return E(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),J=new t(0),D=function(e,o,l,g,r){return function(e,o,l,g,r,d){var C=e.length,I=new t(g+C+5*(1+Math.ceil(C/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||C<8)for(var A=0;A<=C;A+=65535){var b=A+65535;b>=C&&(m[u>>3]=d),u=Y(m,u+1,e.subarray(A,b))}else{for(var p=L[o-1],Z=p>>>13,w=8191&p,S=(1<7e3||B>24576)&&j>423){u=K(e,m,0,v,T,E,O,B,D,A-D,u),B=X=O=0,D=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)E[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(Z,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[B++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];O+=s[ae]+a[oe],++T[257+ae],++E[oe],N=A+H,++X}else v[B++]=e[A],++T[e[A]]}}u=K(e,m,d,v,T,E,O,B,D,A-D,u),!d&&7&u&&(u=Y(m,u+1,J))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=D(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var d=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,p=i.m,Z=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,E=F+T;if(E>l){c&&v(0);break}g&&d(m+T),n.set(e.subarray(F,E),m),i.b=m+=T,i.p=I=8*E,i.f=h;continue}if(1==R)u=w,b=V,p=9,Z=5;else if(2==R){var X=y(e,I,31)+257,O=y(e,I+10,15)+4,B=X+y(e,I+5,31)+1;I+=14;for(var N=new t(B),Y=new t(19),K=0;K>>4)<16)N[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=N[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)N[K++]=M}}var Q=N.subarray(0,X),H=N.subarray(X);p=f(Q),Z=f(H),u=A(Q,p,1),b=A(H,Z,1)}else v(1);if(I>S){c&&v(0);break}}g&&d(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=C[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&d(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(J,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0-canary.5",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if("sendrecv"===t&&!0!==s.multistream)throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'");!0===a&&(o.redirect=!0),"boolean"==typeof s.multistream&&(o.multistream=s.multistream),"boolean"==typeof s.simulcast&&(o.simulcast=s.simulcast);void 0!==s.simulcastRid&&0<=["r0","r1","r2"].indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid),"boolean"==typeof s.spotlight&&(o.spotlight=s.spotlight),"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber);const l=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=l.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=l.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid),void 0!==i&&(o.metadata=i),void 0!==s.signalingNotifyMetadata&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),void 0!==s.clientId&&(o.client_id=s.clientId),void 0!==s.bundleId&&(o.bundle_id=s.bundleId),"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const g=["audioCodecType","audioBitRate"],r=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],c=["videoCodecType","videoBitRate"],d=Object.assign({},s);Object.keys(d).forEach((e=>{"audio"===e&&"boolean"==typeof d[e]||"video"===e&&"boolean"==typeof d[e]||0<=g.indexOf(e)&&null!==d[e]||0<=r.indexOf(e)&&null!==d[e]||0<=c.indexOf(e)&&null!==d[e]||delete d[e]})),void 0!==d.audio&&(o.audio=d.audio);const C=Object.keys(d).some((e=>0<=g.indexOf(e)));o.audio&&C&&(o.audio={},"audioCodecType"in d&&(o.audio.codec_type=d.audioCodecType),"audioBitRate"in d&&(o.audio.bit_rate=d.audioBitRate));const h=Object.keys(d).some((e=>0<=r.indexOf(e)));o.audio&&h&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in d&&(o.audio.opus_params.channels=d.audioOpusParamsChannels),"audioOpusParamsClockRate"in d&&(o.audio.opus_params.clock_rate=d.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in d&&(o.audio.opus_params.maxplaybackrate=d.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in d&&(o.audio.opus_params.stereo=d.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in d&&(o.audio.opus_params.sprop_stereo=d.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in d&&(o.audio.opus_params.minptime=d.audioOpusParamsMinptime),"audioOpusParamsPtime"in d&&(o.audio.opus_params.ptime=d.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in d&&(o.audio.opus_params.useinbandfec=d.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in d&&(o.audio.opus_params.usedtx=d.audioOpusParamsUsedtx)),void 0!==d.video&&(o.video=d.video);const I=Object.keys(d).some((e=>0<=c.indexOf(e)));if(o.video&&I&&(o.video={},"videoCodecType"in d&&(o.video.codec_type=d.videoCodecType),"videoBitRate"in d&&(o.video.bit_rate=d.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if("boolean"==typeof s.e2ee&&(o.e2ee=s.e2ee),!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8")}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.connectedSignalingUrl="",this.contactSignalingUrl=""}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}stopStream(){return new Promise(((e,t)=>(this.debug&&console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."),this.stream?(this.stream.getTracks().forEach((e=>{e.stop()})),this.stream=null,e()):e())))}async signalingTerminate(){await this.stopStream();for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}async abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.contactSignalingUrl="",this.connectedSignalingUrl="",this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=async e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),await this.signalingTerminate(),s(t)},e.onmessage=async t=>{if(t.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",t.data),void this.signalingOnMessageE2EE(t.data);if("string"!=typeof t.data)throw new Error("Received invalid signaling data");const n=JSON.parse(t.data);if("offer"==n.type)this.writeWebSocketSignalingLog("onmessage-offer",n),this.signalingOnMessageTypeOffer(n),this.connectedSignalingUrl=e.url,i(n);else if("update"==n.type)this.writeWebSocketSignalingLog("onmessage-update",n),await this.signalingOnMessageTypeUpdate(n);else if("re-offer"==n.type)this.writeWebSocketSignalingLog("onmessage-re-offer",n),await this.signalingOnMessageTypeReOffer(n);else if("ping"==n.type)await this.signalingOnMessageTypePing(n);else if("push"==n.type)this.callbacks.push(n,"websocket");else if("notify"==n.type)"connection.created"===n.event_type?this.writeWebSocketTimelineLog("notify-connection.created",n):"connection.destroyed"===n.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",n),this.signalingOnMessageTypeNotify(n,"websocket");else if("switched"==n.type)this.writeWebSocketSignalingLog("onmessage-switched",n),this.signalingOnMessageTypeSwitched(n);else if("redirect"==n.type){this.writeWebSocketSignalingLog("onmessage-redirect",n);try{const e=await this.signalingOnMessageTypeRedirect(n);i(e)}catch(e){s(e)}}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e,t||(this.contactSignalingUrl=e.url,this.writeWebSocketSignalingLog("contact-signaling-url",this.contactSignalingUrl)))})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=async e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),await this.signalingTerminate(),t(n)},this.ws.onerror=async e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),await this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=async e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((async()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=async e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),await this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=e.target;let s;"string"==typeof e.data?s=(new TextEncoder).encode(e.data):e.data instanceof ArrayBuffer?s=e.data:console.warn("Received onmessage event data is not of type String or ArrayBuffer."),void 0!==s&&(!0===n.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(i.label,s)))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");if("open"!==n.readyState)throw new Error("Messaging DataChannel is not open");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1 {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") ; else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t};\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t};\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t};\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});\n\t\t}\n\t})();\n}\n\nconst WORKER_SCRIPT = \"InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCkgPSBsb2coeCkgLyBsb2coMjU2KQogICAgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5sb2cobikgLyBNYXRoLmxvZygyICoqIDgpICsgMSk7Cn0KZnVuY3Rpb24gYXJyYXlCdWZmZXJUb051bWJlcihhcnJheUJ1ZmZlcikgewogICAgLy8gMzJiaXQg44G+44Gn44KS5oOz5a6aIChCaWdJbnQg44G444Gu5pu444GN5o+b44GI5pmC44Gr6KaB5L+u5q2jKQogICAgY29uc3QgbmV3QXJyYXlCdWZmZXIgPSBuZXcgQXJyYXlCdWZmZXIoVWludDMyQXJyYXkuQllURVNfUEVSX0VMRU1FTlQpOwogICAgY29uc3Qgb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EZXJpdmVLZXlbImtleUlkIl0gPCBrZXlJZCkgewogICAgICAgICAgICBjb25zdCBuZXh0U2VsZkRlcml2ZUtleSA9IHsgY29ubmVjdGlvbklkLCBrZXlJZCwgZGVyaXZlS2V5IH07CiAgICAgICAgICAgIHNlbGZEZXJpdmVLZXlNYXAuc2V0KCJsYXRlc3QiLCBuZXh0U2VsZkRlcml2ZUtleSk7CiAgICAgICAgfQogICAgfQogICAgZWxzZSB7CiAgICAgICAgY29uc3QgbmV4dFNlbGZEZXJpdmVLZXkgPSB7IGNvbm5lY3Rpb25JZCwga2V5SWQsIGRlcml2ZUtleSB9OwogICAgICAgIHNlbGZEZXJpdmVLZXlNYXAuc2V0KCJsYXRlc3QiLCBuZXh0U2VsZkRlcml2ZUtleSk7CiAgICB9Cn0KZnVuY3Rpb24gc2lsZW5jZUZyYW1lKGVuY29kZWRGcmFtZSkgewogICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkLCByZWNlaXZlTWVzc2FnZSDlj5fkv6HliY3jga7loLTlkIgKICAgIGlmIChlbmNvZGVkRnJhbWUudHlwZSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgLy8g6Z+z5aOw44Gv5pqX5Y+35YyW44Gv44GE44KL44Go6IGe44GR44Gf44KC44Gu44GY44KD44Gq44GE44Gu44Gn572u44GN5o+b44GI44KLCiAgICAgICAgY29uc3QgbmV3RGF0YSA9IG5ldyBBcnJheUJ1ZmZlcigzKTsKICAgICAgICBjb25zdCBuZXdVaW50OCA9IG5ldyBVaW50OEFycmF5KG5ld0RhdGEpOwogICAgICAgIC8vIE9wdXMg44K144Kk44Os44Oz44K544OV44Os44O844OgCiAgICAgICAgbmV3VWludDguc2V0KFsweGQ4LCAweGZmLCAweGZlXSk7CiAgICAgICAgZW5jb2RlZEZyYW1lLmRhdGEgPSBuZXdEYXRhOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgLy8g5pig5YOP44GM5q2j5bi444GY44KD44Gq44GE44Gf44KBIFBMSS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S2V5KG1hdGVyaWFsKS50aGVuKChkZXJpdmVLZXkpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRTZWxmRGVyaXZlS2V5KHNlbGZDb25uZWN0aW9uSWQsIHNlbGZLZXlJZCwgZGVyaXZlS2V5KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgZ2VuZXJhdGVXcml0ZUlWKG1hdGVyaWFsKS50aGVuKCh3cml0ZUlWKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2V0V3JpdGVJVihzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5lY3Rpb25JZCwga2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBzZXRMYXRlc3RSZW1vdGVLZXlJZChjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gInJlbW92ZVJlbW90ZURlcml2ZUtleSIpIHsKICAgICAgICBjb25zdCB7IGNvbm5lY3Rpb25JZCB9ID0gZXZlbnQuZGF0YTsKICAgICAgICByZW1vdmVEZXJpdmVLZXkoY29ubmVjdGlvbklkKTsKICAgIH0KICAgIGVsc2UgaWYgKHR5cGUgPT09ICJlbmNyeXB0IikgewogICAgICAgIGNvbnN0IHsgcmVhZGFibGVTdHJlYW0sIHdyaXRhYmxlU3RyZWFtIH0gPSBldmVudC5kYXRhOwogICAgICAgIGNvbnN0IHRyYW5zZm9ybVN0cmVhbSA9IG5ldyBUcmFuc2Zvcm1TdHJlYW0oewogICAgICAgICAgICB0cmFuc2Zvcm06IGVuY3J5cHRGdW5jdGlvbiwKICAgICAgICB9KTsKICAgICAgICByZWFkYWJsZVN0cmVhbS5waXBlVGhyb3VnaCh0cmFuc2Zvcm1TdHJlYW0pLnBpcGVUbyh3cml0YWJsZVN0cmVhbSk7CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAiZGVjcnlwdCIpIHsKICAgICAgICBjb25zdCB7IHJlYWRhYmxlU3RyZWFtLCB3cml0YWJsZVN0cmVhbSB9ID0gZXZlbnQuZGF0YTsKICAgICAgICBjb25zdCB0cmFuc2Zvcm1TdHJlYW0gPSBuZXcgVHJhbnNmb3JtU3RyZWFtKHsKICAgICAgICAgICAgdHJhbnNmb3JtOiBkZWNyeXB0RnVuY3Rpb24sCiAgICAgICAgfSk7CiAgICAgICAgcmVhZGFibGVTdHJlYW0ucGlwZVRocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=\";\nclass SoraE2EE {\n constructor() {\n // 対応しているかどうかの判断\n // @ts-ignore トライアル段階の API なので無視する\n const supportsInsertableStreams = !!RTCRtpSender.prototype.createEncodedStreams;\n if (!supportsInsertableStreams) {\n throw new Error(\"E2EE is not supported in this browser.\");\n }\n this.worker = null;\n this.onWorkerDisconnect = null;\n }\n // worker を起動する\n startWorker() {\n // ワーカーを起動する\n const workerScript = atob(WORKER_SCRIPT);\n this.worker = new Worker(URL.createObjectURL(new Blob([workerScript], { type: \"application/javascript\" })));\n this.worker.onmessage = (event) => {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n // role: sendrecv で multistream: false の場合は例外を発生させる\n if (role === \"sendrecv\" && options.multistream !== true) {\n throw new Error(\"Failed to parse options. Options multistream must be true when connecting using 'sendrecv'\");\n }\n\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n\n if (redirect) {\n message.redirect = true;\n }\n\n if (\"signalingNotifyMetadata\" in options) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n\n if (\"multistream\" in options && options.multistream === true) {\n // multistream\n message.multistream = true;\n // spotlight\n if (\"spotlight\" in options) {\n message.spotlight = options.spotlight;\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n }\n if (message.spotlight === true) {\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n }\n }\n\n if (\"simulcast\" in options || \"simulcastRid\" in options) {\n // simulcast\n if (\"simulcast\" in options && options.simulcast === true) {\n message.simulcast = true;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n }\n\n if (\"clientId\" in options && options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n\n if (\"bundleId\" in options && options.bundleId !== undefined) {\n message.bundle_id = options.bundleId;\n }\n\n if (\"dataChannelSignaling\" in options && typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (\"ignoreDisconnectWebSocket\" in options && typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n message.e2ee = true;\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WS シグナリングで type offer メッセージを受信したシグナリング URL\n */\n connectedSignalingUrl: string;\n /**\n * WS シグナリングで最初に type connect を送信したシグナリング URL\n */\n contactSignalingUrl: string;\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.connectedSignalingUrl = \"\";\n this.contactSignalingUrl = \"\";\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * stream を停止するメソッド\n */\n private stopStream(): Promise {\n return new Promise((resolve, _) => {\n if (this.debug) {\n console.warn(\n \"@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself.\"\n );\n }\n if (!this.stream) {\n return resolve();\n }\n this.stream.getTracks().forEach((t) => {\n t.stop();\n });\n this.stream = null;\n return resolve();\n });\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private async signalingTerminate(): Promise {\n await this.stopStream();\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private async abendPeerConnectionState(title: SoraAbendTitle): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.contactSignalingUrl = \"\";\n this.connectedSignalingUrl = \"\";\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = async (event): Promise => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n this.connectedSignalingUrl = ws.url;\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n try {\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n } catch (error) {\n reject(error);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n // 初回に接続した URL を状態管理する\n if (!redirect) {\n this.contactSignalingUrl = ws.url;\n this.writeWebSocketSignalingLog(\"contact-signaling-url\", this.contactSignalingUrl);\n }\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = async (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = async (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n await this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = async (_): Promise => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = async (_): Promise => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n await this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(async () => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n await this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n dataChannel.bufferedAmountLowThreshold = 65536;\n dataChannel.binaryType = \"arraybuffer\";\n this.soraDataChannels[dataChannel.label] = dataChannel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const dataChannel = event.target as RTCDataChannel;\n let data: ArrayBuffer | undefined = undefined;\n if (typeof event.data === \"string\") {\n data = new TextEncoder().encode(event.data);\n } else if (event.data instanceof ArrayBuffer) {\n data = event.data;\n } else {\n console.warn(\"Received onmessage event data is not of type String or ArrayBuffer.\");\n }\n\n if (data !== undefined) {\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n }\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n if (dataChannel.readyState !== \"open\") {\n throw new Error(\"Messaging DataChannel is not open\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n // sendrecv の場合、multistream に初期値を指定する\n const sendrecvOptions: ConnectionOptions = Object.assign({ multistream: true }, options);\n return new ConnectionPublisher(\n this.signalingUrlCandidates,\n \"sendrecv\",\n channelId,\n metadata,\n sendrecvOptions,\n this.debug\n );\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","BYTES_PER_ELEMENT","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","multistream","signaling_notify_metadata","signalingNotifyMetadata","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","simulcast","simalcastRids","simulcastRid","simulcast_rid","clientId","client_id","bundleId","bundle_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","connectedSignalingUrl","contactSignalingUrl","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","stopStream","getTracks","dataChannel","initializeConnection","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","signalingTerminate","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","abendPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmountLowThreshold","bufferedAmount","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","target","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","ontrack","streams","muted","onremovetrack","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendrecvOptions","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMediaStreamConstraints","mediastream","applyConstraints"],"mappings":"qOAslBA,MAAMA,EACFC,cAII,MADoCC,aAAaC,UAAUC,qBAEvD,MAAM,IAAIC,MAAM,0CAEpBC,KAAKC,OAAS,KACdD,KAAKE,mBAAqB,KAG9BC,cAEI,MAAMC,EAAeC,KAfP,wjwBAgBdL,KAAKC,OAAS,IAAIK,OAAOC,IAAIC,gBAAgB,IAAIC,KAAK,CAACL,GAAe,CAAEM,KAAM,6BAC9EV,KAAKC,OAAOU,UAAaC,IACrB,MAAMC,UAA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,WACAtG,EACAC,EACA6T,EACA7xB,KAAK2O,OAqBTmjB,SACE/T,EACAC,EAAqB,KACrBC,EAA6B,CAAEM,OAAO,EAAMC,OAAO,IAEnD,OAAO,IAAIqS,GAAoB7wB,KAAKqkB,uBAAwB,WAAYtG,EAAWC,EAAUC,EAASje,KAAK2O,OAoB7GojB,SACEhU,EACAC,EAAqB,KACrBC,EAA6B,CAAEM,OAAO,EAAMC,OAAO,IAEnD,OAAO,IAAI+S,GAAqBvxB,KAAKqkB,uBAAwB,WAAYtG,EAAWC,EAAUC,EAASje,KAAK2O,OAQ1Gob,mBACF,OAAO/pB,KAAKqkB,8BAOD,CAYb2N,SAAU7wB,eAAgBuC,SAClBhE,EAASuyB,SAASvuB,IAgB1BwuB,WAAY,SAAU7N,EAA2C1V,GAAQ,GACvE,OAAO,IAAIgjB,GAAetN,EAAwB1V,IAOpDoC,QAAS,WACP,MAAO,qBAOTohB,QAAS,CACPC,4BCnMJjxB,eACEkxB,EACA3N,GAEA,GAAIA,EAAYnG,OAAsC,kBAAtBmG,EAAYnG,MAC1C,IAAK,MAAM7c,KAAS2wB,EAAYlM,uBACxBzkB,EAAM4wB,iBAAiB5N,EAAYnG,OAG7C,GAAImG,EAAYlG,OAAsC,kBAAtBkG,EAAYlG,MAC1C,IAAK,MAAM9c,KAAS2wB,EAAY1L,uBACxBjlB,EAAM4wB,iBAAiB5N,EAAYlG"} \ No newline at end of file +{"version":3,"file":"sora.min.js","sources":["../packages/e2ee/dist/sora_e2ee.mjs","../node_modules/fflate/esm/browser.js","../packages/sdk/src/utils.ts","../packages/sdk/src/base.ts","../packages/sdk/src/publisher.ts","../packages/sdk/src/subscriber.ts","../packages/sdk/src/sora.ts","../packages/sdk/src/helpers.ts"],"sourcesContent":["/**\n * @sora/e2ee\n * WebRTC SFU Sora JavaScript E2EE Library\n * @version: 2021.1.0\n * @author: Shiguredo Inc.\n * @license: Apache-2.0\n **/\n\n// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nfunction WasmExec () {\n\t(() => {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") ; else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t};\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t};\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t};\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});\n\t\t}\n\t})();\n}\n\nconst WORKER_SCRIPT = \"InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCkgPSBsb2coeCkgLyBsb2coMjU2KQogICAgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5sb2cobikgLyBNYXRoLmxvZygyICoqIDgpICsgMSk7Cn0KZnVuY3Rpb24gYXJyYXlCdWZmZXJUb051bWJlcihhcnJheUJ1ZmZlcikgewogICAgLy8gMzJiaXQg44G+44Gn44KS5oOz5a6aIChCaWdJbnQg44G444Gu5pu444GN5o+b44GI5pmC44Gr6KaB5L+u5q2jKQogICAgY29uc3QgbmV3QXJyYXlCdWZmZXIgPSBuZXcgQXJyYXlCdWZmZXIoVWludDMyQXJyYXkuQllURVNfUEVSX0VMRU1FTlQpOwogICAgY29uc3QgbmV3RGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcobmV3QXJyYXlCdWZmZXIpOwogICAgY29uc3QgZGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcoYXJyYXlCdWZmZXIpOwogICAgY29uc3QgcGFkZGluZ0xlbmd0aCA9IFVpbnQzMkFycmF5LkJZVEVTX1BFUl9FTEVNRU5UIC0gZGF0YVZpZXcuYnl0ZUxlbmd0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ogICAgfQogICAgZWxzZSB7CiAgICAgICAgY29uc3QgbmV4dFNlbGZEZXJpdmVLZXkgPSB7IGNvbm5lY3Rpb25JZCwga2V5SWQsIGRlcml2ZUtleSB9OwogICAgICAgIHNlbGZEZXJpdmVLZXlNYXAuc2V0KCJsYXRlc3QiLCBuZXh0U2VsZkRlcml2ZUtleSk7CiAgICB9Cn0KZnVuY3Rpb24gc2lsZW5jZUZyYW1lKGVuY29kZWRGcmFtZSkgewogICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkLCByZWNlaXZlTWVzc2FnZSDlj5fkv6HliY3jga7loLTlkIgKICAgIGlmIChlbmNvZGVkRnJhbWUudHlwZSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgLy8g6Z+z5aOw44Gv5pqX5Y+35YyW44Gv44GE44KL44Go6IGe44GR44Gf44KC44Gu44GY44KD44Gq44GE44Gu44Gn572u44GN5o+b44GI44KLCiAgICAgICAgY29uc3QgbmV3RGF0YSA9IG5ldyBBcnJheUJ1ZmZlcigzKTsKICAgICAgICBjb25zdCBuZXdVaW50OCA9IG5ldyBVaW50OEFycmF5KG5ld0RhdGEpOwogICAgICAgIC8vIE9wdXMg44K144Kk44Os44Oz44K544OV44Os44O844OgCiAgICAgICAgbmV3VWludDguc2V0KFsweGQ4LCAweGZmLCAweGZlXSk7CiAgICAgICAgZW5jb2RlZEZyYW1lLmRhdGEgPSBuZXdEYXRhOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgLy8g5pig5YOP44GM5q2j5bi444GY44KD44Gq44GE44Gf44KBIFBMSSDjgrnjg4jjg7zjg6DjgYznmbrnlJ/jgZfjgabjgZfjgb7jgYYKICAgICAgICAvLyDjgZ3jga7jgZ/jgoEgMzIweDI0MCDjga7nnJ/jgaPpu5LjgarnlLvpnaLjgavnva7jgY3mj5vjgYjjgosKICAgICAgICBjb25zdCBuZXdEYXRhID0gbmV3IEFycmF5QnVmZmVyKDYwKTsKICAgICAgICBjb25zdCBuZXdVaW50O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VuKCh3cml0ZUlWKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2V0V3JpdGVJVihzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5lY3Rpb25JZCwga2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBzZXRMYXRlc3RSZW1vdGVLZXlJZChjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gInJlbW92ZVJlbW90ZURlcml2ZUtleSIpIHsKICAgICAgICBjb25zdCB7IGNvbm5lY3Rpb25JZCB9ID0gZXZlbnQuZGF0YTsKICAgICAgICByZW1vdmVEZXJpdmVLZXkoY29ubmVjdGlvbklkKTsKICAgIH0KICAgIGVsc2UgaWYgKHR5cGUgPT09ICJlbmNyeXB0IikgewogICAgICAgIGNvbnN0IHsgcmVhZGFibGVTdHJlYW0sIHdyaXRhYmxlU3RyZWFtIH0gPSBldmVudC5kYXRhOwogICAgICAgIGNvbnN0IHRyYW5zZm9ybVN0cmVhbSA9IG5ldyBUcmFuc2Zvcm1TdHJlYW0oewogICAgICAgICAgICB0cmFuc2Zvcm06IGVuY3J5cHRGdW5jdGlvbiwKICAgICAgICB9KTsKICAgICAgICByZWFkYWJsZVN0cmVhbS5waXBlVGhyb3VnaCh0cmFuc2Zvcm1TdHJlYW0pLnBpcGVUbyh3cml0YWJsZVN0cmVhbSk7CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAiZGVjcnlwdCIpIHsKICAgICAgICBjb25zdCB7IHJlYWRhYmxlU3RyZWFtLCB3cml0YWJsZVN0cmVhbSB9ID0gZXZlbnQuZGF0YTsKICAgICAgICBjb25zdCB0cmFuc2Zvcm1TdHJlYW0gPSBuZXcgVHJhbnNmb3JtU3RyZWFtKHsKICAgICAgICAgICAgdHJhbnNmb3JtOiBkZWNyeXB0RnVuY3Rpb24sCiAgICAgICAgfSk7CiAgICAgICAgcmVhZGFibGVTdHJlYW0ucGlwZVRocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=\";\nclass SoraE2EE {\n constructor() {\n // 対応しているかどうかの判断\n // @ts-ignore トライアル段階の API なので無視する\n const supportsInsertableStreams = !!RTCRtpSender.prototype.createEncodedStreams;\n if (!supportsInsertableStreams) {\n throw new Error(\"E2EE is not supported in this browser.\");\n }\n this.worker = null;\n this.onWorkerDisconnect = null;\n }\n // worker を起動する\n startWorker() {\n // ワーカーを起動する\n const workerScript = atob(WORKER_SCRIPT);\n this.worker = new Worker(URL.createObjectURL(new Blob([workerScript], { type: \"application/javascript\" })));\n this.worker.onmessage = (event) => {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n // role: sendrecv で multistream: false の場合は例外を発生させる\n if (role === \"sendrecv\" && options.multistream !== true) {\n throw new Error(\"Failed to parse options. Options multistream must be true when connecting using 'sendrecv'\");\n }\n if (redirect === true) {\n message.redirect = true;\n }\n if (typeof options.multistream === \"boolean\") {\n message.multistream = options.multistream;\n }\n if (typeof options.simulcast === \"boolean\") {\n message.simulcast = options.simulcast;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n if (typeof options.spotlight === \"boolean\") {\n message.spotlight = options.spotlight;\n }\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n if (options.signalingNotifyMetadata !== undefined) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n if (options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n if (options.bundleId !== undefined) {\n message.bundle_id = options.bundleId;\n }\n if (typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n if (typeof options.e2ee === \"boolean\") {\n message.e2ee = options.e2ee;\n }\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WS シグナリングで type offer メッセージを受信したシグナリング URL\n */\n connectedSignalingUrl: string;\n /**\n * WS シグナリングで最初に type connect を送信したシグナリング URL\n */\n contactSignalingUrl: string;\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.connectedSignalingUrl = \"\";\n this.contactSignalingUrl = \"\";\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * stream を停止するメソッド\n */\n private stopStream(): Promise {\n return new Promise((resolve, _) => {\n if (this.debug) {\n console.warn(\n \"@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself.\"\n );\n }\n if (!this.stream) {\n return resolve();\n }\n this.stream.getTracks().forEach((t) => {\n t.stop();\n });\n this.stream = null;\n return resolve();\n });\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private async signalingTerminate(): Promise {\n await this.stopStream();\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private async abendPeerConnectionState(title: SoraAbendTitle): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.contactSignalingUrl = \"\";\n this.connectedSignalingUrl = \"\";\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = async (event): Promise => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n this.connectedSignalingUrl = ws.url;\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n try {\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n } catch (error) {\n reject(error);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n // 初回に接続した URL を状態管理する\n if (!redirect) {\n this.contactSignalingUrl = ws.url;\n this.writeWebSocketSignalingLog(\"contact-signaling-url\", this.contactSignalingUrl);\n }\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = async (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = async (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n await this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = async (_): Promise => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = async (_): Promise => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n await this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(async () => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n await this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n dataChannel.bufferedAmountLowThreshold = 65536;\n dataChannel.binaryType = \"arraybuffer\";\n this.soraDataChannels[dataChannel.label] = dataChannel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const dataChannel = event.target as RTCDataChannel;\n let data: ArrayBuffer | undefined = undefined;\n if (typeof event.data === \"string\") {\n data = new TextEncoder().encode(event.data);\n } else if (event.data instanceof ArrayBuffer) {\n data = event.data;\n } else {\n console.warn(\"Received onmessage event data is not of type String or ArrayBuffer.\");\n }\n\n if (data !== undefined) {\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n }\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n if (dataChannel.readyState !== \"open\") {\n throw new Error(\"Messaging DataChannel is not open\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n // sendrecv の場合、multistream に初期値を指定する\n const sendrecvOptions: ConnectionOptions = Object.assign({ multistream: true }, options);\n return new ConnectionPublisher(\n this.signalingUrlCandidates,\n \"sendrecv\",\n channelId,\n metadata,\n sendrecvOptions,\n this.debug\n );\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","BYTES_PER_ELEMENT","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","multistream","simulcast","simulcastRid","simulcast_rid","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","signalingNotifyMetadata","signaling_notify_metadata","clientId","client_id","bundleId","bundle_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","connectedSignalingUrl","contactSignalingUrl","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","stopStream","getTracks","dataChannel","initializeConnection","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","signalingTerminate","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","abendPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmountLowThreshold","bufferedAmount","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","target","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","ontrack","streams","muted","onremovetrack","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendrecvOptions","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMediaStreamConstraints","mediastream","applyConstraints"],"mappings":"qOAslBA,MAAMA,EACFC,cAII,MADoCC,aAAaC,UAAUC,qBAEvD,MAAM,IAAIC,MAAM,0CAEpBC,KAAKC,OAAS,KACdD,KAAKE,mBAAqB,KAG9BC,cAEI,MAAMC,EAAeC,KAfP,wjwBAgBdL,KAAKC,OAAS,IAAIK,OAAOC,IAAIC,gBAAgB,IAAIC,KAAK,CAACL,GAAe,CAAEM,KAAM,6BAC9EV,KAAKC,OAAOU,UAAaC,IACrB,MAAMC,UAAEA,GAAcD,EAAME,KACV,eAAdD,GAAiE,mBAA5Bb,KAAKE,oBAC1CF,KAAKE,sBAKjBa,cACQf,KAAKC,QACLD,KAAKC,OAAOe,YAAY,CACpBN,KAAM,UAKlBO,kBACQjB,KAAKC,QACLD,KAAKC,OAAOiB,YAIpBC,aACI,MAAMC,aAAEA,SAAuBC,OAAOC,KAAKC,OAC3C,OAAOH,EAEXI,qBAAqBC,GACjB,IAAKA,EAAOC,MACR,OAGJ,MAAMC,EAAgBF,EAAO3B,uBACvB8B,EAAiBD,EAAcC,gBAAkBD,EAAcE,SAC/DC,EAAiBH,EAAcG,gBAAkB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Q,GACvE,OAAO,IAAI+iB,GAAetN,EAAwBzV,IAOpDoC,QAAS,WACP,MAAO,qBAOTmhB,QAAS,CACPC,4BCnMJhxB,eACEixB,EACA3N,GAEA,GAAIA,EAAYlG,OAAsC,kBAAtBkG,EAAYlG,MAC1C,IAAK,MAAM7c,KAAS0wB,EAAYlM,uBACxBxkB,EAAM2wB,iBAAiB5N,EAAYlG,OAG7C,GAAIkG,EAAYjG,OAAsC,kBAAtBiG,EAAYjG,MAC1C,IAAK,MAAM9c,KAAS0wB,EAAY1L,uBACxBhlB,EAAM2wB,iBAAiB5N,EAAYjG"} \ No newline at end of file diff --git a/dist/sora.mjs b/dist/sora.mjs index 88153730..0f94c8d1 100644 --- a/dist/sora.mjs +++ b/dist/sora.mjs @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2022.1.0-canary.4 + * @version: 2022.1.0-canary.5 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -1627,7 +1627,7 @@ function createSignalingMessage(offerSDP, role, channelId, metadata, options, re } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2022.1.0-canary.4", + sora_client: "Sora JavaScript SDK 2022.1.0-canary.5", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -1639,55 +1639,48 @@ function createSignalingMessage(offerSDP, role, channelId, metadata, options, re if (role === "sendrecv" && options.multistream !== true) { throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'"); } - if (metadata !== undefined) { - message.metadata = metadata; - } - if (redirect) { + if (redirect === true) { message.redirect = true; } - if ("signalingNotifyMetadata" in options) { - message.signaling_notify_metadata = options.signalingNotifyMetadata; + if (typeof options.multistream === "boolean") { + message.multistream = options.multistream; } - if ("multistream" in options && options.multistream === true) { - // multistream - message.multistream = true; - // spotlight - if ("spotlight" in options) { - message.spotlight = options.spotlight; - if ("spotlightNumber" in options) { - message.spotlight_number = options.spotlightNumber; - } - } - if (message.spotlight === true) { - const spotlightFocusRids = ["none", "r0", "r1", "r2"]; - if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) { - message.spotlight_focus_rid = options.spotlightFocusRid; - } - if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) { - message.spotlight_unfocus_rid = options.spotlightUnfocusRid; - } - } + if (typeof options.simulcast === "boolean") { + message.simulcast = options.simulcast; } - if ("simulcast" in options || "simulcastRid" in options) { - // simulcast - if ("simulcast" in options && options.simulcast === true) { - message.simulcast = true; - } - const simalcastRids = ["r0", "r1", "r2"]; - if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) { - message.simulcast_rid = options.simulcastRid; - } + const simalcastRids = ["r0", "r1", "r2"]; + if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) { + message.simulcast_rid = options.simulcastRid; } - if ("clientId" in options && options.clientId !== undefined) { + if (typeof options.spotlight === "boolean") { + message.spotlight = options.spotlight; + } + if ("spotlightNumber" in options) { + message.spotlight_number = options.spotlightNumber; + } + const spotlightFocusRids = ["none", "r0", "r1", "r2"]; + if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) { + message.spotlight_focus_rid = options.spotlightFocusRid; + } + if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) { + message.spotlight_unfocus_rid = options.spotlightUnfocusRid; + } + if (metadata !== undefined) { + message.metadata = metadata; + } + if (options.signalingNotifyMetadata !== undefined) { + message.signaling_notify_metadata = options.signalingNotifyMetadata; + } + if (options.clientId !== undefined) { message.client_id = options.clientId; } - if ("bundleId" in options && options.bundleId !== undefined) { + if (options.bundleId !== undefined) { message.bundle_id = options.bundleId; } - if ("dataChannelSignaling" in options && typeof options.dataChannelSignaling === "boolean") { + if (typeof options.dataChannelSignaling === "boolean") { message.data_channel_signaling = options.dataChannelSignaling; } - if ("ignoreDisconnectWebSocket" in options && typeof options.ignoreDisconnectWebSocket === "boolean") { + if (typeof options.ignoreDisconnectWebSocket === "boolean") { message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket; } // parse options @@ -1792,6 +1785,9 @@ function createSignalingMessage(offerSDP, role, channelId, metadata, options, re if (message.simulcast && !enabledSimulcast() && role !== "recvonly") { throw new Error("Simulcast can not be used with this browser"); } + if (typeof options.e2ee === "boolean") { + message.e2ee = options.e2ee; + } if (options.e2ee === true) { if (message.signaling_notify_metadata === undefined) { message.signaling_notify_metadata = {}; @@ -1805,7 +1801,6 @@ function createSignalingMessage(offerSDP, role, channelId, metadata, options, re if (message.video) { message.video["codec_type"] = "VP8"; } - message.e2ee = true; } if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) { message.data_channels = parseDataChannelConfigurations(options.dataChannels); @@ -4412,7 +4407,7 @@ var sora = { * @public */ version: function () { - return "2022.1.0-canary.4"; + return "2022.1.0-canary.5"; }, /** * WebRTC のユーティリティ関数群 diff --git a/package-lock.json b/package-lock.json index 5200b875..383b5313 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sora-js-sdk", - "version": "2022.1.0-canary.4", + "version": "2022.1.0-canary.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "sora-js-sdk", - "version": "2022.1.0-canary.4", + "version": "2022.1.0-canary.5", "license": "Apache-2.0", "workspaces": [ "packages/go-wasm", diff --git a/package.json b/package.json index e2c79d9d..3d219a00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sora-js-sdk", - "version": "2022.1.0-canary.4", + "version": "2022.1.0-canary.5", "description": "WebRTC SFU Sora JavaScript SDK", "main": "dist/sora.min.js", "module": "dist/sora.mjs", From 958f8aabd6936542654b7894e5ebb35b950026c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 16:02:08 +0000 Subject: [PATCH 57/86] Bump eslint from 8.12.0 to 8.13.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.12.0 to 8.13.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.12.0...v8.13.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 16 ++++++++-------- packages/sdk/package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 383b5313..39c4aa3e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3048,9 +3048,9 @@ } }, "node_modules/eslint": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.12.0.tgz", - "integrity": "sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.13.0.tgz", + "integrity": "sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.2.1", @@ -8471,7 +8471,7 @@ "@types/jest": "^27.4.1", "@typescript-eslint/eslint-plugin": "5.18.0", "@typescript-eslint/parser": "5.18.0", - "eslint": "8.12.0", + "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.5.1", @@ -9548,7 +9548,7 @@ "@types/jest": "^27.4.1", "@typescript-eslint/eslint-plugin": "5.18.0", "@typescript-eslint/parser": "5.18.0", - "eslint": "8.12.0", + "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "fflate": "^0.7.3", @@ -10843,9 +10843,9 @@ } }, "eslint": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.12.0.tgz", - "integrity": "sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.13.0.tgz", + "integrity": "sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ==", "dev": true, "requires": { "@eslint/eslintrc": "^1.2.1", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 078f093e..2bebdb57 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -15,7 +15,7 @@ "@types/jest": "^27.4.1", "@typescript-eslint/eslint-plugin": "5.18.0", "@typescript-eslint/parser": "5.18.0", - "eslint": "8.12.0", + "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.5.1", From 1c49c3314f575752bb9b8399fae3983fb412862b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 16:02:56 +0000 Subject: [PATCH 58/86] Bump typedoc from 0.22.13 to 0.22.15 Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.22.13 to 0.22.15. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.22.13...v0.22.15) --- updated-dependencies: - dependency-name: typedoc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 383b5313..4f2bb216 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7951,9 +7951,9 @@ } }, "node_modules/typedoc": { - "version": "0.22.13", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.13.tgz", - "integrity": "sha512-NHNI7Dr6JHa/I3+c62gdRNXBIyX7P33O9TafGLd07ur3MqzcKgwTvpg18EtvCLHJyfeSthAtCLpM7WkStUmDuQ==", + "version": "0.22.15", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.15.tgz", + "integrity": "sha512-CMd1lrqQbFvbx6S9G6fL4HKp3GoIuhujJReWqlIvSb2T26vGai+8Os3Mde7Pn832pXYemd9BMuuYWhFpL5st0Q==", "dev": true, "dependencies": { "glob": "^7.2.0", @@ -14593,9 +14593,9 @@ } }, "typedoc": { - "version": "0.22.13", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.13.tgz", - "integrity": "sha512-NHNI7Dr6JHa/I3+c62gdRNXBIyX7P33O9TafGLd07ur3MqzcKgwTvpg18EtvCLHJyfeSthAtCLpM7WkStUmDuQ==", + "version": "0.22.15", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.15.tgz", + "integrity": "sha512-CMd1lrqQbFvbx6S9G6fL4HKp3GoIuhujJReWqlIvSb2T26vGai+8Os3Mde7Pn832pXYemd9BMuuYWhFpL5st0Q==", "dev": true, "requires": { "glob": "^7.2.0", From a824071e0cb8f40896967cc302ab338dab69facf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 16:03:23 +0000 Subject: [PATCH 59/86] Bump npm-check-updates from 12.5.7 to 12.5.8 Bumps [npm-check-updates](https://github.com/raineorshine/npm-check-updates) from 12.5.7 to 12.5.8. - [Release notes](https://github.com/raineorshine/npm-check-updates/releases) - [Changelog](https://github.com/raineorshine/npm-check-updates/blob/main/CHANGELOG.md) - [Commits](https://github.com/raineorshine/npm-check-updates/compare/v12.5.7...v12.5.8) --- updated-dependencies: - dependency-name: npm-check-updates dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 383b5313..9937eac8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6025,9 +6025,9 @@ } }, "node_modules/npm-check-updates": { - "version": "12.5.7", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.7.tgz", - "integrity": "sha512-WDkqPBevmgphV1UH3FImsDEpTAq2UFvnMZC3GdXPknE2VL701kfKylnae8IA9ZeYfm/uU0249N9gjMXqA/9y3w==", + "version": "12.5.8", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.8.tgz", + "integrity": "sha512-8SDZ6qYXI0aKf63zSbByqB9QmK8ygrZ+UVcXg9kGQyvH7dGIcFauFF0ksC0NdThHkU/5QhowJVSHXva9zujkJg==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -13137,9 +13137,9 @@ } }, "npm-check-updates": { - "version": "12.5.7", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.7.tgz", - "integrity": "sha512-WDkqPBevmgphV1UH3FImsDEpTAq2UFvnMZC3GdXPknE2VL701kfKylnae8IA9ZeYfm/uU0249N9gjMXqA/9y3w==", + "version": "12.5.8", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.8.tgz", + "integrity": "sha512-8SDZ6qYXI0aKf63zSbByqB9QmK8ygrZ+UVcXg9kGQyvH7dGIcFauFF0ksC0NdThHkU/5QhowJVSHXva9zujkJg==", "dev": true, "requires": { "chalk": "^4.1.2", From 3a00698566df06ad7842be31114f8214ef6ba84e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 00:59:56 +0000 Subject: [PATCH 60/86] Bump @typescript-eslint/eslint-plugin from 5.18.0 to 5.19.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.18.0 to 5.19.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.19.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 260 +++++++++++++++++++++++++++++++++----- packages/sdk/package.json | 2 +- 2 files changed, 227 insertions(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index eeec1b25..83270382 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1514,14 +1514,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.18.0.tgz", - "integrity": "sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.19.0.tgz", + "integrity": "sha512-w59GpFqDYGnWFim9p6TGJz7a3qWeENJuAKCqjGSx+Hq/bwq3RZwXYqy98KIfN85yDqz9mq6QXiY5h0FjGQLyEg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.18.0", - "@typescript-eslint/type-utils": "5.18.0", - "@typescript-eslint/utils": "5.18.0", + "@typescript-eslint/scope-manager": "5.19.0", + "@typescript-eslint/type-utils": "5.19.0", + "@typescript-eslint/utils": "5.19.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1546,6 +1546,53 @@ } } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz", + "integrity": "sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/visitor-keys": "5.19.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.19.0.tgz", + "integrity": "sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz", + "integrity": "sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.19.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/parser": { "version": "5.18.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.18.0.tgz", @@ -1591,12 +1638,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.18.0.tgz", - "integrity": "sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.19.0.tgz", + "integrity": "sha512-O6XQ4RI4rQcBGshTQAYBUIGsKqrKeuIOz9v8bckXZnSeXjn/1+BDZndHLe10UplQeJLXDNbaZYrAytKNQO2T4Q==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.18.0", + "@typescript-eslint/utils": "5.19.0", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -1657,15 +1704,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.18.0.tgz", - "integrity": "sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.19.0.tgz", + "integrity": "sha512-ZuEckdupXpXamKvFz/Ql8YnePh2ZWcwz7APICzJL985Rp5C2AYcHO62oJzIqNhAMtMK6XvrlBTZeNG8n7gS3lQ==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.18.0", - "@typescript-eslint/types": "5.18.0", - "@typescript-eslint/typescript-estree": "5.18.0", + "@typescript-eslint/scope-manager": "5.19.0", + "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/typescript-estree": "5.19.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1680,6 +1727,80 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz", + "integrity": "sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/visitor-keys": "5.19.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.19.0.tgz", + "integrity": "sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.19.0.tgz", + "integrity": "sha512-dRPuD4ocXdaE1BM/dNR21elSEUPKaWgowCA0bqJ6YbYkvtrPVEvZ+zqcX5a8ECYn3q5iBSSUcBBD42ubaOp0Hw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/visitor-keys": "5.19.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz", + "integrity": "sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.19.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/visitor-keys": { "version": "5.18.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz", @@ -8469,7 +8590,7 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.1", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.18.0", + "@typescript-eslint/eslint-plugin": "5.19.0", "@typescript-eslint/parser": "5.18.0", "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", @@ -9546,7 +9667,7 @@ "@rollup/plugin-typescript": "^8.3.1", "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.18.0", + "@typescript-eslint/eslint-plugin": "5.19.0", "@typescript-eslint/parser": "5.18.0", "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", @@ -9714,20 +9835,48 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.18.0.tgz", - "integrity": "sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.19.0.tgz", + "integrity": "sha512-w59GpFqDYGnWFim9p6TGJz7a3qWeENJuAKCqjGSx+Hq/bwq3RZwXYqy98KIfN85yDqz9mq6QXiY5h0FjGQLyEg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.18.0", - "@typescript-eslint/type-utils": "5.18.0", - "@typescript-eslint/utils": "5.18.0", + "@typescript-eslint/scope-manager": "5.19.0", + "@typescript-eslint/type-utils": "5.19.0", + "@typescript-eslint/utils": "5.19.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", "regexpp": "^3.2.0", "semver": "^7.3.5", "tsutils": "^3.21.0" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz", + "integrity": "sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/visitor-keys": "5.19.0" + } + }, + "@typescript-eslint/types": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.19.0.tgz", + "integrity": "sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w==", + "dev": true + }, + "@typescript-eslint/visitor-keys": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz", + "integrity": "sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.19.0", + "eslint-visitor-keys": "^3.0.0" + } + } } }, "@typescript-eslint/parser": { @@ -9753,12 +9902,12 @@ } }, "@typescript-eslint/type-utils": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.18.0.tgz", - "integrity": "sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.19.0.tgz", + "integrity": "sha512-O6XQ4RI4rQcBGshTQAYBUIGsKqrKeuIOz9v8bckXZnSeXjn/1+BDZndHLe10UplQeJLXDNbaZYrAytKNQO2T4Q==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.18.0", + "@typescript-eslint/utils": "5.19.0", "debug": "^4.3.2", "tsutils": "^3.21.0" } @@ -9785,17 +9934,60 @@ } }, "@typescript-eslint/utils": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.18.0.tgz", - "integrity": "sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.19.0.tgz", + "integrity": "sha512-ZuEckdupXpXamKvFz/Ql8YnePh2ZWcwz7APICzJL985Rp5C2AYcHO62oJzIqNhAMtMK6XvrlBTZeNG8n7gS3lQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.18.0", - "@typescript-eslint/types": "5.18.0", - "@typescript-eslint/typescript-estree": "5.18.0", + "@typescript-eslint/scope-manager": "5.19.0", + "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/typescript-estree": "5.19.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz", + "integrity": "sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/visitor-keys": "5.19.0" + } + }, + "@typescript-eslint/types": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.19.0.tgz", + "integrity": "sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.19.0.tgz", + "integrity": "sha512-dRPuD4ocXdaE1BM/dNR21elSEUPKaWgowCA0bqJ6YbYkvtrPVEvZ+zqcX5a8ECYn3q5iBSSUcBBD42ubaOp0Hw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/visitor-keys": "5.19.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz", + "integrity": "sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.19.0", + "eslint-visitor-keys": "^3.0.0" + } + } } }, "@typescript-eslint/visitor-keys": { diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 2bebdb57..cd9ff15d 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -13,7 +13,7 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.1", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.18.0", + "@typescript-eslint/eslint-plugin": "5.19.0", "@typescript-eslint/parser": "5.18.0", "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", From 65e2ad342a03b11bb3c0485cf1bc5fe5c9bb6019 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 01:04:42 +0000 Subject: [PATCH 61/86] Bump @typescript-eslint/parser from 5.18.0 to 5.19.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.18.0 to 5.19.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.19.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 280 ++++++-------------------------------- packages/sdk/package.json | 2 +- 2 files changed, 45 insertions(+), 237 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8e793f0d..499e5009 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1546,62 +1546,15 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz", - "integrity": "sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.19.0", - "@typescript-eslint/visitor-keys": "5.19.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.19.0.tgz", - "integrity": "sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "node_modules/@typescript-eslint/parser": { "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz", - "integrity": "sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ==", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.19.0.tgz", + "integrity": "sha512-yhktJjMCJX8BSBczh1F/uY8wGRYrBeyn84kH6oyqdIJwTGKmzX5Qiq49LRQ0Jh0LXnWijEziSo6BRqny8nqLVQ==", "dev": true, "dependencies": { + "@typescript-eslint/scope-manager": "5.19.0", "@typescript-eslint/types": "5.19.0", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.18.0.tgz", - "integrity": "sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.18.0", - "@typescript-eslint/types": "5.18.0", - "@typescript-eslint/typescript-estree": "5.18.0", + "@typescript-eslint/typescript-estree": "5.19.0", "debug": "^4.3.2" }, "engines": { @@ -1621,13 +1574,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.18.0.tgz", - "integrity": "sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz", + "integrity": "sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.18.0", - "@typescript-eslint/visitor-keys": "5.18.0" + "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/visitor-keys": "5.19.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1664,9 +1617,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.18.0.tgz", - "integrity": "sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.19.0.tgz", + "integrity": "sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1677,13 +1630,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz", - "integrity": "sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.19.0.tgz", + "integrity": "sha512-dRPuD4ocXdaE1BM/dNR21elSEUPKaWgowCA0bqJ6YbYkvtrPVEvZ+zqcX5a8ECYn3q5iBSSUcBBD42ubaOp0Hw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.18.0", - "@typescript-eslint/visitor-keys": "5.18.0", + "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/visitor-keys": "5.19.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1727,64 +1680,7 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz", - "integrity": "sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.19.0", - "@typescript-eslint/visitor-keys": "5.19.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.19.0.tgz", - "integrity": "sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.19.0.tgz", - "integrity": "sha512-dRPuD4ocXdaE1BM/dNR21elSEUPKaWgowCA0bqJ6YbYkvtrPVEvZ+zqcX5a8ECYn3q5iBSSUcBBD42ubaOp0Hw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.19.0", - "@typescript-eslint/visitor-keys": "5.19.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "node_modules/@typescript-eslint/visitor-keys": { "version": "5.19.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz", "integrity": "sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ==", @@ -1801,23 +1697,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz", - "integrity": "sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.18.0", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@zeit/schemas": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.6.0.tgz", @@ -8591,7 +8470,7 @@ "@rollup/plugin-typescript": "^8.3.1", "@types/jest": "^27.4.1", "@typescript-eslint/eslint-plugin": "5.19.0", - "@typescript-eslint/parser": "5.18.0", + "@typescript-eslint/parser": "5.19.0", "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", @@ -9668,7 +9547,7 @@ "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.1", "@typescript-eslint/eslint-plugin": "5.19.0", - "@typescript-eslint/parser": "5.18.0", + "@typescript-eslint/parser": "5.19.0", "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", @@ -9849,56 +9728,28 @@ "regexpp": "^3.2.0", "semver": "^7.3.5", "tsutils": "^3.21.0" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz", - "integrity": "sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.19.0", - "@typescript-eslint/visitor-keys": "5.19.0" - } - }, - "@typescript-eslint/types": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.19.0.tgz", - "integrity": "sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w==", - "dev": true - }, - "@typescript-eslint/visitor-keys": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz", - "integrity": "sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.19.0", - "eslint-visitor-keys": "^3.0.0" - } - } } }, "@typescript-eslint/parser": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.18.0.tgz", - "integrity": "sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.19.0.tgz", + "integrity": "sha512-yhktJjMCJX8BSBczh1F/uY8wGRYrBeyn84kH6oyqdIJwTGKmzX5Qiq49LRQ0Jh0LXnWijEziSo6BRqny8nqLVQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.18.0", - "@typescript-eslint/types": "5.18.0", - "@typescript-eslint/typescript-estree": "5.18.0", + "@typescript-eslint/scope-manager": "5.19.0", + "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/typescript-estree": "5.19.0", "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.18.0.tgz", - "integrity": "sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz", + "integrity": "sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g==", "dev": true, "requires": { - "@typescript-eslint/types": "5.18.0", - "@typescript-eslint/visitor-keys": "5.18.0" + "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/visitor-keys": "5.19.0" } }, "@typescript-eslint/type-utils": { @@ -9913,19 +9764,19 @@ } }, "@typescript-eslint/types": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.18.0.tgz", - "integrity": "sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.19.0.tgz", + "integrity": "sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz", - "integrity": "sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.19.0.tgz", + "integrity": "sha512-dRPuD4ocXdaE1BM/dNR21elSEUPKaWgowCA0bqJ6YbYkvtrPVEvZ+zqcX5a8ECYn3q5iBSSUcBBD42ubaOp0Hw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.18.0", - "@typescript-eslint/visitor-keys": "5.18.0", + "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/visitor-keys": "5.19.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -9945,58 +9796,15 @@ "@typescript-eslint/typescript-estree": "5.19.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz", - "integrity": "sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.19.0", - "@typescript-eslint/visitor-keys": "5.19.0" - } - }, - "@typescript-eslint/types": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.19.0.tgz", - "integrity": "sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.19.0.tgz", - "integrity": "sha512-dRPuD4ocXdaE1BM/dNR21elSEUPKaWgowCA0bqJ6YbYkvtrPVEvZ+zqcX5a8ECYn3q5iBSSUcBBD42ubaOp0Hw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.19.0", - "@typescript-eslint/visitor-keys": "5.19.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz", - "integrity": "sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.19.0", - "eslint-visitor-keys": "^3.0.0" - } - } } }, "@typescript-eslint/visitor-keys": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz", - "integrity": "sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz", + "integrity": "sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.18.0", + "@typescript-eslint/types": "5.19.0", "eslint-visitor-keys": "^3.0.0" } }, diff --git a/packages/sdk/package.json b/packages/sdk/package.json index cd9ff15d..06af10e9 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -14,7 +14,7 @@ "@rollup/plugin-typescript": "^8.3.1", "@types/jest": "^27.4.1", "@typescript-eslint/eslint-plugin": "5.19.0", - "@typescript-eslint/parser": "5.18.0", + "@typescript-eslint/parser": "5.19.0", "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", From 104a5212aa1366a623a270557a468f2320c51b62 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 19 Apr 2022 10:11:43 +0900 Subject: [PATCH 62/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 325 ++++++++++++++++++------------------- package.json | 4 +- packages/e2ee/package.json | 16 +- packages/sdk/package.json | 18 +- 4 files changed, 181 insertions(+), 182 deletions(-) diff --git a/package-lock.json b/package-lock.json index 499e5009..50ebfd89 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,9 +14,9 @@ "packages/sdk" ], "devDependencies": { - "npm-check-updates": "^12.5.4", + "npm-check-updates": "^12.5.9", "serve": "^13.0.2", - "typedoc": "^0.22.13" + "typedoc": "^0.22.15" } }, "node_modules/@ampproject/remapping": { @@ -1221,9 +1221,9 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.2.tgz", - "integrity": "sha512-d/OmjaLVO4j/aQX69bwpWPpbvI3TJkQuxoAk7BH8ew1PyoMBLTOuvJTjzG8oEoW7drIIqB0KCJtfFLu/2GClWg==", + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.1.0.tgz", + "integrity": "sha512-6ZtHx3VHIp2ReNNDxHjuUml6ur+WcQ28N1yHgCQwsbNkQg2suhxGMDQGJOn/KuDxKtd1xuZP5xSTwBA4GQ8hbA==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1242,9 +1242,9 @@ } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "13.1.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz", - "integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==", + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.2.1.tgz", + "integrity": "sha512-btX7kzGvp1JwShQI9V6IM841YKNPYjKCvUbNrQ2EcVYbULtUd/GH6wZ/qdqH13j9pOHBER+EZXNN2L8RSJhVRA==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1275,9 +1275,9 @@ } }, "node_modules/@rollup/plugin-typescript": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.1.tgz", - "integrity": "sha512-84rExe3ICUBXzqNX48WZV2Jp3OddjTMX97O2Py6D1KJaGSwWp0mDHXj+bCGNJqWHIEKDIT2U0sDjhP4czKi6cA==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.2.tgz", + "integrity": "sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1514,14 +1514,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.19.0.tgz", - "integrity": "sha512-w59GpFqDYGnWFim9p6TGJz7a3qWeENJuAKCqjGSx+Hq/bwq3RZwXYqy98KIfN85yDqz9mq6QXiY5h0FjGQLyEg==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz", + "integrity": "sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.19.0", - "@typescript-eslint/type-utils": "5.19.0", - "@typescript-eslint/utils": "5.19.0", + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/type-utils": "5.20.0", + "@typescript-eslint/utils": "5.20.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1547,14 +1547,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.19.0.tgz", - "integrity": "sha512-yhktJjMCJX8BSBczh1F/uY8wGRYrBeyn84kH6oyqdIJwTGKmzX5Qiq49LRQ0Jh0LXnWijEziSo6BRqny8nqLVQ==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.20.0.tgz", + "integrity": "sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.19.0", - "@typescript-eslint/types": "5.19.0", - "@typescript-eslint/typescript-estree": "5.19.0", + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/typescript-estree": "5.20.0", "debug": "^4.3.2" }, "engines": { @@ -1574,13 +1574,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz", - "integrity": "sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz", + "integrity": "sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.19.0", - "@typescript-eslint/visitor-keys": "5.19.0" + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/visitor-keys": "5.20.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1591,12 +1591,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.19.0.tgz", - "integrity": "sha512-O6XQ4RI4rQcBGshTQAYBUIGsKqrKeuIOz9v8bckXZnSeXjn/1+BDZndHLe10UplQeJLXDNbaZYrAytKNQO2T4Q==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz", + "integrity": "sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.19.0", + "@typescript-eslint/utils": "5.20.0", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -1617,9 +1617,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.19.0.tgz", - "integrity": "sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz", + "integrity": "sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1630,13 +1630,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.19.0.tgz", - "integrity": "sha512-dRPuD4ocXdaE1BM/dNR21elSEUPKaWgowCA0bqJ6YbYkvtrPVEvZ+zqcX5a8ECYn3q5iBSSUcBBD42ubaOp0Hw==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz", + "integrity": "sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.19.0", - "@typescript-eslint/visitor-keys": "5.19.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/visitor-keys": "5.20.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1657,15 +1657,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.19.0.tgz", - "integrity": "sha512-ZuEckdupXpXamKvFz/Ql8YnePh2ZWcwz7APICzJL985Rp5C2AYcHO62oJzIqNhAMtMK6XvrlBTZeNG8n7gS3lQ==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.20.0.tgz", + "integrity": "sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.19.0", - "@typescript-eslint/types": "5.19.0", - "@typescript-eslint/typescript-estree": "5.19.0", + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/typescript-estree": "5.20.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1681,12 +1681,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz", - "integrity": "sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz", + "integrity": "sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/types": "5.20.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -6025,9 +6025,9 @@ } }, "node_modules/npm-check-updates": { - "version": "12.5.8", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.8.tgz", - "integrity": "sha512-8SDZ6qYXI0aKf63zSbByqB9QmK8ygrZ+UVcXg9kGQyvH7dGIcFauFF0ksC0NdThHkU/5QhowJVSHXva9zujkJg==", + "version": "12.5.9", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.9.tgz", + "integrity": "sha512-l9iOvD7EsQb96gFJL45V01YG6bP8+dmobYnSguvehPuNwgdWNMrE8RC8bSfURX5iUmX4bkobN4T8XMHXN9GMHA==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -6601,9 +6601,9 @@ } }, "node_modules/prettier": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.0.tgz", - "integrity": "sha512-m2FgJibYrBGGgQXNzfd0PuDGShJgRavjUoRCw1mZERIWVSXF0iLzLm+aOqTAbLnC3n6JzUhAA8uZnFVghHJ86A==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", + "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -7011,9 +7011,9 @@ } }, "node_modules/rollup": { - "version": "2.70.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.1.tgz", - "integrity": "sha512-CRYsI5EuzLbXdxC6RnYhOuRdtz4bhejPMSWjsFLfVM/7w/85n2szZv6yExqUXsBdz5KT8eoubeyDUDjhLHEslA==", + "version": "2.70.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.2.tgz", + "integrity": "sha512-EitogNZnfku65I1DD5Mxe8JYRUCy0hkK5X84IlDtUs+O6JRMpRciXTzyCUuX11b5L5pvjH+OmFXiQ3XjabcXgg==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -7837,9 +7837,9 @@ } }, "node_modules/ts-jest": { - "version": "27.1.3", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.3.tgz", - "integrity": "sha512-6Nlura7s6uM9BVUAoqLH7JHyMXjz8gluryjpPXxr3IxZdAXnU6FhjvVLHFtfd1vsE1p8zD1OJfskkc0jhTSnkA==", + "version": "27.1.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.4.tgz", + "integrity": "sha512-qjkZlVPWVctAezwsOD1OPzbZ+k7zA5z3oxII4dGdZo5ggX/PL7kvwTM0pXTr10fAtbiVpJaL3bWd502zAhpgSQ==", "dev": true, "dependencies": { "bs-logger": "0.x", @@ -7861,7 +7861,6 @@ "@babel/core": ">=7.0.0-beta.0 <8", "@types/jest": "^27.0.0", "babel-jest": ">=27.0.0 <28", - "esbuild": "~0.14.0", "jest": "^27.0.0", "typescript": ">=3.8 <5.0" }, @@ -7973,9 +7972,9 @@ } }, "node_modules/typescript": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz", - "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -8440,17 +8439,17 @@ "@sora/go-wasm": "^2021.1.0" }, "devDependencies": { - "@rollup/plugin-node-resolve": "^13.1.3", + "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.1", - "@typescript-eslint/eslint-plugin": "^5.16.0", - "@typescript-eslint/parser": "^5.16.0", - "eslint": "^8.11.0", + "@rollup/plugin-typescript": "^8.3.2", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", + "eslint": "^8.13.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.6.0", - "rollup": "^2.70.1", - "typescript": "^4.6.2" + "prettier": "^2.6.2", + "rollup": "^2.70.2", + "typescript": "^4.6.3" } }, "packages/go-wasm": { @@ -8464,22 +8463,22 @@ "fflate": "^0.7.3" }, "devDependencies": { - "@rollup/plugin-commonjs": "^21.0.2", - "@rollup/plugin-node-resolve": "^13.1.3", + "@rollup/plugin-commonjs": "^21.1.0", + "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.1", + "@rollup/plugin-typescript": "^8.3.2", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.19.0", - "@typescript-eslint/parser": "5.19.0", + "@typescript-eslint/eslint-plugin": "5.20.0", + "@typescript-eslint/parser": "5.20.0", "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.5.1", - "prettier": "^2.6.0", - "rollup": "^2.70.1", + "prettier": "^2.6.2", + "rollup": "^2.70.2", "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^27.1.3", - "typescript": "^4.6.2" + "ts-jest": "^27.1.4", + "typescript": "^4.6.3" } } }, @@ -9426,9 +9425,9 @@ } }, "@rollup/plugin-commonjs": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.2.tgz", - "integrity": "sha512-d/OmjaLVO4j/aQX69bwpWPpbvI3TJkQuxoAk7BH8ew1PyoMBLTOuvJTjzG8oEoW7drIIqB0KCJtfFLu/2GClWg==", + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.1.0.tgz", + "integrity": "sha512-6ZtHx3VHIp2ReNNDxHjuUml6ur+WcQ28N1yHgCQwsbNkQg2suhxGMDQGJOn/KuDxKtd1xuZP5xSTwBA4GQ8hbA==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -9441,9 +9440,9 @@ } }, "@rollup/plugin-node-resolve": { - "version": "13.1.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz", - "integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==", + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.2.1.tgz", + "integrity": "sha512-btX7kzGvp1JwShQI9V6IM841YKNPYjKCvUbNrQ2EcVYbULtUd/GH6wZ/qdqH13j9pOHBER+EZXNN2L8RSJhVRA==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -9465,9 +9464,9 @@ } }, "@rollup/plugin-typescript": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.1.tgz", - "integrity": "sha512-84rExe3ICUBXzqNX48WZV2Jp3OddjTMX97O2Py6D1KJaGSwWp0mDHXj+bCGNJqWHIEKDIT2U0sDjhP4czKi6cA==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.2.tgz", + "integrity": "sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -9520,18 +9519,18 @@ "@sora/e2ee": { "version": "file:packages/e2ee", "requires": { - "@rollup/plugin-node-resolve": "^13.1.3", + "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.1", + "@rollup/plugin-typescript": "^8.3.2", "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^5.16.0", - "@typescript-eslint/parser": "^5.16.0", - "eslint": "^8.11.0", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", + "eslint": "^8.13.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.6.0", - "rollup": "^2.70.1", - "typescript": "^4.6.2" + "prettier": "^2.6.2", + "rollup": "^2.70.2", + "typescript": "^4.6.3" } }, "@sora/go-wasm": { @@ -9540,24 +9539,24 @@ "@sora/sdk": { "version": "file:packages/sdk", "requires": { - "@rollup/plugin-commonjs": "^21.0.2", - "@rollup/plugin-node-resolve": "^13.1.3", + "@rollup/plugin-commonjs": "^21.1.0", + "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.1", + "@rollup/plugin-typescript": "^8.3.2", "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.19.0", - "@typescript-eslint/parser": "5.19.0", + "@typescript-eslint/eslint-plugin": "5.20.0", + "@typescript-eslint/parser": "5.20.0", "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "fflate": "^0.7.3", "jest": "^27.5.1", - "prettier": "^2.6.0", - "rollup": "^2.70.1", + "prettier": "^2.6.2", + "rollup": "^2.70.2", "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^27.1.3", - "typescript": "^4.6.2" + "ts-jest": "^27.1.4", + "typescript": "^4.6.3" } }, "@szmarczak/http-timer": { @@ -9714,14 +9713,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.19.0.tgz", - "integrity": "sha512-w59GpFqDYGnWFim9p6TGJz7a3qWeENJuAKCqjGSx+Hq/bwq3RZwXYqy98KIfN85yDqz9mq6QXiY5h0FjGQLyEg==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz", + "integrity": "sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.19.0", - "@typescript-eslint/type-utils": "5.19.0", - "@typescript-eslint/utils": "5.19.0", + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/type-utils": "5.20.0", + "@typescript-eslint/utils": "5.20.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -9731,52 +9730,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.19.0.tgz", - "integrity": "sha512-yhktJjMCJX8BSBczh1F/uY8wGRYrBeyn84kH6oyqdIJwTGKmzX5Qiq49LRQ0Jh0LXnWijEziSo6BRqny8nqLVQ==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.20.0.tgz", + "integrity": "sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.19.0", - "@typescript-eslint/types": "5.19.0", - "@typescript-eslint/typescript-estree": "5.19.0", + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/typescript-estree": "5.20.0", "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz", - "integrity": "sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz", + "integrity": "sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.19.0", - "@typescript-eslint/visitor-keys": "5.19.0" + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/visitor-keys": "5.20.0" } }, "@typescript-eslint/type-utils": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.19.0.tgz", - "integrity": "sha512-O6XQ4RI4rQcBGshTQAYBUIGsKqrKeuIOz9v8bckXZnSeXjn/1+BDZndHLe10UplQeJLXDNbaZYrAytKNQO2T4Q==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz", + "integrity": "sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.19.0", + "@typescript-eslint/utils": "5.20.0", "debug": "^4.3.2", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.19.0.tgz", - "integrity": "sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz", + "integrity": "sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.19.0.tgz", - "integrity": "sha512-dRPuD4ocXdaE1BM/dNR21elSEUPKaWgowCA0bqJ6YbYkvtrPVEvZ+zqcX5a8ECYn3q5iBSSUcBBD42ubaOp0Hw==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz", + "integrity": "sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==", "dev": true, "requires": { - "@typescript-eslint/types": "5.19.0", - "@typescript-eslint/visitor-keys": "5.19.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/visitor-keys": "5.20.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -9785,26 +9784,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.19.0.tgz", - "integrity": "sha512-ZuEckdupXpXamKvFz/Ql8YnePh2ZWcwz7APICzJL985Rp5C2AYcHO62oJzIqNhAMtMK6XvrlBTZeNG8n7gS3lQ==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.20.0.tgz", + "integrity": "sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.19.0", - "@typescript-eslint/types": "5.19.0", - "@typescript-eslint/typescript-estree": "5.19.0", + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/typescript-estree": "5.20.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz", - "integrity": "sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz", + "integrity": "sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.19.0", + "@typescript-eslint/types": "5.20.0", "eslint-visitor-keys": "^3.0.0" } }, @@ -13137,9 +13136,9 @@ } }, "npm-check-updates": { - "version": "12.5.8", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.8.tgz", - "integrity": "sha512-8SDZ6qYXI0aKf63zSbByqB9QmK8ygrZ+UVcXg9kGQyvH7dGIcFauFF0ksC0NdThHkU/5QhowJVSHXva9zujkJg==", + "version": "12.5.9", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.9.tgz", + "integrity": "sha512-l9iOvD7EsQb96gFJL45V01YG6bP8+dmobYnSguvehPuNwgdWNMrE8RC8bSfURX5iUmX4bkobN4T8XMHXN9GMHA==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -13569,9 +13568,9 @@ "dev": true }, "prettier": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.0.tgz", - "integrity": "sha512-m2FgJibYrBGGgQXNzfd0PuDGShJgRavjUoRCw1mZERIWVSXF0iLzLm+aOqTAbLnC3n6JzUhAA8uZnFVghHJ86A==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", + "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", "dev": true }, "prettier-linter-helpers": { @@ -13869,9 +13868,9 @@ } }, "rollup": { - "version": "2.70.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.1.tgz", - "integrity": "sha512-CRYsI5EuzLbXdxC6RnYhOuRdtz4bhejPMSWjsFLfVM/7w/85n2szZv6yExqUXsBdz5KT8eoubeyDUDjhLHEslA==", + "version": "2.70.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.2.tgz", + "integrity": "sha512-EitogNZnfku65I1DD5Mxe8JYRUCy0hkK5X84IlDtUs+O6JRMpRciXTzyCUuX11b5L5pvjH+OmFXiQ3XjabcXgg==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -14523,9 +14522,9 @@ } }, "ts-jest": { - "version": "27.1.3", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.3.tgz", - "integrity": "sha512-6Nlura7s6uM9BVUAoqLH7JHyMXjz8gluryjpPXxr3IxZdAXnU6FhjvVLHFtfd1vsE1p8zD1OJfskkc0jhTSnkA==", + "version": "27.1.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.4.tgz", + "integrity": "sha512-qjkZlVPWVctAezwsOD1OPzbZ+k7zA5z3oxII4dGdZo5ggX/PL7kvwTM0pXTr10fAtbiVpJaL3bWd502zAhpgSQ==", "dev": true, "requires": { "bs-logger": "0.x", @@ -14606,9 +14605,9 @@ } }, "typescript": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz", - "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", "dev": true }, "unique-filename": { diff --git a/package.json b/package.json index 3d219a00..aef9f85f 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ "dist" ], "devDependencies": { - "npm-check-updates": "^12.5.4", + "npm-check-updates": "^12.5.9", "serve": "^13.0.2", - "typedoc": "^0.22.13" + "typedoc": "^0.22.15" }, "resolutions": { "get-pkg-repo": "4.1.2" diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index c5e8af97..158c7355 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -16,17 +16,17 @@ "test": "echo \"no test\"" }, "devDependencies": { - "@rollup/plugin-node-resolve": "^13.1.3", + "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.1", - "@typescript-eslint/eslint-plugin": "^5.16.0", - "@typescript-eslint/parser": "^5.16.0", - "eslint": "^8.11.0", + "@rollup/plugin-typescript": "^8.3.2", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", + "eslint": "^8.13.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.6.0", - "rollup": "^2.70.1", - "typescript": "^4.6.2" + "prettier": "^2.6.2", + "rollup": "^2.70.2", + "typescript": "^4.6.3" }, "dependencies": { "@sora/go-wasm": "^2021.1.0" diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 06af10e9..e1f01778 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -8,22 +8,22 @@ "test": "jest --detectOpenHandles --forceExit" }, "devDependencies": { - "@rollup/plugin-commonjs": "^21.0.2", - "@rollup/plugin-node-resolve": "^13.1.3", + "@rollup/plugin-commonjs": "^21.1.0", + "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.1", + "@rollup/plugin-typescript": "^8.3.2", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.19.0", - "@typescript-eslint/parser": "5.19.0", + "@typescript-eslint/eslint-plugin": "5.20.0", + "@typescript-eslint/parser": "5.20.0", "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.5.1", - "prettier": "^2.6.0", - "rollup": "^2.70.1", + "prettier": "^2.6.2", + "rollup": "^2.70.2", "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^27.1.3", - "typescript": "^4.6.2" + "ts-jest": "^27.1.4", + "typescript": "^4.6.3" }, "dependencies": { "@sora/e2ee": "^2021.1.0", From 31de06600f286394d7ff53f57b9faed13fa3f112 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 26 Apr 2022 10:55:47 +0900 Subject: [PATCH 63/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 4842 ++++++++++++++++++++++++++++-------- packages/e2ee/package.json | 6 +- packages/sdk/package.json | 10 +- 3 files changed, 3821 insertions(+), 1037 deletions(-) diff --git a/package-lock.json b/package-lock.json index 50ebfd89..a9167368 100644 --- a/package-lock.json +++ b/package-lock.json @@ -601,9 +601,9 @@ "dev": true }, "node_modules/@eslint/eslintrc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", - "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", + "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -824,6 +824,7 @@ "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", "dev": true, + "peer": true, "dependencies": { "@jest/types": "^27.5.1", "@types/node": "*", @@ -841,6 +842,7 @@ "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", "dev": true, + "peer": true, "dependencies": { "@jest/console": "^27.5.1", "@jest/reporters": "^27.5.1", @@ -888,6 +890,7 @@ "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", "dev": true, + "peer": true, "dependencies": { "@jest/fake-timers": "^27.5.1", "@jest/types": "^27.5.1", @@ -898,11 +901,347 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/@jest/expect": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.0.0.tgz", + "integrity": "sha512-usQreaafoLj25kgt8YpcWLZlveqdV5/Upa8ouFrtlbLa0jcxlfG9eXvJHfd061/kUinMUmg5umaribPlIZnO9A==", + "dev": true, + "dependencies": { + "expect": "^28.0.0", + "jest-snapshot": "^28.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.0.0.tgz", + "integrity": "sha512-C/lpxRTC60wl2TIwttFm/qoccZe56kpE8MVDZUJjtinxAOuPFAolGgcon3qs2ggOL2+9zsTSbt648rB4D8RGdQ==", + "dev": true, + "dependencies": { + "jest-get-type": "^28.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect-utils/node_modules/jest-get-type": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.0.tgz", + "integrity": "sha512-754LtawzW+Qk4o5rC+eDqfcQ9dV8z9uvbaVenmK8pju11PBGfuMDvQwRxoPews0LCaumNmYHjcAwmkYINTlhIA==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/@jest/transform": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.0.0.tgz", + "integrity": "sha512-Xrc02CJFju0TLb1QZmqHCvbVEvSvR0SlSawMFEiXu/vVthWKfZgsia2UumOEJFc7YFknufShHwf+0OWBpSxNXw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^28.0.0", + "@jridgewell/trace-mapping": "^0.3.7", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.0.0", + "jest-regex-util": "^28.0.0", + "jest-util": "^28.0.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/@jest/types": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.0.0.tgz", + "integrity": "sha512-4rxVTiBbSjsl8V9sXkspfxW+t2Tdcmmc3fX7AU49gVrRpjXMjEDurSx/iruXnOSor4PTL0fwO61/2+n1XQ/RgA==", + "dev": true, + "dependencies": { + "@jest/schemas": "^28.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@jest/expect/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/expect/node_modules/ci-info": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "dev": true + }, + "node_modules/@jest/expect/node_modules/diff-sequences": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.0.tgz", + "integrity": "sha512-GTIQPn2pPa1DMoEH70P9yQgYLcGW8bjPR5EOL2JO9/7DQHX+9tTFJee3UmlGWuyUvIqMgpXXssrckLubiEUZTg==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/expect": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.0.0.tgz", + "integrity": "sha512-06Ga42mfjx7tF1f2rn8DuKNARucmbluGtcDRwGlmUdakwHotIHi6h6yC0Gxp9+Q53jfOhr1lnfnETDaq6EjeDQ==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^28.0.0", + "jest-get-type": "^28.0.0", + "jest-matcher-utils": "^28.0.0", + "jest-message-util": "^28.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/jest-diff": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.0.0.tgz", + "integrity": "sha512-LuxfL//yP8TFNECSL9ULr1lCKh4RTi4OZTNzzQYY99S0EfGW7B6ckkeXJ6QOpyj9wS4Jb1v51bOLUlJLlGf1Vg==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^28.0.0", + "jest-get-type": "^28.0.0", + "pretty-format": "^28.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/jest-get-type": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.0.tgz", + "integrity": "sha512-754LtawzW+Qk4o5rC+eDqfcQ9dV8z9uvbaVenmK8pju11PBGfuMDvQwRxoPews0LCaumNmYHjcAwmkYINTlhIA==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/jest-haste-map": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.0.0.tgz", + "integrity": "sha512-Wv/0P3Rc5V3Si5Rb4FpoaxrzHwDRH3mG40WOI0h4ya6cJRNbSpy/RcMMJeksJgt9hUE8KoFqHOnGAPxKC18VpQ==", + "dev": true, + "dependencies": { + "@jest/types": "^28.0.0", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.0", + "jest-util": "^28.0.0", + "jest-worker": "^28.0.0", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/@jest/expect/node_modules/jest-matcher-utils": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.0.0.tgz", + "integrity": "sha512-WI2jLjGQ2OTBIUVIJA+oiYkAEuG6U4URe6iCrqNQcN4KE3ZmLlcMlALsaYe/t/njS2El51ILtm6erpaCW+EK9A==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^28.0.0", + "jest-get-type": "^28.0.0", + "pretty-format": "^28.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/jest-message-util": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.0.0.tgz", + "integrity": "sha512-dREPaseSGHG76kpUv+DbUoxZ8lRwSM7YwgrQNxPYuRR4rxSJJh23EKu6n6Nqv0yOer+FuVVu5RzEzdA+SbCtgQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^28.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/jest-regex-util": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.0.tgz", + "integrity": "sha512-VqrjkteNiucN3ctI/AtBzO7iitfk5YGArPwU2cJ3WyT5Z6kGFHw/HQp0fSTkOUHdwVdJkFzbI5nh0yC82f9Kfg==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/jest-snapshot": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.0.0.tgz", + "integrity": "sha512-JqMff/KN8EAfAxCV7o4lHhnbL1wvJz2R8pHKe6UiEJ7wBmWo/fck/AIYpmdbk8w62+6exy4BmIDmERo9k0cy6w==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.0.0", + "@jest/transform": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^28.0.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.0.0", + "jest-get-type": "^28.0.0", + "jest-haste-map": "^28.0.0", + "jest-matcher-utils": "^28.0.0", + "jest-message-util": "^28.0.0", + "jest-util": "^28.0.0", + "natural-compare": "^1.4.0", + "pretty-format": "^28.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/jest-util": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.0.0.tgz", + "integrity": "sha512-wSZjUR74ZR076RfyWdZ0tI3+U87QmK+RCB5igUKRUhinclf4O9om6UNBy0u9YfT6shKhno3l/eiQVmRp/AEfeA==", + "dev": true, + "dependencies": { + "@jest/types": "^28.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/jest-worker": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.0.0.tgz", + "integrity": "sha512-ETSSJaDwDREF7LudjrfGpXs4jDAcKPvcrh2RgaRVXLBwp5e/5MtQQRk4zlaPjYpExhm7hyDJwIsIEq9sJMcHUg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/pretty-format": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.0.0.tgz", + "integrity": "sha512-CoBfnZavDij+aBzQCVWIIYaZEe1ifIGLI2lG+c3/spHWhpeSt4kpjGd5W50GqtdtbL/Ojx4ZonGIqZVdUNoBGQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^28.0.0", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/react-is": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.0.0.tgz", + "integrity": "sha512-yUcBYdBBbo3QiPsgYDcfQcIkGZHfxOaoE6HLSnr1sPzMhdyxusbfKOSUbSd/ocGi32dxcj366PsTj+5oggeKKw==", + "dev": true + }, + "node_modules/@jest/expect/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/@jest/expect/node_modules/write-file-atomic": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" + } + }, "node_modules/@jest/fake-timers": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", "dev": true, + "peer": true, "dependencies": { "@jest/types": "^27.5.1", "@sinonjs/fake-timers": "^8.0.1", @@ -920,6 +1259,7 @@ "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", "dev": true, + "peer": true, "dependencies": { "@jest/environment": "^27.5.1", "@jest/types": "^27.5.1", @@ -934,6 +1274,7 @@ "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", "dev": true, + "peer": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^27.5.1", @@ -973,11 +1314,24 @@ } } }, + "node_modules/@jest/schemas": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.0.tgz", + "integrity": "sha512-Pap9Jvwr8KYFvDgkya/p0FCVya+jZkWt57lHpwBylfjgmwi/gtXfhyAO/Cw+jKuMafHcXY0beNf2XV2pkcu9vA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.23.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, "node_modules/@jest/source-map": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", "dev": true, + "peer": true, "dependencies": { "callsites": "^3.0.0", "graceful-fs": "^4.2.9", @@ -992,6 +1346,7 @@ "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", "dev": true, + "peer": true, "dependencies": { "@jest/console": "^27.5.1", "@jest/types": "^27.5.1", @@ -1007,6 +1362,7 @@ "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", "dev": true, + "peer": true, "dependencies": { "@jest/test-result": "^27.5.1", "graceful-fs": "^4.2.9", @@ -1022,6 +1378,7 @@ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", "dev": true, + "peer": true, "dependencies": { "@babel/core": "^7.1.0", "@jest/types": "^27.5.1", @@ -1075,9 +1432,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz", - "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==", + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -1221,9 +1578,9 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.1.0.tgz", - "integrity": "sha512-6ZtHx3VHIp2ReNNDxHjuUml6ur+WcQ28N1yHgCQwsbNkQg2suhxGMDQGJOn/KuDxKtd1xuZP5xSTwBA4GQ8hbA==", + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.0.tgz", + "integrity": "sha512-Ktvf2j+bAO+30awhbYoCaXpBcyPmJbaEUYClQns/+6SNCYFURbvBiNbWgHITEsIgDDWCDUclWRKEuf8cwZCFoQ==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1235,10 +1592,10 @@ "resolve": "^1.17.0" }, "engines": { - "node": ">= 8.0.0" + "node": ">= 12.0.0" }, "peerDependencies": { - "rollup": "^2.38.3" + "rollup": "^2.68.0" } }, "node_modules/@rollup/plugin-node-resolve": { @@ -1315,6 +1672,12 @@ "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", "dev": true }, + "node_modules/@sinclair/typebox": { + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.4.tgz", + "integrity": "sha512-0/WqSvpVbCBAV1yPeko7eAczKbs78dNVAaX14quVlwOb2wxfKuXCx91h4NrEfkYK9zEnyVSW4JVI/trP3iS+Qg==", + "dev": true + }, "node_modules/@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", @@ -1338,6 +1701,7 @@ "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", "dev": true, + "peer": true, "dependencies": { "@sinonjs/commons": "^1.7.0" } @@ -1514,14 +1878,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz", - "integrity": "sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.21.0.tgz", + "integrity": "sha512-fTU85q8v5ZLpoZEyn/u1S2qrFOhi33Edo2CZ0+q1gDaWWm0JuPh3bgOyU8lM0edIEYgKLDkPFiZX2MOupgjlyg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/type-utils": "5.20.0", - "@typescript-eslint/utils": "5.20.0", + "@typescript-eslint/scope-manager": "5.21.0", + "@typescript-eslint/type-utils": "5.21.0", + "@typescript-eslint/utils": "5.21.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1547,14 +1911,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.20.0.tgz", - "integrity": "sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.21.0.tgz", + "integrity": "sha512-8RUwTO77hstXUr3pZoWZbRQUxXcSXafZ8/5gpnQCfXvgmP9gpNlRGlWzvfbEQ14TLjmtU8eGnONkff8U2ui2Eg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/typescript-estree": "5.20.0", + "@typescript-eslint/scope-manager": "5.21.0", + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/typescript-estree": "5.21.0", "debug": "^4.3.2" }, "engines": { @@ -1574,13 +1938,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz", - "integrity": "sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.21.0.tgz", + "integrity": "sha512-XTX0g0IhvzcH/e3393SvjRCfYQxgxtYzL3UREteUneo72EFlt7UNoiYnikUtmGVobTbhUDByhJ4xRBNe+34kOQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/visitor-keys": "5.20.0" + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/visitor-keys": "5.21.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1591,12 +1955,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz", - "integrity": "sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.21.0.tgz", + "integrity": "sha512-MxmLZj0tkGlkcZCSE17ORaHl8Th3JQwBzyXL/uvC6sNmu128LsgjTX0NIzy+wdH2J7Pd02GN8FaoudJntFvSOw==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.20.0", + "@typescript-eslint/utils": "5.21.0", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -1617,9 +1981,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz", - "integrity": "sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.21.0.tgz", + "integrity": "sha512-XnOOo5Wc2cBlq8Lh5WNvAgHzpjnEzxn4CJBwGkcau7b/tZ556qrWXQz4DJyChYg8JZAD06kczrdgFPpEQZfDsA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1630,13 +1994,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz", - "integrity": "sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.21.0.tgz", + "integrity": "sha512-Y8Y2T2FNvm08qlcoSMoNchh9y2Uj3QmjtwNMdRQkcFG7Muz//wfJBGBxh8R7HAGQFpgYpdHqUpEoPQk+q9Kjfg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/visitor-keys": "5.20.0", + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/visitor-keys": "5.21.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1657,15 +2021,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.20.0.tgz", - "integrity": "sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.21.0.tgz", + "integrity": "sha512-q/emogbND9wry7zxy7VYri+7ydawo2HDZhRZ5k6yggIvXa7PvBbAAZ4PFH/oZLem72ezC4Pr63rJvDK/sTlL8Q==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/typescript-estree": "5.20.0", + "@typescript-eslint/scope-manager": "5.21.0", + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/typescript-estree": "5.21.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1681,12 +2045,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz", - "integrity": "sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.21.0.tgz", + "integrity": "sha512-SX8jNN+iHqAF0riZQMkm7e8+POXa/fXw5cxL+gjpyP+FI+JVNhii53EmQgDAfDcBpFekYSlO0fGytMQwRiMQCA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/types": "5.21.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -1707,7 +2071,8 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", - "dev": true + "dev": true, + "peer": true }, "node_modules/abbrev": { "version": "1.1.1", @@ -1745,6 +2110,7 @@ "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", "dev": true, + "peer": true, "dependencies": { "acorn": "^7.1.1", "acorn-walk": "^7.1.1" @@ -1755,6 +2121,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true, + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1776,6 +2143,7 @@ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", "dev": true, + "peer": true, "engines": { "node": ">=0.4.0" } @@ -1972,13 +2340,15 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "dev": true, + "peer": true }, "node_modules/babel-jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==", "dev": true, + "peer": true, "dependencies": { "@jest/transform": "^27.5.1", "@jest/types": "^27.5.1", @@ -2017,6 +2387,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz", "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==", "dev": true, + "peer": true, "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", @@ -2055,6 +2426,7 @@ "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==", "dev": true, + "peer": true, "dependencies": { "babel-plugin-jest-hoist": "^27.5.1", "babel-preset-current-node-syntax": "^1.0.0" @@ -2119,7 +2491,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true + "dev": true, + "peer": true }, "node_modules/browserslist": { "version": "4.20.2", @@ -2497,6 +2870,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, + "peer": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -2661,13 +3035,15 @@ "version": "0.4.4", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", - "dev": true + "dev": true, + "peer": true }, "node_modules/cssstyle": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", "dev": true, + "peer": true, "dependencies": { "cssom": "~0.3.6" }, @@ -2679,13 +3055,15 @@ "version": "0.3.8", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true + "dev": true, + "peer": true }, "node_modules/data-urls": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", "dev": true, + "peer": true, "dependencies": { "abab": "^2.0.3", "whatwg-mimetype": "^2.3.0", @@ -2716,7 +3094,8 @@ "version": "10.3.1", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", - "dev": true + "dev": true, + "peer": true }, "node_modules/decompress-response": { "version": "3.3.0", @@ -2771,6 +3150,7 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true, + "peer": true, "engines": { "node": ">=0.4.0" } @@ -2837,6 +3217,7 @@ "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", "dev": true, + "peer": true, "dependencies": { "webidl-conversions": "^5.0.0" }, @@ -2849,6 +3230,7 @@ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", "dev": true, + "peer": true, "engines": { "node": ">=8" } @@ -2882,6 +3264,7 @@ "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", "dev": true, + "peer": true, "engines": { "node": ">=10" }, @@ -2970,6 +3353,7 @@ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", "dev": true, + "peer": true, "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", @@ -2992,6 +3376,7 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "peer": true, "engines": { "node": ">=4.0" } @@ -3001,6 +3386,7 @@ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, + "peer": true, "dependencies": { "prelude-ls": "~1.1.2", "type-check": "~0.3.2" @@ -3014,6 +3400,7 @@ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, + "peer": true, "dependencies": { "deep-is": "~0.1.3", "fast-levenshtein": "~2.0.6", @@ -3031,6 +3418,7 @@ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true, + "peer": true, "engines": { "node": ">= 0.8.0" } @@ -3040,6 +3428,7 @@ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, + "peer": true, "dependencies": { "prelude-ls": "~1.1.2" }, @@ -3048,12 +3437,12 @@ } }, "node_modules/eslint": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.13.0.tgz", - "integrity": "sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", + "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.2.1", + "@eslint/eslintrc": "^1.2.2", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -3430,6 +3819,7 @@ "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", "dev": true, + "peer": true, "dependencies": { "@jest/types": "^27.5.1", "jest-get-type": "^27.5.1", @@ -3588,6 +3978,7 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", "dev": true, + "peer": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -3923,6 +4314,7 @@ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", "dev": true, + "peer": true, "dependencies": { "whatwg-encoding": "^1.0.5" }, @@ -4294,7 +4686,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true + "dev": true, + "peer": true }, "node_modules/is-reference": { "version": "1.2.1", @@ -4424,6 +4817,7 @@ "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==", "dev": true, + "peer": true, "dependencies": { "@jest/core": "^27.5.1", "import-local": "^3.0.2", @@ -4449,6 +4843,7 @@ "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz", "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==", "dev": true, + "peer": true, "dependencies": { "@jest/types": "^27.5.1", "execa": "^5.0.0", @@ -4463,6 +4858,7 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "peer": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -4477,6 +4873,7 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, + "peer": true, "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -4500,6 +4897,7 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, + "peer": true, "engines": { "node": ">=10" }, @@ -4512,6 +4910,7 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, + "peer": true, "engines": { "node": ">=8" }, @@ -4524,6 +4923,7 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, + "peer": true, "dependencies": { "path-key": "^3.0.0" }, @@ -4536,6 +4936,7 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "peer": true, "engines": { "node": ">=8" } @@ -4545,6 +4946,7 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "peer": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -4557,6 +4959,7 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "peer": true, "engines": { "node": ">=8" } @@ -4566,6 +4969,7 @@ "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz", "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==", "dev": true, + "peer": true, "dependencies": { "@jest/environment": "^27.5.1", "@jest/test-result": "^27.5.1", @@ -4596,6 +5000,7 @@ "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz", "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==", "dev": true, + "peer": true, "dependencies": { "@jest/core": "^27.5.1", "@jest/test-result": "^27.5.1", @@ -4630,6 +5035,7 @@ "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz", "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==", "dev": true, + "peer": true, "dependencies": { "@babel/core": "^7.8.0", "@jest/test-sequencer": "^27.5.1", @@ -4672,13 +5078,15 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true + "dev": true, + "peer": true }, "node_modules/jest-config/node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "peer": true, "engines": { "node": ">=8" }, @@ -4706,6 +5114,7 @@ "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz", "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==", "dev": true, + "peer": true, "dependencies": { "detect-newline": "^3.0.0" }, @@ -4718,6 +5127,7 @@ "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz", "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==", "dev": true, + "peer": true, "dependencies": { "@jest/types": "^27.5.1", "chalk": "^4.0.0", @@ -4734,6 +5144,7 @@ "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz", "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==", "dev": true, + "peer": true, "dependencies": { "@jest/environment": "^27.5.1", "@jest/fake-timers": "^27.5.1", @@ -4752,6 +5163,7 @@ "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", "dev": true, + "peer": true, "dependencies": { "@jest/environment": "^27.5.1", "@jest/fake-timers": "^27.5.1", @@ -4778,6 +5190,7 @@ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", "dev": true, + "peer": true, "dependencies": { "@jest/types": "^27.5.1", "@types/graceful-fs": "^4.1.2", @@ -4804,6 +5217,7 @@ "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz", "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==", "dev": true, + "peer": true, "dependencies": { "@jest/environment": "^27.5.1", "@jest/source-map": "^27.5.1", @@ -4832,6 +5246,7 @@ "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz", "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==", "dev": true, + "peer": true, "dependencies": { "jest-get-type": "^27.5.1", "pretty-format": "^27.5.1" @@ -4860,6 +5275,7 @@ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", "dev": true, + "peer": true, "dependencies": { "@babel/code-frame": "^7.12.13", "@jest/types": "^27.5.1", @@ -4880,6 +5296,7 @@ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", "dev": true, + "peer": true, "dependencies": { "@jest/types": "^27.5.1", "@types/node": "*" @@ -4910,6 +5327,7 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", "dev": true, + "peer": true, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } @@ -4919,6 +5337,7 @@ "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", "dev": true, + "peer": true, "dependencies": { "@jest/types": "^27.5.1", "chalk": "^4.0.0", @@ -4940,6 +5359,7 @@ "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz", "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==", "dev": true, + "peer": true, "dependencies": { "@jest/types": "^27.5.1", "jest-regex-util": "^27.5.1", @@ -4954,6 +5374,7 @@ "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz", "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==", "dev": true, + "peer": true, "dependencies": { "@jest/console": "^27.5.1", "@jest/environment": "^27.5.1", @@ -4986,6 +5407,7 @@ "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz", "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==", "dev": true, + "peer": true, "dependencies": { "@jest/environment": "^27.5.1", "@jest/fake-timers": "^27.5.1", @@ -5019,6 +5441,7 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "peer": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -5033,6 +5456,7 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, + "peer": true, "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -5056,6 +5480,7 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, + "peer": true, "engines": { "node": ">=10" }, @@ -5068,6 +5493,7 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, + "peer": true, "engines": { "node": ">=8" }, @@ -5080,6 +5506,7 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, + "peer": true, "dependencies": { "path-key": "^3.0.0" }, @@ -5092,6 +5519,7 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "peer": true, "engines": { "node": ">=8" } @@ -5101,6 +5529,7 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "peer": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -5113,6 +5542,7 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "peer": true, "engines": { "node": ">=8" } @@ -5122,6 +5552,7 @@ "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", "dev": true, + "peer": true, "dependencies": { "@types/node": "*", "graceful-fs": "^4.2.9" @@ -5135,6 +5566,7 @@ "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz", "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==", "dev": true, + "peer": true, "dependencies": { "@babel/core": "^7.7.2", "@babel/generator": "^7.7.2", @@ -5191,6 +5623,7 @@ "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", "dev": true, + "peer": true, "dependencies": { "@jest/types": "^27.5.1", "camelcase": "^6.2.0", @@ -5208,6 +5641,7 @@ "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz", "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==", "dev": true, + "peer": true, "dependencies": { "@jest/test-result": "^27.5.1", "@jest/types": "^27.5.1", @@ -5226,6 +5660,7 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "dev": true, + "peer": true, "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -5240,6 +5675,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -5279,6 +5715,7 @@ "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", "dev": true, + "peer": true, "dependencies": { "abab": "^2.0.5", "acorn": "^8.2.4", @@ -5325,6 +5762,7 @@ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true, + "peer": true, "engines": { "node": ">= 6" } @@ -5334,6 +5772,7 @@ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, + "peer": true, "dependencies": { "@tootallnate/once": "1", "agent-base": "6", @@ -6182,7 +6621,8 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", - "dev": true + "dev": true, + "peer": true }, "node_modules/on-headers": { "version": "1.0.2", @@ -6435,7 +6875,8 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true + "dev": true, + "peer": true }, "node_modules/path-exists": { "version": "4.0.0", @@ -6707,7 +7148,8 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true + "dev": true, + "peer": true }, "node_modules/pump": { "version": "3.0.0", @@ -7094,6 +7536,7 @@ "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", "dev": true, + "peer": true, "dependencies": { "xmlchars": "^2.2.0" }, @@ -7640,7 +8083,8 @@ "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true + "dev": true, + "peer": true }, "node_modules/tar": { "version": "6.1.11", @@ -7797,6 +8241,7 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", "dev": true, + "peer": true, "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -7811,6 +8256,7 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, + "peer": true, "engines": { "node": ">=6" } @@ -7820,6 +8266,7 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", "dev": true, + "peer": true, "dependencies": { "punycode": "^2.1.1" }, @@ -7832,6 +8279,7 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, + "peer": true, "engines": { "node": ">=6" } @@ -8019,6 +8467,7 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, + "peer": true, "engines": { "node": ">= 4.0.0" } @@ -8108,6 +8557,7 @@ "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", "dev": true, + "peer": true, "dependencies": { "@types/istanbul-lib-coverage": "^2.0.1", "convert-source-map": "^1.6.0", @@ -8122,6 +8572,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", "dev": true, + "peer": true, "engines": { "node": ">= 8" } @@ -8171,6 +8622,7 @@ "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", "dev": true, + "peer": true, "dependencies": { "browser-process-hrtime": "^1.0.0" } @@ -8180,6 +8632,7 @@ "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", "dev": true, + "peer": true, "dependencies": { "xml-name-validator": "^3.0.0" }, @@ -8201,6 +8654,7 @@ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", "dev": true, + "peer": true, "engines": { "node": ">=10.4" } @@ -8210,6 +8664,7 @@ "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", "dev": true, + "peer": true, "dependencies": { "iconv-lite": "0.4.24" } @@ -8219,6 +8674,7 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, + "peer": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -8230,13 +8686,15 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true + "dev": true, + "peer": true }, "node_modules/whatwg-url": { "version": "8.7.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", "dev": true, + "peer": true, "dependencies": { "lodash": "^4.7.0", "tr46": "^2.1.0", @@ -8331,6 +8789,7 @@ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", "dev": true, + "peer": true, "engines": { "node": ">=8.3.0" }, @@ -8360,13 +8819,15 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true + "dev": true, + "peer": true }, "node_modules/xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true + "dev": true, + "peer": true }, "node_modules/y18n": { "version": "5.0.8", @@ -8397,6 +8858,7 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, + "peer": true, "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -8442,9 +8904,9 @@ "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.20.0", - "@typescript-eslint/parser": "^5.20.0", - "eslint": "^8.13.0", + "@typescript-eslint/eslint-plugin": "^5.21.0", + "@typescript-eslint/parser": "^5.21.0", + "eslint": "^8.14.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", @@ -8463,1102 +8925,3326 @@ "fflate": "^0.7.3" }, "devDependencies": { - "@rollup/plugin-commonjs": "^21.1.0", + "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.20.0", - "@typescript-eslint/parser": "5.20.0", - "eslint": "8.13.0", + "@typescript-eslint/eslint-plugin": "5.21.0", + "@typescript-eslint/parser": "5.21.0", + "eslint": "8.14.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", - "jest": "^27.5.1", + "jest": "^28.0.0", "prettier": "^2.6.2", "rollup": "^2.70.2", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^27.1.4", "typescript": "^4.6.3" } - } - }, - "dependencies": { - "@ampproject/remapping": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", - "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", + }, + "packages/sdk/node_modules/@jest/console": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.0.0.tgz", + "integrity": "sha512-LXXHbaVzluR26JGHz1iBYt32KM4+795/BFzDDoNuVDNFTcUANofye+zNl5Uzs/MfY2oFB7Zw+nJHpXEb1OGwpQ==", "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.0" + "dependencies": { + "@jest/types": "^28.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^28.0.0", + "jest-util": "^28.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "packages/sdk/node_modules/@jest/core": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.0.0.tgz", + "integrity": "sha512-ttGwIMsxHCS7/O9M19etIDnnJS9hGR6TtzfqRtiomAMtKX6VXi5vxJuV7z0C6TudesNU7h3DDSRptmg0HQ4c5A==", "dev": true, - "requires": { - "@babel/highlight": "^7.16.7" + "dependencies": { + "@jest/console": "^28.0.0", + "@jest/reporters": "^28.0.0", + "@jest/test-result": "^28.0.0", + "@jest/transform": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^28.0.0", + "jest-config": "^28.0.0", + "jest-haste-map": "^28.0.0", + "jest-message-util": "^28.0.0", + "jest-regex-util": "^28.0.0", + "jest-resolve": "^28.0.0", + "jest-resolve-dependencies": "^28.0.0", + "jest-runner": "^28.0.0", + "jest-runtime": "^28.0.0", + "jest-snapshot": "^28.0.0", + "jest-util": "^28.0.0", + "jest-validate": "^28.0.0", + "jest-watcher": "^28.0.0", + "micromatch": "^4.0.4", + "pretty-format": "^28.0.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "@babel/compat-data": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", - "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", - "dev": true - }, - "@babel/core": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", - "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", + "packages/sdk/node_modules/@jest/environment": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.0.0.tgz", + "integrity": "sha512-4JW8g0UokMK8fHCxtg5N1xowzQPQknHYrcQhh/xtC2FuRN5nC1P1Utxt7FERxT94gxTbAkE9PGILVgFXQxEU2g==", "dev": true, - "requires": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.7", - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.8", - "@babel/parser": "^7.17.8", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0" - }, "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "@jest/fake-timers": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/node": "*", + "jest-mock": "^28.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@babel/generator": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", - "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "packages/sdk/node_modules/@jest/fake-timers": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.0.0.tgz", + "integrity": "sha512-ph5LQOCueZ5d19fwENuI4+Sdl0VBfVBBL+8aCO6XBRvYQ9tQ5lEiaqOe4OorctRv9xwy6XXsYpV/cdK/4nkMRQ==", "dev": true, - "requires": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "@jest/types": "^28.0.0", + "@sinonjs/fake-timers": "^9.1.1", + "@types/node": "*", + "jest-message-util": "^28.0.0", + "jest-mock": "^28.0.0", + "jest-util": "^28.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@babel/helper-compilation-targets": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", - "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", + "packages/sdk/node_modules/@jest/globals": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.0.0.tgz", + "integrity": "sha512-WnvQWgHWa6rdn3NIADBpaQDirVuynriOe9b/55dbw+5UH5FqWU8wedclfYTS+yh3Z9FHWpAIxoE38TmVabqyRw==", "dev": true, - "requires": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-validator-option": "^7.16.7", - "browserslist": "^4.17.5", - "semver": "^6.3.0" + "dependencies": { + "@jest/environment": "^28.0.0", + "@jest/expect": "^28.0.0", + "@jest/types": "^28.0.0" }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "packages/sdk/node_modules/@jest/reporters": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.0.0.tgz", + "integrity": "sha512-Pvm5nR9YeVZYig+rWKVvbe8tWymEcRKn2VEvNMZlKiSICfQzRcUAVPdA7OAT1zBYkJPiK8lS52MdOE61JejCzg==", + "dev": true, "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^28.0.0", + "@jest/test-result": "^28.0.0", + "@jest/transform": "^28.0.0", + "@jest/types": "^28.0.0", + "@jridgewell/trace-mapping": "^0.3.7", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-util": "^28.0.0", + "jest-worker": "^28.0.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^9.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true } } }, - "@babel/helper-environment-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", - "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", + "packages/sdk/node_modules/@jest/source-map": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.0.0.tgz", + "integrity": "sha512-yeD/Y94j6UJPiaZTG5Sdww7pbHvEc7RlTucoVAdXaBaSuNcyrAkLlJonAb/xX/efCugDOEbFJdATsSnDEh45Nw==", "dev": true, - "requires": { - "@babel/types": "^7.16.7" + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.7", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@babel/helper-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", - "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", + "packages/sdk/node_modules/@jest/test-result": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.0.0.tgz", + "integrity": "sha512-hd6eS08F9gEAY5kt7Pw7zaIzj31ElKRVHml6pyz+i5s0EzHd0LjnaDwaAqBbbFxrD13HoQOJh8Lel6kvgAT3Yg==", "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/types": "^7.16.7" + "dependencies": { + "@jest/console": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@babel/helper-get-function-arity": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", - "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", + "packages/sdk/node_modules/@jest/test-sequencer": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.0.0.tgz", + "integrity": "sha512-tRgs5JRVxodtDVddITgH0BRFwBAjbdWnnobuYWHgeYEM4sZVAsNZmF0oeZIaE9vK72xgdnjIoRg1+kppMorFCQ==", "dev": true, - "requires": { - "@babel/types": "^7.16.7" + "dependencies": { + "@jest/test-result": "^28.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "packages/sdk/node_modules/@jest/transform": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.0.0.tgz", + "integrity": "sha512-Xrc02CJFju0TLb1QZmqHCvbVEvSvR0SlSawMFEiXu/vVthWKfZgsia2UumOEJFc7YFknufShHwf+0OWBpSxNXw==", "dev": true, - "requires": { - "@babel/types": "^7.16.7" + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^28.0.0", + "@jridgewell/trace-mapping": "^0.3.7", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.0.0", + "jest-regex-util": "^28.0.0", + "jest-util": "^28.0.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@babel/helper-module-imports": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", - "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", + "packages/sdk/node_modules/@jest/types": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.0.0.tgz", + "integrity": "sha512-4rxVTiBbSjsl8V9sXkspfxW+t2Tdcmmc3fX7AU49gVrRpjXMjEDurSx/iruXnOSor4PTL0fwO61/2+n1XQ/RgA==", "dev": true, - "requires": { - "@babel/types": "^7.16.7" + "dependencies": { + "@jest/schemas": "^28.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@babel/helper-module-transforms": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz", - "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==", + "packages/sdk/node_modules/@sinonjs/fake-timers": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.17.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0" + "dependencies": { + "@sinonjs/commons": "^1.7.0" } }, - "@babel/helper-plugin-utils": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", - "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", - "dev": true - }, - "@babel/helper-simple-access": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", - "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", + "packages/sdk/node_modules/@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", "dev": true, - "requires": { - "@babel/types": "^7.17.0" + "dependencies": { + "@types/yargs-parser": "*" } }, - "@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "packages/sdk/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "requires": { - "@babel/types": "^7.16.7" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", - "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", - "dev": true - }, - "@babel/helpers": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", - "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", + "packages/sdk/node_modules/babel-jest": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.0.0.tgz", + "integrity": "sha512-UBCCUmm8YnHyaBCF68rIknYvL1TjS4RKasviDG+j8lMHHxrV9aNdWVi4bIggb1rPEm5f/Z2Y44ByyvaHZprvAg==", "dev": true, - "requires": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0" + "dependencies": { + "@jest/transform": "^28.0.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^28.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" } }, - "@babel/highlight": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", - "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "packages/sdk/node_modules/babel-plugin-jest-hoist": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.0.0.tgz", + "integrity": "sha512-Eu+TDlmKd2SsnvmlooVeHFryVHHom6ffCLSZuqrN8WpIHE0H6qiIPW5h5rFlzIZQmVqnZR2qHnbm2eQWIP7hZg==", "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@babel/parser": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", - "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", - "dev": true - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "packages/sdk/node_modules/babel-preset-jest": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.0.0.tgz", + "integrity": "sha512-JLyjfCmqCWS3tXUw86ei5fQwuwn34slNBPTluNbhoqHVI1Cbw6MsmvgEl54jPjbyzkmA6XAHJTg3EGNY7rnr4A==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "dependencies": { + "babel-plugin-jest-hoist": "^28.0.0", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } + "packages/sdk/node_modules/ci-info": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "dev": true }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "packages/sdk/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" } }, - "@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "packages/sdk/node_modules/diff-sequences": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.0.tgz", + "integrity": "sha512-GTIQPn2pPa1DMoEH70P9yQgYLcGW8bjPR5EOL2JO9/7DQHX+9tTFJee3UmlGWuyUvIqMgpXXssrckLubiEUZTg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "packages/sdk/node_modules/emittery": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", + "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" } }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "packages/sdk/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "packages/sdk/node_modules/expect": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.0.0.tgz", + "integrity": "sha512-06Ga42mfjx7tF1f2rn8DuKNARucmbluGtcDRwGlmUdakwHotIHi6h6yC0Gxp9+Q53jfOhr1lnfnETDaq6EjeDQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "dependencies": { + "@jest/expect-utils": "^28.0.0", + "jest-get-type": "^28.0.0", + "jest-matcher-utils": "^28.0.0", + "jest-message-util": "^28.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "packages/sdk/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "packages/sdk/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "packages/sdk/node_modules/jest": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-28.0.0.tgz", + "integrity": "sha512-Zl07FoxrV6em3/sBqSRepHWBtcqJ3BKbwmZ1CyeuHPKkSjhOqUEG/OcuJd/5pKP3wqRovoF6aHR1ID+2Qz/ufQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "dependencies": { + "@jest/core": "^28.0.0", + "import-local": "^3.0.2", + "jest-cli": "^28.0.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "packages/sdk/node_modules/jest-changed-files": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.0.tgz", + "integrity": "sha512-9hFz/LuADUTv7zN+t0Ig+J/as2mtILTmgoT2XQdG/ezGbA1tfqoSwEKCXFcDaldzkskZddbh+QI2sACQGaxg6Q==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "dependencies": { + "execa": "^5.0.0", + "throat": "^6.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "packages/sdk/node_modules/jest-circus": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.0.0.tgz", + "integrity": "sha512-GLmtj2SXMPMinU46Bgo/bD2JkYbssf/8CSKz5k7w4RY8VVRhODd+GMMzts822RHswMm35ACUU8dV1fYRutCwqQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "dependencies": { + "@jest/environment": "^28.0.0", + "@jest/expect": "^28.0.0", + "@jest/test-result": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^28.0.0", + "jest-matcher-utils": "^28.0.0", + "jest-message-util": "^28.0.0", + "jest-runtime": "^28.0.0", + "jest-snapshot": "^28.0.0", + "jest-util": "^28.0.0", + "pretty-format": "^28.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3", + "throat": "^6.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@babel/plugin-syntax-typescript": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz", - "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==", + "packages/sdk/node_modules/jest-cli": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.0.0.tgz", + "integrity": "sha512-LrK46qmPoi+rVMOQt6e8OMMyfMk0+mgdTFnhOFi011p+qoKefW/5obGdS9rWZHcoTPg+lZ9iV4JBI4NJhie2hw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "dependencies": { + "@jest/core": "^28.0.0", + "@jest/test-result": "^28.0.0", + "@jest/types": "^28.0.0", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^28.0.0", + "jest-util": "^28.0.0", + "jest-validate": "^28.0.0", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "packages/sdk/node_modules/jest-config": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.0.0.tgz", + "integrity": "sha512-6dP4hkHLlMllh5iK/2n8jLlrrJvDnXQyY4MKFnXyPiUYdXu59yg4paYYEKW0JNbgco//d07AiUvL1t+gkjPfFg==", "dev": true, - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^28.0.0", + "@jest/types": "^28.0.0", + "babel-jest": "^28.0.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^28.0.0", + "jest-environment-node": "^28.0.0", + "jest-get-type": "^28.0.0", + "jest-regex-util": "^28.0.0", + "jest-resolve": "^28.0.0", + "jest-runner": "^28.0.0", + "jest-util": "^28.0.0", + "jest-validate": "^28.0.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^28.0.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } } }, - "@babel/traverse": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", - "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "packages/sdk/node_modules/jest-diff": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.0.0.tgz", + "integrity": "sha512-LuxfL//yP8TFNECSL9ULr1lCKh4RTi4OZTNzzQYY99S0EfGW7B6ckkeXJ6QOpyj9wS4Jb1v51bOLUlJLlGf1Vg==", "dev": true, - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^28.0.0", + "jest-get-type": "^28.0.0", + "pretty-format": "^28.0.0" }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "packages/sdk/node_modules/jest-docblock": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.0.0.tgz", + "integrity": "sha512-88od+z1QkHyvtpj1gRA6QGysopOzImocHNNlvvM7OydDe9ER6z1siLtHJXbKEfi5FoxMpYqDtszYIS50JVs0WA==", + "dev": true, "dependencies": { - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - } + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "packages/sdk/node_modules/jest-each": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.0.0.tgz", + "integrity": "sha512-nnGven0xJDHPrb5RKskWG/MvHvkfDPoOG9dyduV7sfl2WkMBe1X1l68Xdjv+eTdUV966/mPMZEuHWLh0HRKifw==", "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" + "dependencies": { + "@jest/types": "^28.0.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.0", + "jest-util": "^28.0.0", + "pretty-format": "^28.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true + "packages/sdk/node_modules/jest-environment-node": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.0.0.tgz", + "integrity": "sha512-kWzs9d2Yom5BtIjKu83I/CsWHpKbegTnMlLZicRK9OZlk9GCdnP2mrQo9YqkUyGTYKZGXOSYnGJLJVBaR+NZGA==", + "dev": true, + "dependencies": { + "@jest/environment": "^28.0.0", + "@jest/fake-timers": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/node": "*", + "jest-mock": "^28.0.0", + "jest-util": "^28.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } }, - "@eslint/eslintrc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", - "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", + "packages/sdk/node_modules/jest-get-type": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.0.tgz", + "integrity": "sha512-754LtawzW+Qk4o5rC+eDqfcQ9dV8z9uvbaVenmK8pju11PBGfuMDvQwRxoPews0LCaumNmYHjcAwmkYINTlhIA==", "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.3.1", - "globals": "^13.9.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "packages/sdk/node_modules/jest-haste-map": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.0.0.tgz", + "integrity": "sha512-Wv/0P3Rc5V3Si5Rb4FpoaxrzHwDRH3mG40WOI0h4ya6cJRNbSpy/RcMMJeksJgt9hUE8KoFqHOnGAPxKC18VpQ==", + "dev": true, + "dependencies": { + "@jest/types": "^28.0.0", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.0", + "jest-util": "^28.0.0", + "jest-worker": "^28.0.0", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "packages/sdk/node_modules/jest-leak-detector": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.0.0.tgz", + "integrity": "sha512-P4KWylb4x6Q/jctJtGKJSD3PkUjgSIu/JOpstWwgYFvGfNKtAGXEfIY6nlGSBTCajSuPs7WXUNMQXiYqKwivgg==", + "dev": true, "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - } + "jest-get-type": "^28.0.0", + "pretty-format": "^28.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", - "dev": true + "packages/sdk/node_modules/jest-matcher-utils": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.0.0.tgz", + "integrity": "sha512-WI2jLjGQ2OTBIUVIJA+oiYkAEuG6U4URe6iCrqNQcN4KE3ZmLlcMlALsaYe/t/njS2El51ILtm6erpaCW+EK9A==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^28.0.0", + "jest-get-type": "^28.0.0", + "pretty-format": "^28.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } }, - "@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "packages/sdk/node_modules/jest-message-util": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.0.0.tgz", + "integrity": "sha512-dREPaseSGHG76kpUv+DbUoxZ8lRwSM7YwgrQNxPYuRR4rxSJJh23EKu6n6Nqv0yOer+FuVVu5RzEzdA+SbCtgQ==", "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^28.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "packages/sdk/node_modules/jest-mock": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.0.0.tgz", + "integrity": "sha512-C8xBtHuokPvmyX4ajh/TaenKGSbcu4pcIwjucD6ZZ7WznfSnMkLI/gzOh/YhUNr60tvBnxNsN+A0ECLG8pprTg==", + "dev": true, "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } + "@jest/types": "^28.0.0", + "@types/node": "*" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true + "packages/sdk/node_modules/jest-regex-util": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.0.tgz", + "integrity": "sha512-VqrjkteNiucN3ctI/AtBzO7iitfk5YGArPwU2cJ3WyT5Z6kGFHw/HQp0fSTkOUHdwVdJkFzbI5nh0yC82f9Kfg==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "packages/sdk/node_modules/jest-resolve": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.0.0.tgz", + "integrity": "sha512-aKRsKCo3gjVL6lSSjoEucVrhrDP8NJmiIzBiw7hI4o6gYrXH4yNahF5m9Vl6Wl9Q3LNqMAQhPSxPxVnSh1k3YQ==", "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.0.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^28.0.0", + "jest-validate": "^28.0.0", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + } + }, + "packages/sdk/node_modules/jest-resolve-dependencies": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.0.0.tgz", + "integrity": "sha512-SzS4mfZTznPKczh6KopL1ZMTGWzNNhGJ4vLvhYkXb1g1a8SgE+lIfZ0aI+Diu+DASw+QZwJrwiRTSvSGu4k6/g==", + "dev": true, "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } + "jest-regex-util": "^28.0.0", + "jest-snapshot": "^28.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true - }, - "@jest/console": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", - "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", + "packages/sdk/node_modules/jest-runner": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.0.0.tgz", + "integrity": "sha512-ygi+tgaeYaqfl72FA9HdD0B8c1q0RmhbHuBVvNhMwqqFs9OZpI0vN4ksRJCqmlRDgfK/1JGPElot0kTQ62++Rg==", "dev": true, - "requires": { - "@jest/types": "^27.5.1", + "dependencies": { + "@jest/console": "^28.0.0", + "@jest/environment": "^28.0.0", + "@jest/test-result": "^28.0.0", + "@jest/transform": "^28.0.0", + "@jest/types": "^28.0.0", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", - "slash": "^3.0.0" + "emittery": "^0.10.2", + "graceful-fs": "^4.2.9", + "jest-docblock": "^28.0.0", + "jest-environment-node": "^28.0.0", + "jest-haste-map": "^28.0.0", + "jest-leak-detector": "^28.0.0", + "jest-message-util": "^28.0.0", + "jest-resolve": "^28.0.0", + "jest-runtime": "^28.0.0", + "jest-util": "^28.0.0", + "jest-watcher": "^28.0.0", + "jest-worker": "^28.0.0", + "source-map-support": "0.5.13", + "throat": "^6.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@jest/core": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", - "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", + "packages/sdk/node_modules/jest-runtime": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.0.0.tgz", + "integrity": "sha512-s7sw1I4J4lUos34kbFnptxVSLfXIwILSNAq5DAzgmRzP/jUCuRFPm4/aWD7PaobxpCFJiSUAGj+Vnl7qSYQ+Cw==", "dev": true, - "requires": { - "@jest/console": "^27.5.1", - "@jest/reporters": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", + "dependencies": { + "@jest/environment": "^28.0.0", + "@jest/fake-timers": "^28.0.0", + "@jest/globals": "^28.0.0", + "@jest/source-map": "^28.0.0", + "@jest/test-result": "^28.0.0", + "@jest/transform": "^28.0.0", + "@jest/types": "^28.0.0", "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "execa": "^5.0.0", + "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-changed-files": "^27.5.1", - "jest-config": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-resolve-dependencies": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "jest-watcher": "^27.5.1", - "micromatch": "^4.0.4", - "rimraf": "^3.0.0", + "jest-haste-map": "^28.0.0", + "jest-message-util": "^28.0.0", + "jest-mock": "^28.0.0", + "jest-regex-util": "^28.0.0", + "jest-resolve": "^28.0.0", + "jest-snapshot": "^28.0.0", + "jest-util": "^28.0.0", "slash": "^3.0.0", - "strip-ansi": "^6.0.0" + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@jest/environment": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", - "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", + "packages/sdk/node_modules/jest-snapshot": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.0.0.tgz", + "integrity": "sha512-JqMff/KN8EAfAxCV7o4lHhnbL1wvJz2R8pHKe6UiEJ7wBmWo/fck/AIYpmdbk8w62+6exy4BmIDmERo9k0cy6w==", "dev": true, - "requires": { - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1" + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.0.0", + "@jest/transform": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^28.0.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.0.0", + "jest-get-type": "^28.0.0", + "jest-haste-map": "^28.0.0", + "jest-matcher-utils": "^28.0.0", + "jest-message-util": "^28.0.0", + "jest-util": "^28.0.0", + "natural-compare": "^1.4.0", + "pretty-format": "^28.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@jest/fake-timers": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", - "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", + "packages/sdk/node_modules/jest-util": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.0.0.tgz", + "integrity": "sha512-wSZjUR74ZR076RfyWdZ0tI3+U87QmK+RCB5igUKRUhinclf4O9om6UNBy0u9YfT6shKhno3l/eiQVmRp/AEfeA==", "dev": true, - "requires": { - "@jest/types": "^27.5.1", - "@sinonjs/fake-timers": "^8.0.1", + "dependencies": { + "@jest/types": "^28.0.0", "@types/node": "*", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@jest/globals": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", - "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", + "packages/sdk/node_modules/jest-validate": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.0.0.tgz", + "integrity": "sha512-5Z0vTTIZRNYAKzemp/jvutWoMKYGHyr6TKc5kl4+KtAxrbX7n7cGv00AxEavBKtrb7EMAZ2zhbhu2nKaEEUwKw==", "dev": true, - "requires": { - "@jest/environment": "^27.5.1", - "@jest/types": "^27.5.1", - "expect": "^27.5.1" + "dependencies": { + "@jest/types": "^28.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.0", + "leven": "^3.1.0", + "pretty-format": "^28.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@jest/reporters": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", - "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", + "packages/sdk/node_modules/jest-watcher": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.0.0.tgz", + "integrity": "sha512-SOeze65Bvb6biK+gXqb2fa1T3F626AuM/z3fvISF7wPgKkCzqxPG6obkNJIzcISpWfSP4G+Pf5eNVScj1KNsYQ==", "dev": true, - "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "dependencies": { + "@jest/test-result": "^28.0.0", + "@jest/types": "^28.0.0", "@types/node": "*", + "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-haste-map": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "slash": "^3.0.0", - "source-map": "^0.6.0", - "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" + "emittery": "^0.10.2", + "jest-util": "^28.0.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@jest/source-map": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", - "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", + "packages/sdk/node_modules/jest-worker": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.0.0.tgz", + "integrity": "sha512-ETSSJaDwDREF7LudjrfGpXs4jDAcKPvcrh2RgaRVXLBwp5e/5MtQQRk4zlaPjYpExhm7hyDJwIsIEq9sJMcHUg==", "dev": true, - "requires": { - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9", - "source-map": "^0.6.0" + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@jest/test-result": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", - "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", + "packages/sdk/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "requires": { - "@jest/console": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "@jest/test-sequencer": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", - "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", + "packages/sdk/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "requires": { - "@jest/test-result": "^27.5.1", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-runtime": "^27.5.1" + "engines": { + "node": ">=8" } }, - "@jest/transform": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", - "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", + "packages/sdk/node_modules/pretty-format": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.0.0.tgz", + "integrity": "sha512-CoBfnZavDij+aBzQCVWIIYaZEe1ifIGLI2lG+c3/spHWhpeSt4kpjGd5W50GqtdtbL/Ojx4ZonGIqZVdUNoBGQ==", "dev": true, - "requires": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.5.1", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-util": "^27.5.1", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" - } - }, - "@jest/types": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", - "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" + "dependencies": { + "@jest/schemas": "^28.0.0", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" } }, - "@jridgewell/resolve-uri": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", - "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", - "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "packages/sdk/node_modules/react-is": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.0.0.tgz", + "integrity": "sha512-yUcBYdBBbo3QiPsgYDcfQcIkGZHfxOaoE6HLSnr1sPzMhdyxusbfKOSUbSd/ocGi32dxcj366PsTj+5oggeKKw==", "dev": true }, - "@jridgewell/trace-mapping": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz", - "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==", + "packages/sdk/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "packages/sdk/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "engines": { + "node": ">=8" } }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "packages/sdk/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } }, - "@npmcli/fs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.0.tgz", - "integrity": "sha512-DmfBvNXGaetMxj9LTp8NAN9vEidXURrf5ZTslQzEAi/6GbW+4yjaLFQc6Tue5cpZ9Frlk4OBo/Snf1Bh/S7qTQ==", + "packages/sdk/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "requires": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "@npmcli/git": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.0.tgz", - "integrity": "sha512-xfSBJ+KBMZWWqRHFbEgIaXG/LtELHrQZMJ72Gkb3yWdHysu/7+VGOs8ME0c3td7QNQX57Ggo3kYL6ylcd70/kA==", + "packages/sdk/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "requires": { - "@npmcli/promise-spawn": "^1.3.2", - "lru-cache": "^7.3.1", - "mkdirp": "^1.0.4", - "npm-pick-manifest": "^7.0.0", - "proc-log": "^2.0.0", - "promise-inflight": "^1.0.1", - "promise-retry": "^2.0.1", - "semver": "^7.3.5", - "which": "^2.0.2" - }, "dependencies": { - "lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", - "dev": true - } + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "@npmcli/installed-package-contents": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", - "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", + "packages/sdk/node_modules/v8-to-istanbul": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", + "integrity": "sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==", "dev": true, - "requires": { - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1" + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.7", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + }, + "engines": { + "node": ">=10.12.0" } }, - "@npmcli/move-file": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", - "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "packages/sdk/node_modules/write-file-atomic": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", "dev": true, - "requires": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "@npmcli/node-gyp": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", - "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", - "dev": true - }, - "@npmcli/promise-spawn": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", - "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", + "packages/sdk/node_modules/yargs": { + "version": "17.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz", + "integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==", "dev": true, - "requires": { - "infer-owner": "^1.0.4" + "dependencies": { + "cliui": "^7.0.2", + "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.0.0" + }, + "engines": { + "node": ">=12" } }, - "@npmcli/run-script": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.1.tgz", - "integrity": "sha512-o2fkld5hYwu9sKYzoXTpqEocMnDLaigobaPzLaGB63k/ExmLBTaB+KpfKlpcIePPnuP8RFR+0GDI4KopJCM6Xg==", + "packages/sdk/node_modules/yargs-parser": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", "dev": true, - "requires": { - "@npmcli/node-gyp": "^1.0.3", - "@npmcli/promise-spawn": "^1.3.2", - "node-gyp": "^9.0.0", - "read-package-json-fast": "^2.0.3" + "engines": { + "node": ">=12" } - }, - "@rollup/plugin-commonjs": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.1.0.tgz", - "integrity": "sha512-6ZtHx3VHIp2ReNNDxHjuUml6ur+WcQ28N1yHgCQwsbNkQg2suhxGMDQGJOn/KuDxKtd1xuZP5xSTwBA4GQ8hbA==", + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", + "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", "dev": true, "requires": { - "@rollup/pluginutils": "^3.1.0", - "commondir": "^1.0.1", - "estree-walker": "^2.0.1", - "glob": "^7.1.6", - "is-reference": "^1.2.1", - "magic-string": "^0.25.7", - "resolve": "^1.17.0" + "@jridgewell/trace-mapping": "^0.3.0" } }, - "@rollup/plugin-node-resolve": { - "version": "13.2.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.2.1.tgz", - "integrity": "sha512-btX7kzGvp1JwShQI9V6IM841YKNPYjKCvUbNrQ2EcVYbULtUd/GH6wZ/qdqH13j9pOHBER+EZXNN2L8RSJhVRA==", + "@babel/code-frame": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "dev": true, "requires": { - "@rollup/pluginutils": "^3.1.0", - "@types/resolve": "1.17.1", - "builtin-modules": "^3.1.0", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.19.0" + "@babel/highlight": "^7.16.7" } }, - "@rollup/plugin-replace": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-4.0.0.tgz", - "integrity": "sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g==", + "@babel/compat-data": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", + "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", + "dev": true + }, + "@babel/core": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", + "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", "dev": true, "requires": { - "@rollup/pluginutils": "^3.1.0", - "magic-string": "^0.25.7" + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.7", + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-module-transforms": "^7.17.7", + "@babel/helpers": "^7.17.8", + "@babel/parser": "^7.17.8", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, - "@rollup/plugin-typescript": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.2.tgz", - "integrity": "sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==", + "@babel/generator": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", "dev": true, "requires": { - "@rollup/pluginutils": "^3.1.0", - "resolve": "^1.17.0" + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } } }, - "@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "@babel/helper-compilation-targets": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", + "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", "dev": true, "requires": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" + "@babel/compat-data": "^7.17.7", + "@babel/helper-validator-option": "^7.16.7", + "browserslist": "^4.17.5", + "semver": "^6.3.0" }, "dependencies": { - "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-module-imports": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-module-transforms": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz", + "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.17.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", + "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", + "dev": true + }, + "@babel/helper-simple-access": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", + "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", + "dev": true, + "requires": { + "@babel/types": "^7.17.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", + "dev": true + }, + "@babel/helpers": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", + "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", + "dev": true, + "requires": { + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0" + } + }, + "@babel/highlight": { + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", + "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", + "dev": true + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz", + "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/template": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/traverse": { + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", + "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "dependencies": { + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + } + }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "@eslint/eslintrc": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", + "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.3.1", + "globals": "^13.9.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + } + } + }, + "@gar/promisify": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", + "dev": true + }, + "@humanwhocodes/config-array": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jest/console": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", + "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", + "dev": true, + "peer": true, + "requires": { + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", + "slash": "^3.0.0" + } + }, + "@jest/core": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", + "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", + "dev": true, + "peer": true, + "requires": { + "@jest/console": "^27.5.1", + "@jest/reporters": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.8.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^27.5.1", + "jest-config": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-resolve-dependencies": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "jest-watcher": "^27.5.1", + "micromatch": "^4.0.4", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "@jest/environment": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", + "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", + "dev": true, + "peer": true, + "requires": { + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1" + } + }, + "@jest/expect": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.0.0.tgz", + "integrity": "sha512-usQreaafoLj25kgt8YpcWLZlveqdV5/Upa8ouFrtlbLa0jcxlfG9eXvJHfd061/kUinMUmg5umaribPlIZnO9A==", + "dev": true, + "requires": { + "expect": "^28.0.0", + "jest-snapshot": "^28.0.0" + }, + "dependencies": { + "@jest/transform": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.0.0.tgz", + "integrity": "sha512-Xrc02CJFju0TLb1QZmqHCvbVEvSvR0SlSawMFEiXu/vVthWKfZgsia2UumOEJFc7YFknufShHwf+0OWBpSxNXw==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/types": "^28.0.0", + "@jridgewell/trace-mapping": "^0.3.7", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.0.0", + "jest-regex-util": "^28.0.0", + "jest-util": "^28.0.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" + } + }, + "@jest/types": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.0.0.tgz", + "integrity": "sha512-4rxVTiBbSjsl8V9sXkspfxW+t2Tdcmmc3fX7AU49gVrRpjXMjEDurSx/iruXnOSor4PTL0fwO61/2+n1XQ/RgA==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "ci-info": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "dev": true + }, + "diff-sequences": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.0.tgz", + "integrity": "sha512-GTIQPn2pPa1DMoEH70P9yQgYLcGW8bjPR5EOL2JO9/7DQHX+9tTFJee3UmlGWuyUvIqMgpXXssrckLubiEUZTg==", + "dev": true + }, + "expect": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.0.0.tgz", + "integrity": "sha512-06Ga42mfjx7tF1f2rn8DuKNARucmbluGtcDRwGlmUdakwHotIHi6h6yC0Gxp9+Q53jfOhr1lnfnETDaq6EjeDQ==", + "dev": true, + "requires": { + "@jest/expect-utils": "^28.0.0", + "jest-get-type": "^28.0.0", + "jest-matcher-utils": "^28.0.0", + "jest-message-util": "^28.0.0" + } + }, + "jest-diff": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.0.0.tgz", + "integrity": "sha512-LuxfL//yP8TFNECSL9ULr1lCKh4RTi4OZTNzzQYY99S0EfGW7B6ckkeXJ6QOpyj9wS4Jb1v51bOLUlJLlGf1Vg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^28.0.0", + "jest-get-type": "^28.0.0", + "pretty-format": "^28.0.0" + } + }, + "jest-get-type": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.0.tgz", + "integrity": "sha512-754LtawzW+Qk4o5rC+eDqfcQ9dV8z9uvbaVenmK8pju11PBGfuMDvQwRxoPews0LCaumNmYHjcAwmkYINTlhIA==", + "dev": true + }, + "jest-haste-map": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.0.0.tgz", + "integrity": "sha512-Wv/0P3Rc5V3Si5Rb4FpoaxrzHwDRH3mG40WOI0h4ya6cJRNbSpy/RcMMJeksJgt9hUE8KoFqHOnGAPxKC18VpQ==", + "dev": true, + "requires": { + "@jest/types": "^28.0.0", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.0", + "jest-util": "^28.0.0", + "jest-worker": "^28.0.0", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + } + }, + "jest-matcher-utils": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.0.0.tgz", + "integrity": "sha512-WI2jLjGQ2OTBIUVIJA+oiYkAEuG6U4URe6iCrqNQcN4KE3ZmLlcMlALsaYe/t/njS2El51ILtm6erpaCW+EK9A==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^28.0.0", + "jest-get-type": "^28.0.0", + "pretty-format": "^28.0.0" + } + }, + "jest-message-util": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.0.0.tgz", + "integrity": "sha512-dREPaseSGHG76kpUv+DbUoxZ8lRwSM7YwgrQNxPYuRR4rxSJJh23EKu6n6Nqv0yOer+FuVVu5RzEzdA+SbCtgQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^28.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-regex-util": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.0.tgz", + "integrity": "sha512-VqrjkteNiucN3ctI/AtBzO7iitfk5YGArPwU2cJ3WyT5Z6kGFHw/HQp0fSTkOUHdwVdJkFzbI5nh0yC82f9Kfg==", + "dev": true + }, + "jest-snapshot": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.0.0.tgz", + "integrity": "sha512-JqMff/KN8EAfAxCV7o4lHhnbL1wvJz2R8pHKe6UiEJ7wBmWo/fck/AIYpmdbk8w62+6exy4BmIDmERo9k0cy6w==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.0.0", + "@jest/transform": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^28.0.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.0.0", + "jest-get-type": "^28.0.0", + "jest-haste-map": "^28.0.0", + "jest-matcher-utils": "^28.0.0", + "jest-message-util": "^28.0.0", + "jest-util": "^28.0.0", + "natural-compare": "^1.4.0", + "pretty-format": "^28.0.0", + "semver": "^7.3.5" + } + }, + "jest-util": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.0.0.tgz", + "integrity": "sha512-wSZjUR74ZR076RfyWdZ0tI3+U87QmK+RCB5igUKRUhinclf4O9om6UNBy0u9YfT6shKhno3l/eiQVmRp/AEfeA==", + "dev": true, + "requires": { + "@jest/types": "^28.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "jest-worker": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.0.0.tgz", + "integrity": "sha512-ETSSJaDwDREF7LudjrfGpXs4jDAcKPvcrh2RgaRVXLBwp5e/5MtQQRk4zlaPjYpExhm7hyDJwIsIEq9sJMcHUg==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "pretty-format": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.0.0.tgz", + "integrity": "sha512-CoBfnZavDij+aBzQCVWIIYaZEe1ifIGLI2lG+c3/spHWhpeSt4kpjGd5W50GqtdtbL/Ojx4ZonGIqZVdUNoBGQ==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.0", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.0.0.tgz", + "integrity": "sha512-yUcBYdBBbo3QiPsgYDcfQcIkGZHfxOaoE6HLSnr1sPzMhdyxusbfKOSUbSd/ocGi32dxcj366PsTj+5oggeKKw==", + "dev": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "write-file-atomic": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } + } + } + }, + "@jest/expect-utils": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.0.0.tgz", + "integrity": "sha512-C/lpxRTC60wl2TIwttFm/qoccZe56kpE8MVDZUJjtinxAOuPFAolGgcon3qs2ggOL2+9zsTSbt648rB4D8RGdQ==", + "dev": true, + "requires": { + "jest-get-type": "^28.0.0" + }, + "dependencies": { + "jest-get-type": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.0.tgz", + "integrity": "sha512-754LtawzW+Qk4o5rC+eDqfcQ9dV8z9uvbaVenmK8pju11PBGfuMDvQwRxoPews0LCaumNmYHjcAwmkYINTlhIA==", + "dev": true + } + } + }, + "@jest/fake-timers": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", + "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", + "dev": true, + "peer": true, + "requires": { + "@jest/types": "^27.5.1", + "@sinonjs/fake-timers": "^8.0.1", + "@types/node": "*", + "jest-message-util": "^27.5.1", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" + } + }, + "@jest/globals": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", + "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", + "dev": true, + "peer": true, + "requires": { + "@jest/environment": "^27.5.1", + "@jest/types": "^27.5.1", + "expect": "^27.5.1" + } + }, + "@jest/reporters": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", + "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", + "dev": true, + "peer": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-haste-map": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "slash": "^3.0.0", + "source-map": "^0.6.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^8.1.0" + } + }, + "@jest/schemas": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.0.tgz", + "integrity": "sha512-Pap9Jvwr8KYFvDgkya/p0FCVya+jZkWt57lHpwBylfjgmwi/gtXfhyAO/Cw+jKuMafHcXY0beNf2XV2pkcu9vA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.23.3" + } + }, + "@jest/source-map": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", + "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", + "dev": true, + "peer": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9", + "source-map": "^0.6.0" + } + }, + "@jest/test-result": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", + "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", + "dev": true, + "peer": true, + "requires": { + "@jest/console": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", + "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", + "dev": true, + "peer": true, + "requires": { + "@jest/test-result": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-runtime": "^27.5.1" + } + }, + "@jest/transform": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", + "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", + "dev": true, + "peer": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/types": "^27.5.1", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-util": "^27.5.1", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + } + }, + "@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", + "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", + "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@npmcli/fs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.0.tgz", + "integrity": "sha512-DmfBvNXGaetMxj9LTp8NAN9vEidXURrf5ZTslQzEAi/6GbW+4yjaLFQc6Tue5cpZ9Frlk4OBo/Snf1Bh/S7qTQ==", + "dev": true, + "requires": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + } + }, + "@npmcli/git": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.0.tgz", + "integrity": "sha512-xfSBJ+KBMZWWqRHFbEgIaXG/LtELHrQZMJ72Gkb3yWdHysu/7+VGOs8ME0c3td7QNQX57Ggo3kYL6ylcd70/kA==", + "dev": true, + "requires": { + "@npmcli/promise-spawn": "^1.3.2", + "lru-cache": "^7.3.1", + "mkdirp": "^1.0.4", + "npm-pick-manifest": "^7.0.0", + "proc-log": "^2.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^2.0.2" + }, + "dependencies": { + "lru-cache": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "dev": true + } + } + }, + "@npmcli/installed-package-contents": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", + "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", + "dev": true, + "requires": { + "npm-bundled": "^1.1.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "@npmcli/move-file": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "dev": true, + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + } + }, + "@npmcli/node-gyp": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", + "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", + "dev": true + }, + "@npmcli/promise-spawn": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", + "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", + "dev": true, + "requires": { + "infer-owner": "^1.0.4" + } + }, + "@npmcli/run-script": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.1.tgz", + "integrity": "sha512-o2fkld5hYwu9sKYzoXTpqEocMnDLaigobaPzLaGB63k/ExmLBTaB+KpfKlpcIePPnuP8RFR+0GDI4KopJCM6Xg==", + "dev": true, + "requires": { + "@npmcli/node-gyp": "^1.0.3", + "@npmcli/promise-spawn": "^1.3.2", + "node-gyp": "^9.0.0", + "read-package-json-fast": "^2.0.3" + } + }, + "@rollup/plugin-commonjs": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.0.tgz", + "integrity": "sha512-Ktvf2j+bAO+30awhbYoCaXpBcyPmJbaEUYClQns/+6SNCYFURbvBiNbWgHITEsIgDDWCDUclWRKEuf8cwZCFoQ==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "commondir": "^1.0.1", + "estree-walker": "^2.0.1", + "glob": "^7.1.6", + "is-reference": "^1.2.1", + "magic-string": "^0.25.7", + "resolve": "^1.17.0" + } + }, + "@rollup/plugin-node-resolve": { + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.2.1.tgz", + "integrity": "sha512-btX7kzGvp1JwShQI9V6IM841YKNPYjKCvUbNrQ2EcVYbULtUd/GH6wZ/qdqH13j9pOHBER+EZXNN2L8RSJhVRA==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "builtin-modules": "^3.1.0", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.19.0" + } + }, + "@rollup/plugin-replace": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-4.0.0.tgz", + "integrity": "sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "magic-string": "^0.25.7" + } + }, + "@rollup/plugin-typescript": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.2.tgz", + "integrity": "sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "resolve": "^1.17.0" + } + }, + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "dependencies": { + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + } + } + }, + "@sinclair/typebox": { + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.4.tgz", + "integrity": "sha512-0/WqSvpVbCBAV1yPeko7eAczKbs78dNVAaX14quVlwOb2wxfKuXCx91h4NrEfkYK9zEnyVSW4JVI/trP3iS+Qg==", + "dev": true + }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true + }, + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", + "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "dev": true, + "peer": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sora/e2ee": { + "version": "file:packages/e2ee", + "requires": { + "@rollup/plugin-node-resolve": "^13.2.1", + "@rollup/plugin-replace": "^4.0.0", + "@rollup/plugin-typescript": "^8.3.2", + "@sora/go-wasm": "^2021.1.0", + "@typescript-eslint/eslint-plugin": "^5.21.0", + "@typescript-eslint/parser": "^5.21.0", + "eslint": "^8.14.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.0.0", + "prettier": "^2.6.2", + "rollup": "^2.70.2", + "typescript": "^4.6.3" + } + }, + "@sora/go-wasm": { + "version": "file:packages/go-wasm" + }, + "@sora/sdk": { + "version": "file:packages/sdk", + "requires": { + "@rollup/plugin-commonjs": "^22.0.0", + "@rollup/plugin-node-resolve": "^13.2.1", + "@rollup/plugin-replace": "^4.0.0", + "@rollup/plugin-typescript": "^8.3.2", + "@sora/e2ee": "^2021.1.0", + "@types/jest": "^27.4.1", + "@typescript-eslint/eslint-plugin": "5.21.0", + "@typescript-eslint/parser": "5.21.0", + "eslint": "8.14.0", + "eslint-config-prettier": "8.5.0", + "eslint-plugin-prettier": "4.0.0", + "fflate": "^0.7.3", + "jest": "^28.0.0", + "prettier": "^2.6.2", + "rollup": "^2.70.2", + "rollup-plugin-terser": "^7.0.2", + "ts-jest": "^27.1.4", + "typescript": "^4.6.3" + }, + "dependencies": { + "@jest/console": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.0.0.tgz", + "integrity": "sha512-LXXHbaVzluR26JGHz1iBYt32KM4+795/BFzDDoNuVDNFTcUANofye+zNl5Uzs/MfY2oFB7Zw+nJHpXEb1OGwpQ==", + "dev": true, + "requires": { + "@jest/types": "^28.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^28.0.0", + "jest-util": "^28.0.0", + "slash": "^3.0.0" + } + }, + "@jest/core": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.0.0.tgz", + "integrity": "sha512-ttGwIMsxHCS7/O9M19etIDnnJS9hGR6TtzfqRtiomAMtKX6VXi5vxJuV7z0C6TudesNU7h3DDSRptmg0HQ4c5A==", + "dev": true, + "requires": { + "@jest/console": "^28.0.0", + "@jest/reporters": "^28.0.0", + "@jest/test-result": "^28.0.0", + "@jest/transform": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^28.0.0", + "jest-config": "^28.0.0", + "jest-haste-map": "^28.0.0", + "jest-message-util": "^28.0.0", + "jest-regex-util": "^28.0.0", + "jest-resolve": "^28.0.0", + "jest-resolve-dependencies": "^28.0.0", + "jest-runner": "^28.0.0", + "jest-runtime": "^28.0.0", + "jest-snapshot": "^28.0.0", + "jest-util": "^28.0.0", + "jest-validate": "^28.0.0", + "jest-watcher": "^28.0.0", + "micromatch": "^4.0.4", + "pretty-format": "^28.0.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "@jest/environment": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.0.0.tgz", + "integrity": "sha512-4JW8g0UokMK8fHCxtg5N1xowzQPQknHYrcQhh/xtC2FuRN5nC1P1Utxt7FERxT94gxTbAkE9PGILVgFXQxEU2g==", + "dev": true, + "requires": { + "@jest/fake-timers": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/node": "*", + "jest-mock": "^28.0.0" + } + }, + "@jest/fake-timers": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.0.0.tgz", + "integrity": "sha512-ph5LQOCueZ5d19fwENuI4+Sdl0VBfVBBL+8aCO6XBRvYQ9tQ5lEiaqOe4OorctRv9xwy6XXsYpV/cdK/4nkMRQ==", + "dev": true, + "requires": { + "@jest/types": "^28.0.0", + "@sinonjs/fake-timers": "^9.1.1", + "@types/node": "*", + "jest-message-util": "^28.0.0", + "jest-mock": "^28.0.0", + "jest-util": "^28.0.0" + } + }, + "@jest/globals": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.0.0.tgz", + "integrity": "sha512-WnvQWgHWa6rdn3NIADBpaQDirVuynriOe9b/55dbw+5UH5FqWU8wedclfYTS+yh3Z9FHWpAIxoE38TmVabqyRw==", + "dev": true, + "requires": { + "@jest/environment": "^28.0.0", + "@jest/expect": "^28.0.0", + "@jest/types": "^28.0.0" + } + }, + "@jest/reporters": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.0.0.tgz", + "integrity": "sha512-Pvm5nR9YeVZYig+rWKVvbe8tWymEcRKn2VEvNMZlKiSICfQzRcUAVPdA7OAT1zBYkJPiK8lS52MdOE61JejCzg==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^28.0.0", + "@jest/test-result": "^28.0.0", + "@jest/transform": "^28.0.0", + "@jest/types": "^28.0.0", + "@jridgewell/trace-mapping": "^0.3.7", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-util": "^28.0.0", + "jest-worker": "^28.0.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^9.0.0" + } + }, + "@jest/source-map": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.0.0.tgz", + "integrity": "sha512-yeD/Y94j6UJPiaZTG5Sdww7pbHvEc7RlTucoVAdXaBaSuNcyrAkLlJonAb/xX/efCugDOEbFJdATsSnDEh45Nw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.7", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + } + }, + "@jest/test-result": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.0.0.tgz", + "integrity": "sha512-hd6eS08F9gEAY5kt7Pw7zaIzj31ElKRVHml6pyz+i5s0EzHd0LjnaDwaAqBbbFxrD13HoQOJh8Lel6kvgAT3Yg==", + "dev": true, + "requires": { + "@jest/console": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.0.0.tgz", + "integrity": "sha512-tRgs5JRVxodtDVddITgH0BRFwBAjbdWnnobuYWHgeYEM4sZVAsNZmF0oeZIaE9vK72xgdnjIoRg1+kppMorFCQ==", + "dev": true, + "requires": { + "@jest/test-result": "^28.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.0.0", + "slash": "^3.0.0" + } + }, + "@jest/transform": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.0.0.tgz", + "integrity": "sha512-Xrc02CJFju0TLb1QZmqHCvbVEvSvR0SlSawMFEiXu/vVthWKfZgsia2UumOEJFc7YFknufShHwf+0OWBpSxNXw==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/types": "^28.0.0", + "@jridgewell/trace-mapping": "^0.3.7", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.0.0", + "jest-regex-util": "^28.0.0", + "jest-util": "^28.0.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" + } + }, + "@jest/types": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.0.0.tgz", + "integrity": "sha512-4rxVTiBbSjsl8V9sXkspfxW+t2Tdcmmc3fX7AU49gVrRpjXMjEDurSx/iruXnOSor4PTL0fwO61/2+n1XQ/RgA==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@sinonjs/fake-timers": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "babel-jest": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.0.0.tgz", + "integrity": "sha512-UBCCUmm8YnHyaBCF68rIknYvL1TjS4RKasviDG+j8lMHHxrV9aNdWVi4bIggb1rPEm5f/Z2Y44ByyvaHZprvAg==", + "dev": true, + "requires": { + "@jest/transform": "^28.0.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^28.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + } + }, + "babel-plugin-jest-hoist": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.0.0.tgz", + "integrity": "sha512-Eu+TDlmKd2SsnvmlooVeHFryVHHom6ffCLSZuqrN8WpIHE0H6qiIPW5h5rFlzIZQmVqnZR2qHnbm2eQWIP7hZg==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-preset-jest": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.0.0.tgz", + "integrity": "sha512-JLyjfCmqCWS3tXUw86ei5fQwuwn34slNBPTluNbhoqHVI1Cbw6MsmvgEl54jPjbyzkmA6XAHJTg3EGNY7rnr4A==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^28.0.0", + "babel-preset-current-node-syntax": "^1.0.0" + } + }, + "ci-info": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "diff-sequences": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.0.tgz", + "integrity": "sha512-GTIQPn2pPa1DMoEH70P9yQgYLcGW8bjPR5EOL2JO9/7DQHX+9tTFJee3UmlGWuyUvIqMgpXXssrckLubiEUZTg==", + "dev": true + }, + "emittery": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", + "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "dev": true + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "expect": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.0.0.tgz", + "integrity": "sha512-06Ga42mfjx7tF1f2rn8DuKNARucmbluGtcDRwGlmUdakwHotIHi6h6yC0Gxp9+Q53jfOhr1lnfnETDaq6EjeDQ==", + "dev": true, + "requires": { + "@jest/expect-utils": "^28.0.0", + "jest-get-type": "^28.0.0", + "jest-matcher-utils": "^28.0.0", + "jest-message-util": "^28.0.0" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "jest": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-28.0.0.tgz", + "integrity": "sha512-Zl07FoxrV6em3/sBqSRepHWBtcqJ3BKbwmZ1CyeuHPKkSjhOqUEG/OcuJd/5pKP3wqRovoF6aHR1ID+2Qz/ufQ==", + "dev": true, + "requires": { + "@jest/core": "^28.0.0", + "import-local": "^3.0.2", + "jest-cli": "^28.0.0" + } + }, + "jest-changed-files": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.0.tgz", + "integrity": "sha512-9hFz/LuADUTv7zN+t0Ig+J/as2mtILTmgoT2XQdG/ezGbA1tfqoSwEKCXFcDaldzkskZddbh+QI2sACQGaxg6Q==", + "dev": true, + "requires": { + "execa": "^5.0.0", + "throat": "^6.0.1" + } + }, + "jest-circus": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.0.0.tgz", + "integrity": "sha512-GLmtj2SXMPMinU46Bgo/bD2JkYbssf/8CSKz5k7w4RY8VVRhODd+GMMzts822RHswMm35ACUU8dV1fYRutCwqQ==", + "dev": true, + "requires": { + "@jest/environment": "^28.0.0", + "@jest/expect": "^28.0.0", + "@jest/test-result": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^28.0.0", + "jest-matcher-utils": "^28.0.0", + "jest-message-util": "^28.0.0", + "jest-runtime": "^28.0.0", + "jest-snapshot": "^28.0.0", + "jest-util": "^28.0.0", + "pretty-format": "^28.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3", + "throat": "^6.0.1" + } + }, + "jest-cli": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.0.0.tgz", + "integrity": "sha512-LrK46qmPoi+rVMOQt6e8OMMyfMk0+mgdTFnhOFi011p+qoKefW/5obGdS9rWZHcoTPg+lZ9iV4JBI4NJhie2hw==", + "dev": true, + "requires": { + "@jest/core": "^28.0.0", + "@jest/test-result": "^28.0.0", + "@jest/types": "^28.0.0", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^28.0.0", + "jest-util": "^28.0.0", + "jest-validate": "^28.0.0", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + } + }, + "jest-config": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.0.0.tgz", + "integrity": "sha512-6dP4hkHLlMllh5iK/2n8jLlrrJvDnXQyY4MKFnXyPiUYdXu59yg4paYYEKW0JNbgco//d07AiUvL1t+gkjPfFg==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^28.0.0", + "@jest/types": "^28.0.0", + "babel-jest": "^28.0.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^28.0.0", + "jest-environment-node": "^28.0.0", + "jest-get-type": "^28.0.0", + "jest-regex-util": "^28.0.0", + "jest-resolve": "^28.0.0", + "jest-runner": "^28.0.0", + "jest-util": "^28.0.0", + "jest-validate": "^28.0.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^28.0.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + } + }, + "jest-diff": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.0.0.tgz", + "integrity": "sha512-LuxfL//yP8TFNECSL9ULr1lCKh4RTi4OZTNzzQYY99S0EfGW7B6ckkeXJ6QOpyj9wS4Jb1v51bOLUlJLlGf1Vg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^28.0.0", + "jest-get-type": "^28.0.0", + "pretty-format": "^28.0.0" + } + }, + "jest-docblock": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.0.0.tgz", + "integrity": "sha512-88od+z1QkHyvtpj1gRA6QGysopOzImocHNNlvvM7OydDe9ER6z1siLtHJXbKEfi5FoxMpYqDtszYIS50JVs0WA==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.0.0.tgz", + "integrity": "sha512-nnGven0xJDHPrb5RKskWG/MvHvkfDPoOG9dyduV7sfl2WkMBe1X1l68Xdjv+eTdUV966/mPMZEuHWLh0HRKifw==", + "dev": true, + "requires": { + "@jest/types": "^28.0.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.0", + "jest-util": "^28.0.0", + "pretty-format": "^28.0.0" + } + }, + "jest-environment-node": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.0.0.tgz", + "integrity": "sha512-kWzs9d2Yom5BtIjKu83I/CsWHpKbegTnMlLZicRK9OZlk9GCdnP2mrQo9YqkUyGTYKZGXOSYnGJLJVBaR+NZGA==", + "dev": true, + "requires": { + "@jest/environment": "^28.0.0", + "@jest/fake-timers": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/node": "*", + "jest-mock": "^28.0.0", + "jest-util": "^28.0.0" + } + }, + "jest-get-type": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.0.tgz", + "integrity": "sha512-754LtawzW+Qk4o5rC+eDqfcQ9dV8z9uvbaVenmK8pju11PBGfuMDvQwRxoPews0LCaumNmYHjcAwmkYINTlhIA==", + "dev": true + }, + "jest-haste-map": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.0.0.tgz", + "integrity": "sha512-Wv/0P3Rc5V3Si5Rb4FpoaxrzHwDRH3mG40WOI0h4ya6cJRNbSpy/RcMMJeksJgt9hUE8KoFqHOnGAPxKC18VpQ==", + "dev": true, + "requires": { + "@jest/types": "^28.0.0", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.0", + "jest-util": "^28.0.0", + "jest-worker": "^28.0.0", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + } + }, + "jest-leak-detector": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.0.0.tgz", + "integrity": "sha512-P4KWylb4x6Q/jctJtGKJSD3PkUjgSIu/JOpstWwgYFvGfNKtAGXEfIY6nlGSBTCajSuPs7WXUNMQXiYqKwivgg==", + "dev": true, + "requires": { + "jest-get-type": "^28.0.0", + "pretty-format": "^28.0.0" + } + }, + "jest-matcher-utils": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.0.0.tgz", + "integrity": "sha512-WI2jLjGQ2OTBIUVIJA+oiYkAEuG6U4URe6iCrqNQcN4KE3ZmLlcMlALsaYe/t/njS2El51ILtm6erpaCW+EK9A==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^28.0.0", + "jest-get-type": "^28.0.0", + "pretty-format": "^28.0.0" + } + }, + "jest-message-util": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.0.0.tgz", + "integrity": "sha512-dREPaseSGHG76kpUv+DbUoxZ8lRwSM7YwgrQNxPYuRR4rxSJJh23EKu6n6Nqv0yOer+FuVVu5RzEzdA+SbCtgQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^28.0.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-mock": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.0.0.tgz", + "integrity": "sha512-C8xBtHuokPvmyX4ajh/TaenKGSbcu4pcIwjucD6ZZ7WznfSnMkLI/gzOh/YhUNr60tvBnxNsN+A0ECLG8pprTg==", + "dev": true, + "requires": { + "@jest/types": "^28.0.0", + "@types/node": "*" + } + }, + "jest-regex-util": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.0.tgz", + "integrity": "sha512-VqrjkteNiucN3ctI/AtBzO7iitfk5YGArPwU2cJ3WyT5Z6kGFHw/HQp0fSTkOUHdwVdJkFzbI5nh0yC82f9Kfg==", + "dev": true + }, + "jest-resolve": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.0.0.tgz", + "integrity": "sha512-aKRsKCo3gjVL6lSSjoEucVrhrDP8NJmiIzBiw7hI4o6gYrXH4yNahF5m9Vl6Wl9Q3LNqMAQhPSxPxVnSh1k3YQ==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.0.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^28.0.0", + "jest-validate": "^28.0.0", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" + } + }, + "jest-resolve-dependencies": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.0.0.tgz", + "integrity": "sha512-SzS4mfZTznPKczh6KopL1ZMTGWzNNhGJ4vLvhYkXb1g1a8SgE+lIfZ0aI+Diu+DASw+QZwJrwiRTSvSGu4k6/g==", + "dev": true, + "requires": { + "jest-regex-util": "^28.0.0", + "jest-snapshot": "^28.0.0" + } + }, + "jest-runner": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.0.0.tgz", + "integrity": "sha512-ygi+tgaeYaqfl72FA9HdD0B8c1q0RmhbHuBVvNhMwqqFs9OZpI0vN4ksRJCqmlRDgfK/1JGPElot0kTQ62++Rg==", + "dev": true, + "requires": { + "@jest/console": "^28.0.0", + "@jest/environment": "^28.0.0", + "@jest/test-result": "^28.0.0", + "@jest/transform": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "graceful-fs": "^4.2.9", + "jest-docblock": "^28.0.0", + "jest-environment-node": "^28.0.0", + "jest-haste-map": "^28.0.0", + "jest-leak-detector": "^28.0.0", + "jest-message-util": "^28.0.0", + "jest-resolve": "^28.0.0", + "jest-runtime": "^28.0.0", + "jest-util": "^28.0.0", + "jest-watcher": "^28.0.0", + "jest-worker": "^28.0.0", + "source-map-support": "0.5.13", + "throat": "^6.0.1" + } + }, + "jest-runtime": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.0.0.tgz", + "integrity": "sha512-s7sw1I4J4lUos34kbFnptxVSLfXIwILSNAq5DAzgmRzP/jUCuRFPm4/aWD7PaobxpCFJiSUAGj+Vnl7qSYQ+Cw==", + "dev": true, + "requires": { + "@jest/environment": "^28.0.0", + "@jest/fake-timers": "^28.0.0", + "@jest/globals": "^28.0.0", + "@jest/source-map": "^28.0.0", + "@jest/test-result": "^28.0.0", + "@jest/transform": "^28.0.0", + "@jest/types": "^28.0.0", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "execa": "^5.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.0.0", + "jest-message-util": "^28.0.0", + "jest-mock": "^28.0.0", + "jest-regex-util": "^28.0.0", + "jest-resolve": "^28.0.0", + "jest-snapshot": "^28.0.0", + "jest-util": "^28.0.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + } + }, + "jest-snapshot": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.0.0.tgz", + "integrity": "sha512-JqMff/KN8EAfAxCV7o4lHhnbL1wvJz2R8pHKe6UiEJ7wBmWo/fck/AIYpmdbk8w62+6exy4BmIDmERo9k0cy6w==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.0.0", + "@jest/transform": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^28.0.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.0.0", + "jest-get-type": "^28.0.0", + "jest-haste-map": "^28.0.0", + "jest-matcher-utils": "^28.0.0", + "jest-message-util": "^28.0.0", + "jest-util": "^28.0.0", + "natural-compare": "^1.4.0", + "pretty-format": "^28.0.0", + "semver": "^7.3.5" + } + }, + "jest-util": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.0.0.tgz", + "integrity": "sha512-wSZjUR74ZR076RfyWdZ0tI3+U87QmK+RCB5igUKRUhinclf4O9om6UNBy0u9YfT6shKhno3l/eiQVmRp/AEfeA==", + "dev": true, + "requires": { + "@jest/types": "^28.0.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "jest-validate": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.0.0.tgz", + "integrity": "sha512-5Z0vTTIZRNYAKzemp/jvutWoMKYGHyr6TKc5kl4+KtAxrbX7n7cGv00AxEavBKtrb7EMAZ2zhbhu2nKaEEUwKw==", + "dev": true, + "requires": { + "@jest/types": "^28.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.0", + "leven": "^3.1.0", + "pretty-format": "^28.0.0" + } + }, + "jest-watcher": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.0.0.tgz", + "integrity": "sha512-SOeze65Bvb6biK+gXqb2fa1T3F626AuM/z3fvISF7wPgKkCzqxPG6obkNJIzcISpWfSP4G+Pf5eNVScj1KNsYQ==", + "dev": true, + "requires": { + "@jest/test-result": "^28.0.0", + "@jest/types": "^28.0.0", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "jest-util": "^28.0.0", + "string-length": "^4.0.1" + } + }, + "jest-worker": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.0.0.tgz", + "integrity": "sha512-ETSSJaDwDREF7LudjrfGpXs4jDAcKPvcrh2RgaRVXLBwp5e/5MtQQRk4zlaPjYpExhm7hyDJwIsIEq9sJMcHUg==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "pretty-format": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.0.0.tgz", + "integrity": "sha512-CoBfnZavDij+aBzQCVWIIYaZEe1ifIGLI2lG+c3/spHWhpeSt4kpjGd5W50GqtdtbL/Ojx4ZonGIqZVdUNoBGQ==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.0", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.0.0.tgz", + "integrity": "sha512-yUcBYdBBbo3QiPsgYDcfQcIkGZHfxOaoE6HLSnr1sPzMhdyxusbfKOSUbSd/ocGi32dxcj366PsTj+5oggeKKw==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "v8-to-istanbul": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", + "integrity": "sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.7", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + } + }, + "write-file-atomic": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } + }, + "yargs": { + "version": "17.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz", + "integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "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.0.0" + } + }, + "yargs-parser": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", "dev": true } } }, - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true - }, - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@sora/e2ee": { - "version": "file:packages/e2ee", - "requires": { - "@rollup/plugin-node-resolve": "^13.2.1", - "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", - "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^5.20.0", - "@typescript-eslint/parser": "^5.20.0", - "eslint": "^8.13.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.6.2", - "rollup": "^2.70.2", - "typescript": "^4.6.3" - } - }, - "@sora/go-wasm": { - "version": "file:packages/go-wasm" - }, - "@sora/sdk": { - "version": "file:packages/sdk", - "requires": { - "@rollup/plugin-commonjs": "^21.1.0", - "@rollup/plugin-node-resolve": "^13.2.1", - "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", - "@sora/e2ee": "^2021.1.0", - "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.20.0", - "@typescript-eslint/parser": "5.20.0", - "eslint": "8.13.0", - "eslint-config-prettier": "8.5.0", - "eslint-plugin-prettier": "4.0.0", - "fflate": "^0.7.3", - "jest": "^27.5.1", - "prettier": "^2.6.2", - "rollup": "^2.70.2", - "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^27.1.4", - "typescript": "^4.6.3" - } - }, "@szmarczak/http-timer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", @@ -9713,14 +12399,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz", - "integrity": "sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.21.0.tgz", + "integrity": "sha512-fTU85q8v5ZLpoZEyn/u1S2qrFOhi33Edo2CZ0+q1gDaWWm0JuPh3bgOyU8lM0edIEYgKLDkPFiZX2MOupgjlyg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/type-utils": "5.20.0", - "@typescript-eslint/utils": "5.20.0", + "@typescript-eslint/scope-manager": "5.21.0", + "@typescript-eslint/type-utils": "5.21.0", + "@typescript-eslint/utils": "5.21.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -9730,52 +12416,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.20.0.tgz", - "integrity": "sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.21.0.tgz", + "integrity": "sha512-8RUwTO77hstXUr3pZoWZbRQUxXcSXafZ8/5gpnQCfXvgmP9gpNlRGlWzvfbEQ14TLjmtU8eGnONkff8U2ui2Eg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/typescript-estree": "5.20.0", + "@typescript-eslint/scope-manager": "5.21.0", + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/typescript-estree": "5.21.0", "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz", - "integrity": "sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.21.0.tgz", + "integrity": "sha512-XTX0g0IhvzcH/e3393SvjRCfYQxgxtYzL3UREteUneo72EFlt7UNoiYnikUtmGVobTbhUDByhJ4xRBNe+34kOQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/visitor-keys": "5.20.0" + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/visitor-keys": "5.21.0" } }, "@typescript-eslint/type-utils": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz", - "integrity": "sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.21.0.tgz", + "integrity": "sha512-MxmLZj0tkGlkcZCSE17ORaHl8Th3JQwBzyXL/uvC6sNmu128LsgjTX0NIzy+wdH2J7Pd02GN8FaoudJntFvSOw==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.20.0", + "@typescript-eslint/utils": "5.21.0", "debug": "^4.3.2", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz", - "integrity": "sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.21.0.tgz", + "integrity": "sha512-XnOOo5Wc2cBlq8Lh5WNvAgHzpjnEzxn4CJBwGkcau7b/tZ556qrWXQz4DJyChYg8JZAD06kczrdgFPpEQZfDsA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz", - "integrity": "sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.21.0.tgz", + "integrity": "sha512-Y8Y2T2FNvm08qlcoSMoNchh9y2Uj3QmjtwNMdRQkcFG7Muz//wfJBGBxh8R7HAGQFpgYpdHqUpEoPQk+q9Kjfg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/visitor-keys": "5.20.0", + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/visitor-keys": "5.21.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -9784,26 +12470,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.20.0.tgz", - "integrity": "sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.21.0.tgz", + "integrity": "sha512-q/emogbND9wry7zxy7VYri+7ydawo2HDZhRZ5k6yggIvXa7PvBbAAZ4PFH/oZLem72ezC4Pr63rJvDK/sTlL8Q==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/typescript-estree": "5.20.0", + "@typescript-eslint/scope-manager": "5.21.0", + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/typescript-estree": "5.21.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz", - "integrity": "sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.21.0.tgz", + "integrity": "sha512-SX8jNN+iHqAF0riZQMkm7e8+POXa/fXw5cxL+gjpyP+FI+JVNhii53EmQgDAfDcBpFekYSlO0fGytMQwRiMQCA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/types": "5.21.0", "eslint-visitor-keys": "^3.0.0" } }, @@ -9817,7 +12503,8 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", - "dev": true + "dev": true, + "peer": true }, "abbrev": { "version": "1.1.1", @@ -9846,6 +12533,7 @@ "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", "dev": true, + "peer": true, "requires": { "acorn": "^7.1.1", "acorn-walk": "^7.1.1" @@ -9855,7 +12543,8 @@ "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true + "dev": true, + "peer": true } } }, @@ -9870,7 +12559,8 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true + "dev": true, + "peer": true }, "agent-base": { "version": "6.0.2", @@ -10009,13 +12699,15 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "dev": true, + "peer": true }, "babel-jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==", "dev": true, + "peer": true, "requires": { "@jest/transform": "^27.5.1", "@jest/types": "^27.5.1", @@ -10045,6 +12737,7 @@ "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz", "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==", "dev": true, + "peer": true, "requires": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", @@ -10077,6 +12770,7 @@ "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==", "dev": true, + "peer": true, "requires": { "babel-plugin-jest-hoist": "^27.5.1", "babel-preset-current-node-syntax": "^1.0.0" @@ -10126,7 +12820,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true + "dev": true, + "peer": true }, "browserslist": { "version": "4.20.2", @@ -10403,6 +13098,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, + "peer": true, "requires": { "delayed-stream": "~1.0.0" } @@ -10541,13 +13237,15 @@ "version": "0.4.4", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", - "dev": true + "dev": true, + "peer": true }, "cssstyle": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", "dev": true, + "peer": true, "requires": { "cssom": "~0.3.6" }, @@ -10556,7 +13254,8 @@ "version": "0.3.8", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true + "dev": true, + "peer": true } } }, @@ -10565,6 +13264,7 @@ "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", "dev": true, + "peer": true, "requires": { "abab": "^2.0.3", "whatwg-mimetype": "^2.3.0", @@ -10584,7 +13284,8 @@ "version": "10.3.1", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", - "dev": true + "dev": true, + "peer": true }, "decompress-response": { "version": "3.3.0", @@ -10629,7 +13330,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true + "dev": true, + "peer": true }, "delegates": { "version": "1.0.0", @@ -10678,6 +13380,7 @@ "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", "dev": true, + "peer": true, "requires": { "webidl-conversions": "^5.0.0" }, @@ -10686,7 +13389,8 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "dev": true + "dev": true, + "peer": true } } }, @@ -10715,7 +13419,8 @@ "version": "0.8.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", - "dev": true + "dev": true, + "peer": true }, "emoji-regex": { "version": "8.0.0", @@ -10786,6 +13491,7 @@ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", "dev": true, + "peer": true, "requires": { "esprima": "^4.0.1", "estraverse": "^5.2.0", @@ -10798,13 +13504,15 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true + "dev": true, + "peer": true }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, + "peer": true, "requires": { "prelude-ls": "~1.1.2", "type-check": "~0.3.2" @@ -10815,6 +13523,7 @@ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, + "peer": true, "requires": { "deep-is": "~0.1.3", "fast-levenshtein": "~2.0.6", @@ -10828,13 +13537,15 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true + "dev": true, + "peer": true }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, + "peer": true, "requires": { "prelude-ls": "~1.1.2" } @@ -10842,12 +13553,12 @@ } }, "eslint": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.13.0.tgz", - "integrity": "sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", + "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.2.1", + "@eslint/eslintrc": "^1.2.2", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -11118,6 +13829,7 @@ "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", "dev": true, + "peer": true, "requires": { "@jest/types": "^27.5.1", "jest-get-type": "^27.5.1", @@ -11255,6 +13967,7 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", "dev": true, + "peer": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -11508,6 +14221,7 @@ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", "dev": true, + "peer": true, "requires": { "whatwg-encoding": "^1.0.5" } @@ -11785,7 +14499,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true + "dev": true, + "peer": true }, "is-reference": { "version": "1.2.1", @@ -11893,6 +14608,7 @@ "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==", "dev": true, + "peer": true, "requires": { "@jest/core": "^27.5.1", "import-local": "^3.0.2", @@ -11904,6 +14620,7 @@ "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz", "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==", "dev": true, + "peer": true, "requires": { "@jest/types": "^27.5.1", "execa": "^5.0.0", @@ -11915,6 +14632,7 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "peer": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -11926,6 +14644,7 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, + "peer": true, "requires": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -11942,19 +14661,22 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true + "dev": true, + "peer": true }, "is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true + "dev": true, + "peer": true }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, + "peer": true, "requires": { "path-key": "^3.0.0" } @@ -11963,13 +14685,15 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "dev": true, + "peer": true }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "peer": true, "requires": { "shebang-regex": "^3.0.0" } @@ -11978,7 +14702,8 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true + "dev": true, + "peer": true } } }, @@ -11987,6 +14712,7 @@ "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz", "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==", "dev": true, + "peer": true, "requires": { "@jest/environment": "^27.5.1", "@jest/test-result": "^27.5.1", @@ -12014,6 +14740,7 @@ "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz", "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==", "dev": true, + "peer": true, "requires": { "@jest/core": "^27.5.1", "@jest/test-result": "^27.5.1", @@ -12034,6 +14761,7 @@ "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz", "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==", "dev": true, + "peer": true, "requires": { "@babel/core": "^7.8.0", "@jest/test-sequencer": "^27.5.1", @@ -12065,13 +14793,15 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true + "dev": true, + "peer": true }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true + "dev": true, + "peer": true } } }, @@ -12092,6 +14822,7 @@ "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz", "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==", "dev": true, + "peer": true, "requires": { "detect-newline": "^3.0.0" } @@ -12101,6 +14832,7 @@ "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz", "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==", "dev": true, + "peer": true, "requires": { "@jest/types": "^27.5.1", "chalk": "^4.0.0", @@ -12114,6 +14846,7 @@ "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz", "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==", "dev": true, + "peer": true, "requires": { "@jest/environment": "^27.5.1", "@jest/fake-timers": "^27.5.1", @@ -12129,6 +14862,7 @@ "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", "dev": true, + "peer": true, "requires": { "@jest/environment": "^27.5.1", "@jest/fake-timers": "^27.5.1", @@ -12149,6 +14883,7 @@ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", "dev": true, + "peer": true, "requires": { "@jest/types": "^27.5.1", "@types/graceful-fs": "^4.1.2", @@ -12170,6 +14905,7 @@ "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz", "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==", "dev": true, + "peer": true, "requires": { "@jest/environment": "^27.5.1", "@jest/source-map": "^27.5.1", @@ -12195,6 +14931,7 @@ "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz", "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==", "dev": true, + "peer": true, "requires": { "jest-get-type": "^27.5.1", "pretty-format": "^27.5.1" @@ -12217,6 +14954,7 @@ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", "dev": true, + "peer": true, "requires": { "@babel/code-frame": "^7.12.13", "@jest/types": "^27.5.1", @@ -12234,6 +14972,7 @@ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", "dev": true, + "peer": true, "requires": { "@jest/types": "^27.5.1", "@types/node": "*" @@ -12250,13 +14989,15 @@ "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", - "dev": true + "dev": true, + "peer": true }, "jest-resolve": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", "dev": true, + "peer": true, "requires": { "@jest/types": "^27.5.1", "chalk": "^4.0.0", @@ -12275,6 +15016,7 @@ "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz", "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==", "dev": true, + "peer": true, "requires": { "@jest/types": "^27.5.1", "jest-regex-util": "^27.5.1", @@ -12286,6 +15028,7 @@ "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz", "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==", "dev": true, + "peer": true, "requires": { "@jest/console": "^27.5.1", "@jest/environment": "^27.5.1", @@ -12315,6 +15058,7 @@ "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz", "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==", "dev": true, + "peer": true, "requires": { "@jest/environment": "^27.5.1", "@jest/fake-timers": "^27.5.1", @@ -12345,6 +15089,7 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "peer": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -12356,6 +15101,7 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, + "peer": true, "requires": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -12372,19 +15118,22 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true + "dev": true, + "peer": true }, "is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true + "dev": true, + "peer": true }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, + "peer": true, "requires": { "path-key": "^3.0.0" } @@ -12393,13 +15142,15 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "dev": true, + "peer": true }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "peer": true, "requires": { "shebang-regex": "^3.0.0" } @@ -12408,7 +15159,8 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true + "dev": true, + "peer": true } } }, @@ -12417,6 +15169,7 @@ "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", "dev": true, + "peer": true, "requires": { "@types/node": "*", "graceful-fs": "^4.2.9" @@ -12427,6 +15180,7 @@ "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz", "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==", "dev": true, + "peer": true, "requires": { "@babel/core": "^7.7.2", "@babel/generator": "^7.7.2", @@ -12479,6 +15233,7 @@ "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", "dev": true, + "peer": true, "requires": { "@jest/types": "^27.5.1", "camelcase": "^6.2.0", @@ -12493,6 +15248,7 @@ "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz", "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==", "dev": true, + "peer": true, "requires": { "@jest/test-result": "^27.5.1", "@jest/types": "^27.5.1", @@ -12508,6 +15264,7 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "dev": true, + "peer": true, "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -12519,6 +15276,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "peer": true, "requires": { "has-flag": "^4.0.0" } @@ -12551,6 +15309,7 @@ "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", "dev": true, + "peer": true, "requires": { "abab": "^2.0.5", "acorn": "^8.2.4", @@ -12585,13 +15344,15 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true + "dev": true, + "peer": true }, "http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, + "peer": true, "requires": { "@tootallnate/once": "1", "agent-base": "6", @@ -13262,7 +16023,8 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", - "dev": true + "dev": true, + "peer": true }, "on-headers": { "version": "1.0.2", @@ -13445,7 +16207,8 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true + "dev": true, + "peer": true }, "path-exists": { "version": "4.0.0", @@ -13643,7 +16406,8 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true + "dev": true, + "peer": true }, "pump": { "version": "3.0.0", @@ -13927,6 +16691,7 @@ "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", "dev": true, + "peer": true, "requires": { "xmlchars": "^2.2.0" } @@ -14362,7 +17127,8 @@ "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true + "dev": true, + "peer": true }, "tar": { "version": "6.1.11", @@ -14490,6 +17256,7 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", "dev": true, + "peer": true, "requires": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -14500,7 +17267,8 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "dev": true, + "peer": true } } }, @@ -14509,6 +17277,7 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", "dev": true, + "peer": true, "requires": { "punycode": "^2.1.1" }, @@ -14517,7 +17286,8 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "dev": true, + "peer": true } } }, @@ -14641,7 +17411,8 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true + "dev": true, + "peer": true }, "update-check": { "version": "1.5.2", @@ -14718,6 +17489,7 @@ "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", "dev": true, + "peer": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.1", "convert-source-map": "^1.6.0", @@ -14728,7 +17500,8 @@ "version": "0.7.3", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true + "dev": true, + "peer": true } } }, @@ -14774,6 +17547,7 @@ "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", "dev": true, + "peer": true, "requires": { "browser-process-hrtime": "^1.0.0" } @@ -14783,6 +17557,7 @@ "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", "dev": true, + "peer": true, "requires": { "xml-name-validator": "^3.0.0" } @@ -14800,13 +17575,15 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", - "dev": true + "dev": true, + "peer": true }, "whatwg-encoding": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", "dev": true, + "peer": true, "requires": { "iconv-lite": "0.4.24" }, @@ -14816,6 +17593,7 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, + "peer": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } @@ -14826,13 +17604,15 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true + "dev": true, + "peer": true }, "whatwg-url": { "version": "8.7.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", "dev": true, + "peer": true, "requires": { "lodash": "^4.7.0", "tr46": "^2.1.0", @@ -14906,6 +17686,7 @@ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", "dev": true, + "peer": true, "requires": {} }, "xdg-basedir": { @@ -14918,13 +17699,15 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true + "dev": true, + "peer": true }, "xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true + "dev": true, + "peer": true }, "y18n": { "version": "5.0.8", @@ -14949,6 +17732,7 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, + "peer": true, "requires": { "cliui": "^7.0.2", "escalade": "^3.1.1", diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index 158c7355..6fc389b5 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -19,9 +19,9 @@ "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.20.0", - "@typescript-eslint/parser": "^5.20.0", - "eslint": "^8.13.0", + "@typescript-eslint/eslint-plugin": "^5.21.0", + "@typescript-eslint/parser": "^5.21.0", + "eslint": "^8.14.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index e1f01778..773056b6 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -8,17 +8,17 @@ "test": "jest --detectOpenHandles --forceExit" }, "devDependencies": { - "@rollup/plugin-commonjs": "^21.1.0", + "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.20.0", - "@typescript-eslint/parser": "5.20.0", - "eslint": "8.13.0", + "@typescript-eslint/eslint-plugin": "5.21.0", + "@typescript-eslint/parser": "5.21.0", + "eslint": "8.14.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", - "jest": "^27.5.1", + "jest": "^28.0.0", "prettier": "^2.6.2", "rollup": "^2.70.2", "rollup-plugin-terser": "^7.0.2", From 363609a34c838a410e4b1007f39cdf68a58ebd8a Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 26 Apr 2022 11:10:47 +0900 Subject: [PATCH 64/86] =?UTF-8?q?Revert=20"=E3=83=91=E3=83=83=E3=82=B1?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 31de06600f286394d7ff53f57b9faed13fa3f112. --- package-lock.json | 4872 ++++++++---------------------------- packages/e2ee/package.json | 6 +- packages/sdk/package.json | 10 +- 3 files changed, 1052 insertions(+), 3836 deletions(-) diff --git a/package-lock.json b/package-lock.json index a9167368..50ebfd89 100644 --- a/package-lock.json +++ b/package-lock.json @@ -601,9 +601,9 @@ "dev": true }, "node_modules/@eslint/eslintrc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", - "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", + "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -824,7 +824,6 @@ "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^27.5.1", "@types/node": "*", @@ -842,7 +841,6 @@ "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", "dev": true, - "peer": true, "dependencies": { "@jest/console": "^27.5.1", "@jest/reporters": "^27.5.1", @@ -890,7 +888,6 @@ "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", "dev": true, - "peer": true, "dependencies": { "@jest/fake-timers": "^27.5.1", "@jest/types": "^27.5.1", @@ -901,347 +898,11 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/@jest/expect": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.0.0.tgz", - "integrity": "sha512-usQreaafoLj25kgt8YpcWLZlveqdV5/Upa8ouFrtlbLa0jcxlfG9eXvJHfd061/kUinMUmg5umaribPlIZnO9A==", - "dev": true, - "dependencies": { - "expect": "^28.0.0", - "jest-snapshot": "^28.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.0.0.tgz", - "integrity": "sha512-C/lpxRTC60wl2TIwttFm/qoccZe56kpE8MVDZUJjtinxAOuPFAolGgcon3qs2ggOL2+9zsTSbt648rB4D8RGdQ==", - "dev": true, - "dependencies": { - "jest-get-type": "^28.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect-utils/node_modules/jest-get-type": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.0.tgz", - "integrity": "sha512-754LtawzW+Qk4o5rC+eDqfcQ9dV8z9uvbaVenmK8pju11PBGfuMDvQwRxoPews0LCaumNmYHjcAwmkYINTlhIA==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/@jest/transform": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.0.0.tgz", - "integrity": "sha512-Xrc02CJFju0TLb1QZmqHCvbVEvSvR0SlSawMFEiXu/vVthWKfZgsia2UumOEJFc7YFknufShHwf+0OWBpSxNXw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^28.0.0", - "@jridgewell/trace-mapping": "^0.3.7", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.0.0", - "jest-regex-util": "^28.0.0", - "jest-util": "^28.0.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/@jest/types": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.0.0.tgz", - "integrity": "sha512-4rxVTiBbSjsl8V9sXkspfxW+t2Tdcmmc3fX7AU49gVrRpjXMjEDurSx/iruXnOSor4PTL0fwO61/2+n1XQ/RgA==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@jest/expect/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/expect/node_modules/ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true - }, - "node_modules/@jest/expect/node_modules/diff-sequences": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.0.tgz", - "integrity": "sha512-GTIQPn2pPa1DMoEH70P9yQgYLcGW8bjPR5EOL2JO9/7DQHX+9tTFJee3UmlGWuyUvIqMgpXXssrckLubiEUZTg==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/expect": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.0.0.tgz", - "integrity": "sha512-06Ga42mfjx7tF1f2rn8DuKNARucmbluGtcDRwGlmUdakwHotIHi6h6yC0Gxp9+Q53jfOhr1lnfnETDaq6EjeDQ==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^28.0.0", - "jest-get-type": "^28.0.0", - "jest-matcher-utils": "^28.0.0", - "jest-message-util": "^28.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-diff": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.0.0.tgz", - "integrity": "sha512-LuxfL//yP8TFNECSL9ULr1lCKh4RTi4OZTNzzQYY99S0EfGW7B6ckkeXJ6QOpyj9wS4Jb1v51bOLUlJLlGf1Vg==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^28.0.0", - "jest-get-type": "^28.0.0", - "pretty-format": "^28.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-get-type": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.0.tgz", - "integrity": "sha512-754LtawzW+Qk4o5rC+eDqfcQ9dV8z9uvbaVenmK8pju11PBGfuMDvQwRxoPews0LCaumNmYHjcAwmkYINTlhIA==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-haste-map": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.0.0.tgz", - "integrity": "sha512-Wv/0P3Rc5V3Si5Rb4FpoaxrzHwDRH3mG40WOI0h4ya6cJRNbSpy/RcMMJeksJgt9hUE8KoFqHOnGAPxKC18VpQ==", - "dev": true, - "dependencies": { - "@jest/types": "^28.0.0", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^28.0.0", - "jest-util": "^28.0.0", - "jest-worker": "^28.0.0", - "micromatch": "^4.0.4", - "walker": "^1.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/@jest/expect/node_modules/jest-matcher-utils": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.0.0.tgz", - "integrity": "sha512-WI2jLjGQ2OTBIUVIJA+oiYkAEuG6U4URe6iCrqNQcN4KE3ZmLlcMlALsaYe/t/njS2El51ILtm6erpaCW+EK9A==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^28.0.0", - "jest-get-type": "^28.0.0", - "pretty-format": "^28.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-message-util": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.0.0.tgz", - "integrity": "sha512-dREPaseSGHG76kpUv+DbUoxZ8lRwSM7YwgrQNxPYuRR4rxSJJh23EKu6n6Nqv0yOer+FuVVu5RzEzdA+SbCtgQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-regex-util": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.0.tgz", - "integrity": "sha512-VqrjkteNiucN3ctI/AtBzO7iitfk5YGArPwU2cJ3WyT5Z6kGFHw/HQp0fSTkOUHdwVdJkFzbI5nh0yC82f9Kfg==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-snapshot": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.0.0.tgz", - "integrity": "sha512-JqMff/KN8EAfAxCV7o4lHhnbL1wvJz2R8pHKe6UiEJ7wBmWo/fck/AIYpmdbk8w62+6exy4BmIDmERo9k0cy6w==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.0.0", - "@jest/transform": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^28.0.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^28.0.0", - "jest-get-type": "^28.0.0", - "jest-haste-map": "^28.0.0", - "jest-matcher-utils": "^28.0.0", - "jest-message-util": "^28.0.0", - "jest-util": "^28.0.0", - "natural-compare": "^1.4.0", - "pretty-format": "^28.0.0", - "semver": "^7.3.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-util": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.0.0.tgz", - "integrity": "sha512-wSZjUR74ZR076RfyWdZ0tI3+U87QmK+RCB5igUKRUhinclf4O9om6UNBy0u9YfT6shKhno3l/eiQVmRp/AEfeA==", - "dev": true, - "dependencies": { - "@jest/types": "^28.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-worker": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.0.0.tgz", - "integrity": "sha512-ETSSJaDwDREF7LudjrfGpXs4jDAcKPvcrh2RgaRVXLBwp5e/5MtQQRk4zlaPjYpExhm7hyDJwIsIEq9sJMcHUg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/pretty-format": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.0.0.tgz", - "integrity": "sha512-CoBfnZavDij+aBzQCVWIIYaZEe1ifIGLI2lG+c3/spHWhpeSt4kpjGd5W50GqtdtbL/Ojx4ZonGIqZVdUNoBGQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.0", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/react-is": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.0.0.tgz", - "integrity": "sha512-yUcBYdBBbo3QiPsgYDcfQcIkGZHfxOaoE6HLSnr1sPzMhdyxusbfKOSUbSd/ocGi32dxcj366PsTj+5oggeKKw==", - "dev": true - }, - "node_modules/@jest/expect/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/@jest/expect/node_modules/write-file-atomic": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", - "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" - } - }, "node_modules/@jest/fake-timers": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^27.5.1", "@sinonjs/fake-timers": "^8.0.1", @@ -1259,7 +920,6 @@ "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", "dev": true, - "peer": true, "dependencies": { "@jest/environment": "^27.5.1", "@jest/types": "^27.5.1", @@ -1274,7 +934,6 @@ "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", "dev": true, - "peer": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^27.5.1", @@ -1314,24 +973,11 @@ } } }, - "node_modules/@jest/schemas": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.0.tgz", - "integrity": "sha512-Pap9Jvwr8KYFvDgkya/p0FCVya+jZkWt57lHpwBylfjgmwi/gtXfhyAO/Cw+jKuMafHcXY0beNf2XV2pkcu9vA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.23.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, "node_modules/@jest/source-map": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", "dev": true, - "peer": true, "dependencies": { "callsites": "^3.0.0", "graceful-fs": "^4.2.9", @@ -1346,7 +992,6 @@ "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", "dev": true, - "peer": true, "dependencies": { "@jest/console": "^27.5.1", "@jest/types": "^27.5.1", @@ -1362,7 +1007,6 @@ "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", "dev": true, - "peer": true, "dependencies": { "@jest/test-result": "^27.5.1", "graceful-fs": "^4.2.9", @@ -1378,7 +1022,6 @@ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", "dev": true, - "peer": true, "dependencies": { "@babel/core": "^7.1.0", "@jest/types": "^27.5.1", @@ -1432,9 +1075,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz", + "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -1578,9 +1221,9 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.0.tgz", - "integrity": "sha512-Ktvf2j+bAO+30awhbYoCaXpBcyPmJbaEUYClQns/+6SNCYFURbvBiNbWgHITEsIgDDWCDUclWRKEuf8cwZCFoQ==", + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.1.0.tgz", + "integrity": "sha512-6ZtHx3VHIp2ReNNDxHjuUml6ur+WcQ28N1yHgCQwsbNkQg2suhxGMDQGJOn/KuDxKtd1xuZP5xSTwBA4GQ8hbA==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1592,10 +1235,10 @@ "resolve": "^1.17.0" }, "engines": { - "node": ">= 12.0.0" + "node": ">= 8.0.0" }, "peerDependencies": { - "rollup": "^2.68.0" + "rollup": "^2.38.3" } }, "node_modules/@rollup/plugin-node-resolve": { @@ -1672,12 +1315,6 @@ "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", "dev": true }, - "node_modules/@sinclair/typebox": { - "version": "0.23.4", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.4.tgz", - "integrity": "sha512-0/WqSvpVbCBAV1yPeko7eAczKbs78dNVAaX14quVlwOb2wxfKuXCx91h4NrEfkYK9zEnyVSW4JVI/trP3iS+Qg==", - "dev": true - }, "node_modules/@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", @@ -1701,7 +1338,6 @@ "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", "dev": true, - "peer": true, "dependencies": { "@sinonjs/commons": "^1.7.0" } @@ -1878,14 +1514,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.21.0.tgz", - "integrity": "sha512-fTU85q8v5ZLpoZEyn/u1S2qrFOhi33Edo2CZ0+q1gDaWWm0JuPh3bgOyU8lM0edIEYgKLDkPFiZX2MOupgjlyg==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz", + "integrity": "sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.21.0", - "@typescript-eslint/type-utils": "5.21.0", - "@typescript-eslint/utils": "5.21.0", + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/type-utils": "5.20.0", + "@typescript-eslint/utils": "5.20.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1911,14 +1547,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.21.0.tgz", - "integrity": "sha512-8RUwTO77hstXUr3pZoWZbRQUxXcSXafZ8/5gpnQCfXvgmP9gpNlRGlWzvfbEQ14TLjmtU8eGnONkff8U2ui2Eg==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.20.0.tgz", + "integrity": "sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.21.0", - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/typescript-estree": "5.21.0", + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/typescript-estree": "5.20.0", "debug": "^4.3.2" }, "engines": { @@ -1938,13 +1574,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.21.0.tgz", - "integrity": "sha512-XTX0g0IhvzcH/e3393SvjRCfYQxgxtYzL3UREteUneo72EFlt7UNoiYnikUtmGVobTbhUDByhJ4xRBNe+34kOQ==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz", + "integrity": "sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/visitor-keys": "5.21.0" + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/visitor-keys": "5.20.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1955,12 +1591,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.21.0.tgz", - "integrity": "sha512-MxmLZj0tkGlkcZCSE17ORaHl8Th3JQwBzyXL/uvC6sNmu128LsgjTX0NIzy+wdH2J7Pd02GN8FaoudJntFvSOw==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz", + "integrity": "sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.21.0", + "@typescript-eslint/utils": "5.20.0", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -1981,9 +1617,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.21.0.tgz", - "integrity": "sha512-XnOOo5Wc2cBlq8Lh5WNvAgHzpjnEzxn4CJBwGkcau7b/tZ556qrWXQz4DJyChYg8JZAD06kczrdgFPpEQZfDsA==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz", + "integrity": "sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1994,13 +1630,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.21.0.tgz", - "integrity": "sha512-Y8Y2T2FNvm08qlcoSMoNchh9y2Uj3QmjtwNMdRQkcFG7Muz//wfJBGBxh8R7HAGQFpgYpdHqUpEoPQk+q9Kjfg==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz", + "integrity": "sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/visitor-keys": "5.21.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/visitor-keys": "5.20.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -2021,15 +1657,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.21.0.tgz", - "integrity": "sha512-q/emogbND9wry7zxy7VYri+7ydawo2HDZhRZ5k6yggIvXa7PvBbAAZ4PFH/oZLem72ezC4Pr63rJvDK/sTlL8Q==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.20.0.tgz", + "integrity": "sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.21.0", - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/typescript-estree": "5.21.0", + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/typescript-estree": "5.20.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -2045,12 +1681,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.21.0.tgz", - "integrity": "sha512-SX8jNN+iHqAF0riZQMkm7e8+POXa/fXw5cxL+gjpyP+FI+JVNhii53EmQgDAfDcBpFekYSlO0fGytMQwRiMQCA==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz", + "integrity": "sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/types": "5.20.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -2071,8 +1707,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", - "dev": true, - "peer": true + "dev": true }, "node_modules/abbrev": { "version": "1.1.1", @@ -2110,7 +1745,6 @@ "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", "dev": true, - "peer": true, "dependencies": { "acorn": "^7.1.1", "acorn-walk": "^7.1.1" @@ -2121,7 +1755,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true, - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2143,7 +1776,6 @@ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", "dev": true, - "peer": true, "engines": { "node": ">=0.4.0" } @@ -2340,15 +1972,13 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true, - "peer": true + "dev": true }, "node_modules/babel-jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==", "dev": true, - "peer": true, "dependencies": { "@jest/transform": "^27.5.1", "@jest/types": "^27.5.1", @@ -2387,7 +2017,6 @@ "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz", "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==", "dev": true, - "peer": true, "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", @@ -2426,7 +2055,6 @@ "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==", "dev": true, - "peer": true, "dependencies": { "babel-plugin-jest-hoist": "^27.5.1", "babel-preset-current-node-syntax": "^1.0.0" @@ -2491,8 +2119,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true, - "peer": true + "dev": true }, "node_modules/browserslist": { "version": "4.20.2", @@ -2870,7 +2497,6 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, - "peer": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -3035,15 +2661,13 @@ "version": "0.4.4", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/cssstyle": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", "dev": true, - "peer": true, "dependencies": { "cssom": "~0.3.6" }, @@ -3055,15 +2679,13 @@ "version": "0.3.8", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true, - "peer": true + "dev": true }, "node_modules/data-urls": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", "dev": true, - "peer": true, "dependencies": { "abab": "^2.0.3", "whatwg-mimetype": "^2.3.0", @@ -3094,8 +2716,7 @@ "version": "10.3.1", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/decompress-response": { "version": "3.3.0", @@ -3150,7 +2771,6 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true, - "peer": true, "engines": { "node": ">=0.4.0" } @@ -3217,7 +2837,6 @@ "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", "dev": true, - "peer": true, "dependencies": { "webidl-conversions": "^5.0.0" }, @@ -3230,7 +2849,6 @@ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -3264,7 +2882,6 @@ "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", "dev": true, - "peer": true, "engines": { "node": ">=10" }, @@ -3353,7 +2970,6 @@ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", "dev": true, - "peer": true, "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", @@ -3376,7 +2992,6 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "peer": true, "engines": { "node": ">=4.0" } @@ -3386,7 +3001,6 @@ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, - "peer": true, "dependencies": { "prelude-ls": "~1.1.2", "type-check": "~0.3.2" @@ -3400,7 +3014,6 @@ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, - "peer": true, "dependencies": { "deep-is": "~0.1.3", "fast-levenshtein": "~2.0.6", @@ -3418,7 +3031,6 @@ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true, - "peer": true, "engines": { "node": ">= 0.8.0" } @@ -3428,7 +3040,6 @@ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, - "peer": true, "dependencies": { "prelude-ls": "~1.1.2" }, @@ -3437,12 +3048,12 @@ } }, "node_modules/eslint": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", - "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.13.0.tgz", + "integrity": "sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.2.2", + "@eslint/eslintrc": "^1.2.1", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -3819,7 +3430,6 @@ "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^27.5.1", "jest-get-type": "^27.5.1", @@ -3978,7 +3588,6 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", "dev": true, - "peer": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -4314,7 +3923,6 @@ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", "dev": true, - "peer": true, "dependencies": { "whatwg-encoding": "^1.0.5" }, @@ -4686,8 +4294,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/is-reference": { "version": "1.2.1", @@ -4817,7 +4424,6 @@ "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==", "dev": true, - "peer": true, "dependencies": { "@jest/core": "^27.5.1", "import-local": "^3.0.2", @@ -4843,7 +4449,6 @@ "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz", "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^27.5.1", "execa": "^5.0.0", @@ -4858,7 +4463,6 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "peer": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -4873,7 +4477,6 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, - "peer": true, "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -4897,7 +4500,6 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "peer": true, "engines": { "node": ">=10" }, @@ -4910,7 +4512,6 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, - "peer": true, "engines": { "node": ">=8" }, @@ -4923,7 +4524,6 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "peer": true, "dependencies": { "path-key": "^3.0.0" }, @@ -4936,7 +4536,6 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -4946,7 +4545,6 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "peer": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -4959,7 +4557,6 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -4969,7 +4566,6 @@ "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz", "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==", "dev": true, - "peer": true, "dependencies": { "@jest/environment": "^27.5.1", "@jest/test-result": "^27.5.1", @@ -5000,7 +4596,6 @@ "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz", "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==", "dev": true, - "peer": true, "dependencies": { "@jest/core": "^27.5.1", "@jest/test-result": "^27.5.1", @@ -5035,7 +4630,6 @@ "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz", "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==", "dev": true, - "peer": true, "dependencies": { "@babel/core": "^7.8.0", "@jest/test-sequencer": "^27.5.1", @@ -5078,15 +4672,13 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/jest-config/node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "peer": true, "engines": { "node": ">=8" }, @@ -5114,7 +4706,6 @@ "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz", "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==", "dev": true, - "peer": true, "dependencies": { "detect-newline": "^3.0.0" }, @@ -5127,7 +4718,6 @@ "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz", "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^27.5.1", "chalk": "^4.0.0", @@ -5144,7 +4734,6 @@ "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz", "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==", "dev": true, - "peer": true, "dependencies": { "@jest/environment": "^27.5.1", "@jest/fake-timers": "^27.5.1", @@ -5163,7 +4752,6 @@ "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", "dev": true, - "peer": true, "dependencies": { "@jest/environment": "^27.5.1", "@jest/fake-timers": "^27.5.1", @@ -5190,7 +4778,6 @@ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^27.5.1", "@types/graceful-fs": "^4.1.2", @@ -5217,7 +4804,6 @@ "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz", "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==", "dev": true, - "peer": true, "dependencies": { "@jest/environment": "^27.5.1", "@jest/source-map": "^27.5.1", @@ -5246,7 +4832,6 @@ "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz", "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==", "dev": true, - "peer": true, "dependencies": { "jest-get-type": "^27.5.1", "pretty-format": "^27.5.1" @@ -5275,7 +4860,6 @@ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", "dev": true, - "peer": true, "dependencies": { "@babel/code-frame": "^7.12.13", "@jest/types": "^27.5.1", @@ -5296,7 +4880,6 @@ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^27.5.1", "@types/node": "*" @@ -5327,7 +4910,6 @@ "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", "dev": true, - "peer": true, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } @@ -5337,7 +4919,6 @@ "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^27.5.1", "chalk": "^4.0.0", @@ -5359,7 +4940,6 @@ "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz", "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^27.5.1", "jest-regex-util": "^27.5.1", @@ -5374,7 +4954,6 @@ "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz", "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==", "dev": true, - "peer": true, "dependencies": { "@jest/console": "^27.5.1", "@jest/environment": "^27.5.1", @@ -5407,7 +4986,6 @@ "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz", "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==", "dev": true, - "peer": true, "dependencies": { "@jest/environment": "^27.5.1", "@jest/fake-timers": "^27.5.1", @@ -5441,7 +5019,6 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "peer": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -5456,7 +5033,6 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, - "peer": true, "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -5480,7 +5056,6 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "peer": true, "engines": { "node": ">=10" }, @@ -5493,7 +5068,6 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, - "peer": true, "engines": { "node": ">=8" }, @@ -5506,7 +5080,6 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "peer": true, "dependencies": { "path-key": "^3.0.0" }, @@ -5519,7 +5092,6 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -5529,7 +5101,6 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "peer": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -5542,7 +5113,6 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -5552,7 +5122,6 @@ "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", "dev": true, - "peer": true, "dependencies": { "@types/node": "*", "graceful-fs": "^4.2.9" @@ -5566,7 +5135,6 @@ "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz", "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==", "dev": true, - "peer": true, "dependencies": { "@babel/core": "^7.7.2", "@babel/generator": "^7.7.2", @@ -5623,7 +5191,6 @@ "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", "dev": true, - "peer": true, "dependencies": { "@jest/types": "^27.5.1", "camelcase": "^6.2.0", @@ -5641,7 +5208,6 @@ "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz", "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==", "dev": true, - "peer": true, "dependencies": { "@jest/test-result": "^27.5.1", "@jest/types": "^27.5.1", @@ -5660,7 +5226,6 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "dev": true, - "peer": true, "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -5675,7 +5240,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -5715,7 +5279,6 @@ "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", "dev": true, - "peer": true, "dependencies": { "abab": "^2.0.5", "acorn": "^8.2.4", @@ -5762,7 +5325,6 @@ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true, - "peer": true, "engines": { "node": ">= 6" } @@ -5772,7 +5334,6 @@ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, - "peer": true, "dependencies": { "@tootallnate/once": "1", "agent-base": "6", @@ -6621,8 +6182,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/on-headers": { "version": "1.0.2", @@ -6875,8 +6435,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/path-exists": { "version": "4.0.0", @@ -7148,8 +6707,7 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/pump": { "version": "3.0.0", @@ -7536,7 +7094,6 @@ "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", "dev": true, - "peer": true, "dependencies": { "xmlchars": "^2.2.0" }, @@ -8083,8 +7640,7 @@ "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/tar": { "version": "6.1.11", @@ -8241,7 +7797,6 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", "dev": true, - "peer": true, "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -8256,7 +7811,6 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, - "peer": true, "engines": { "node": ">=6" } @@ -8266,7 +7820,6 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", "dev": true, - "peer": true, "dependencies": { "punycode": "^2.1.1" }, @@ -8279,7 +7832,6 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, - "peer": true, "engines": { "node": ">=6" } @@ -8467,7 +8019,6 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, - "peer": true, "engines": { "node": ">= 4.0.0" } @@ -8557,7 +8108,6 @@ "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", "dev": true, - "peer": true, "dependencies": { "@types/istanbul-lib-coverage": "^2.0.1", "convert-source-map": "^1.6.0", @@ -8572,7 +8122,6 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", "dev": true, - "peer": true, "engines": { "node": ">= 8" } @@ -8622,7 +8171,6 @@ "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", "dev": true, - "peer": true, "dependencies": { "browser-process-hrtime": "^1.0.0" } @@ -8632,7 +8180,6 @@ "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", "dev": true, - "peer": true, "dependencies": { "xml-name-validator": "^3.0.0" }, @@ -8654,7 +8201,6 @@ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", "dev": true, - "peer": true, "engines": { "node": ">=10.4" } @@ -8664,7 +8210,6 @@ "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", "dev": true, - "peer": true, "dependencies": { "iconv-lite": "0.4.24" } @@ -8674,7 +8219,6 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, - "peer": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -8686,15 +8230,13 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true, - "peer": true + "dev": true }, "node_modules/whatwg-url": { "version": "8.7.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", "dev": true, - "peer": true, "dependencies": { "lodash": "^4.7.0", "tr46": "^2.1.0", @@ -8789,7 +8331,6 @@ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", "dev": true, - "peer": true, "engines": { "node": ">=8.3.0" }, @@ -8819,15 +8360,13 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/y18n": { "version": "5.0.8", @@ -8858,7 +8397,6 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, - "peer": true, "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -8904,9 +8442,9 @@ "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.21.0", - "@typescript-eslint/parser": "^5.21.0", - "eslint": "^8.14.0", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", + "eslint": "^8.13.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", @@ -8925,3326 +8463,1102 @@ "fflate": "^0.7.3" }, "devDependencies": { - "@rollup/plugin-commonjs": "^22.0.0", + "@rollup/plugin-commonjs": "^21.1.0", "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.21.0", - "@typescript-eslint/parser": "5.21.0", - "eslint": "8.14.0", + "@typescript-eslint/eslint-plugin": "5.20.0", + "@typescript-eslint/parser": "5.20.0", + "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", - "jest": "^28.0.0", + "jest": "^27.5.1", "prettier": "^2.6.2", "rollup": "^2.70.2", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^27.1.4", "typescript": "^4.6.3" } - }, - "packages/sdk/node_modules/@jest/console": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.0.0.tgz", - "integrity": "sha512-LXXHbaVzluR26JGHz1iBYt32KM4+795/BFzDDoNuVDNFTcUANofye+zNl5Uzs/MfY2oFB7Zw+nJHpXEb1OGwpQ==", + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", + "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", "dev": true, - "dependencies": { - "@jest/types": "^28.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^28.0.0", - "jest-util": "^28.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@jridgewell/trace-mapping": "^0.3.0" } }, - "packages/sdk/node_modules/@jest/core": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.0.0.tgz", - "integrity": "sha512-ttGwIMsxHCS7/O9M19etIDnnJS9hGR6TtzfqRtiomAMtKX6VXi5vxJuV7z0C6TudesNU7h3DDSRptmg0HQ4c5A==", + "@babel/code-frame": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "dev": true, - "dependencies": { - "@jest/console": "^28.0.0", - "@jest/reporters": "^28.0.0", - "@jest/test-result": "^28.0.0", - "@jest/transform": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^28.0.0", - "jest-config": "^28.0.0", - "jest-haste-map": "^28.0.0", - "jest-message-util": "^28.0.0", - "jest-regex-util": "^28.0.0", - "jest-resolve": "^28.0.0", - "jest-resolve-dependencies": "^28.0.0", - "jest-runner": "^28.0.0", - "jest-runtime": "^28.0.0", - "jest-snapshot": "^28.0.0", - "jest-util": "^28.0.0", - "jest-validate": "^28.0.0", - "jest-watcher": "^28.0.0", - "micromatch": "^4.0.4", - "pretty-format": "^28.0.0", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "requires": { + "@babel/highlight": "^7.16.7" } }, - "packages/sdk/node_modules/@jest/environment": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.0.0.tgz", - "integrity": "sha512-4JW8g0UokMK8fHCxtg5N1xowzQPQknHYrcQhh/xtC2FuRN5nC1P1Utxt7FERxT94gxTbAkE9PGILVgFXQxEU2g==", - "dev": true, - "dependencies": { - "@jest/fake-timers": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/node": "*", - "jest-mock": "^28.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } + "@babel/compat-data": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", + "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", + "dev": true }, - "packages/sdk/node_modules/@jest/fake-timers": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.0.0.tgz", - "integrity": "sha512-ph5LQOCueZ5d19fwENuI4+Sdl0VBfVBBL+8aCO6XBRvYQ9tQ5lEiaqOe4OorctRv9xwy6XXsYpV/cdK/4nkMRQ==", + "@babel/core": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", + "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", "dev": true, - "dependencies": { - "@jest/types": "^28.0.0", - "@sinonjs/fake-timers": "^9.1.1", - "@types/node": "*", - "jest-message-util": "^28.0.0", - "jest-mock": "^28.0.0", - "jest-util": "^28.0.0" + "requires": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.7", + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-module-transforms": "^7.17.7", + "@babel/helpers": "^7.17.8", + "@babel/parser": "^7.17.8", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "packages/sdk/node_modules/@jest/globals": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.0.0.tgz", - "integrity": "sha512-WnvQWgHWa6rdn3NIADBpaQDirVuynriOe9b/55dbw+5UH5FqWU8wedclfYTS+yh3Z9FHWpAIxoE38TmVabqyRw==", - "dev": true, "dependencies": { - "@jest/environment": "^28.0.0", - "@jest/expect": "^28.0.0", - "@jest/types": "^28.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, - "packages/sdk/node_modules/@jest/reporters": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.0.0.tgz", - "integrity": "sha512-Pvm5nR9YeVZYig+rWKVvbe8tWymEcRKn2VEvNMZlKiSICfQzRcUAVPdA7OAT1zBYkJPiK8lS52MdOE61JejCzg==", + "@babel/generator": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", "dev": true, - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^28.0.0", - "@jest/test-result": "^28.0.0", - "@jest/transform": "^28.0.0", - "@jest/types": "^28.0.0", - "@jridgewell/trace-mapping": "^0.3.7", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-util": "^28.0.0", - "jest-worker": "^28.0.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^9.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + "requires": { + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true } } }, - "packages/sdk/node_modules/@jest/source-map": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.0.0.tgz", - "integrity": "sha512-yeD/Y94j6UJPiaZTG5Sdww7pbHvEc7RlTucoVAdXaBaSuNcyrAkLlJonAb/xX/efCugDOEbFJdATsSnDEh45Nw==", + "@babel/helper-compilation-targets": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", + "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.7", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" + "requires": { + "@babel/compat-data": "^7.17.7", + "@babel/helper-validator-option": "^7.16.7", + "browserslist": "^4.17.5", + "semver": "^6.3.0" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, - "packages/sdk/node_modules/@jest/test-result": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.0.0.tgz", - "integrity": "sha512-hd6eS08F9gEAY5kt7Pw7zaIzj31ElKRVHml6pyz+i5s0EzHd0LjnaDwaAqBbbFxrD13HoQOJh8Lel6kvgAT3Yg==", + "@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", "dev": true, - "dependencies": { - "@jest/console": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@babel/types": "^7.16.7" } }, - "packages/sdk/node_modules/@jest/test-sequencer": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.0.0.tgz", - "integrity": "sha512-tRgs5JRVxodtDVddITgH0BRFwBAjbdWnnobuYWHgeYEM4sZVAsNZmF0oeZIaE9vK72xgdnjIoRg1+kppMorFCQ==", + "@babel/helper-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", "dev": true, - "dependencies": { - "@jest/test-result": "^28.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" } }, - "packages/sdk/node_modules/@jest/transform": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.0.0.tgz", - "integrity": "sha512-Xrc02CJFju0TLb1QZmqHCvbVEvSvR0SlSawMFEiXu/vVthWKfZgsia2UumOEJFc7YFknufShHwf+0OWBpSxNXw==", + "@babel/helper-get-function-arity": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^28.0.0", - "@jridgewell/trace-mapping": "^0.3.7", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.0.0", - "jest-regex-util": "^28.0.0", - "jest-util": "^28.0.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@babel/types": "^7.16.7" } }, - "packages/sdk/node_modules/@jest/types": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.0.0.tgz", - "integrity": "sha512-4rxVTiBbSjsl8V9sXkspfxW+t2Tdcmmc3fX7AU49gVrRpjXMjEDurSx/iruXnOSor4PTL0fwO61/2+n1XQ/RgA==", + "@babel/helper-hoist-variables": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@babel/types": "^7.16.7" } }, - "packages/sdk/node_modules/@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "@babel/helper-module-imports": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0" + "requires": { + "@babel/types": "^7.16.7" } }, - "packages/sdk/node_modules/@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "@babel/helper-module-transforms": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz", + "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==", "dev": true, - "dependencies": { - "@types/yargs-parser": "*" + "requires": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.17.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0" } }, - "packages/sdk/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "@babel/helper-plugin-utils": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", + "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", + "dev": true + }, + "@babel/helper-simple-access": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", + "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "requires": { + "@babel/types": "^7.17.0" } }, - "packages/sdk/node_modules/babel-jest": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.0.0.tgz", - "integrity": "sha512-UBCCUmm8YnHyaBCF68rIknYvL1TjS4RKasviDG+j8lMHHxrV9aNdWVi4bIggb1rPEm5f/Z2Y44ByyvaHZprvAg==", + "@babel/helper-split-export-declaration": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dev": true, - "dependencies": { - "@jest/transform": "^28.0.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^28.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" + "requires": { + "@babel/types": "^7.16.7" } }, - "packages/sdk/node_modules/babel-plugin-jest-hoist": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.0.0.tgz", - "integrity": "sha512-Eu+TDlmKd2SsnvmlooVeHFryVHHom6ffCLSZuqrN8WpIHE0H6qiIPW5h5rFlzIZQmVqnZR2qHnbm2eQWIP7hZg==", - "dev": true, - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", + "dev": true + }, + "@babel/helpers": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", + "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", + "dev": true, + "requires": { + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0" } }, - "packages/sdk/node_modules/babel-preset-jest": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.0.0.tgz", - "integrity": "sha512-JLyjfCmqCWS3tXUw86ei5fQwuwn34slNBPTluNbhoqHVI1Cbw6MsmvgEl54jPjbyzkmA6XAHJTg3EGNY7rnr4A==", + "@babel/highlight": { + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", "dev": true, - "dependencies": { - "babel-plugin-jest-hoist": "^28.0.0", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, - "packages/sdk/node_modules/ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "@babel/parser": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", + "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", "dev": true }, - "packages/sdk/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" } }, - "packages/sdk/node_modules/diff-sequences": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.0.tgz", - "integrity": "sha512-GTIQPn2pPa1DMoEH70P9yQgYLcGW8bjPR5EOL2JO9/7DQHX+9tTFJee3UmlGWuyUvIqMgpXXssrckLubiEUZTg==", + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" } }, - "packages/sdk/node_modules/emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" } }, - "packages/sdk/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" } }, - "packages/sdk/node_modules/expect": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.0.0.tgz", - "integrity": "sha512-06Ga42mfjx7tF1f2rn8DuKNARucmbluGtcDRwGlmUdakwHotIHi6h6yC0Gxp9+Q53jfOhr1lnfnETDaq6EjeDQ==", + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, - "dependencies": { - "@jest/expect-utils": "^28.0.0", - "jest-get-type": "^28.0.0", - "jest-matcher-utils": "^28.0.0", - "jest-message-util": "^28.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" } }, - "packages/sdk/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" } }, - "packages/sdk/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" } }, - "packages/sdk/node_modules/jest": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-28.0.0.tgz", - "integrity": "sha512-Zl07FoxrV6em3/sBqSRepHWBtcqJ3BKbwmZ1CyeuHPKkSjhOqUEG/OcuJd/5pKP3wqRovoF6aHR1ID+2Qz/ufQ==", + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, - "dependencies": { - "@jest/core": "^28.0.0", - "import-local": "^3.0.2", - "jest-cli": "^28.0.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" } }, - "packages/sdk/node_modules/jest-changed-files": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.0.tgz", - "integrity": "sha512-9hFz/LuADUTv7zN+t0Ig+J/as2mtILTmgoT2XQdG/ezGbA1tfqoSwEKCXFcDaldzkskZddbh+QI2sACQGaxg6Q==", + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, - "dependencies": { - "execa": "^5.0.0", - "throat": "^6.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" } }, - "packages/sdk/node_modules/jest-circus": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.0.0.tgz", - "integrity": "sha512-GLmtj2SXMPMinU46Bgo/bD2JkYbssf/8CSKz5k7w4RY8VVRhODd+GMMzts822RHswMm35ACUU8dV1fYRutCwqQ==", + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, - "dependencies": { - "@jest/environment": "^28.0.0", - "@jest/expect": "^28.0.0", - "@jest/test-result": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^28.0.0", - "jest-matcher-utils": "^28.0.0", - "jest-message-util": "^28.0.0", - "jest-runtime": "^28.0.0", - "jest-snapshot": "^28.0.0", - "jest-util": "^28.0.0", - "pretty-format": "^28.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" } }, - "packages/sdk/node_modules/jest-cli": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.0.0.tgz", - "integrity": "sha512-LrK46qmPoi+rVMOQt6e8OMMyfMk0+mgdTFnhOFi011p+qoKefW/5obGdS9rWZHcoTPg+lZ9iV4JBI4NJhie2hw==", + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, - "dependencies": { - "@jest/core": "^28.0.0", - "@jest/test-result": "^28.0.0", - "@jest/types": "^28.0.0", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^28.0.0", - "jest-util": "^28.0.0", - "jest-validate": "^28.0.0", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" } }, - "packages/sdk/node_modules/jest-config": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.0.0.tgz", - "integrity": "sha512-6dP4hkHLlMllh5iK/2n8jLlrrJvDnXQyY4MKFnXyPiUYdXu59yg4paYYEKW0JNbgco//d07AiUvL1t+gkjPfFg==", + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^28.0.0", - "@jest/types": "^28.0.0", - "babel-jest": "^28.0.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^28.0.0", - "jest-environment-node": "^28.0.0", - "jest-get-type": "^28.0.0", - "jest-regex-util": "^28.0.0", - "jest-resolve": "^28.0.0", - "jest-runner": "^28.0.0", - "jest-util": "^28.0.0", - "jest-validate": "^28.0.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^28.0.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" } }, - "packages/sdk/node_modules/jest-diff": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.0.0.tgz", - "integrity": "sha512-LuxfL//yP8TFNECSL9ULr1lCKh4RTi4OZTNzzQYY99S0EfGW7B6ckkeXJ6QOpyj9wS4Jb1v51bOLUlJLlGf1Vg==", + "@babel/plugin-syntax-typescript": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz", + "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==", "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^28.0.0", - "jest-get-type": "^28.0.0", - "pretty-format": "^28.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" } }, - "packages/sdk/node_modules/jest-docblock": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.0.0.tgz", - "integrity": "sha512-88od+z1QkHyvtpj1gRA6QGysopOzImocHNNlvvM7OydDe9ER6z1siLtHJXbKEfi5FoxMpYqDtszYIS50JVs0WA==", + "@babel/template": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" } }, - "packages/sdk/node_modules/jest-each": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.0.0.tgz", - "integrity": "sha512-nnGven0xJDHPrb5RKskWG/MvHvkfDPoOG9dyduV7sfl2WkMBe1X1l68Xdjv+eTdUV966/mPMZEuHWLh0HRKifw==", + "@babel/traverse": { + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", + "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", "dev": true, - "dependencies": { - "@jest/types": "^28.0.0", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.0", - "jest-util": "^28.0.0", - "pretty-format": "^28.0.0" + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", + "debug": "^4.1.0", + "globals": "^11.1.0" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "packages/sdk/node_modules/jest-environment-node": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.0.0.tgz", - "integrity": "sha512-kWzs9d2Yom5BtIjKu83I/CsWHpKbegTnMlLZicRK9OZlk9GCdnP2mrQo9YqkUyGTYKZGXOSYnGJLJVBaR+NZGA==", - "dev": true, "dependencies": { - "@jest/environment": "^28.0.0", - "@jest/fake-timers": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/node": "*", - "jest-mock": "^28.0.0", - "jest-util": "^28.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + } } }, - "packages/sdk/node_modules/jest-get-type": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.0.tgz", - "integrity": "sha512-754LtawzW+Qk4o5rC+eDqfcQ9dV8z9uvbaVenmK8pju11PBGfuMDvQwRxoPews0LCaumNmYHjcAwmkYINTlhIA==", + "@babel/types": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" } }, - "packages/sdk/node_modules/jest-haste-map": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.0.0.tgz", - "integrity": "sha512-Wv/0P3Rc5V3Si5Rb4FpoaxrzHwDRH3mG40WOI0h4ya6cJRNbSpy/RcMMJeksJgt9hUE8KoFqHOnGAPxKC18VpQ==", - "dev": true, - "dependencies": { - "@jest/types": "^28.0.0", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^28.0.0", - "jest-util": "^28.0.0", - "jest-worker": "^28.0.0", - "micromatch": "^4.0.4", - "walker": "^1.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true }, - "packages/sdk/node_modules/jest-leak-detector": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.0.0.tgz", - "integrity": "sha512-P4KWylb4x6Q/jctJtGKJSD3PkUjgSIu/JOpstWwgYFvGfNKtAGXEfIY6nlGSBTCajSuPs7WXUNMQXiYqKwivgg==", + "@eslint/eslintrc": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", + "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", "dev": true, - "dependencies": { - "jest-get-type": "^28.0.0", - "pretty-format": "^28.0.0" + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.3.1", + "globals": "^13.9.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "packages/sdk/node_modules/jest-matcher-utils": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.0.0.tgz", - "integrity": "sha512-WI2jLjGQ2OTBIUVIJA+oiYkAEuG6U4URe6iCrqNQcN4KE3ZmLlcMlALsaYe/t/njS2El51ILtm6erpaCW+EK9A==", - "dev": true, "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^28.0.0", - "jest-get-type": "^28.0.0", - "pretty-format": "^28.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + } } }, - "packages/sdk/node_modules/jest-message-util": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.0.0.tgz", - "integrity": "sha512-dREPaseSGHG76kpUv+DbUoxZ8lRwSM7YwgrQNxPYuRR4rxSJJh23EKu6n6Nqv0yOer+FuVVu5RzEzdA+SbCtgQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } + "@gar/promisify": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", + "dev": true }, - "packages/sdk/node_modules/jest-mock": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.0.0.tgz", - "integrity": "sha512-C8xBtHuokPvmyX4ajh/TaenKGSbcu4pcIwjucD6ZZ7WznfSnMkLI/gzOh/YhUNr60tvBnxNsN+A0ECLG8pprTg==", + "@humanwhocodes/config-array": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", "dev": true, - "dependencies": { - "@jest/types": "^28.0.0", - "@types/node": "*" + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "packages/sdk/node_modules/jest-regex-util": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.0.tgz", - "integrity": "sha512-VqrjkteNiucN3ctI/AtBzO7iitfk5YGArPwU2cJ3WyT5Z6kGFHw/HQp0fSTkOUHdwVdJkFzbI5nh0yC82f9Kfg==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "packages/sdk/node_modules/jest-resolve": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.0.0.tgz", - "integrity": "sha512-aKRsKCo3gjVL6lSSjoEucVrhrDP8NJmiIzBiw7hI4o6gYrXH4yNahF5m9Vl6Wl9Q3LNqMAQhPSxPxVnSh1k3YQ==", - "dev": true, "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.0.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^28.0.0", - "jest-validate": "^28.0.0", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, - "packages/sdk/node_modules/jest-resolve-dependencies": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.0.0.tgz", - "integrity": "sha512-SzS4mfZTznPKczh6KopL1ZMTGWzNNhGJ4vLvhYkXb1g1a8SgE+lIfZ0aI+Diu+DASw+QZwJrwiRTSvSGu4k6/g==", - "dev": true, - "dependencies": { - "jest-regex-util": "^28.0.0", - "jest-snapshot": "^28.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true }, - "packages/sdk/node_modules/jest-runner": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.0.0.tgz", - "integrity": "sha512-ygi+tgaeYaqfl72FA9HdD0B8c1q0RmhbHuBVvNhMwqqFs9OZpI0vN4ksRJCqmlRDgfK/1JGPElot0kTQ62++Rg==", + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, - "dependencies": { - "@jest/console": "^28.0.0", - "@jest/environment": "^28.0.0", - "@jest/test-result": "^28.0.0", - "@jest/transform": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "graceful-fs": "^4.2.9", - "jest-docblock": "^28.0.0", - "jest-environment-node": "^28.0.0", - "jest-haste-map": "^28.0.0", - "jest-leak-detector": "^28.0.0", - "jest-message-util": "^28.0.0", - "jest-resolve": "^28.0.0", - "jest-runtime": "^28.0.0", - "jest-util": "^28.0.0", - "jest-watcher": "^28.0.0", - "jest-worker": "^28.0.0", - "source-map-support": "0.5.13", - "throat": "^6.0.1" + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" - } - }, - "packages/sdk/node_modules/jest-runtime": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.0.0.tgz", - "integrity": "sha512-s7sw1I4J4lUos34kbFnptxVSLfXIwILSNAq5DAzgmRzP/jUCuRFPm4/aWD7PaobxpCFJiSUAGj+Vnl7qSYQ+Cw==", - "dev": true, "dependencies": { - "@jest/environment": "^28.0.0", - "@jest/fake-timers": "^28.0.0", - "@jest/globals": "^28.0.0", - "@jest/source-map": "^28.0.0", - "@jest/test-result": "^28.0.0", - "@jest/transform": "^28.0.0", - "@jest/types": "^28.0.0", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.0.0", - "jest-message-util": "^28.0.0", - "jest-mock": "^28.0.0", - "jest-regex-util": "^28.0.0", - "jest-resolve": "^28.0.0", - "jest-snapshot": "^28.0.0", - "jest-util": "^28.0.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } } }, - "packages/sdk/node_modules/jest-snapshot": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.0.0.tgz", - "integrity": "sha512-JqMff/KN8EAfAxCV7o4lHhnbL1wvJz2R8pHKe6UiEJ7wBmWo/fck/AIYpmdbk8w62+6exy4BmIDmERo9k0cy6w==", + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jest/console": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", + "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.0.0", - "@jest/transform": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", + "requires": { + "@jest/types": "^27.5.1", + "@types/node": "*", "chalk": "^4.0.0", - "expect": "^28.0.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^28.0.0", - "jest-get-type": "^28.0.0", - "jest-haste-map": "^28.0.0", - "jest-matcher-utils": "^28.0.0", - "jest-message-util": "^28.0.0", - "jest-util": "^28.0.0", - "natural-compare": "^1.4.0", - "pretty-format": "^28.0.0", - "semver": "^7.3.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", + "slash": "^3.0.0" } }, - "packages/sdk/node_modules/jest-util": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.0.0.tgz", - "integrity": "sha512-wSZjUR74ZR076RfyWdZ0tI3+U87QmK+RCB5igUKRUhinclf4O9om6UNBy0u9YfT6shKhno3l/eiQVmRp/AEfeA==", + "@jest/core": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", + "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", "dev": true, - "dependencies": { - "@jest/types": "^28.0.0", + "requires": { + "@jest/console": "^27.5.1", + "@jest/reporters": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", "@types/node": "*", + "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "ci-info": "^3.2.0", + "emittery": "^0.8.1", + "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "jest-changed-files": "^27.5.1", + "jest-config": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-resolve-dependencies": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "jest-watcher": "^27.5.1", + "micromatch": "^4.0.4", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" } }, - "packages/sdk/node_modules/jest-validate": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.0.0.tgz", - "integrity": "sha512-5Z0vTTIZRNYAKzemp/jvutWoMKYGHyr6TKc5kl4+KtAxrbX7n7cGv00AxEavBKtrb7EMAZ2zhbhu2nKaEEUwKw==", + "@jest/environment": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", + "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", "dev": true, - "dependencies": { - "@jest/types": "^28.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.0", - "leven": "^3.1.0", - "pretty-format": "^28.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@jest/fake-timers": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "jest-mock": "^27.5.1" } }, - "packages/sdk/node_modules/jest-watcher": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.0.0.tgz", - "integrity": "sha512-SOeze65Bvb6biK+gXqb2fa1T3F626AuM/z3fvISF7wPgKkCzqxPG6obkNJIzcISpWfSP4G+Pf5eNVScj1KNsYQ==", + "@jest/fake-timers": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", + "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", "dev": true, - "dependencies": { - "@jest/test-result": "^28.0.0", - "@jest/types": "^28.0.0", + "requires": { + "@jest/types": "^27.5.1", + "@sinonjs/fake-timers": "^8.0.1", "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^28.0.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "jest-message-util": "^27.5.1", + "jest-mock": "^27.5.1", + "jest-util": "^27.5.1" } }, - "packages/sdk/node_modules/jest-worker": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.0.0.tgz", - "integrity": "sha512-ETSSJaDwDREF7LudjrfGpXs4jDAcKPvcrh2RgaRVXLBwp5e/5MtQQRk4zlaPjYpExhm7hyDJwIsIEq9sJMcHUg==", + "@jest/globals": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", + "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@jest/environment": "^27.5.1", + "@jest/types": "^27.5.1", + "expect": "^27.5.1" } }, - "packages/sdk/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "@jest/reporters": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", + "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-haste-map": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "slash": "^3.0.0", + "source-map": "^0.6.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^8.1.0" } }, - "packages/sdk/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "@jest/source-map": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", + "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", "dev": true, - "engines": { - "node": ">=8" + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9", + "source-map": "^0.6.0" } }, - "packages/sdk/node_modules/pretty-format": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.0.0.tgz", - "integrity": "sha512-CoBfnZavDij+aBzQCVWIIYaZEe1ifIGLI2lG+c3/spHWhpeSt4kpjGd5W50GqtdtbL/Ojx4ZonGIqZVdUNoBGQ==", + "@jest/test-result": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", + "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.0", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" + "requires": { + "@jest/console": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" } }, - "packages/sdk/node_modules/react-is": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.0.0.tgz", - "integrity": "sha512-yUcBYdBBbo3QiPsgYDcfQcIkGZHfxOaoE6HLSnr1sPzMhdyxusbfKOSUbSd/ocGi32dxcj366PsTj+5oggeKKw==", - "dev": true - }, - "packages/sdk/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "packages/sdk/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "packages/sdk/node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "packages/sdk/node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "@jest/test-sequencer": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", + "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "requires": { + "@jest/test-result": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-runtime": "^27.5.1" } }, - "packages/sdk/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==", + "@jest/transform": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", + "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "requires": { + "@babel/core": "^7.1.0", + "@jest/types": "^27.5.1", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-util": "^27.5.1", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" } }, - "packages/sdk/node_modules/v8-to-istanbul": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", - "integrity": "sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==", + "@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.7", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - }, - "engines": { - "node": ">=10.12.0" + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" } }, - "packages/sdk/node_modules/write-file-atomic": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", - "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" - } + "@jridgewell/resolve-uri": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", + "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "dev": true }, - "packages/sdk/node_modules/yargs": { - "version": "17.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz", - "integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "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.0.0" - }, - "engines": { - "node": ">=12" - } + "@jridgewell/sourcemap-codec": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", + "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "dev": true }, - "packages/sdk/node_modules/yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", - "dev": true, - "engines": { - "node": ">=12" - } - } - }, - "dependencies": { - "@ampproject/remapping": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", - "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", + "@jridgewell/trace-mapping": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz", + "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.0" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "requires": { - "@babel/highlight": "^7.16.7" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" } }, - "@babel/compat-data": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", - "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true }, - "@babel/core": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", - "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "requires": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.7", - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.8", - "@babel/parser": "^7.17.8", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" } }, - "@babel/generator": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", - "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "@npmcli/fs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.0.tgz", + "integrity": "sha512-DmfBvNXGaetMxj9LTp8NAN9vEidXURrf5ZTslQzEAi/6GbW+4yjaLFQc6Tue5cpZ9Frlk4OBo/Snf1Bh/S7qTQ==", "dev": true, "requires": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" } }, - "@babel/helper-compilation-targets": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", - "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", + "@npmcli/git": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.0.tgz", + "integrity": "sha512-xfSBJ+KBMZWWqRHFbEgIaXG/LtELHrQZMJ72Gkb3yWdHysu/7+VGOs8ME0c3td7QNQX57Ggo3kYL6ylcd70/kA==", "dev": true, "requires": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-validator-option": "^7.16.7", - "browserslist": "^4.17.5", - "semver": "^6.3.0" + "@npmcli/promise-spawn": "^1.3.2", + "lru-cache": "^7.3.1", + "mkdirp": "^1.0.4", + "npm-pick-manifest": "^7.0.0", + "proc-log": "^2.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^2.0.2" }, "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "lru-cache": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", "dev": true } } }, - "@babel/helper-environment-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", - "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", - "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", + "@npmcli/installed-package-contents": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", + "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", - "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-module-imports": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", - "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-module-transforms": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz", - "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.17.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", - "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", - "dev": true - }, - "@babel/helper-simple-access": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", - "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", - "dev": true, - "requires": { - "@babel/types": "^7.17.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", - "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", - "dev": true - }, - "@babel/helpers": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", - "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", - "dev": true, - "requires": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0" - } - }, - "@babel/highlight": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", - "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/parser": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", - "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", - "dev": true - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-syntax-typescript": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz", - "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.16.7" - } - }, - "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" - } - }, - "@babel/traverse": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", - "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "dependencies": { - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - } - }, - "@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "@eslint/eslintrc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", - "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.3.1", - "globals": "^13.9.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - } - } - }, - "@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", - "dev": true - }, - "@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } - }, - "@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true - }, - "@jest/console": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", - "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", - "dev": true, - "peer": true, - "requires": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", - "slash": "^3.0.0" - } - }, - "@jest/core": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", - "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", - "dev": true, - "peer": true, - "requires": { - "@jest/console": "^27.5.1", - "@jest/reporters": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^27.5.1", - "jest-config": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-resolve-dependencies": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "jest-watcher": "^27.5.1", - "micromatch": "^4.0.4", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "@jest/environment": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", - "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", - "dev": true, - "peer": true, - "requires": { - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1" - } - }, - "@jest/expect": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.0.0.tgz", - "integrity": "sha512-usQreaafoLj25kgt8YpcWLZlveqdV5/Upa8ouFrtlbLa0jcxlfG9eXvJHfd061/kUinMUmg5umaribPlIZnO9A==", - "dev": true, - "requires": { - "expect": "^28.0.0", - "jest-snapshot": "^28.0.0" - }, - "dependencies": { - "@jest/transform": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.0.0.tgz", - "integrity": "sha512-Xrc02CJFju0TLb1QZmqHCvbVEvSvR0SlSawMFEiXu/vVthWKfZgsia2UumOEJFc7YFknufShHwf+0OWBpSxNXw==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/types": "^28.0.0", - "@jridgewell/trace-mapping": "^0.3.7", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.0.0", - "jest-regex-util": "^28.0.0", - "jest-util": "^28.0.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - } - }, - "@jest/types": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.0.0.tgz", - "integrity": "sha512-4rxVTiBbSjsl8V9sXkspfxW+t2Tdcmmc3fX7AU49gVrRpjXMjEDurSx/iruXnOSor4PTL0fwO61/2+n1XQ/RgA==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, - "ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true - }, - "diff-sequences": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.0.tgz", - "integrity": "sha512-GTIQPn2pPa1DMoEH70P9yQgYLcGW8bjPR5EOL2JO9/7DQHX+9tTFJee3UmlGWuyUvIqMgpXXssrckLubiEUZTg==", - "dev": true - }, - "expect": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.0.0.tgz", - "integrity": "sha512-06Ga42mfjx7tF1f2rn8DuKNARucmbluGtcDRwGlmUdakwHotIHi6h6yC0Gxp9+Q53jfOhr1lnfnETDaq6EjeDQ==", - "dev": true, - "requires": { - "@jest/expect-utils": "^28.0.0", - "jest-get-type": "^28.0.0", - "jest-matcher-utils": "^28.0.0", - "jest-message-util": "^28.0.0" - } - }, - "jest-diff": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.0.0.tgz", - "integrity": "sha512-LuxfL//yP8TFNECSL9ULr1lCKh4RTi4OZTNzzQYY99S0EfGW7B6ckkeXJ6QOpyj9wS4Jb1v51bOLUlJLlGf1Vg==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^28.0.0", - "jest-get-type": "^28.0.0", - "pretty-format": "^28.0.0" - } - }, - "jest-get-type": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.0.tgz", - "integrity": "sha512-754LtawzW+Qk4o5rC+eDqfcQ9dV8z9uvbaVenmK8pju11PBGfuMDvQwRxoPews0LCaumNmYHjcAwmkYINTlhIA==", - "dev": true - }, - "jest-haste-map": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.0.0.tgz", - "integrity": "sha512-Wv/0P3Rc5V3Si5Rb4FpoaxrzHwDRH3mG40WOI0h4ya6cJRNbSpy/RcMMJeksJgt9hUE8KoFqHOnGAPxKC18VpQ==", - "dev": true, - "requires": { - "@jest/types": "^28.0.0", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "fsevents": "^2.3.2", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^28.0.0", - "jest-util": "^28.0.0", - "jest-worker": "^28.0.0", - "micromatch": "^4.0.4", - "walker": "^1.0.7" - } - }, - "jest-matcher-utils": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.0.0.tgz", - "integrity": "sha512-WI2jLjGQ2OTBIUVIJA+oiYkAEuG6U4URe6iCrqNQcN4KE3ZmLlcMlALsaYe/t/njS2El51ILtm6erpaCW+EK9A==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^28.0.0", - "jest-get-type": "^28.0.0", - "pretty-format": "^28.0.0" - } - }, - "jest-message-util": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.0.0.tgz", - "integrity": "sha512-dREPaseSGHG76kpUv+DbUoxZ8lRwSM7YwgrQNxPYuRR4rxSJJh23EKu6n6Nqv0yOer+FuVVu5RzEzdA+SbCtgQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-regex-util": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.0.tgz", - "integrity": "sha512-VqrjkteNiucN3ctI/AtBzO7iitfk5YGArPwU2cJ3WyT5Z6kGFHw/HQp0fSTkOUHdwVdJkFzbI5nh0yC82f9Kfg==", - "dev": true - }, - "jest-snapshot": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.0.0.tgz", - "integrity": "sha512-JqMff/KN8EAfAxCV7o4lHhnbL1wvJz2R8pHKe6UiEJ7wBmWo/fck/AIYpmdbk8w62+6exy4BmIDmERo9k0cy6w==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.0.0", - "@jest/transform": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^28.0.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^28.0.0", - "jest-get-type": "^28.0.0", - "jest-haste-map": "^28.0.0", - "jest-matcher-utils": "^28.0.0", - "jest-message-util": "^28.0.0", - "jest-util": "^28.0.0", - "natural-compare": "^1.4.0", - "pretty-format": "^28.0.0", - "semver": "^7.3.5" - } - }, - "jest-util": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.0.0.tgz", - "integrity": "sha512-wSZjUR74ZR076RfyWdZ0tI3+U87QmK+RCB5igUKRUhinclf4O9om6UNBy0u9YfT6shKhno3l/eiQVmRp/AEfeA==", - "dev": true, - "requires": { - "@jest/types": "^28.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "jest-worker": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.0.0.tgz", - "integrity": "sha512-ETSSJaDwDREF7LudjrfGpXs4jDAcKPvcrh2RgaRVXLBwp5e/5MtQQRk4zlaPjYpExhm7hyDJwIsIEq9sJMcHUg==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - } - }, - "pretty-format": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.0.0.tgz", - "integrity": "sha512-CoBfnZavDij+aBzQCVWIIYaZEe1ifIGLI2lG+c3/spHWhpeSt4kpjGd5W50GqtdtbL/Ojx4ZonGIqZVdUNoBGQ==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.0", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.0.0.tgz", - "integrity": "sha512-yUcBYdBBbo3QiPsgYDcfQcIkGZHfxOaoE6HLSnr1sPzMhdyxusbfKOSUbSd/ocGi32dxcj366PsTj+5oggeKKw==", - "dev": true - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "write-file-atomic": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", - "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - } - } - } - }, - "@jest/expect-utils": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.0.0.tgz", - "integrity": "sha512-C/lpxRTC60wl2TIwttFm/qoccZe56kpE8MVDZUJjtinxAOuPFAolGgcon3qs2ggOL2+9zsTSbt648rB4D8RGdQ==", - "dev": true, - "requires": { - "jest-get-type": "^28.0.0" - }, - "dependencies": { - "jest-get-type": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.0.tgz", - "integrity": "sha512-754LtawzW+Qk4o5rC+eDqfcQ9dV8z9uvbaVenmK8pju11PBGfuMDvQwRxoPews0LCaumNmYHjcAwmkYINTlhIA==", - "dev": true - } - } - }, - "@jest/fake-timers": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", - "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", - "dev": true, - "peer": true, - "requires": { - "@jest/types": "^27.5.1", - "@sinonjs/fake-timers": "^8.0.1", - "@types/node": "*", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" - } - }, - "@jest/globals": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", - "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", - "dev": true, - "peer": true, - "requires": { - "@jest/environment": "^27.5.1", - "@jest/types": "^27.5.1", - "expect": "^27.5.1" - } - }, - "@jest/reporters": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", - "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", - "dev": true, - "peer": true, - "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-haste-map": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "slash": "^3.0.0", - "source-map": "^0.6.0", - "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" - } - }, - "@jest/schemas": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.0.tgz", - "integrity": "sha512-Pap9Jvwr8KYFvDgkya/p0FCVya+jZkWt57lHpwBylfjgmwi/gtXfhyAO/Cw+jKuMafHcXY0beNf2XV2pkcu9vA==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.23.3" - } - }, - "@jest/source-map": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", - "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", - "dev": true, - "peer": true, - "requires": { - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9", - "source-map": "^0.6.0" - } - }, - "@jest/test-result": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", - "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", - "dev": true, - "peer": true, - "requires": { - "@jest/console": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - } - }, - "@jest/test-sequencer": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", - "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", - "dev": true, - "peer": true, - "requires": { - "@jest/test-result": "^27.5.1", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-runtime": "^27.5.1" - } - }, - "@jest/transform": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", - "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", - "dev": true, - "peer": true, - "requires": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.5.1", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-util": "^27.5.1", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" - } - }, - "@jest/types": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", - "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", - "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", - "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@npmcli/fs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.0.tgz", - "integrity": "sha512-DmfBvNXGaetMxj9LTp8NAN9vEidXURrf5ZTslQzEAi/6GbW+4yjaLFQc6Tue5cpZ9Frlk4OBo/Snf1Bh/S7qTQ==", - "dev": true, - "requires": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" - } - }, - "@npmcli/git": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.0.tgz", - "integrity": "sha512-xfSBJ+KBMZWWqRHFbEgIaXG/LtELHrQZMJ72Gkb3yWdHysu/7+VGOs8ME0c3td7QNQX57Ggo3kYL6ylcd70/kA==", - "dev": true, - "requires": { - "@npmcli/promise-spawn": "^1.3.2", - "lru-cache": "^7.3.1", - "mkdirp": "^1.0.4", - "npm-pick-manifest": "^7.0.0", - "proc-log": "^2.0.0", - "promise-inflight": "^1.0.1", - "promise-retry": "^2.0.1", - "semver": "^7.3.5", - "which": "^2.0.2" - }, - "dependencies": { - "lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", - "dev": true - } - } - }, - "@npmcli/installed-package-contents": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", - "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", - "dev": true, - "requires": { - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1" - } - }, - "@npmcli/move-file": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", - "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", - "dev": true, - "requires": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - } - }, - "@npmcli/node-gyp": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", - "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", - "dev": true - }, - "@npmcli/promise-spawn": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", - "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", - "dev": true, - "requires": { - "infer-owner": "^1.0.4" - } - }, - "@npmcli/run-script": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.1.tgz", - "integrity": "sha512-o2fkld5hYwu9sKYzoXTpqEocMnDLaigobaPzLaGB63k/ExmLBTaB+KpfKlpcIePPnuP8RFR+0GDI4KopJCM6Xg==", - "dev": true, - "requires": { - "@npmcli/node-gyp": "^1.0.3", - "@npmcli/promise-spawn": "^1.3.2", - "node-gyp": "^9.0.0", - "read-package-json-fast": "^2.0.3" - } - }, - "@rollup/plugin-commonjs": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.0.tgz", - "integrity": "sha512-Ktvf2j+bAO+30awhbYoCaXpBcyPmJbaEUYClQns/+6SNCYFURbvBiNbWgHITEsIgDDWCDUclWRKEuf8cwZCFoQ==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "commondir": "^1.0.1", - "estree-walker": "^2.0.1", - "glob": "^7.1.6", - "is-reference": "^1.2.1", - "magic-string": "^0.25.7", - "resolve": "^1.17.0" - } - }, - "@rollup/plugin-node-resolve": { - "version": "13.2.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.2.1.tgz", - "integrity": "sha512-btX7kzGvp1JwShQI9V6IM841YKNPYjKCvUbNrQ2EcVYbULtUd/GH6wZ/qdqH13j9pOHBER+EZXNN2L8RSJhVRA==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "@types/resolve": "1.17.1", - "builtin-modules": "^3.1.0", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.19.0" - } - }, - "@rollup/plugin-replace": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-4.0.0.tgz", - "integrity": "sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "magic-string": "^0.25.7" - } - }, - "@rollup/plugin-typescript": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.2.tgz", - "integrity": "sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "resolve": "^1.17.0" - } - }, - "@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "requires": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - }, - "dependencies": { - "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - } - } - }, - "@sinclair/typebox": { - "version": "0.23.4", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.4.tgz", - "integrity": "sha512-0/WqSvpVbCBAV1yPeko7eAczKbs78dNVAaX14quVlwOb2wxfKuXCx91h4NrEfkYK9zEnyVSW4JVI/trP3iS+Qg==", - "dev": true - }, - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true - }, - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", - "dev": true, - "peer": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@sora/e2ee": { - "version": "file:packages/e2ee", - "requires": { - "@rollup/plugin-node-resolve": "^13.2.1", - "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", - "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^5.21.0", - "@typescript-eslint/parser": "^5.21.0", - "eslint": "^8.14.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.6.2", - "rollup": "^2.70.2", - "typescript": "^4.6.3" - } - }, - "@sora/go-wasm": { - "version": "file:packages/go-wasm" - }, - "@sora/sdk": { - "version": "file:packages/sdk", - "requires": { - "@rollup/plugin-commonjs": "^22.0.0", - "@rollup/plugin-node-resolve": "^13.2.1", - "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", - "@sora/e2ee": "^2021.1.0", - "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.21.0", - "@typescript-eslint/parser": "5.21.0", - "eslint": "8.14.0", - "eslint-config-prettier": "8.5.0", - "eslint-plugin-prettier": "4.0.0", - "fflate": "^0.7.3", - "jest": "^28.0.0", - "prettier": "^2.6.2", - "rollup": "^2.70.2", - "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^27.1.4", - "typescript": "^4.6.3" - }, - "dependencies": { - "@jest/console": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.0.0.tgz", - "integrity": "sha512-LXXHbaVzluR26JGHz1iBYt32KM4+795/BFzDDoNuVDNFTcUANofye+zNl5Uzs/MfY2oFB7Zw+nJHpXEb1OGwpQ==", - "dev": true, - "requires": { - "@jest/types": "^28.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^28.0.0", - "jest-util": "^28.0.0", - "slash": "^3.0.0" - } - }, - "@jest/core": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.0.0.tgz", - "integrity": "sha512-ttGwIMsxHCS7/O9M19etIDnnJS9hGR6TtzfqRtiomAMtKX6VXi5vxJuV7z0C6TudesNU7h3DDSRptmg0HQ4c5A==", - "dev": true, - "requires": { - "@jest/console": "^28.0.0", - "@jest/reporters": "^28.0.0", - "@jest/test-result": "^28.0.0", - "@jest/transform": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^28.0.0", - "jest-config": "^28.0.0", - "jest-haste-map": "^28.0.0", - "jest-message-util": "^28.0.0", - "jest-regex-util": "^28.0.0", - "jest-resolve": "^28.0.0", - "jest-resolve-dependencies": "^28.0.0", - "jest-runner": "^28.0.0", - "jest-runtime": "^28.0.0", - "jest-snapshot": "^28.0.0", - "jest-util": "^28.0.0", - "jest-validate": "^28.0.0", - "jest-watcher": "^28.0.0", - "micromatch": "^4.0.4", - "pretty-format": "^28.0.0", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "@jest/environment": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.0.0.tgz", - "integrity": "sha512-4JW8g0UokMK8fHCxtg5N1xowzQPQknHYrcQhh/xtC2FuRN5nC1P1Utxt7FERxT94gxTbAkE9PGILVgFXQxEU2g==", - "dev": true, - "requires": { - "@jest/fake-timers": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/node": "*", - "jest-mock": "^28.0.0" - } - }, - "@jest/fake-timers": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.0.0.tgz", - "integrity": "sha512-ph5LQOCueZ5d19fwENuI4+Sdl0VBfVBBL+8aCO6XBRvYQ9tQ5lEiaqOe4OorctRv9xwy6XXsYpV/cdK/4nkMRQ==", - "dev": true, - "requires": { - "@jest/types": "^28.0.0", - "@sinonjs/fake-timers": "^9.1.1", - "@types/node": "*", - "jest-message-util": "^28.0.0", - "jest-mock": "^28.0.0", - "jest-util": "^28.0.0" - } - }, - "@jest/globals": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.0.0.tgz", - "integrity": "sha512-WnvQWgHWa6rdn3NIADBpaQDirVuynriOe9b/55dbw+5UH5FqWU8wedclfYTS+yh3Z9FHWpAIxoE38TmVabqyRw==", - "dev": true, - "requires": { - "@jest/environment": "^28.0.0", - "@jest/expect": "^28.0.0", - "@jest/types": "^28.0.0" - } - }, - "@jest/reporters": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.0.0.tgz", - "integrity": "sha512-Pvm5nR9YeVZYig+rWKVvbe8tWymEcRKn2VEvNMZlKiSICfQzRcUAVPdA7OAT1zBYkJPiK8lS52MdOE61JejCzg==", - "dev": true, - "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^28.0.0", - "@jest/test-result": "^28.0.0", - "@jest/transform": "^28.0.0", - "@jest/types": "^28.0.0", - "@jridgewell/trace-mapping": "^0.3.7", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-util": "^28.0.0", - "jest-worker": "^28.0.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^9.0.0" - } - }, - "@jest/source-map": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.0.0.tgz", - "integrity": "sha512-yeD/Y94j6UJPiaZTG5Sdww7pbHvEc7RlTucoVAdXaBaSuNcyrAkLlJonAb/xX/efCugDOEbFJdATsSnDEh45Nw==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.7", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - } - }, - "@jest/test-result": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.0.0.tgz", - "integrity": "sha512-hd6eS08F9gEAY5kt7Pw7zaIzj31ElKRVHml6pyz+i5s0EzHd0LjnaDwaAqBbbFxrD13HoQOJh8Lel6kvgAT3Yg==", - "dev": true, - "requires": { - "@jest/console": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - } - }, - "@jest/test-sequencer": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.0.0.tgz", - "integrity": "sha512-tRgs5JRVxodtDVddITgH0BRFwBAjbdWnnobuYWHgeYEM4sZVAsNZmF0oeZIaE9vK72xgdnjIoRg1+kppMorFCQ==", - "dev": true, - "requires": { - "@jest/test-result": "^28.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.0.0", - "slash": "^3.0.0" - } - }, - "@jest/transform": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.0.0.tgz", - "integrity": "sha512-Xrc02CJFju0TLb1QZmqHCvbVEvSvR0SlSawMFEiXu/vVthWKfZgsia2UumOEJFc7YFknufShHwf+0OWBpSxNXw==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/types": "^28.0.0", - "@jridgewell/trace-mapping": "^0.3.7", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.0.0", - "jest-regex-util": "^28.0.0", - "jest-util": "^28.0.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - } - }, - "@jest/types": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.0.0.tgz", - "integrity": "sha512-4rxVTiBbSjsl8V9sXkspfxW+t2Tdcmmc3fX7AU49gVrRpjXMjEDurSx/iruXnOSor4PTL0fwO61/2+n1XQ/RgA==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, - "babel-jest": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.0.0.tgz", - "integrity": "sha512-UBCCUmm8YnHyaBCF68rIknYvL1TjS4RKasviDG+j8lMHHxrV9aNdWVi4bIggb1rPEm5f/Z2Y44ByyvaHZprvAg==", - "dev": true, - "requires": { - "@jest/transform": "^28.0.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^28.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - } - }, - "babel-plugin-jest-hoist": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.0.0.tgz", - "integrity": "sha512-Eu+TDlmKd2SsnvmlooVeHFryVHHom6ffCLSZuqrN8WpIHE0H6qiIPW5h5rFlzIZQmVqnZR2qHnbm2eQWIP7hZg==", - "dev": true, - "requires": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - } - }, - "babel-preset-jest": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.0.0.tgz", - "integrity": "sha512-JLyjfCmqCWS3tXUw86ei5fQwuwn34slNBPTluNbhoqHVI1Cbw6MsmvgEl54jPjbyzkmA6XAHJTg3EGNY7rnr4A==", - "dev": true, - "requires": { - "babel-plugin-jest-hoist": "^28.0.0", - "babel-preset-current-node-syntax": "^1.0.0" - } - }, - "ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "diff-sequences": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.0.tgz", - "integrity": "sha512-GTIQPn2pPa1DMoEH70P9yQgYLcGW8bjPR5EOL2JO9/7DQHX+9tTFJee3UmlGWuyUvIqMgpXXssrckLubiEUZTg==", - "dev": true - }, - "emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", - "dev": true - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "expect": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.0.0.tgz", - "integrity": "sha512-06Ga42mfjx7tF1f2rn8DuKNARucmbluGtcDRwGlmUdakwHotIHi6h6yC0Gxp9+Q53jfOhr1lnfnETDaq6EjeDQ==", - "dev": true, - "requires": { - "@jest/expect-utils": "^28.0.0", - "jest-get-type": "^28.0.0", - "jest-matcher-utils": "^28.0.0", - "jest-message-util": "^28.0.0" - } - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true - }, - "jest": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-28.0.0.tgz", - "integrity": "sha512-Zl07FoxrV6em3/sBqSRepHWBtcqJ3BKbwmZ1CyeuHPKkSjhOqUEG/OcuJd/5pKP3wqRovoF6aHR1ID+2Qz/ufQ==", - "dev": true, - "requires": { - "@jest/core": "^28.0.0", - "import-local": "^3.0.2", - "jest-cli": "^28.0.0" - } - }, - "jest-changed-files": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.0.tgz", - "integrity": "sha512-9hFz/LuADUTv7zN+t0Ig+J/as2mtILTmgoT2XQdG/ezGbA1tfqoSwEKCXFcDaldzkskZddbh+QI2sACQGaxg6Q==", - "dev": true, - "requires": { - "execa": "^5.0.0", - "throat": "^6.0.1" - } - }, - "jest-circus": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.0.0.tgz", - "integrity": "sha512-GLmtj2SXMPMinU46Bgo/bD2JkYbssf/8CSKz5k7w4RY8VVRhODd+GMMzts822RHswMm35ACUU8dV1fYRutCwqQ==", - "dev": true, - "requires": { - "@jest/environment": "^28.0.0", - "@jest/expect": "^28.0.0", - "@jest/test-result": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^28.0.0", - "jest-matcher-utils": "^28.0.0", - "jest-message-util": "^28.0.0", - "jest-runtime": "^28.0.0", - "jest-snapshot": "^28.0.0", - "jest-util": "^28.0.0", - "pretty-format": "^28.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" - } - }, - "jest-cli": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.0.0.tgz", - "integrity": "sha512-LrK46qmPoi+rVMOQt6e8OMMyfMk0+mgdTFnhOFi011p+qoKefW/5obGdS9rWZHcoTPg+lZ9iV4JBI4NJhie2hw==", - "dev": true, - "requires": { - "@jest/core": "^28.0.0", - "@jest/test-result": "^28.0.0", - "@jest/types": "^28.0.0", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^28.0.0", - "jest-util": "^28.0.0", - "jest-validate": "^28.0.0", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - } - }, - "jest-config": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.0.0.tgz", - "integrity": "sha512-6dP4hkHLlMllh5iK/2n8jLlrrJvDnXQyY4MKFnXyPiUYdXu59yg4paYYEKW0JNbgco//d07AiUvL1t+gkjPfFg==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^28.0.0", - "@jest/types": "^28.0.0", - "babel-jest": "^28.0.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^28.0.0", - "jest-environment-node": "^28.0.0", - "jest-get-type": "^28.0.0", - "jest-regex-util": "^28.0.0", - "jest-resolve": "^28.0.0", - "jest-runner": "^28.0.0", - "jest-util": "^28.0.0", - "jest-validate": "^28.0.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^28.0.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - } - }, - "jest-diff": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.0.0.tgz", - "integrity": "sha512-LuxfL//yP8TFNECSL9ULr1lCKh4RTi4OZTNzzQYY99S0EfGW7B6ckkeXJ6QOpyj9wS4Jb1v51bOLUlJLlGf1Vg==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^28.0.0", - "jest-get-type": "^28.0.0", - "pretty-format": "^28.0.0" - } - }, - "jest-docblock": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.0.0.tgz", - "integrity": "sha512-88od+z1QkHyvtpj1gRA6QGysopOzImocHNNlvvM7OydDe9ER6z1siLtHJXbKEfi5FoxMpYqDtszYIS50JVs0WA==", - "dev": true, - "requires": { - "detect-newline": "^3.0.0" - } - }, - "jest-each": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.0.0.tgz", - "integrity": "sha512-nnGven0xJDHPrb5RKskWG/MvHvkfDPoOG9dyduV7sfl2WkMBe1X1l68Xdjv+eTdUV966/mPMZEuHWLh0HRKifw==", - "dev": true, - "requires": { - "@jest/types": "^28.0.0", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.0", - "jest-util": "^28.0.0", - "pretty-format": "^28.0.0" - } - }, - "jest-environment-node": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.0.0.tgz", - "integrity": "sha512-kWzs9d2Yom5BtIjKu83I/CsWHpKbegTnMlLZicRK9OZlk9GCdnP2mrQo9YqkUyGTYKZGXOSYnGJLJVBaR+NZGA==", - "dev": true, - "requires": { - "@jest/environment": "^28.0.0", - "@jest/fake-timers": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/node": "*", - "jest-mock": "^28.0.0", - "jest-util": "^28.0.0" - } - }, - "jest-get-type": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.0.tgz", - "integrity": "sha512-754LtawzW+Qk4o5rC+eDqfcQ9dV8z9uvbaVenmK8pju11PBGfuMDvQwRxoPews0LCaumNmYHjcAwmkYINTlhIA==", - "dev": true - }, - "jest-haste-map": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.0.0.tgz", - "integrity": "sha512-Wv/0P3Rc5V3Si5Rb4FpoaxrzHwDRH3mG40WOI0h4ya6cJRNbSpy/RcMMJeksJgt9hUE8KoFqHOnGAPxKC18VpQ==", - "dev": true, - "requires": { - "@jest/types": "^28.0.0", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "fsevents": "^2.3.2", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^28.0.0", - "jest-util": "^28.0.0", - "jest-worker": "^28.0.0", - "micromatch": "^4.0.4", - "walker": "^1.0.7" - } - }, - "jest-leak-detector": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.0.0.tgz", - "integrity": "sha512-P4KWylb4x6Q/jctJtGKJSD3PkUjgSIu/JOpstWwgYFvGfNKtAGXEfIY6nlGSBTCajSuPs7WXUNMQXiYqKwivgg==", - "dev": true, - "requires": { - "jest-get-type": "^28.0.0", - "pretty-format": "^28.0.0" - } - }, - "jest-matcher-utils": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.0.0.tgz", - "integrity": "sha512-WI2jLjGQ2OTBIUVIJA+oiYkAEuG6U4URe6iCrqNQcN4KE3ZmLlcMlALsaYe/t/njS2El51ILtm6erpaCW+EK9A==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^28.0.0", - "jest-get-type": "^28.0.0", - "pretty-format": "^28.0.0" - } - }, - "jest-message-util": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.0.0.tgz", - "integrity": "sha512-dREPaseSGHG76kpUv+DbUoxZ8lRwSM7YwgrQNxPYuRR4rxSJJh23EKu6n6Nqv0yOer+FuVVu5RzEzdA+SbCtgQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.0.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^28.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-mock": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.0.0.tgz", - "integrity": "sha512-C8xBtHuokPvmyX4ajh/TaenKGSbcu4pcIwjucD6ZZ7WznfSnMkLI/gzOh/YhUNr60tvBnxNsN+A0ECLG8pprTg==", - "dev": true, - "requires": { - "@jest/types": "^28.0.0", - "@types/node": "*" - } - }, - "jest-regex-util": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.0.tgz", - "integrity": "sha512-VqrjkteNiucN3ctI/AtBzO7iitfk5YGArPwU2cJ3WyT5Z6kGFHw/HQp0fSTkOUHdwVdJkFzbI5nh0yC82f9Kfg==", - "dev": true - }, - "jest-resolve": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.0.0.tgz", - "integrity": "sha512-aKRsKCo3gjVL6lSSjoEucVrhrDP8NJmiIzBiw7hI4o6gYrXH4yNahF5m9Vl6Wl9Q3LNqMAQhPSxPxVnSh1k3YQ==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.0.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^28.0.0", - "jest-validate": "^28.0.0", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - } - }, - "jest-resolve-dependencies": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.0.0.tgz", - "integrity": "sha512-SzS4mfZTznPKczh6KopL1ZMTGWzNNhGJ4vLvhYkXb1g1a8SgE+lIfZ0aI+Diu+DASw+QZwJrwiRTSvSGu4k6/g==", - "dev": true, - "requires": { - "jest-regex-util": "^28.0.0", - "jest-snapshot": "^28.0.0" - } - }, - "jest-runner": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.0.0.tgz", - "integrity": "sha512-ygi+tgaeYaqfl72FA9HdD0B8c1q0RmhbHuBVvNhMwqqFs9OZpI0vN4ksRJCqmlRDgfK/1JGPElot0kTQ62++Rg==", - "dev": true, - "requires": { - "@jest/console": "^28.0.0", - "@jest/environment": "^28.0.0", - "@jest/test-result": "^28.0.0", - "@jest/transform": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "graceful-fs": "^4.2.9", - "jest-docblock": "^28.0.0", - "jest-environment-node": "^28.0.0", - "jest-haste-map": "^28.0.0", - "jest-leak-detector": "^28.0.0", - "jest-message-util": "^28.0.0", - "jest-resolve": "^28.0.0", - "jest-runtime": "^28.0.0", - "jest-util": "^28.0.0", - "jest-watcher": "^28.0.0", - "jest-worker": "^28.0.0", - "source-map-support": "0.5.13", - "throat": "^6.0.1" - } - }, - "jest-runtime": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.0.0.tgz", - "integrity": "sha512-s7sw1I4J4lUos34kbFnptxVSLfXIwILSNAq5DAzgmRzP/jUCuRFPm4/aWD7PaobxpCFJiSUAGj+Vnl7qSYQ+Cw==", - "dev": true, - "requires": { - "@jest/environment": "^28.0.0", - "@jest/fake-timers": "^28.0.0", - "@jest/globals": "^28.0.0", - "@jest/source-map": "^28.0.0", - "@jest/test-result": "^28.0.0", - "@jest/transform": "^28.0.0", - "@jest/types": "^28.0.0", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.0.0", - "jest-message-util": "^28.0.0", - "jest-mock": "^28.0.0", - "jest-regex-util": "^28.0.0", - "jest-resolve": "^28.0.0", - "jest-snapshot": "^28.0.0", - "jest-util": "^28.0.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - } - }, - "jest-snapshot": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.0.0.tgz", - "integrity": "sha512-JqMff/KN8EAfAxCV7o4lHhnbL1wvJz2R8pHKe6UiEJ7wBmWo/fck/AIYpmdbk8w62+6exy4BmIDmERo9k0cy6w==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.0.0", - "@jest/transform": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^28.0.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^28.0.0", - "jest-get-type": "^28.0.0", - "jest-haste-map": "^28.0.0", - "jest-matcher-utils": "^28.0.0", - "jest-message-util": "^28.0.0", - "jest-util": "^28.0.0", - "natural-compare": "^1.4.0", - "pretty-format": "^28.0.0", - "semver": "^7.3.5" - } - }, - "jest-util": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.0.0.tgz", - "integrity": "sha512-wSZjUR74ZR076RfyWdZ0tI3+U87QmK+RCB5igUKRUhinclf4O9om6UNBy0u9YfT6shKhno3l/eiQVmRp/AEfeA==", - "dev": true, - "requires": { - "@jest/types": "^28.0.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "jest-validate": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.0.0.tgz", - "integrity": "sha512-5Z0vTTIZRNYAKzemp/jvutWoMKYGHyr6TKc5kl4+KtAxrbX7n7cGv00AxEavBKtrb7EMAZ2zhbhu2nKaEEUwKw==", - "dev": true, - "requires": { - "@jest/types": "^28.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.0", - "leven": "^3.1.0", - "pretty-format": "^28.0.0" - } - }, - "jest-watcher": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.0.0.tgz", - "integrity": "sha512-SOeze65Bvb6biK+gXqb2fa1T3F626AuM/z3fvISF7wPgKkCzqxPG6obkNJIzcISpWfSP4G+Pf5eNVScj1KNsYQ==", - "dev": true, - "requires": { - "@jest/test-result": "^28.0.0", - "@jest/types": "^28.0.0", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^28.0.0", - "string-length": "^4.0.1" - } - }, - "jest-worker": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.0.0.tgz", - "integrity": "sha512-ETSSJaDwDREF7LudjrfGpXs4jDAcKPvcrh2RgaRVXLBwp5e/5MtQQRk4zlaPjYpExhm7hyDJwIsIEq9sJMcHUg==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - } - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "pretty-format": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.0.0.tgz", - "integrity": "sha512-CoBfnZavDij+aBzQCVWIIYaZEe1ifIGLI2lG+c3/spHWhpeSt4kpjGd5W50GqtdtbL/Ojx4ZonGIqZVdUNoBGQ==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.0", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.0.0.tgz", - "integrity": "sha512-yUcBYdBBbo3QiPsgYDcfQcIkGZHfxOaoE6HLSnr1sPzMhdyxusbfKOSUbSd/ocGi32dxcj366PsTj+5oggeKKw==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "v8-to-istanbul": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", - "integrity": "sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.7", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - } - }, - "write-file-atomic": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", - "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - } - }, - "yargs": { - "version": "17.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz", - "integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "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.0.0" - } - }, - "yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", + "npm-bundled": "^1.1.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "@npmcli/move-file": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "dev": true, + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + } + }, + "@npmcli/node-gyp": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", + "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", + "dev": true + }, + "@npmcli/promise-spawn": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", + "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", + "dev": true, + "requires": { + "infer-owner": "^1.0.4" + } + }, + "@npmcli/run-script": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.1.tgz", + "integrity": "sha512-o2fkld5hYwu9sKYzoXTpqEocMnDLaigobaPzLaGB63k/ExmLBTaB+KpfKlpcIePPnuP8RFR+0GDI4KopJCM6Xg==", + "dev": true, + "requires": { + "@npmcli/node-gyp": "^1.0.3", + "@npmcli/promise-spawn": "^1.3.2", + "node-gyp": "^9.0.0", + "read-package-json-fast": "^2.0.3" + } + }, + "@rollup/plugin-commonjs": { + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.1.0.tgz", + "integrity": "sha512-6ZtHx3VHIp2ReNNDxHjuUml6ur+WcQ28N1yHgCQwsbNkQg2suhxGMDQGJOn/KuDxKtd1xuZP5xSTwBA4GQ8hbA==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "commondir": "^1.0.1", + "estree-walker": "^2.0.1", + "glob": "^7.1.6", + "is-reference": "^1.2.1", + "magic-string": "^0.25.7", + "resolve": "^1.17.0" + } + }, + "@rollup/plugin-node-resolve": { + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.2.1.tgz", + "integrity": "sha512-btX7kzGvp1JwShQI9V6IM841YKNPYjKCvUbNrQ2EcVYbULtUd/GH6wZ/qdqH13j9pOHBER+EZXNN2L8RSJhVRA==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "builtin-modules": "^3.1.0", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.19.0" + } + }, + "@rollup/plugin-replace": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-4.0.0.tgz", + "integrity": "sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "magic-string": "^0.25.7" + } + }, + "@rollup/plugin-typescript": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.2.tgz", + "integrity": "sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "resolve": "^1.17.0" + } + }, + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "dependencies": { + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", "dev": true } } }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true + }, + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", + "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sora/e2ee": { + "version": "file:packages/e2ee", + "requires": { + "@rollup/plugin-node-resolve": "^13.2.1", + "@rollup/plugin-replace": "^4.0.0", + "@rollup/plugin-typescript": "^8.3.2", + "@sora/go-wasm": "^2021.1.0", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", + "eslint": "^8.13.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.0.0", + "prettier": "^2.6.2", + "rollup": "^2.70.2", + "typescript": "^4.6.3" + } + }, + "@sora/go-wasm": { + "version": "file:packages/go-wasm" + }, + "@sora/sdk": { + "version": "file:packages/sdk", + "requires": { + "@rollup/plugin-commonjs": "^21.1.0", + "@rollup/plugin-node-resolve": "^13.2.1", + "@rollup/plugin-replace": "^4.0.0", + "@rollup/plugin-typescript": "^8.3.2", + "@sora/e2ee": "^2021.1.0", + "@types/jest": "^27.4.1", + "@typescript-eslint/eslint-plugin": "5.20.0", + "@typescript-eslint/parser": "5.20.0", + "eslint": "8.13.0", + "eslint-config-prettier": "8.5.0", + "eslint-plugin-prettier": "4.0.0", + "fflate": "^0.7.3", + "jest": "^27.5.1", + "prettier": "^2.6.2", + "rollup": "^2.70.2", + "rollup-plugin-terser": "^7.0.2", + "ts-jest": "^27.1.4", + "typescript": "^4.6.3" + } + }, "@szmarczak/http-timer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", @@ -12399,14 +9713,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.21.0.tgz", - "integrity": "sha512-fTU85q8v5ZLpoZEyn/u1S2qrFOhi33Edo2CZ0+q1gDaWWm0JuPh3bgOyU8lM0edIEYgKLDkPFiZX2MOupgjlyg==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz", + "integrity": "sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.21.0", - "@typescript-eslint/type-utils": "5.21.0", - "@typescript-eslint/utils": "5.21.0", + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/type-utils": "5.20.0", + "@typescript-eslint/utils": "5.20.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -12416,52 +9730,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.21.0.tgz", - "integrity": "sha512-8RUwTO77hstXUr3pZoWZbRQUxXcSXafZ8/5gpnQCfXvgmP9gpNlRGlWzvfbEQ14TLjmtU8eGnONkff8U2ui2Eg==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.20.0.tgz", + "integrity": "sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.21.0", - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/typescript-estree": "5.21.0", + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/typescript-estree": "5.20.0", "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.21.0.tgz", - "integrity": "sha512-XTX0g0IhvzcH/e3393SvjRCfYQxgxtYzL3UREteUneo72EFlt7UNoiYnikUtmGVobTbhUDByhJ4xRBNe+34kOQ==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz", + "integrity": "sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/visitor-keys": "5.21.0" + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/visitor-keys": "5.20.0" } }, "@typescript-eslint/type-utils": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.21.0.tgz", - "integrity": "sha512-MxmLZj0tkGlkcZCSE17ORaHl8Th3JQwBzyXL/uvC6sNmu128LsgjTX0NIzy+wdH2J7Pd02GN8FaoudJntFvSOw==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz", + "integrity": "sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.21.0", + "@typescript-eslint/utils": "5.20.0", "debug": "^4.3.2", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.21.0.tgz", - "integrity": "sha512-XnOOo5Wc2cBlq8Lh5WNvAgHzpjnEzxn4CJBwGkcau7b/tZ556qrWXQz4DJyChYg8JZAD06kczrdgFPpEQZfDsA==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz", + "integrity": "sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.21.0.tgz", - "integrity": "sha512-Y8Y2T2FNvm08qlcoSMoNchh9y2Uj3QmjtwNMdRQkcFG7Muz//wfJBGBxh8R7HAGQFpgYpdHqUpEoPQk+q9Kjfg==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz", + "integrity": "sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==", "dev": true, "requires": { - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/visitor-keys": "5.21.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/visitor-keys": "5.20.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -12470,26 +9784,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.21.0.tgz", - "integrity": "sha512-q/emogbND9wry7zxy7VYri+7ydawo2HDZhRZ5k6yggIvXa7PvBbAAZ4PFH/oZLem72ezC4Pr63rJvDK/sTlL8Q==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.20.0.tgz", + "integrity": "sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.21.0", - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/typescript-estree": "5.21.0", + "@typescript-eslint/scope-manager": "5.20.0", + "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/typescript-estree": "5.20.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.21.0.tgz", - "integrity": "sha512-SX8jNN+iHqAF0riZQMkm7e8+POXa/fXw5cxL+gjpyP+FI+JVNhii53EmQgDAfDcBpFekYSlO0fGytMQwRiMQCA==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz", + "integrity": "sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/types": "5.20.0", "eslint-visitor-keys": "^3.0.0" } }, @@ -12503,8 +9817,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", - "dev": true, - "peer": true + "dev": true }, "abbrev": { "version": "1.1.1", @@ -12533,7 +9846,6 @@ "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", "dev": true, - "peer": true, "requires": { "acorn": "^7.1.1", "acorn-walk": "^7.1.1" @@ -12543,8 +9855,7 @@ "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "peer": true + "dev": true } } }, @@ -12559,8 +9870,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true, - "peer": true + "dev": true }, "agent-base": { "version": "6.0.2", @@ -12699,15 +10009,13 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true, - "peer": true + "dev": true }, "babel-jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==", "dev": true, - "peer": true, "requires": { "@jest/transform": "^27.5.1", "@jest/types": "^27.5.1", @@ -12737,7 +10045,6 @@ "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz", "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==", "dev": true, - "peer": true, "requires": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", @@ -12770,7 +10077,6 @@ "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==", "dev": true, - "peer": true, "requires": { "babel-plugin-jest-hoist": "^27.5.1", "babel-preset-current-node-syntax": "^1.0.0" @@ -12820,8 +10126,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true, - "peer": true + "dev": true }, "browserslist": { "version": "4.20.2", @@ -13098,7 +10403,6 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, - "peer": true, "requires": { "delayed-stream": "~1.0.0" } @@ -13237,15 +10541,13 @@ "version": "0.4.4", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", - "dev": true, - "peer": true + "dev": true }, "cssstyle": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", "dev": true, - "peer": true, "requires": { "cssom": "~0.3.6" }, @@ -13254,8 +10556,7 @@ "version": "0.3.8", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true, - "peer": true + "dev": true } } }, @@ -13264,7 +10565,6 @@ "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", "dev": true, - "peer": true, "requires": { "abab": "^2.0.3", "whatwg-mimetype": "^2.3.0", @@ -13284,8 +10584,7 @@ "version": "10.3.1", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", - "dev": true, - "peer": true + "dev": true }, "decompress-response": { "version": "3.3.0", @@ -13330,8 +10629,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true, - "peer": true + "dev": true }, "delegates": { "version": "1.0.0", @@ -13380,7 +10678,6 @@ "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", "dev": true, - "peer": true, "requires": { "webidl-conversions": "^5.0.0" }, @@ -13389,8 +10686,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "dev": true, - "peer": true + "dev": true } } }, @@ -13419,8 +10715,7 @@ "version": "0.8.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", - "dev": true, - "peer": true + "dev": true }, "emoji-regex": { "version": "8.0.0", @@ -13491,7 +10786,6 @@ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", "dev": true, - "peer": true, "requires": { "esprima": "^4.0.1", "estraverse": "^5.2.0", @@ -13504,15 +10798,13 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "peer": true + "dev": true }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, - "peer": true, "requires": { "prelude-ls": "~1.1.2", "type-check": "~0.3.2" @@ -13523,7 +10815,6 @@ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, - "peer": true, "requires": { "deep-is": "~0.1.3", "fast-levenshtein": "~2.0.6", @@ -13537,15 +10828,13 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true, - "peer": true + "dev": true }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, - "peer": true, "requires": { "prelude-ls": "~1.1.2" } @@ -13553,12 +10842,12 @@ } }, "eslint": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", - "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.13.0.tgz", + "integrity": "sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.2.2", + "@eslint/eslintrc": "^1.2.1", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -13829,7 +11118,6 @@ "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", "dev": true, - "peer": true, "requires": { "@jest/types": "^27.5.1", "jest-get-type": "^27.5.1", @@ -13967,7 +11255,6 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", "dev": true, - "peer": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -14221,7 +11508,6 @@ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", "dev": true, - "peer": true, "requires": { "whatwg-encoding": "^1.0.5" } @@ -14499,8 +11785,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true, - "peer": true + "dev": true }, "is-reference": { "version": "1.2.1", @@ -14608,7 +11893,6 @@ "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==", "dev": true, - "peer": true, "requires": { "@jest/core": "^27.5.1", "import-local": "^3.0.2", @@ -14620,7 +11904,6 @@ "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz", "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==", "dev": true, - "peer": true, "requires": { "@jest/types": "^27.5.1", "execa": "^5.0.0", @@ -14632,7 +11915,6 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "peer": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -14644,7 +11926,6 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, - "peer": true, "requires": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -14661,22 +11942,19 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "peer": true + "dev": true }, "is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "peer": true + "dev": true }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "peer": true, "requires": { "path-key": "^3.0.0" } @@ -14685,15 +11963,13 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "peer": true + "dev": true }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "peer": true, "requires": { "shebang-regex": "^3.0.0" } @@ -14702,8 +11978,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "peer": true + "dev": true } } }, @@ -14712,7 +11987,6 @@ "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz", "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==", "dev": true, - "peer": true, "requires": { "@jest/environment": "^27.5.1", "@jest/test-result": "^27.5.1", @@ -14740,7 +12014,6 @@ "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz", "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==", "dev": true, - "peer": true, "requires": { "@jest/core": "^27.5.1", "@jest/test-result": "^27.5.1", @@ -14761,7 +12034,6 @@ "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz", "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==", "dev": true, - "peer": true, "requires": { "@babel/core": "^7.8.0", "@jest/test-sequencer": "^27.5.1", @@ -14793,15 +12065,13 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true, - "peer": true + "dev": true }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "peer": true + "dev": true } } }, @@ -14822,7 +12092,6 @@ "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz", "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==", "dev": true, - "peer": true, "requires": { "detect-newline": "^3.0.0" } @@ -14832,7 +12101,6 @@ "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz", "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==", "dev": true, - "peer": true, "requires": { "@jest/types": "^27.5.1", "chalk": "^4.0.0", @@ -14846,7 +12114,6 @@ "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz", "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==", "dev": true, - "peer": true, "requires": { "@jest/environment": "^27.5.1", "@jest/fake-timers": "^27.5.1", @@ -14862,7 +12129,6 @@ "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", "dev": true, - "peer": true, "requires": { "@jest/environment": "^27.5.1", "@jest/fake-timers": "^27.5.1", @@ -14883,7 +12149,6 @@ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", "dev": true, - "peer": true, "requires": { "@jest/types": "^27.5.1", "@types/graceful-fs": "^4.1.2", @@ -14905,7 +12170,6 @@ "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz", "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==", "dev": true, - "peer": true, "requires": { "@jest/environment": "^27.5.1", "@jest/source-map": "^27.5.1", @@ -14931,7 +12195,6 @@ "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz", "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==", "dev": true, - "peer": true, "requires": { "jest-get-type": "^27.5.1", "pretty-format": "^27.5.1" @@ -14954,7 +12217,6 @@ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", "dev": true, - "peer": true, "requires": { "@babel/code-frame": "^7.12.13", "@jest/types": "^27.5.1", @@ -14972,7 +12234,6 @@ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", "dev": true, - "peer": true, "requires": { "@jest/types": "^27.5.1", "@types/node": "*" @@ -14989,15 +12250,13 @@ "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", - "dev": true, - "peer": true + "dev": true }, "jest-resolve": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", "dev": true, - "peer": true, "requires": { "@jest/types": "^27.5.1", "chalk": "^4.0.0", @@ -15016,7 +12275,6 @@ "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz", "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==", "dev": true, - "peer": true, "requires": { "@jest/types": "^27.5.1", "jest-regex-util": "^27.5.1", @@ -15028,7 +12286,6 @@ "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz", "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==", "dev": true, - "peer": true, "requires": { "@jest/console": "^27.5.1", "@jest/environment": "^27.5.1", @@ -15058,7 +12315,6 @@ "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz", "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==", "dev": true, - "peer": true, "requires": { "@jest/environment": "^27.5.1", "@jest/fake-timers": "^27.5.1", @@ -15089,7 +12345,6 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "peer": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -15101,7 +12356,6 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, - "peer": true, "requires": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -15118,22 +12372,19 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "peer": true + "dev": true }, "is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "peer": true + "dev": true }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "peer": true, "requires": { "path-key": "^3.0.0" } @@ -15142,15 +12393,13 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "peer": true + "dev": true }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "peer": true, "requires": { "shebang-regex": "^3.0.0" } @@ -15159,8 +12408,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "peer": true + "dev": true } } }, @@ -15169,7 +12417,6 @@ "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", "dev": true, - "peer": true, "requires": { "@types/node": "*", "graceful-fs": "^4.2.9" @@ -15180,7 +12427,6 @@ "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz", "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==", "dev": true, - "peer": true, "requires": { "@babel/core": "^7.7.2", "@babel/generator": "^7.7.2", @@ -15233,7 +12479,6 @@ "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", "dev": true, - "peer": true, "requires": { "@jest/types": "^27.5.1", "camelcase": "^6.2.0", @@ -15248,7 +12493,6 @@ "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz", "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==", "dev": true, - "peer": true, "requires": { "@jest/test-result": "^27.5.1", "@jest/types": "^27.5.1", @@ -15264,7 +12508,6 @@ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "dev": true, - "peer": true, "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -15276,7 +12519,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "peer": true, "requires": { "has-flag": "^4.0.0" } @@ -15309,7 +12551,6 @@ "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", "dev": true, - "peer": true, "requires": { "abab": "^2.0.5", "acorn": "^8.2.4", @@ -15344,15 +12585,13 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true, - "peer": true + "dev": true }, "http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, - "peer": true, "requires": { "@tootallnate/once": "1", "agent-base": "6", @@ -16023,8 +13262,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", - "dev": true, - "peer": true + "dev": true }, "on-headers": { "version": "1.0.2", @@ -16207,8 +13445,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true, - "peer": true + "dev": true }, "path-exists": { "version": "4.0.0", @@ -16406,8 +13643,7 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true, - "peer": true + "dev": true }, "pump": { "version": "3.0.0", @@ -16691,7 +13927,6 @@ "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", "dev": true, - "peer": true, "requires": { "xmlchars": "^2.2.0" } @@ -17127,8 +14362,7 @@ "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true, - "peer": true + "dev": true }, "tar": { "version": "6.1.11", @@ -17256,7 +14490,6 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", "dev": true, - "peer": true, "requires": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -17267,8 +14500,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "peer": true + "dev": true } } }, @@ -17277,7 +14509,6 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", "dev": true, - "peer": true, "requires": { "punycode": "^2.1.1" }, @@ -17286,8 +14517,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "peer": true + "dev": true } } }, @@ -17411,8 +14641,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "peer": true + "dev": true }, "update-check": { "version": "1.5.2", @@ -17489,7 +14718,6 @@ "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", "dev": true, - "peer": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.1", "convert-source-map": "^1.6.0", @@ -17500,8 +14728,7 @@ "version": "0.7.3", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true, - "peer": true + "dev": true } } }, @@ -17547,7 +14774,6 @@ "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", "dev": true, - "peer": true, "requires": { "browser-process-hrtime": "^1.0.0" } @@ -17557,7 +14783,6 @@ "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", "dev": true, - "peer": true, "requires": { "xml-name-validator": "^3.0.0" } @@ -17575,15 +14800,13 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", - "dev": true, - "peer": true + "dev": true }, "whatwg-encoding": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", "dev": true, - "peer": true, "requires": { "iconv-lite": "0.4.24" }, @@ -17593,7 +14816,6 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, - "peer": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } @@ -17604,15 +14826,13 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true, - "peer": true + "dev": true }, "whatwg-url": { "version": "8.7.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", "dev": true, - "peer": true, "requires": { "lodash": "^4.7.0", "tr46": "^2.1.0", @@ -17686,7 +14906,6 @@ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", "dev": true, - "peer": true, "requires": {} }, "xdg-basedir": { @@ -17699,15 +14918,13 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true, - "peer": true + "dev": true }, "xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true, - "peer": true + "dev": true }, "y18n": { "version": "5.0.8", @@ -17732,7 +14949,6 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, - "peer": true, "requires": { "cliui": "^7.0.2", "escalade": "^3.1.1", diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index 6fc389b5..158c7355 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -19,9 +19,9 @@ "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.21.0", - "@typescript-eslint/parser": "^5.21.0", - "eslint": "^8.14.0", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", + "eslint": "^8.13.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 773056b6..e1f01778 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -8,17 +8,17 @@ "test": "jest --detectOpenHandles --forceExit" }, "devDependencies": { - "@rollup/plugin-commonjs": "^22.0.0", + "@rollup/plugin-commonjs": "^21.1.0", "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.21.0", - "@typescript-eslint/parser": "5.21.0", - "eslint": "8.14.0", + "@typescript-eslint/eslint-plugin": "5.20.0", + "@typescript-eslint/parser": "5.20.0", + "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", - "jest": "^28.0.0", + "jest": "^27.5.1", "prettier": "^2.6.2", "rollup": "^2.70.2", "rollup-plugin-terser": "^7.0.2", From 1eb54eb3ac27bebb19e4ca8e84a66e8f340c78d5 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 26 Apr 2022 11:15:57 +0900 Subject: [PATCH 65/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 228 ++++++++++++++++++------------------- packages/e2ee/package.json | 6 +- packages/sdk/package.json | 8 +- 3 files changed, 121 insertions(+), 121 deletions(-) diff --git a/package-lock.json b/package-lock.json index 50ebfd89..a3c906f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -601,9 +601,9 @@ "dev": true }, "node_modules/@eslint/eslintrc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", - "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", + "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -1221,9 +1221,9 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.1.0.tgz", - "integrity": "sha512-6ZtHx3VHIp2ReNNDxHjuUml6ur+WcQ28N1yHgCQwsbNkQg2suhxGMDQGJOn/KuDxKtd1xuZP5xSTwBA4GQ8hbA==", + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.0.tgz", + "integrity": "sha512-Ktvf2j+bAO+30awhbYoCaXpBcyPmJbaEUYClQns/+6SNCYFURbvBiNbWgHITEsIgDDWCDUclWRKEuf8cwZCFoQ==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1235,10 +1235,10 @@ "resolve": "^1.17.0" }, "engines": { - "node": ">= 8.0.0" + "node": ">= 12.0.0" }, "peerDependencies": { - "rollup": "^2.38.3" + "rollup": "^2.68.0" } }, "node_modules/@rollup/plugin-node-resolve": { @@ -1514,14 +1514,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz", - "integrity": "sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.21.0.tgz", + "integrity": "sha512-fTU85q8v5ZLpoZEyn/u1S2qrFOhi33Edo2CZ0+q1gDaWWm0JuPh3bgOyU8lM0edIEYgKLDkPFiZX2MOupgjlyg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/type-utils": "5.20.0", - "@typescript-eslint/utils": "5.20.0", + "@typescript-eslint/scope-manager": "5.21.0", + "@typescript-eslint/type-utils": "5.21.0", + "@typescript-eslint/utils": "5.21.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1547,14 +1547,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.20.0.tgz", - "integrity": "sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.21.0.tgz", + "integrity": "sha512-8RUwTO77hstXUr3pZoWZbRQUxXcSXafZ8/5gpnQCfXvgmP9gpNlRGlWzvfbEQ14TLjmtU8eGnONkff8U2ui2Eg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/typescript-estree": "5.20.0", + "@typescript-eslint/scope-manager": "5.21.0", + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/typescript-estree": "5.21.0", "debug": "^4.3.2" }, "engines": { @@ -1574,13 +1574,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz", - "integrity": "sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.21.0.tgz", + "integrity": "sha512-XTX0g0IhvzcH/e3393SvjRCfYQxgxtYzL3UREteUneo72EFlt7UNoiYnikUtmGVobTbhUDByhJ4xRBNe+34kOQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/visitor-keys": "5.20.0" + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/visitor-keys": "5.21.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1591,12 +1591,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz", - "integrity": "sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.21.0.tgz", + "integrity": "sha512-MxmLZj0tkGlkcZCSE17ORaHl8Th3JQwBzyXL/uvC6sNmu128LsgjTX0NIzy+wdH2J7Pd02GN8FaoudJntFvSOw==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.20.0", + "@typescript-eslint/utils": "5.21.0", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -1617,9 +1617,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz", - "integrity": "sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.21.0.tgz", + "integrity": "sha512-XnOOo5Wc2cBlq8Lh5WNvAgHzpjnEzxn4CJBwGkcau7b/tZ556qrWXQz4DJyChYg8JZAD06kczrdgFPpEQZfDsA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1630,13 +1630,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz", - "integrity": "sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.21.0.tgz", + "integrity": "sha512-Y8Y2T2FNvm08qlcoSMoNchh9y2Uj3QmjtwNMdRQkcFG7Muz//wfJBGBxh8R7HAGQFpgYpdHqUpEoPQk+q9Kjfg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/visitor-keys": "5.20.0", + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/visitor-keys": "5.21.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1657,15 +1657,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.20.0.tgz", - "integrity": "sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.21.0.tgz", + "integrity": "sha512-q/emogbND9wry7zxy7VYri+7ydawo2HDZhRZ5k6yggIvXa7PvBbAAZ4PFH/oZLem72ezC4Pr63rJvDK/sTlL8Q==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/typescript-estree": "5.20.0", + "@typescript-eslint/scope-manager": "5.21.0", + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/typescript-estree": "5.21.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1681,12 +1681,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz", - "integrity": "sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.21.0.tgz", + "integrity": "sha512-SX8jNN+iHqAF0riZQMkm7e8+POXa/fXw5cxL+gjpyP+FI+JVNhii53EmQgDAfDcBpFekYSlO0fGytMQwRiMQCA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/types": "5.21.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -3048,12 +3048,12 @@ } }, "node_modules/eslint": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.13.0.tgz", - "integrity": "sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", + "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.2.1", + "@eslint/eslintrc": "^1.2.2", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -8442,9 +8442,9 @@ "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.20.0", - "@typescript-eslint/parser": "^5.20.0", - "eslint": "^8.13.0", + "@typescript-eslint/eslint-plugin": "^5.21.0", + "@typescript-eslint/parser": "^5.21.0", + "eslint": "^8.14.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", @@ -8463,14 +8463,14 @@ "fflate": "^0.7.3" }, "devDependencies": { - "@rollup/plugin-commonjs": "^21.1.0", + "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.20.0", - "@typescript-eslint/parser": "5.20.0", - "eslint": "8.13.0", + "@typescript-eslint/eslint-plugin": "5.21.0", + "@typescript-eslint/parser": "5.21.0", + "eslint": "8.14.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.5.1", @@ -8927,9 +8927,9 @@ "dev": true }, "@eslint/eslintrc": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz", - "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", + "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -9425,9 +9425,9 @@ } }, "@rollup/plugin-commonjs": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.1.0.tgz", - "integrity": "sha512-6ZtHx3VHIp2ReNNDxHjuUml6ur+WcQ28N1yHgCQwsbNkQg2suhxGMDQGJOn/KuDxKtd1xuZP5xSTwBA4GQ8hbA==", + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.0.tgz", + "integrity": "sha512-Ktvf2j+bAO+30awhbYoCaXpBcyPmJbaEUYClQns/+6SNCYFURbvBiNbWgHITEsIgDDWCDUclWRKEuf8cwZCFoQ==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -9523,9 +9523,9 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^5.20.0", - "@typescript-eslint/parser": "^5.20.0", - "eslint": "^8.13.0", + "@typescript-eslint/eslint-plugin": "^5.21.0", + "@typescript-eslint/parser": "^5.21.0", + "eslint": "^8.14.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", @@ -9539,15 +9539,15 @@ "@sora/sdk": { "version": "file:packages/sdk", "requires": { - "@rollup/plugin-commonjs": "^21.1.0", + "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.20.0", - "@typescript-eslint/parser": "5.20.0", - "eslint": "8.13.0", + "@typescript-eslint/eslint-plugin": "5.21.0", + "@typescript-eslint/parser": "5.21.0", + "eslint": "8.14.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "fflate": "^0.7.3", @@ -9713,14 +9713,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz", - "integrity": "sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.21.0.tgz", + "integrity": "sha512-fTU85q8v5ZLpoZEyn/u1S2qrFOhi33Edo2CZ0+q1gDaWWm0JuPh3bgOyU8lM0edIEYgKLDkPFiZX2MOupgjlyg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/type-utils": "5.20.0", - "@typescript-eslint/utils": "5.20.0", + "@typescript-eslint/scope-manager": "5.21.0", + "@typescript-eslint/type-utils": "5.21.0", + "@typescript-eslint/utils": "5.21.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -9730,52 +9730,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.20.0.tgz", - "integrity": "sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.21.0.tgz", + "integrity": "sha512-8RUwTO77hstXUr3pZoWZbRQUxXcSXafZ8/5gpnQCfXvgmP9gpNlRGlWzvfbEQ14TLjmtU8eGnONkff8U2ui2Eg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/typescript-estree": "5.20.0", + "@typescript-eslint/scope-manager": "5.21.0", + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/typescript-estree": "5.21.0", "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz", - "integrity": "sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.21.0.tgz", + "integrity": "sha512-XTX0g0IhvzcH/e3393SvjRCfYQxgxtYzL3UREteUneo72EFlt7UNoiYnikUtmGVobTbhUDByhJ4xRBNe+34kOQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/visitor-keys": "5.20.0" + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/visitor-keys": "5.21.0" } }, "@typescript-eslint/type-utils": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz", - "integrity": "sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.21.0.tgz", + "integrity": "sha512-MxmLZj0tkGlkcZCSE17ORaHl8Th3JQwBzyXL/uvC6sNmu128LsgjTX0NIzy+wdH2J7Pd02GN8FaoudJntFvSOw==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.20.0", + "@typescript-eslint/utils": "5.21.0", "debug": "^4.3.2", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz", - "integrity": "sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.21.0.tgz", + "integrity": "sha512-XnOOo5Wc2cBlq8Lh5WNvAgHzpjnEzxn4CJBwGkcau7b/tZ556qrWXQz4DJyChYg8JZAD06kczrdgFPpEQZfDsA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz", - "integrity": "sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.21.0.tgz", + "integrity": "sha512-Y8Y2T2FNvm08qlcoSMoNchh9y2Uj3QmjtwNMdRQkcFG7Muz//wfJBGBxh8R7HAGQFpgYpdHqUpEoPQk+q9Kjfg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/visitor-keys": "5.20.0", + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/visitor-keys": "5.21.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -9784,26 +9784,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.20.0.tgz", - "integrity": "sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.21.0.tgz", + "integrity": "sha512-q/emogbND9wry7zxy7VYri+7ydawo2HDZhRZ5k6yggIvXa7PvBbAAZ4PFH/oZLem72ezC4Pr63rJvDK/sTlL8Q==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/typescript-estree": "5.20.0", + "@typescript-eslint/scope-manager": "5.21.0", + "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/typescript-estree": "5.21.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz", - "integrity": "sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.21.0.tgz", + "integrity": "sha512-SX8jNN+iHqAF0riZQMkm7e8+POXa/fXw5cxL+gjpyP+FI+JVNhii53EmQgDAfDcBpFekYSlO0fGytMQwRiMQCA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/types": "5.21.0", "eslint-visitor-keys": "^3.0.0" } }, @@ -10842,12 +10842,12 @@ } }, "eslint": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.13.0.tgz", - "integrity": "sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", + "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.2.1", + "@eslint/eslintrc": "^1.2.2", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index 158c7355..6fc389b5 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -19,9 +19,9 @@ "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.20.0", - "@typescript-eslint/parser": "^5.20.0", - "eslint": "^8.13.0", + "@typescript-eslint/eslint-plugin": "^5.21.0", + "@typescript-eslint/parser": "^5.21.0", + "eslint": "^8.14.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index e1f01778..53e07eb2 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -8,14 +8,14 @@ "test": "jest --detectOpenHandles --forceExit" }, "devDependencies": { - "@rollup/plugin-commonjs": "^21.1.0", + "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-node-resolve": "^13.2.1", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.20.0", - "@typescript-eslint/parser": "5.20.0", - "eslint": "8.13.0", + "@typescript-eslint/eslint-plugin": "5.21.0", + "@typescript-eslint/parser": "5.21.0", + "eslint": "8.14.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^27.5.1", From 3b5e53c79e116edcc82ec1ecd23ea2d071a6a379 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 10 May 2022 10:16:31 +0900 Subject: [PATCH 66/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 10928 +++++++++++++++++++---------------- package.json | 2 +- packages/e2ee/package.json | 12 +- packages/sdk/package.json | 19 +- 4 files changed, 6119 insertions(+), 4842 deletions(-) diff --git a/package-lock.json b/package-lock.json index a3c906f0..fdabb4fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "packages/sdk" ], "devDependencies": { - "npm-check-updates": "^12.5.9", + "npm-check-updates": "^12.5.11", "serve": "^13.0.2", "typedoc": "^0.22.15" } @@ -601,19 +601,19 @@ "dev": true }, "node_modules/@eslint/eslintrc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", - "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.3.tgz", + "integrity": "sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.1", + "espree": "^9.3.2", "globals": "^13.9.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "engines": { @@ -819,375 +819,588 @@ "node": ">=8" } }, - "node_modules/@jest/console": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", - "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", - "dev": true, - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", - "slash": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/core": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", - "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", - "dev": true, - "dependencies": { - "@jest/console": "^27.5.1", - "@jest/reporters": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^27.5.1", - "jest-config": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-resolve-dependencies": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "jest-watcher": "^27.5.1", - "micromatch": "^4.0.4", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, "node_modules/@jest/environment": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", - "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.0.tgz", + "integrity": "sha512-S44WGSxkRngzHslhV6RoAExekfF7Qhwa6R5+IYFa81mpcj0YgdBnRSmvHe3SNwOt64yXaE5GG8Y2xM28ii5ssA==", "dev": true, "dependencies": { - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/fake-timers": "^28.1.0", + "@jest/types": "^28.1.0", "@types/node": "*", - "jest-mock": "^27.5.1" + "jest-mock": "^28.1.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/fake-timers": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", - "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", + "node_modules/@jest/environment/node_modules/@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", - "@sinonjs/fake-timers": "^8.0.1", + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", - "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", - "dev": true, - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/types": "^27.5.1", - "expect": "^27.5.1" + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/reporters": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", - "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", + "node_modules/@jest/environment/node_modules/@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", "dev": true, "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-haste-map": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "slash": "^3.0.0", - "source-map": "^0.6.0", - "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "@types/yargs-parser": "*" } }, - "node_modules/@jest/source-map": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", - "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", + "node_modules/@jest/expect": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.0.tgz", + "integrity": "sha512-be9ETznPLaHOmeJqzYNIXv1ADEzENuQonIoobzThOYPuK/6GhrWNIJDVTgBLCrz3Am73PyEU2urQClZp0hLTtA==", "dev": true, "dependencies": { - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9", - "source-map": "^0.6.0" + "expect": "^28.1.0", + "jest-snapshot": "^28.1.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/test-result": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", - "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", + "node_modules/@jest/expect-utils": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.0.tgz", + "integrity": "sha512-5BrG48dpC0sB80wpeIX5FU6kolDJI4K0n5BM9a5V38MGx0pyRvUBSS0u2aNTdDzmOrCjhOg8pGs6a20ivYkdmw==", "dev": true, "dependencies": { - "@jest/console": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" + "jest-get-type": "^28.0.2" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/test-sequencer": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", - "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", + "node_modules/@jest/expect-utils/node_modules/jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", "dev": true, - "dependencies": { - "@jest/test-result": "^27.5.1", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-runtime": "^27.5.1" - }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/transform": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", - "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", + "node_modules/@jest/expect/node_modules/@jest/transform": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.0.tgz", + "integrity": "sha512-omy2xe5WxlAfqmsTjTPxw+iXRTRnf+NtX0ToG+4S0tABeb4KsKmPUHq5UBuwunHg3tJRwgEQhEp0M/8oiatLEA==", "dev": true, "dependencies": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.5.1", + "@babel/core": "^7.11.6", + "@jest/types": "^28.1.0", + "@jridgewell/trace-mapping": "^0.3.7", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-util": "^27.5.1", + "jest-haste-map": "^28.1.0", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" + "write-file-atomic": "^4.0.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/types": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", - "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "node_modules/@jest/expect/node_modules/@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", "dev": true, "dependencies": { + "@jest/schemas": "^28.0.2", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "@types/yargs": "^16.0.0", + "@types/yargs": "^17.0.8", "chalk": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", - "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "node_modules/@jest/expect/node_modules/@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@jest/expect/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "engines": { - "node": ">=6.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", - "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "node_modules/@jest/expect/node_modules/ci-info": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", "dev": true }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz", - "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==", + "node_modules/@jest/expect/node_modules/diff-sequences": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", + "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/expect": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.0.tgz", + "integrity": "sha512-qFXKl8Pmxk8TBGfaFKRtcQjfXEnKAs+dmlxdwvukJZorwrAabT7M3h8oLOG01I2utEhkmUTi17CHaPBovZsKdw==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jest/expect-utils": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "node_modules/@jest/expect/node_modules/jest-diff": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", + "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", "dev": true, "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "chalk": "^4.0.0", + "diff-sequences": "^28.0.2", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" }, "engines": { - "node": ">= 8" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "node_modules/@jest/expect/node_modules/jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", "dev": true, "engines": { - "node": ">= 8" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/@jest/expect/node_modules/jest-haste-map": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.0.tgz", + "integrity": "sha512-xyZ9sXV8PtKi6NCrJlmq53PyNVHzxmcfXNVvIRHpHmh1j/HChC4pwKgyjj7Z9us19JMw8PpQTJsFWOsIfT93Dw==", "dev": true, "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "@jest/types": "^28.1.0", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.0", + "jest-worker": "^28.1.0", + "micromatch": "^4.0.4", + "walker": "^1.0.7" }, "engines": { - "node": ">= 8" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" } }, - "node_modules/@npmcli/fs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.0.tgz", - "integrity": "sha512-DmfBvNXGaetMxj9LTp8NAN9vEidXURrf5ZTslQzEAi/6GbW+4yjaLFQc6Tue5cpZ9Frlk4OBo/Snf1Bh/S7qTQ==", + "node_modules/@jest/expect/node_modules/jest-matcher-utils": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", + "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", "dev": true, "dependencies": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" + "chalk": "^4.0.0", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@npmcli/git": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.0.tgz", - "integrity": "sha512-xfSBJ+KBMZWWqRHFbEgIaXG/LtELHrQZMJ72Gkb3yWdHysu/7+VGOs8ME0c3td7QNQX57Ggo3kYL6ylcd70/kA==", + "node_modules/@jest/expect/node_modules/jest-regex-util": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/jest-snapshot": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.0.tgz", + "integrity": "sha512-ex49M2ZrZsUyQLpLGxQtDbahvgBjlLPgklkqGM0hq/F7W/f8DyqZxVHjdy19QKBm4O93eDp+H5S23EiTbbUmHw==", "dev": true, "dependencies": { - "@npmcli/promise-spawn": "^1.3.2", - "lru-cache": "^7.3.1", - "mkdirp": "^1.0.4", - "npm-pick-manifest": "^7.0.0", - "proc-log": "^2.0.0", - "promise-inflight": "^1.0.1", - "promise-retry": "^2.0.1", - "semver": "^7.3.5", - "which": "^2.0.2" + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^28.1.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-haste-map": "^28.1.0", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0", + "natural-compare": "^1.4.0", + "pretty-format": "^28.1.0", + "semver": "^7.3.5" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@npmcli/git/node_modules/lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "node_modules/@jest/expect/node_modules/jest-util": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", + "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", "dev": true, + "dependencies": { + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, "engines": { - "node": ">=12" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@npmcli/installed-package-contents": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", - "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", + "node_modules/@jest/expect/node_modules/jest-worker": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.0.tgz", + "integrity": "sha512-ZHwM6mNwaWBR52Snff8ZvsCTqQsvhCxP/bT1I6T6DAnb6ygkshsyLQIMxFwHpYxht0HOoqt23JlC01viI7T03A==", "dev": true, "dependencies": { - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1" - }, - "bin": { - "installed-package-contents": "index.js" + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" }, "engines": { - "node": ">= 10" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@npmcli/move-file": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", - "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "node_modules/@jest/expect/node_modules/pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", "dev": true, "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/expect/node_modules/react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + }, + "node_modules/@jest/expect/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/@jest/expect/node_modules/write-file-atomic": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" + } + }, + "node_modules/@jest/fake-timers": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.0.tgz", + "integrity": "sha512-Xqsf/6VLeAAq78+GNPzI7FZQRf5cCHj1qgQxCjws9n8rKw8r1UYoeaALwBvyuzOkpU3c1I6emeMySPa96rxtIg==", + "dev": true, + "dependencies": { + "@jest/types": "^28.1.0", + "@sinonjs/fake-timers": "^9.1.1", + "@types/node": "*", + "jest-message-util": "^28.1.0", + "jest-mock": "^28.1.0", + "jest-util": "^28.1.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/fake-timers/node_modules/@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "dev": true, + "dependencies": { + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/fake-timers/node_modules/@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@jest/fake-timers/node_modules/ci-info": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "dev": true + }, + "node_modules/@jest/fake-timers/node_modules/jest-util": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", + "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", + "dev": true, + "dependencies": { + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/schemas": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.2.tgz", + "integrity": "sha512-YVDJZjd4izeTDkij00vHHAymNXQ6WWsdChFRK86qck6Jpr3DCL5W3Is3vslviRlP+bLuMYRLbdp98amMvqudhA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.23.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", + "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", + "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.10.tgz", + "integrity": "sha512-Q0YbBd6OTsXm8Y21+YUSDXupHnodNC2M4O18jtd3iwJ3+vMZNdKGols0a9G6JOK0dcJ3IdUUHoh908ZI6qhk8Q==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@npmcli/fs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.0.tgz", + "integrity": "sha512-DmfBvNXGaetMxj9LTp8NAN9vEidXURrf5ZTslQzEAi/6GbW+4yjaLFQc6Tue5cpZ9Frlk4OBo/Snf1Bh/S7qTQ==", + "dev": true, + "dependencies": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/@npmcli/git": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.0.tgz", + "integrity": "sha512-xfSBJ+KBMZWWqRHFbEgIaXG/LtELHrQZMJ72Gkb3yWdHysu/7+VGOs8ME0c3td7QNQX57Ggo3kYL6ylcd70/kA==", + "dev": true, + "dependencies": { + "@npmcli/promise-spawn": "^1.3.2", + "lru-cache": "^7.3.1", + "mkdirp": "^1.0.4", + "npm-pick-manifest": "^7.0.0", + "proc-log": "^2.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^2.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" + } + }, + "node_modules/@npmcli/git/node_modules/lru-cache": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/@npmcli/installed-package-contents": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", + "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", + "dev": true, + "dependencies": { + "npm-bundled": "^1.1.1", + "npm-normalize-package-bin": "^1.0.1" + }, + "bin": { + "installed-package-contents": "index.js" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@npmcli/move-file": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "dev": true, + "dependencies": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "engines": { + "node": ">=10" } }, "node_modules/@npmcli/node-gyp": { @@ -1242,15 +1455,15 @@ } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "13.2.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.2.1.tgz", - "integrity": "sha512-btX7kzGvp1JwShQI9V6IM841YKNPYjKCvUbNrQ2EcVYbULtUd/GH6wZ/qdqH13j9pOHBER+EZXNN2L8RSJhVRA==", + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.3.0.tgz", + "integrity": "sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", "@types/resolve": "1.17.1", - "builtin-modules": "^3.1.0", "deepmerge": "^4.2.2", + "is-builtin-module": "^3.1.0", "is-module": "^1.0.0", "resolve": "^1.19.0" }, @@ -1315,6 +1528,12 @@ "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", "dev": true }, + "node_modules/@sinclair/typebox": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.5.tgz", + "integrity": "sha512-AFBVi/iT4g20DHoujvMH1aEDn8fGJh4xsRGCP6d8RpLPMqsNPvW01Jcn0QysXTsg++/xj25NmJsGyH9xug/wKg==", + "dev": true + }, "node_modules/@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", @@ -1334,9 +1553,9 @@ } }, "node_modules/@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", "dev": true, "dependencies": { "@sinonjs/commons": "^1.7.0" @@ -1456,15 +1675,26 @@ } }, "node_modules/@types/jest": { - "version": "27.4.1", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.1.tgz", - "integrity": "sha512-23iPJADSmicDVrWk+HT58LMJtzLAnB2AgIzplQuq/bSrGaxCrlvRFjGbXmamnnk/mAmCdLStiGqggu28ocUyiw==", + "version": "27.5.0", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.0.tgz", + "integrity": "sha512-9RBFx7r4k+msyj/arpfaa0WOOEcaAZNmN+j80KFbFCoSqCJGHTz7YMAMGQW9Xmqm5w6l5c25vbSjMwlikJi5+g==", "dev": true, "dependencies": { "jest-matcher-utils": "^27.0.0", "pretty-format": "^27.0.0" } }, + "node_modules/@types/jsdom": { + "version": "16.2.14", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-16.2.14.tgz", + "integrity": "sha512-6BAy1xXEmMuHeAJ4Fv4yXKwBDTGTOseExKE3OaHiNycdHdZw59KfYzrt0DkDluvwmik1HRt6QS7bImxUmpSy+w==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/parse5": "*", + "@types/tough-cookie": "*" + } + }, "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -1477,6 +1707,12 @@ "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==", "dev": true }, + "node_modules/@types/parse5": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", + "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==", + "dev": true + }, "node_modules/@types/prettier": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.4.tgz", @@ -1498,11 +1734,19 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, + "node_modules/@types/tough-cookie": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz", + "integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==", + "dev": true + }, "node_modules/@types/yargs": { "version": "16.0.4", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@types/yargs-parser": "*" } @@ -1514,14 +1758,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.21.0.tgz", - "integrity": "sha512-fTU85q8v5ZLpoZEyn/u1S2qrFOhi33Edo2CZ0+q1gDaWWm0JuPh3bgOyU8lM0edIEYgKLDkPFiZX2MOupgjlyg==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.23.0.tgz", + "integrity": "sha512-hEcSmG4XodSLiAp1uxv/OQSGsDY6QN3TcRU32gANp+19wGE1QQZLRS8/GV58VRUoXhnkuJ3ZxNQ3T6Z6zM59DA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.21.0", - "@typescript-eslint/type-utils": "5.21.0", - "@typescript-eslint/utils": "5.21.0", + "@typescript-eslint/scope-manager": "5.23.0", + "@typescript-eslint/type-utils": "5.23.0", + "@typescript-eslint/utils": "5.23.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -1547,14 +1791,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.21.0.tgz", - "integrity": "sha512-8RUwTO77hstXUr3pZoWZbRQUxXcSXafZ8/5gpnQCfXvgmP9gpNlRGlWzvfbEQ14TLjmtU8eGnONkff8U2ui2Eg==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.23.0.tgz", + "integrity": "sha512-V06cYUkqcGqpFjb8ttVgzNF53tgbB/KoQT/iB++DOIExKmzI9vBJKjZKt/6FuV9c+zrDsvJKbJ2DOCYwX91cbw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.21.0", - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/typescript-estree": "5.21.0", + "@typescript-eslint/scope-manager": "5.23.0", + "@typescript-eslint/types": "5.23.0", + "@typescript-eslint/typescript-estree": "5.23.0", "debug": "^4.3.2" }, "engines": { @@ -1574,13 +1818,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.21.0.tgz", - "integrity": "sha512-XTX0g0IhvzcH/e3393SvjRCfYQxgxtYzL3UREteUneo72EFlt7UNoiYnikUtmGVobTbhUDByhJ4xRBNe+34kOQ==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.23.0.tgz", + "integrity": "sha512-EhjaFELQHCRb5wTwlGsNMvzK9b8Oco4aYNleeDlNuL6qXWDF47ch4EhVNPh8Rdhf9tmqbN4sWDk/8g+Z/J8JVw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/visitor-keys": "5.21.0" + "@typescript-eslint/types": "5.23.0", + "@typescript-eslint/visitor-keys": "5.23.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1591,12 +1835,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.21.0.tgz", - "integrity": "sha512-MxmLZj0tkGlkcZCSE17ORaHl8Th3JQwBzyXL/uvC6sNmu128LsgjTX0NIzy+wdH2J7Pd02GN8FaoudJntFvSOw==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.23.0.tgz", + "integrity": "sha512-iuI05JsJl/SUnOTXA9f4oI+/4qS/Zcgk+s2ir+lRmXI+80D8GaGwoUqs4p+X+4AxDolPpEpVUdlEH4ADxFy4gw==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.21.0", + "@typescript-eslint/utils": "5.23.0", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -1617,9 +1861,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.21.0.tgz", - "integrity": "sha512-XnOOo5Wc2cBlq8Lh5WNvAgHzpjnEzxn4CJBwGkcau7b/tZ556qrWXQz4DJyChYg8JZAD06kczrdgFPpEQZfDsA==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.23.0.tgz", + "integrity": "sha512-NfBsV/h4dir/8mJwdZz7JFibaKC3E/QdeMEDJhiAE3/eMkoniZ7MjbEMCGXw6MZnZDMN3G9S0mH/6WUIj91dmw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1630,13 +1874,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.21.0.tgz", - "integrity": "sha512-Y8Y2T2FNvm08qlcoSMoNchh9y2Uj3QmjtwNMdRQkcFG7Muz//wfJBGBxh8R7HAGQFpgYpdHqUpEoPQk+q9Kjfg==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.23.0.tgz", + "integrity": "sha512-xE9e0lrHhI647SlGMl+m+3E3CKPF1wzvvOEWnuE3CCjjT7UiRnDGJxmAcVKJIlFgK6DY9RB98eLr1OPigPEOGg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/visitor-keys": "5.21.0", + "@typescript-eslint/types": "5.23.0", + "@typescript-eslint/visitor-keys": "5.23.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -1657,15 +1901,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.21.0.tgz", - "integrity": "sha512-q/emogbND9wry7zxy7VYri+7ydawo2HDZhRZ5k6yggIvXa7PvBbAAZ4PFH/oZLem72ezC4Pr63rJvDK/sTlL8Q==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.23.0.tgz", + "integrity": "sha512-dbgaKN21drqpkbbedGMNPCtRPZo1IOUr5EI9Jrrh99r5UW5Q0dz46RKXeSBoPV+56R6dFKpbrdhgUNSJsDDRZA==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.21.0", - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/typescript-estree": "5.21.0", + "@typescript-eslint/scope-manager": "5.23.0", + "@typescript-eslint/types": "5.23.0", + "@typescript-eslint/typescript-estree": "5.23.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1681,12 +1925,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.21.0.tgz", - "integrity": "sha512-SX8jNN+iHqAF0riZQMkm7e8+POXa/fXw5cxL+gjpyP+FI+JVNhii53EmQgDAfDcBpFekYSlO0fGytMQwRiMQCA==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.23.0.tgz", + "integrity": "sha512-Vd4mFNchU62sJB8pX19ZSPog05B0Y0CE2UxAZPT5k4iqhRYjPnqyY3woMxCd0++t9OTqkgjST+1ydLBi7e2Fvg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/types": "5.23.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -1704,9 +1948,9 @@ "dev": true }, "node_modules/abab": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", - "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", "dev": true }, "node_modules/abbrev": { @@ -1729,9 +1973,9 @@ } }, "node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1974,28 +2218,6 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, - "node_modules/babel-jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", - "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==", - "dev": true, - "dependencies": { - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^27.5.1", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, "node_modules/babel-plugin-istanbul": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", @@ -2012,25 +2234,10 @@ "node": ">=8" } }, - "node_modules/babel-plugin-jest-hoist": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz", - "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==", - "dev": true, - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", "dev": true, "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", @@ -2050,22 +2257,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/babel-preset-jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", - "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==", - "dev": true, - "dependencies": { - "babel-plugin-jest-hoist": "^27.5.1", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -2658,9 +2849,9 @@ } }, "node_modules/cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", + "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==", "dev": true }, "node_modules/cssstyle": { @@ -2682,17 +2873,30 @@ "dev": true }, "node_modules/data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", + "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", "dev": true, "dependencies": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" + } + }, + "node_modules/data-urls/node_modules/whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "dev": true, + "dependencies": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/debug": { @@ -2833,24 +3037,15 @@ } }, "node_modules/domexception": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", - "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", "dev": true, "dependencies": { - "webidl-conversions": "^5.0.0" + "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/domexception/node_modules/webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "dev": true, - "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/dot-prop": { @@ -2877,18 +3072,6 @@ "integrity": "sha512-Z7Jkc4+ouEg8F6RrrgLOs0kkJjI0cnyFQmnGVpln8pPifuKBNbUr37GMgJsCTSwy6Z9TK7oTwW33Oe+3aERYew==", "dev": true }, - "node_modules/emittery": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", - "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -3048,12 +3231,12 @@ } }, "node_modules/eslint": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", - "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.15.0.tgz", + "integrity": "sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.2.2", + "@eslint/eslintrc": "^1.2.3", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -3064,7 +3247,7 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.1", + "espree": "^9.3.2", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -3080,7 +3263,7 @@ "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", "regexpp": "^3.2.0", @@ -3306,13 +3489,13 @@ } }, "node_modules/espree": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", - "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", + "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", "dev": true, "dependencies": { - "acorn": "^8.7.0", - "acorn-jsx": "^5.3.1", + "acorn": "^8.7.1", + "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -3425,21 +3608,6 @@ "node": ">= 0.8.0" } }, - "node_modules/expect": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", - "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", - "dev": true, - "dependencies": { - "@jest/types": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3584,9 +3752,9 @@ "dev": true }, "node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, "dependencies": { "asynckit": "^0.4.0", @@ -3799,9 +3967,9 @@ } }, "node_modules/globals": { - "version": "13.13.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", - "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", + "version": "13.14.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.14.0.tgz", + "integrity": "sha512-ERO68sOYwm5UuLvSJTY7w7NP2c8S4UcXs3X1GBX8cwOr+ShOcDBbCY5mH4zxz0jsYCdJ8ve8Mv9n2YGJMB1aeg==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -3919,15 +4087,15 @@ } }, "node_modules/html-encoding-sniffer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", - "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", "dev": true, "dependencies": { - "whatwg-encoding": "^1.0.5" + "whatwg-encoding": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/html-escaper": { @@ -3992,7 +4160,6 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, - "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -4145,6 +4312,18 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, + "node_modules/is-builtin-module": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.1.0.tgz", + "integrity": "sha512-OV7JjAgOTfAFJmHZLvpSTb4qi0nIILDV1gWPYDnDJUTNFM5aGlRAhk4QcT8i7TuAleeEV5Fdkqn3t4mS+Q11fg==", + "dev": true, + "dependencies": { + "builtin-modules": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/is-ci": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", @@ -4419,1796 +4598,1693 @@ "node": ">=8" } }, - "node_modules/jest": { + "node_modules/jest-diff": { "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", - "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", + "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", "dev": true, "dependencies": { - "@jest/core": "^27.5.1", - "import-local": "^3.0.2", - "jest-cli": "^27.5.1" - }, - "bin": { - "jest": "bin/jest.js" + "chalk": "^4.0.0", + "diff-sequences": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } } }, - "node_modules/jest-changed-files": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz", - "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==", + "node_modules/jest-environment-jsdom": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.0.tgz", + "integrity": "sha512-8n6P4xiDjNVqTWv6W6vJPuQdLx+ZiA3dbYg7YJ+DPzR+9B61K6pMVJrSs2IxfGRG4J7pyAUA5shQ9G0KEun78w==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", - "execa": "^5.0.0", - "throat": "^6.0.1" + "@jest/environment": "^28.1.0", + "@jest/fake-timers": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/jsdom": "^16.2.4", + "@types/node": "*", + "jest-mock": "^28.1.0", + "jest-util": "^28.1.0", + "jsdom": "^19.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-changed-files/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "node_modules/jest-environment-jsdom/node_modules/@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", "dev": true, "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" }, "engines": { - "node": ">= 8" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-changed-files/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "node_modules/jest-environment-jsdom/node_modules/@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", "dev": true, "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "@types/yargs-parser": "*" + } + }, + "node_modules/jest-environment-jsdom/node_modules/ci-info": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "dev": true + }, + "node_modules/jest-environment-jsdom/node_modules/jest-util": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", + "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", + "dev": true, + "dependencies": { + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-changed-files/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "node_modules/jest-get-type": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", + "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-changed-files/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "node_modules/jest-haste-map": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", + "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@jest/types": "^27.5.1", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^27.5.1", + "jest-serializer": "^27.5.1", + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + }, "engines": { - "node": ">=8" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "optionalDependencies": { + "fsevents": "^2.3.2" } }, - "node_modules/jest-changed-files/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "node_modules/jest-matcher-utils": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", + "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", "dev": true, "dependencies": { - "path-key": "^3.0.0" + "chalk": "^4.0.0", + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" }, "engines": { - "node": ">=8" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-changed-files/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "node_modules/jest-message-util": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.0.tgz", + "integrity": "sha512-RpA8mpaJ/B2HphDMiDlrAZdDytkmwFqgjDZovM21F35lHGeUeCvYmm6W+sbQ0ydaLpg5bFAUuWG1cjqOl8vqrw==", "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^28.1.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-changed-files/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "node_modules/jest-message-util/node_modules/@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", "dev": true, "dependencies": { - "shebang-regex": "^3.0.0" + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-changed-files/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "node_modules/jest-message-util/node_modules/@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/jest-message-util/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-circus": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz", - "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==", + "node_modules/jest-message-util/node_modules/pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", "dev": true, "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "expect": "^27.5.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-cli": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz", - "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==", + "node_modules/jest-message-util/node_modules/react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + }, + "node_modules/jest-mock": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.0.tgz", + "integrity": "sha512-H7BrhggNn77WhdL7O1apG0Q/iwl0Bdd5E1ydhCJzL3oBLh/UYxAwR3EJLsBZ9XA3ZU4PA3UNw4tQjduBTCTmLw==", "dev": true, "dependencies": { - "@jest/core": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "prompts": "^2.0.1", - "yargs": "^16.2.0" - }, - "bin": { - "jest": "bin/jest.js" + "@jest/types": "^28.1.0", + "@types/node": "*" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-config": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz", - "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==", + "node_modules/jest-mock/node_modules/@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", "dev": true, "dependencies": { - "@babel/core": "^7.8.0", - "@jest/test-sequencer": "^27.5.1", - "@jest/types": "^27.5.1", - "babel-jest": "^27.5.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.1", - "graceful-fs": "^4.2.9", - "jest-circus": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-jasmine2": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "ts-node": { - "optional": true - } + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-config/node_modules/ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true - }, - "node_modules/jest-config/node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "node_modules/jest-mock/node_modules/@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "dependencies": { + "@types/yargs-parser": "*" } }, - "node_modules/jest-diff": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", - "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", + "node_modules/jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } } }, - "node_modules/jest-docblock": { + "node_modules/jest-regex-util": { "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz", - "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", + "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", "dev": true, - "dependencies": { - "detect-newline": "^3.0.0" - }, + "optional": true, + "peer": true, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-each": { + "node_modules/jest-resolve": { "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz", - "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", + "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@jest/types": "^27.5.1", "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^27.5.1", + "jest-pnp-resolver": "^1.2.2", "jest-util": "^27.5.1", - "pretty-format": "^27.5.1" + "jest-validate": "^27.5.1", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-environment-jsdom": { + "node_modules/jest-serializer": { "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz", - "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", + "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", "dev": true, + "optional": true, + "peer": true, "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1", - "jsdom": "^16.6.0" + "graceful-fs": "^4.2.9" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-environment-node": { + "node_modules/jest-util": { "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", - "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", + "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", "@jest/types": "^27.5.1", "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-get-type": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", - "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", + "node_modules/jest-util/node_modules/ci-info": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", "dev": true, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } + "optional": true, + "peer": true }, - "node_modules/jest-haste-map": { + "node_modules/jest-validate": { "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", - "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", + "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@jest/types": "^27.5.1", - "@types/graceful-fs": "^4.1.2", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^27.5.1", - "jest-serializer": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "micromatch": "^4.0.4", - "walker": "^1.0.7" + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^27.5.1", + "leven": "^3.1.0", + "pretty-format": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" } }, - "node_modules/jest-jasmine2": { + "node_modules/jest-worker": { "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz", - "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^27.5.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", - "throat": "^6.0.1" + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">= 10.13.0" } }, - "node_modules/jest-leak-detector": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz", - "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==", + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "optional": true, + "peer": true, "dependencies": { - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "has-flag": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/jest-matcher-utils": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", - "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", + "node_modules/jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "argparse": "^2.0.1" }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jest-message-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", - "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", + "node_modules/jsdom": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-19.0.0.tgz", + "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.5.1", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "abab": "^2.0.5", + "acorn": "^8.5.0", + "acorn-globals": "^6.0.0", + "cssom": "^0.5.0", + "cssstyle": "^2.3.0", + "data-urls": "^3.0.1", + "decimal.js": "^10.3.1", + "domexception": "^4.0.0", + "escodegen": "^2.0.0", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^3.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^10.0.0", + "ws": "^8.2.3", + "xml-name-validator": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=12" + }, + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } } }, - "node_modules/jest-mock": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", - "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true, - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*" + "bin": { + "jsesc": "bin/jsesc" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=4" } }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "node_modules/json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-parse-helpfulerror": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", + "integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", "dev": true, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } + "dependencies": { + "jju": "^1.1.0" } }, - "node_modules/jest-regex-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", - "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", "dev": true, + "bin": { + "json5": "lib/cli.js" + }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=6" } }, - "node_modules/jest-resolve": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", - "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", + "node_modules/jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", + "dev": true + }, + "node_modules/jsonlines": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsonlines/-/jsonlines-0.1.1.tgz", + "integrity": "sha1-T80kbcXQ44aRkHxEqwAveC0dlMw=", + "dev": true + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true, + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - }, + "json-buffer": "3.0.0" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=6" } }, - "node_modules/jest-resolve-dependencies": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz", - "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==", + "node_modules/latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-snapshot": "^27.5.1" + "package-json": "^6.3.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=8" } }, - "node_modules/jest-runner": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz", - "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==", + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true, - "dependencies": { - "@jest/console": "^27.5.1", - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-leak-detector": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "source-map-support": "^0.5.6", - "throat": "^6.0.1" - }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=6" } }, - "node_modules/jest-runtime": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz", - "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==", + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/globals": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">= 0.8.0" } }, - "node_modules/jest-runtime/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "node_modules/libnpmconfig": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/libnpmconfig/-/libnpmconfig-1.2.1.tgz", + "integrity": "sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA==", "dev": true, "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" + "figgy-pudding": "^3.5.1", + "find-up": "^3.0.0", + "ini": "^1.3.5" } }, - "node_modules/jest-runtime/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "node_modules/libnpmconfig/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "locate-path": "^3.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "node": ">=6" } }, - "node_modules/jest-runtime/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "node_modules/libnpmconfig/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=6" } }, - "node_modules/jest-runtime/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "node_modules/libnpmconfig/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, "engines": { - "node": ">=8" + "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-runtime/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "node_modules/libnpmconfig/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "dependencies": { - "path-key": "^3.0.0" + "p-limit": "^2.0.0" }, "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/jest-runtime/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "node_modules/libnpmconfig/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/jest-runtime/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, "dependencies": { - "shebang-regex": "^3.0.0" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-runtime/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/jest-serializer": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", - "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", + "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": { - "@types/node": "*", - "graceful-fs": "^4.2.9" + "yallist": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=10" } }, - "node_modules/jest-snapshot": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz", - "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==", + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true + }, + "node_modules/magic-string": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", "dev": true, "dependencies": { - "@babel/core": "^7.7.2", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.0.0", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^27.5.1", - "graceful-fs": "^4.2.9", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", - "natural-compare": "^1.4.0", - "pretty-format": "^27.5.1", - "semver": "^7.3.2" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "sourcemap-codec": "^1.4.8" } }, - "node_modules/jest-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", - "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" + "semver": "^6.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-util/node_modules/ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, - "node_modules/jest-validate": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", - "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", + "node_modules/make-fetch-happen": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.6.tgz", + "integrity": "sha512-4Gfh6lV3TLXmj7qz79hBFuvVqjYSMW6v2+sxtdX4LFQU0rK3V/txRjE0DoZb7X0IF3t9f8NO3CxPSWlvdckhVA==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", - "leven": "^3.1.0", - "pretty-format": "^27.5.1" + "agentkeepalive": "^4.2.1", + "cacache": "^16.0.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.5.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^6.1.1", + "ssri": "^8.0.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/jest-watcher": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz", - "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==", + "node_modules/make-fetch-happen/node_modules/lru-cache": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", "dev": true, - "dependencies": { - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "jest-util": "^27.5.1", - "string-length": "^4.0.1" - }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=12" } }, - "node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" + "tmpl": "1.0.5" } }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/marked": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.12.tgz", + "integrity": "sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==", "dev": true, - "dependencies": { - "has-flag": "^4.0.0" + "bin": { + "marked": "bin/marked.js" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": ">= 12" } }, - "node_modules/jju": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", - "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, "dependencies": { - "argparse": "^2.0.1" + "braces": "^3.0.1", + "picomatch": "^2.2.3" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=8.6" } }, - "node_modules/jsdom": { - "version": "16.7.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", - "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", + "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==", + "dev": true, + "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==", "dev": true, "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", - "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", - "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "canvas": "^2.5.0" + "mime-db": "1.52.0" }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jsdom/node_modules/@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true, "engines": { - "node": ">= 6" + "node": ">= 0.6" } }, - "node_modules/jsdom/node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, "engines": { - "node": ">= 6" + "node": ">=6" } }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, "engines": { "node": ">=4" } }, - "node_modules/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json-parse-helpfulerror": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", - "integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", + "node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "dependencies": { - "jju": "^1.1.0" - } - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", - "dev": true, - "bin": { - "json5": "lib/cli.js" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/jsonc-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", - "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", - "dev": true - }, - "node_modules/jsonlines": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsonlines/-/jsonlines-0.1.1.tgz", - "integrity": "sha1-T80kbcXQ44aRkHxEqwAveC0dlMw=", + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, - "node_modules/jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true, - "engines": [ - "node >= 0.2.0" - ] - }, - "node_modules/keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "node_modules/minipass": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", + "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", "dev": true, "dependencies": { - "json-buffer": "3.0.0" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, + "yallist": "^4.0.0" + }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "node_modules/minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", "dev": true, "dependencies": { - "package-json": "^6.3.0" + "minipass": "^3.0.0" }, "engines": { - "node": ">=8" + "node": ">= 8" } }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "node_modules/minipass-fetch": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.0.3.tgz", + "integrity": "sha512-VA+eiiUtaIvpQJXISwE3OiMvQwAWrgKb97F0aXlCS1Ahikr8fEQq8m3Hf7Kv9KT3nokuHigJKsDMB6atU04olQ==", "dev": true, + "dependencies": { + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, "engines": { - "node": ">=6" + "node": "^12.13.0 || ^14.15.0 || >=16" + }, + "optionalDependencies": { + "encoding": "^0.1.13" } }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", "dev": true, "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" + "minipass": "^3.0.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">= 8" } }, - "node_modules/libnpmconfig": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/libnpmconfig/-/libnpmconfig-1.2.1.tgz", - "integrity": "sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA==", + "node_modules/minipass-json-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", + "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", "dev": true, "dependencies": { - "figgy-pudding": "^3.5.1", - "find-up": "^3.0.0", - "ini": "^1.3.5" + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" } }, - "node_modules/libnpmconfig/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", "dev": true, "dependencies": { - "locate-path": "^3.0.0" + "minipass": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/libnpmconfig/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", "dev": true, "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "minipass": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/libnpmconfig/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "dev": true, "dependencies": { - "p-try": "^2.0.0" + "minipass": "^3.0.0", + "yallist": "^4.0.0" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 8" } }, - "node_modules/libnpmconfig/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, - "dependencies": { - "p-limit": "^2.0.0" + "bin": { + "mkdirp": "bin/cmd.js" }, "engines": { - "node": ">=6" - } - }, - "node_modules/libnpmconfig/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "engines": { - "node": ">=4" + "node": ">=10" } }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "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==", "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 0.6" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "node_modules/node-gyp": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.0.0.tgz", + "integrity": "sha512-Ma6p4s+XCTPxCuAMrOA/IJRmVy16R8Sdhtwl4PrCr7IBlj4cPawF0vg/l7nOT1jPbuNS7lIRJpBSvVsXwEZuzw==", + "dev": true, + "dependencies": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^5.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^12.22 || ^14.13 || >=16" + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", "dev": true }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "node_modules/node-releases": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", + "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==", "dev": true }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "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==", + "node_modules/normalize-package-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.0.tgz", + "integrity": "sha512-m+GL22VXJKkKbw62ZaBBjv8u6IE3UI4Mh5QakIqs3fWiKe0Xyi6L97hakwZK41/LD4R/2ly71Bayx0NLMwLA/g==", "dev": true, "dependencies": { - "yallist": "^4.0.0" + "hosted-git-info": "^5.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/lunr": { - "version": "2.3.9", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", - "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", - "dev": true + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "node_modules/normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm-bundled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", + "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", "dev": true, "dependencies": { - "sourcemap-codec": "^1.4.8" + "npm-normalize-package-bin": "^1.0.1" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/npm-check-updates": { + "version": "12.5.11", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.11.tgz", + "integrity": "sha512-uS3yYYK/F1VvZlJRymuCkq+MY2R7v/WlORo5WPUTYx+1OwkqeDMC/CEEGfCN7ATwT2M+JxVVKk9Gq/TGiZjJOw==", "dev": true, "dependencies": { - "semver": "^6.0.0" + "chalk": "^4.1.2", + "cint": "^8.2.1", + "cli-table": "^0.3.11", + "commander": "^9.1.0", + "fast-memoize": "^2.5.2", + "find-up": "5.0.0", + "fp-and-or": "^0.1.3", + "get-stdin": "^8.0.0", + "globby": "^11.0.4", + "hosted-git-info": "^5.0.0", + "json-parse-helpfulerror": "^1.0.3", + "jsonlines": "^0.1.1", + "libnpmconfig": "^1.2.1", + "lodash": "^4.17.21", + "minimatch": "^5.0.1", + "p-map": "^4.0.0", + "pacote": "^13.0.5", + "parse-github-url": "^1.0.2", + "progress": "^2.0.3", + "prompts": "^2.4.2", + "rc-config-loader": "^4.1.0", + "remote-git-tags": "^3.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "semver-utils": "^1.1.4", + "source-map-support": "^0.5.21", + "spawn-please": "^1.0.0", + "update-notifier": "^5.1.0", + "yaml": "^1.10.2" }, - "engines": { - "node": ">=8" + "bin": { + "ncu": "build/src/bin/cli.js", + "npm-check-updates": "build/src/bin/cli.js" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=12" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "node_modules/npm-install-checks": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-4.0.0.tgz", + "integrity": "sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": ">=10" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "node_modules/npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", "dev": true }, - "node_modules/make-fetch-happen": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.6.tgz", - "integrity": "sha512-4Gfh6lV3TLXmj7qz79hBFuvVqjYSMW6v2+sxtdX4LFQU0rK3V/txRjE0DoZb7X0IF3t9f8NO3CxPSWlvdckhVA==", + "node_modules/npm-package-arg": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.1.tgz", + "integrity": "sha512-Xs9wznfEAmZAR61qsYH3iN24V/qMYYkvAR5CRQNMvC6PjN2fHtO8y9XP/xdp5K+Icx+u1wMBMgWRPCmAEChSog==", "dev": true, "dependencies": { - "agentkeepalive": "^4.2.1", - "cacache": "^16.0.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.5.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.1.1", - "ssri": "^8.0.1" + "hosted-git-info": "^5.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^3.0.0" }, "engines": { "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/make-fetch-happen/node_modules/lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "node_modules/npm-packlist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-4.0.0.tgz", + "integrity": "sha512-gL6XC/iw9YSmqArmZOGSkyy+yIZf2f7uH0p4Vmxef/irn73vd9/rDkCtvm+a9rh/QK2xGYfCAMOghM06ymzC0A==", "dev": true, + "dependencies": { + "glob": "^7.2.0", + "ignore-walk": "^4.0.1", + "npm-bundled": "^1.1.2", + "npm-normalize-package-bin": "^1.0.1" + }, + "bin": { + "npm-packlist": "bin/index.js" + }, "engines": { - "node": ">=12" + "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "node_modules/npm-pick-manifest": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.0.tgz", + "integrity": "sha512-njM1AcdioFaKd0JSGtLO09YA1WRwctjGQJbnHGmKS+u+uwP8oFvtZtOQWPYdxrnY5eJud3wn8OpH4sEIx6+GEQ==", "dev": true, "dependencies": { - "tmpl": "1.0.5" + "npm-install-checks": "^4.0.0", + "npm-normalize-package-bin": "^1.0.1", + "npm-package-arg": "^9.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/marked": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.12.tgz", - "integrity": "sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==", + "node_modules/npm-registry-fetch": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.1.0.tgz", + "integrity": "sha512-TIYL5X8CcwDhbFMXFDShNcpG6OMCYK6VzvSr6MUWP20tCU2DJ4ao2qQg3DT+3Pet8mO6/cgbZpon4LMh3duYLg==", "dev": true, - "bin": { - "marked": "bin/marked.js" + "dependencies": { + "make-fetch-happen": "^10.0.6", + "minipass": "^3.1.6", + "minipass-fetch": "^2.0.3", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^9.0.1", + "proc-log": "^2.0.0" }, "engines": { - "node": ">= 12" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "node_modules/npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, + "dependencies": { + "path-key": "^2.0.0" + }, "engines": { - "node": ">= 8" + "node": ">=4" } }, - "node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "node_modules/npmlog": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.1.tgz", + "integrity": "sha512-BTHDvY6nrRHuRfyjt1MAufLxYdVXZfd099H4+i1f0lPywNQyI4foeNXJRObB/uy+TYqUW0vAD9gbdSOXPst7Eg==", "dev": true, "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.0", + "set-blocking": "^2.0.0" }, "engines": { - "node": ">=8.6" + "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "node_modules/nwsapi": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "dev": true + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", "dev": true, "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" + "wrappy": "1" } }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, "engines": { "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, "engines": { - "node": ">=4" + "node": ">= 0.8.0" } }, - "node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "node_modules/p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, "engines": { - "node": ">=10" + "node": ">=6" } }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, - "node_modules/minipass": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", - "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "minipass": "^3.0.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">= 8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minipass-fetch": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.0.3.tgz", - "integrity": "sha512-VA+eiiUtaIvpQJXISwE3OiMvQwAWrgKb97F0aXlCS1Ahikr8fEQq8m3Hf7Kv9KT3nokuHigJKsDMB6atU04olQ==", + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "dependencies": { - "minipass": "^3.1.6", - "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" + "p-limit": "^3.0.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": ">=10" }, - "optionalDependencies": { - "encoding": "^0.1.13" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, "dependencies": { - "minipass": "^3.0.0" + "aggregate-error": "^3.0.0" }, "engines": { - "node": ">= 8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minipass-json-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", - "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "dependencies": { - "jsonparse": "^1.3.1", - "minipass": "^3.0.0" + "engines": { + "node": ">=6" } }, - "node_modules/minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "node_modules/package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", "dev": true, "dependencies": { - "minipass": "^3.0.0" + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" }, "engines": { "node": ">=8" } }, - "node_modules/minipass-sized": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", - "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "node_modules/package-json/node_modules/registry-auth-token": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", "dev": true, "dependencies": { - "minipass": "^3.0.0" + "rc": "^1.2.8" }, "engines": { - "node": ">=8" + "node": ">=6.0.0" } }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "node_modules/package-json/node_modules/registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", "dev": true, "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" + "rc": "^1.2.8" }, "engines": { - "node": ">= 8" + "node": ">=8" } }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "node_modules/package-json/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "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==", - "dev": true, - "engines": { - "node": ">= 0.6" + "semver": "bin/semver.js" } }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node_modules/node-gyp": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.0.0.tgz", - "integrity": "sha512-Ma6p4s+XCTPxCuAMrOA/IJRmVy16R8Sdhtwl4PrCr7IBlj4cPawF0vg/l7nOT1jPbuNS7lIRJpBSvVsXwEZuzw==", + "node_modules/pacote": { + "version": "13.0.5", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.0.5.tgz", + "integrity": "sha512-6CYfot3/rUAn3qqzF2d/jrrXm5HlBtvaSgfmg0VtOUAdJ8fbSq21BJwftMGArkL71yXHIbUJ7Bt5B04547HELA==", "dev": true, "dependencies": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^10.0.3", - "nopt": "^5.0.0", - "npmlog": "^6.0.0", + "@npmcli/git": "^3.0.0", + "@npmcli/installed-package-contents": "^1.0.7", + "@npmcli/promise-spawn": "^1.2.0", + "@npmcli/run-script": "^3.0.1", + "cacache": "^16.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "infer-owner": "^1.0.4", + "minipass": "^3.1.6", + "mkdirp": "^1.0.4", + "npm-package-arg": "^9.0.0", + "npm-packlist": "^4.0.0", + "npm-pick-manifest": "^7.0.0", + "npm-registry-fetch": "^13.0.1", + "proc-log": "^2.0.0", + "promise-retry": "^2.0.1", + "read-package-json": "^5.0.0", + "read-package-json-fast": "^2.0.3", "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" + "ssri": "^8.0.1", + "tar": "^6.1.11" }, "bin": { - "node-gyp": "bin/node-gyp.js" + "pacote": "lib/bin.js" }, "engines": { - "node": "^12.22 || ^14.13 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", - "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==", - "dev": true - }, - "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" + "callsites": "^3.0.0" }, "engines": { "node": ">=6" } }, - "node_modules/normalize-package-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.0.tgz", - "integrity": "sha512-m+GL22VXJKkKbw62ZaBBjv8u6IE3UI4Mh5QakIqs3fWiKe0Xyi6L97hakwZK41/LD4R/2ly71Bayx0NLMwLA/g==", + "node_modules/parse-github-url": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz", + "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==", "dev": true, - "dependencies": { - "hosted-git-info": "^5.0.0", - "is-core-module": "^2.8.1", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4" + "bin": { + "parse-github-url": "cli.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": ">=0.10.0" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/npm-bundled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", - "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, - "dependencies": { - "npm-normalize-package-bin": "^1.0.1" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/npm-check-updates": { - "version": "12.5.9", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.9.tgz", - "integrity": "sha512-l9iOvD7EsQb96gFJL45V01YG6bP8+dmobYnSguvehPuNwgdWNMrE8RC8bSfURX5iUmX4bkobN4T8XMHXN9GMHA==", + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true, - "dependencies": { - "chalk": "^4.1.2", - "cint": "^8.2.1", - "cli-table": "^0.3.11", - "commander": "^9.1.0", - "fast-memoize": "^2.5.2", - "find-up": "5.0.0", - "fp-and-or": "^0.1.3", - "get-stdin": "^8.0.0", - "globby": "^11.0.4", - "hosted-git-info": "^5.0.0", - "json-parse-helpfulerror": "^1.0.3", - "jsonlines": "^0.1.1", - "libnpmconfig": "^1.2.1", - "lodash": "^4.17.21", - "minimatch": "^5.0.1", - "p-map": "^4.0.0", - "pacote": "^13.0.5", - "parse-github-url": "^1.0.2", - "progress": "^2.0.3", - "prompts": "^2.4.2", - "rc-config-loader": "^4.1.0", - "remote-git-tags": "^3.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "semver-utils": "^1.1.4", - "source-map-support": "^0.5.21", - "spawn-please": "^1.0.0", - "update-notifier": "^5.1.0", - "yaml": "^1.10.2" - }, - "bin": { - "ncu": "build/src/bin/cli.js", - "npm-check-updates": "build/src/bin/cli.js" - }, "engines": { - "node": ">=12" + "node": ">=4" } }, - "node_modules/npm-install-checks": { + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", + "dev": true + }, + "node_modules/path-type": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-4.0.0.tgz", - "integrity": "sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w==", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, - "dependencies": { - "semver": "^7.1.1" - }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", "dev": true }, - "node_modules/npm-package-arg": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.1.tgz", - "integrity": "sha512-Xs9wznfEAmZAR61qsYH3iN24V/qMYYkvAR5CRQNMvC6PjN2fHtO8y9XP/xdp5K+Icx+u1wMBMgWRPCmAEChSog==", + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "dependencies": { - "hosted-git-info": "^5.0.0", - "semver": "^7.3.5", - "validate-npm-package-name": "^3.0.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" - } - }, - "node_modules/npm-packlist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-4.0.0.tgz", - "integrity": "sha512-gL6XC/iw9YSmqArmZOGSkyy+yIZf2f7uH0p4Vmxef/irn73vd9/rDkCtvm+a9rh/QK2xGYfCAMOghM06ymzC0A==", - "dev": true, - "dependencies": { - "glob": "^7.2.0", - "ignore-walk": "^4.0.1", - "npm-bundled": "^1.1.2", - "npm-normalize-package-bin": "^1.0.1" - }, - "bin": { - "npm-packlist": "bin/index.js" + "node": ">=8.6" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/npm-pick-manifest": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.0.tgz", - "integrity": "sha512-njM1AcdioFaKd0JSGtLO09YA1WRwctjGQJbnHGmKS+u+uwP8oFvtZtOQWPYdxrnY5eJud3wn8OpH4sEIx6+GEQ==", + "node_modules/pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", "dev": true, - "dependencies": { - "npm-install-checks": "^4.0.0", - "npm-normalize-package-bin": "^1.0.1", - "npm-package-arg": "^9.0.0", - "semver": "^7.3.5" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": ">= 6" } }, - "node_modules/npm-registry-fetch": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.1.0.tgz", - "integrity": "sha512-TIYL5X8CcwDhbFMXFDShNcpG6OMCYK6VzvSr6MUWP20tCU2DJ4ao2qQg3DT+3Pet8mO6/cgbZpon4LMh3duYLg==", + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "dependencies": { - "make-fetch-happen": "^10.0.6", - "minipass": "^3.1.6", - "minipass-fetch": "^2.0.3", - "minipass-json-stream": "^1.0.1", - "minizlib": "^2.1.2", - "npm-package-arg": "^9.0.1", - "proc-log": "^2.0.0" + "find-up": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=8" } }, - "node_modules/npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "dependencies": { - "path-key": "^2.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/npmlog": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.1.tgz", - "integrity": "sha512-BTHDvY6nrRHuRfyjt1MAufLxYdVXZfd099H4+i1f0lPywNQyI4foeNXJRObB/uy+TYqUW0vAD9gbdSOXPst7Eg==", + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.0", - "set-blocking": "^2.0.0" + "p-locate": "^4.1.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" - } - }, - "node_modules/nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", - "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", - "dev": true - }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "dependencies": { - "wrappy": "1" + "node": ">=8" } }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "dependencies": { - "mimic-fn": "^2.1.0" + "p-try": "^2.0.0" }, "engines": { "node": ">=6" @@ -6217,847 +6293,944 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "p-limit": "^2.2.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">=8" } }, - "node_modules/p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "engines": { - "node": ">=6" + "node": ">= 0.8.0" } }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "node_modules/prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true, "engines": { "node": ">=4" } }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "node_modules/prettier": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", + "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" + "bin": { + "prettier": "bin-prettier.js" }, "engines": { - "node": ">=10" + "node": ">=10.13.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", "dev": true, "dependencies": { - "p-limit": "^3.0.2" + "fast-diff": "^1.1.2" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6.0.0" } }, - "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, "dependencies": { - "aggregate-error": "^3.0.0" + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "node_modules/proc-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.0.tgz", + "integrity": "sha512-I/35MfCX2H8jBUhKN8JB8nmqvQo/nKdrBodBY7L3RhDSPPyvOHwLYNmPuhwuJq7a7C3vgFKWGQM+ecPStcvOHA==", "dev": true, "engines": { - "node": ">=6" + "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, - "dependencies": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, "engines": { - "node": ">=8" + "node": ">=0.4.0" } }, - "node_modules/package-json/node_modules/registry-auth-token": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", - "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", + "node_modules/promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", "dev": true, "dependencies": { - "rc": "^1.2.8" + "err-code": "^2.0.2", + "retry": "^0.12.0" }, "engines": { - "node": ">=6.0.0" + "node": ">=10" } }, - "node_modules/package-json/node_modules/registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, "dependencies": { - "rc": "^1.2.8" + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "node_modules/pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "dependencies": { + "escape-goat": "^2.0.0" }, "engines": { "node": ">=8" } }, - "node_modules/package-json/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "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/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" } }, - "node_modules/pacote": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.0.5.tgz", - "integrity": "sha512-6CYfot3/rUAn3qqzF2d/jrrXm5HlBtvaSgfmg0VtOUAdJ8fbSq21BJwftMGArkL71yXHIbUJ7Bt5B04547HELA==", + "node_modules/range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "dependencies": { - "@npmcli/git": "^3.0.0", - "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/promise-spawn": "^1.2.0", - "@npmcli/run-script": "^3.0.1", - "cacache": "^16.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "infer-owner": "^1.0.4", - "minipass": "^3.1.6", - "mkdirp": "^1.0.4", - "npm-package-arg": "^9.0.0", - "npm-packlist": "^4.0.0", - "npm-pick-manifest": "^7.0.0", - "npm-registry-fetch": "^13.0.1", - "proc-log": "^2.0.0", - "promise-retry": "^2.0.1", - "read-package-json": "^5.0.0", - "read-package-json-fast": "^2.0.3", - "rimraf": "^3.0.2", - "ssri": "^8.0.1", - "tar": "^6.1.11" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, "bin": { - "pacote": "lib/bin.js" + "rc": "cli.js" + } + }, + "node_modules/rc-config-loader": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.0.tgz", + "integrity": "sha512-aW+kX4qy0CiM9L4fG4Us3oEOpIrOrXzWykAn+xldD07Y9PXWjTH744oHbv0Kc9ZwWaylw3jMjxaf14RgStrNrA==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "js-yaml": "^4.0.0", + "json5": "^2.1.2", + "require-from-string": "^2.0.2" + } + }, + "node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + }, + "node_modules/read-package-json": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.0.tgz", + "integrity": "sha512-1cjk2MV5ONDMn34uxSID3X8NY7VKsXfJnjbcVdFMvHEnJOBzU6MJ7/3yg6QFVZDq5/1yFNrKBUK9kGnonyGP2Q==", + "dev": true, + "dependencies": { + "glob": "^7.2.0", + "json-parse-even-better-errors": "^2.3.1", + "normalize-package-data": "^4.0.0", + "npm-normalize-package-bin": "^1.0.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "node_modules/read-package-json-fast": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", + "integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==", "dev": true, "dependencies": { - "callsites": "^3.0.0" + "json-parse-even-better-errors": "^2.3.0", + "npm-normalize-package-bin": "^1.0.1" }, "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/parse-github-url": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz", - "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==", + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, - "bin": { - "parse-github-url": "cli.js" + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">= 6" } }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, "engines": { "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "node_modules/registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "node_modules/registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, + "dependencies": { + "rc": "^1.0.1" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true + "node_modules/remote-git-tags": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remote-git-tags/-/remote-git-tags-3.0.0.tgz", + "integrity": "sha512-C9hAO4eoEsX+OXA4rla66pXZQ+TLQ8T9dttgQj18yuKlPMTVkIkdYXvlMC55IuUsIkV6DpmQYi10JKFLaU+l7w==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-to-regexp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", - "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", - "dev": true - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "node_modules/resolve": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "dev": true, - "engines": { - "node": ">=8.6" + "dependencies": { + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", - "dev": true, - "engines": { - "node": ">= 6" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, "dependencies": { - "find-up": "^4.0.0" + "resolve-from": "^5.0.0" }, "engines": { "node": ">=8" } }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, "engines": { "node": ">=8" } }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/resolve.exports": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", + "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=10" } }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "node_modules/responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" + "lowercase-keys": "^1.0.0" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", "dev": true, "engines": { - "node": ">= 0.8.0" + "node": ">= 4" } }, - "node_modules/prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, "engines": { - "node": ">=4" + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, - "node_modules/prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, - "bin": { - "prettier": "bin-prettier.js" + "dependencies": { + "glob": "^7.1.3" }, - "engines": { - "node": ">=10.13.0" + "bin": { + "rimraf": "bin.js" }, "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "node_modules/rollup": { + "version": "2.72.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.72.1.tgz", + "integrity": "sha512-NTc5UGy/NWFGpSqF1lFY8z9Adri6uhyMLI6LvPAXdBKoPRFhIIiBUpt+Qg2awixqO3xvzSijjhnb4+QEZwJmxA==", "dev": true, - "dependencies": { - "fast-diff": "^1.1.2" + "bin": { + "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=6.0.0" + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "node_modules/rollup-plugin-terser": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "peerDependencies": { + "rollup": "^2.0.0" } }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/rollup-plugin-terser/node_modules/jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/proc-log": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.0.tgz", - "integrity": "sha512-I/35MfCX2H8jBUhKN8JB8nmqvQo/nKdrBodBY7L3RhDSPPyvOHwLYNmPuhwuJq7a7C3vgFKWGQM+ecPStcvOHA==", - "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": ">= 10.13.0" } }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, - "engines": { - "node": ">=0.4.0" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" } }, - "node_modules/promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "node_modules/promise-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", - "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", - "dev": true, - "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" - }, - "engines": { - "node": ">=10" - } + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "node_modules/saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", "dev": true, "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" + "xmlchars": "^2.2.0" }, "engines": { - "node": ">= 6" + "node": ">=10" } }, - "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "node_modules/pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "node_modules/semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", "dev": true, "dependencies": { - "escape-goat": "^2.0.0" + "semver": "^6.3.0" }, "engines": { "node": ">=8" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "node_modules/semver-diff/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "node_modules/semver-utils": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/semver-utils/-/semver-utils-1.1.4.tgz", + "integrity": "sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA==", + "dev": true + }, + "node_modules/serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", "dev": true, - "engines": { - "node": ">= 0.6" + "dependencies": { + "randombytes": "^2.1.0" } }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "node_modules/serve": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/serve/-/serve-13.0.2.tgz", + "integrity": "sha512-71R6fKvNgKrqARAag6lYJNnxDzpH7DCNrMuvPY5PLVaC2PDhJsGTj/34o4o4tPWhTuLgEXqvgnAWbATQ9zGZTQ==", "dev": true, "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "@zeit/schemas": "2.6.0", + "ajv": "6.12.6", + "arg": "2.0.0", + "boxen": "5.1.2", + "chalk": "2.4.1", + "clipboardy": "2.3.0", + "compression": "1.7.3", + "serve-handler": "6.1.3", + "update-check": "1.5.2" }, "bin": { - "rc": "cli.js" + "serve": "bin/serve.js" } }, - "node_modules/rc-config-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.0.tgz", - "integrity": "sha512-aW+kX4qy0CiM9L4fG4Us3oEOpIrOrXzWykAn+xldD07Y9PXWjTH744oHbv0Kc9ZwWaylw3jMjxaf14RgStrNrA==", + "node_modules/serve-handler": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", + "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", "dev": true, "dependencies": { - "debug": "^4.1.1", - "js-yaml": "^4.0.0", - "json5": "^2.1.2", - "require-from-string": "^2.0.2" + "bytes": "3.0.0", + "content-disposition": "0.5.2", + "fast-url-parser": "1.1.3", + "mime-types": "2.1.18", + "minimatch": "3.0.4", + "path-is-inside": "1.0.2", + "path-to-regexp": "2.2.1", + "range-parser": "1.2.0" } }, - "node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true - }, - "node_modules/read-package-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.0.tgz", - "integrity": "sha512-1cjk2MV5ONDMn34uxSID3X8NY7VKsXfJnjbcVdFMvHEnJOBzU6MJ7/3yg6QFVZDq5/1yFNrKBUK9kGnonyGP2Q==", + "node_modules/serve-handler/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "glob": "^7.2.0", - "json-parse-even-better-errors": "^2.3.1", - "normalize-package-data": "^4.0.0", - "npm-normalize-package-bin": "^1.0.1" - }, + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/serve-handler/node_modules/mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": ">= 0.6" } }, - "node_modules/read-package-json-fast": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", - "integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==", + "node_modules/serve-handler/node_modules/mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "dev": true, "dependencies": { - "json-parse-even-better-errors": "^2.3.0", - "npm-normalize-package-bin": "^1.0.1" + "mime-db": "~1.33.0" }, "engines": { - "node": ">=10" + "node": ">= 0.6" } }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "node_modules/serve-handler/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">= 6" + "node": "*" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "node_modules/serve/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "color-convert": "^1.9.0" }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" + "engines": { + "node": ">=4" } }, - "node_modules/registry-auth-token": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", - "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", + "node_modules/serve/node_modules/chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "dependencies": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" } }, - "node_modules/registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "node_modules/serve/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "dependencies": { - "rc": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" + "color-name": "1.1.3" } }, - "node_modules/remote-git-tags": { + "node_modules/serve/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/serve/node_modules/has-flag": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remote-git-tags/-/remote-git-tags-3.0.0.tgz", - "integrity": "sha512-C9hAO4eoEsX+OXA4rla66pXZQ+TLQ8T9dttgQj18yuKlPMTVkIkdYXvlMC55IuUsIkV6DpmQYi10JKFLaU+l7w==", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "node_modules/serve/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "node_modules/shiki": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", + "integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", "dev": true, "dependencies": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "jsonc-parser": "^3.0.0", + "vscode-oniguruma": "^1.6.1", + "vscode-textmate": "5.2.0" } }, - "node_modules/resolve-cwd": { + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, "engines": { "node": ">=8" } }, - "node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true, "engines": { - "node": ">=8" + "node": ">= 6.0.0", + "npm": ">= 3.0.0" } }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "node_modules/socks": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", + "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", "dev": true, + "dependencies": { + "ip": "^1.1.5", + "smart-buffer": "^4.2.0" + }, "engines": { - "node": ">=4" + "node": ">= 10.13.0", + "npm": ">= 3.0.0" } }, - "node_modules/resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "node_modules/socks-proxy-agent": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz", + "integrity": "sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==", "dev": true, + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.1", + "socks": "^2.6.1" + }, "engines": { - "node": ">=10" + "node": ">= 10" } }, - "node_modules/responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "dependencies": { - "lowercase-keys": "^1.0.0" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, - "engines": { - "node": ">= 4" + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true + }, + "node_modules/spawn-please": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-1.0.0.tgz", + "integrity": "sha512-Kz33ip6NRNKuyTRo3aDWyWxeGeM0ORDO552Fs6E1nj4pLWPkl37SrRtTnq+MEopVaqgmaO6bAvVS+v64BJ5M/A==", "dev": true, "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "dev": true, "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, - "node_modules/rollup": { - "version": "2.70.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.2.tgz", - "integrity": "sha512-EitogNZnfku65I1DD5Mxe8JYRUCy0hkK5X84IlDtUs+O6JRMpRciXTzyCUuX11b5L5pvjH+OmFXiQ3XjabcXgg==", + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=10.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, - "node_modules/rollup-plugin-terser": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", - "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "node_modules/spdx-license-ids": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", + "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/ssri": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.10.4", - "jest-worker": "^26.2.1", - "serialize-javascript": "^4.0.0", - "terser": "^5.0.0" + "minipass": "^3.1.1" }, - "peerDependencies": { - "rollup": "^2.0.0" + "engines": { + "node": ">= 8" } }, - "node_modules/rollup-plugin-terser/node_modules/jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "node_modules/stack-utils": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", + "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", "dev": true, "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" + "escape-string-regexp": "^2.0.0" }, "engines": { - "node": ">= 10.13.0" + "node": ">=10" } }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string_decoder/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==", "dev": true, "funding": [ { @@ -7072,2493 +7245,4003 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + ] }, - "node_modules/saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, "dependencies": { - "xmlchars": "^2.2.0" + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" }, "engines": { "node": ">=10" } }, - "node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "semver": "^6.3.0" + "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, - "node_modules/semver-diff/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/semver-utils": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/semver-utils/-/semver-utils-1.1.4.tgz", - "integrity": "sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA==", - "dev": true - }, - "node_modules/serialize-javascript": { + "node_modules/strip-bom": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, - "dependencies": { - "randombytes": "^2.1.0" + "engines": { + "node": ">=8" } }, - "node_modules/serve": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/serve/-/serve-13.0.2.tgz", - "integrity": "sha512-71R6fKvNgKrqARAag6lYJNnxDzpH7DCNrMuvPY5PLVaC2PDhJsGTj/34o4o4tPWhTuLgEXqvgnAWbATQ9zGZTQ==", + "node_modules/strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true, - "dependencies": { - "@zeit/schemas": "2.6.0", - "ajv": "6.12.6", - "arg": "2.0.0", - "boxen": "5.1.2", - "chalk": "2.4.1", - "clipboardy": "2.3.0", - "compression": "1.7.3", - "serve-handler": "6.1.3", - "update-check": "1.5.2" - }, - "bin": { - "serve": "bin/serve.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/serve-handler": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", - "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, - "dependencies": { - "bytes": "3.0.0", - "content-disposition": "0.5.2", - "fast-url-parser": "1.1.3", - "mime-types": "2.1.18", - "minimatch": "3.0.4", - "path-is-inside": "1.0.2", - "path-to-regexp": "2.2.1", - "range-parser": "1.2.0" + "engines": { + "node": ">=6" } }, - "node_modules/serve-handler/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/serve-handler/node_modules/mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, "engines": { - "node": ">= 0.6" + "node": ">=8" } }, - "node_modules/serve-handler/node_modules/mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "node_modules/supports-hyperlinks": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", "dev": true, "dependencies": { - "mime-db": "~1.33.0" + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" }, "engines": { - "node": ">= 0.6" + "node": ">=8" } }, - "node_modules/serve-handler/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, "engines": { - "node": "*" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/serve/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, + "node_modules/tar": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", + "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", "dev": true, "dependencies": { - "color-convert": "^1.9.0" + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">= 10" } }, - "node_modules/serve/node_modules/chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "node_modules/terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/serve/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/terser": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.12.1.tgz", + "integrity": "sha512-NXbs+7nisos5E+yXwAD+y7zrcTkMqb0dEJxIGtSKPdCBzopf7ni4odPul2aechpV7EXNvOudYOX2bb5tln1jbQ==", "dev": true, "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/serve/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "node_modules/serve/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "node_modules/terser/node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">= 8" } }, - "node_modules/serve/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">=0.10.0" + "node": "*" } }, - "node_modules/shiki": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", - "integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", - "dev": true, - "dependencies": { - "jsonc-parser": "^3.0.0", - "vscode-oniguruma": "^1.6.1", - "vscode-textmate": "5.2.0" - } + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "node_modules/throat": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", + "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", "dev": true }, - "node_modules/sisteransi": { + "node_modules/tmpl": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "node_modules/to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", "dev": true, "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" + "node": ">=6" } }, - "node_modules/socks": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", - "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "dependencies": { - "ip": "^1.1.5", - "smart-buffer": "^4.2.0" + "is-number": "^7.0.0" }, "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" + "node": ">=8.0" } }, - "node_modules/socks-proxy-agent": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz", - "integrity": "sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==", + "node_modules/tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", "dev": true, "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.1", - "socks": "^2.6.1" + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" }, "engines": { - "node": ">= 10" + "node": ">=6" } }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/tough-cookie/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "node_modules/tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", "dev": true, "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=12" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, - "node_modules/spawn-please": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-1.0.0.tgz", - "integrity": "sha512-Kz33ip6NRNKuyTRo3aDWyWxeGeM0ORDO552Fs6E1nj4pLWPkl37SrRtTnq+MEopVaqgmaO6bAvVS+v64BJ5M/A==", + "node_modules/tr46/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, "engines": { - "node": ">=10" + "node": ">=6" } }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true + "peer": true }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, - "node_modules/spdx-license-ids": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", - "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", - "dev": true - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "node_modules/ssri": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", - "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "dependencies": { - "minipass": "^3.1.1" + "prelude-ls": "^1.2.1" }, "engines": { - "node": ">= 8" + "node": ">= 0.8.0" } }, - "node_modules/stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, "engines": { - "node": ">=10" + "node": ">=4" } }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, "dependencies": { - "safe-buffer": "~5.2.0" + "is-typedarray": "^1.0.0" } }, - "node_modules/string_decoder/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==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "node_modules/typedoc": { + "version": "0.22.15", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.15.tgz", + "integrity": "sha512-CMd1lrqQbFvbx6S9G6fL4HKp3GoIuhujJReWqlIvSb2T26vGai+8Os3Mde7Pn832pXYemd9BMuuYWhFpL5st0Q==", "dev": true, "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" + "glob": "^7.2.0", + "lunr": "^2.3.9", + "marked": "^4.0.12", + "minimatch": "^5.0.1", + "shiki": "^0.10.1" }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "bin": { + "typedoc": "bin/typedoc" }, "engines": { - "node": ">=8" + "node": ">= 12.10.0" + }, + "peerDependencies": { + "typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x || 4.6.x" } }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/typescript": { + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", + "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=8" + "node": ">=4.2.0" } }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "node_modules/unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "unique-slug": "^2.0.0" } }, - "node_modules/strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "node_modules/unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "imurmurhash": "^0.1.4" } }, - "node_modules/strip-final-newline": { + "node_modules/unique-string": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", "dev": true, + "dependencies": { + "crypto-random-string": "^2.0.0" + }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">= 4.0.0" } }, - "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==", + "node_modules/update-check": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.2.tgz", + "integrity": "sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0" } }, - "node_modules/supports-hyperlinks": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", - "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", + "node_modules/update-notifier": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", "dev": true, "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" + "boxen": "^5.0.0", + "chalk": "^4.1.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.4.0", + "is-npm": "^5.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.1.0", + "pupa": "^2.1.1", + "semver": "^7.3.4", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/yeoman/update-notifier?sponsor=1" } }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true - }, - "node_modules/tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 10" + "punycode": "^2.1.0" } }, - "node_modules/terminal-link": { + "node_modules/uri-js/node_modules/punycode": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, - "node_modules/terser": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.12.1.tgz", - "integrity": "sha512-NXbs+7nisos5E+yXwAD+y7zrcTkMqb0dEJxIGtSKPdCBzopf7ni4odPul2aechpV7EXNvOudYOX2bb5tln1jbQ==", + "node_modules/url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "dependencies": { - "acorn": "^8.5.0", - "commander": "^2.20.0", - "source-map": "~0.7.2", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" + "prepend-http": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=4" } }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, - "node_modules/terser/node_modules/source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true, - "engines": { - "node": ">= 8" - } + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/validate-npm-package-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", "dev": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "builtins": "^1.0.3" } }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, "engines": { - "node": "*" + "node": ">= 0.8" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "node_modules/throat": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", - "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", + "node_modules/vscode-oniguruma": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", + "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", "dev": true }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "node_modules/vscode-textmate": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", + "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", "dev": true }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "node_modules/w3c-hr-time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", "dev": true, - "engines": { - "node": ">=6" + "dependencies": { + "browser-process-hrtime": "^1.0.0" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "node_modules/w3c-xmlserializer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz", + "integrity": "sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==", "dev": true, "dependencies": { - "is-number": "^7.0.0" + "xml-name-validator": "^4.0.0" }, "engines": { - "node": ">=8.0" + "node": ">=12" } }, - "node_modules/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.1.2" - }, - "engines": { - "node": ">=6" + "makeerror": "1.0.12" } }, - "node_modules/tough-cookie/node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "dev": true, "engines": { - "node": ">=6" + "node": ">=12" } }, - "node_modules/tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "node_modules/whatwg-encoding": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", "dev": true, "dependencies": { - "punycode": "^2.1.1" + "iconv-lite": "0.6.3" }, "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/tr46/node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "node_modules/whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", "dev": true, "engines": { - "node": ">=6" + "node": ">=12" } }, - "node_modules/ts-jest": { - "version": "27.1.4", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.4.tgz", - "integrity": "sha512-qjkZlVPWVctAezwsOD1OPzbZ+k7zA5z3oxII4dGdZo5ggX/PL7kvwTM0pXTr10fAtbiVpJaL3bWd502zAhpgSQ==", + "node_modules/whatwg-url": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-10.0.0.tgz", + "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==", "dev": true, "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^27.0.0", - "json5": "2.x", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "20.x" - }, - "bin": { - "ts-jest": "cli.js" + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@types/jest": "^27.0.0", - "babel-jest": ">=27.0.0 <28", - "jest": "^27.0.0", - "typescript": ">=3.8 <5.0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@types/jest": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - } + "node": ">=12" } }, - "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true, - "peer": true - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "dependencies": { - "tslib": "^1.8.1" + "isexe": "^2.0.0" }, - "engines": { - "node": ">= 6" + "bin": { + "node-which": "bin/node-which" }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + "engines": { + "node": ">= 8" } }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "dev": true, "dependencies": { - "prelude-ls": "^1.2.1" + "string-width": "^4.0.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">=8" } }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "dependencies": { - "is-typedarray": "^1.0.0" + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" } }, - "node_modules/typedoc": { - "version": "0.22.15", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.15.tgz", - "integrity": "sha512-CMd1lrqQbFvbx6S9G6fL4HKp3GoIuhujJReWqlIvSb2T26vGai+8Os3Mde7Pn832pXYemd9BMuuYWhFpL5st0Q==", + "node_modules/ws": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.6.0.tgz", + "integrity": "sha512-AzmM3aH3gk0aX7/rZLYvjdvZooofDu3fFOzGqcSnQ1tOcTWwhM/o+q++E8mAyVVIyUdajrkzWUGftaVSDLn1bw==", "dev": true, - "dependencies": { - "glob": "^7.2.0", - "lunr": "^2.3.9", - "marked": "^4.0.12", - "minimatch": "^5.0.1", - "shiki": "^0.10.1" - }, - "bin": { - "typedoc": "bin/typedoc" - }, "engines": { - "node": ">= 12.10.0" + "node": ">=10.0.0" }, "peerDependencies": { - "typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x || 4.6.x" + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, - "node_modules/typescript": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", - "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", + "node_modules/xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, "engines": { - "node": ">=4.2.0" + "node": ">=8" } }, - "node_modules/unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "node_modules/xml-name-validator": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", "dev": true, - "dependencies": { - "unique-slug": "^2.0.0" + "engines": { + "node": ">=12" } }, - "node_modules/unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4" - } + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true }, - "node_modules/unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "dependencies": { - "crypto-random-string": "^2.0.0" - }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "node_modules/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/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true, "engines": { - "node": ">= 4.0.0" + "node": ">= 6" } }, - "node_modules/update-check": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.2.tgz", - "integrity": "sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ==", + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, - "dependencies": { - "registry-auth-token": "3.3.2", - "registry-url": "3.1.0" + "engines": { + "node": ">=10" } }, - "node_modules/update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "dependencies": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/yeoman/update-notifier?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, + "packages/e2ee": { + "name": "@sora/e2ee", + "version": "2021.1.0", + "license": "Apache-2.0", "dependencies": { - "punycode": "^2.1.0" + "@sora/go-wasm": "^2021.1.0" + }, + "devDependencies": { + "@rollup/plugin-node-resolve": "^13.3.0", + "@rollup/plugin-replace": "^4.0.0", + "@rollup/plugin-typescript": "^8.3.2", + "@typescript-eslint/eslint-plugin": "^5.23.0", + "@typescript-eslint/parser": "^5.23.0", + "eslint": "^8.15.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.0.0", + "prettier": "^2.6.2", + "rollup": "^2.72.1", + "typescript": "^4.6.4" } }, - "node_modules/uri-js/node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "engines": { - "node": ">=6" - } + "packages/go-wasm": { + "name": "@sora/go-wasm", + "version": "2021.1.0" }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, + "packages/sdk": { + "name": "@sora/sdk", "dependencies": { - "prepend-http": "^2.0.0" + "@sora/e2ee": "^2021.1.0", + "fflate": "^0.7.3" }, - "engines": { - "node": ">=4" + "devDependencies": { + "@rollup/plugin-commonjs": "^22.0.0", + "@rollup/plugin-node-resolve": "^13.3.0", + "@rollup/plugin-replace": "^4.0.0", + "@rollup/plugin-typescript": "^8.3.2", + "@types/jest": "^27.5.0", + "@typescript-eslint/eslint-plugin": "5.23.0", + "@typescript-eslint/parser": "5.23.0", + "eslint": "8.15.0", + "eslint-config-prettier": "8.5.0", + "eslint-plugin-prettier": "4.0.0", + "jest": "^28.1.0", + "jest-environment-jsdom": "^28.1.0", + "prettier": "^2.6.2", + "rollup": "^2.72.1", + "rollup-plugin-terser": "^7.0.2", + "ts-jest": "^28.0.2", + "typescript": "^4.6.4" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "node_modules/v8-to-istanbul": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", - "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", + "packages/sdk/node_modules/@jest/console": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.0.tgz", + "integrity": "sha512-tscn3dlJFGay47kb4qVruQg/XWlmvU0xp3EJOjzzY+sBaI+YgwKcvAmTcyYU7xEiLLIY5HCdWRooAL8dqkFlDA==", "dev": true, "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0", + "slash": "^3.0.0" }, "engines": { - "node": ">=10.12.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/v8-to-istanbul/node_modules/source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "packages/sdk/node_modules/@jest/core": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.0.tgz", + "integrity": "sha512-/2PTt0ywhjZ4NwNO4bUqD9IVJfmFVhVKGlhvSpmEfUCuxYf/3NHcKmRFI+I71lYzbTT3wMuYpETDCTHo81gC/g==", "dev": true, + "dependencies": { + "@jest/console": "^28.1.0", + "@jest/reporters": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^28.0.2", + "jest-config": "^28.1.0", + "jest-haste-map": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.0", + "jest-resolve-dependencies": "^28.1.0", + "jest-runner": "^28.1.0", + "jest-runtime": "^28.1.0", + "jest-snapshot": "^28.1.0", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "jest-watcher": "^28.1.0", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, "engines": { - "node": ">= 8" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "packages/sdk/node_modules/@jest/globals": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.0.tgz", + "integrity": "sha512-3m7sTg52OTQR6dPhsEQSxAvU+LOBbMivZBwOvKEZ+Rb+GyxVnXi9HKgOTYkx/S99T8yvh17U4tNNJPIEQmtwYw==", "dev": true, "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "@jest/environment": "^28.1.0", + "@jest/expect": "^28.1.0", + "@jest/types": "^28.1.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/validate-npm-package-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "packages/sdk/node_modules/@jest/reporters": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.0.tgz", + "integrity": "sha512-qxbFfqap/5QlSpIizH9c/bFCDKsQlM4uAKSOvZrP+nIdrjqre3FmKzpTtYyhsaVcOSNK7TTt2kjm+4BJIjysFA==", "dev": true, "dependencies": { - "builtins": "^1.0.3" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@jridgewell/trace-mapping": "^0.3.7", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-util": "^28.1.0", + "jest-worker": "^28.1.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^9.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "packages/sdk/node_modules/@jest/source-map": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.0.2.tgz", + "integrity": "sha512-Y9dxC8ZpN3kImkk0LkK5XCEneYMAXlZ8m5bflmSL5vrwyeUpJfentacCUg6fOb8NOpOO7hz2+l37MV77T6BFPw==", "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.7", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, "engines": { - "node": ">= 0.8" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/vscode-oniguruma": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", - "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", - "dev": true + "packages/sdk/node_modules/@jest/test-result": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.0.tgz", + "integrity": "sha512-sBBFIyoPzrZho3N+80P35A5oAkSKlGfsEFfXFWuPGBsW40UAjCkGakZhn4UQK4iQlW2vgCDMRDOob9FGKV8YoQ==", + "dev": true, + "dependencies": { + "@jest/console": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } }, - "node_modules/vscode-textmate": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", - "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", - "dev": true + "packages/sdk/node_modules/@jest/test-sequencer": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.0.tgz", + "integrity": "sha512-tZCEiVWlWNTs/2iK9yi6o3AlMfbbYgV4uuZInSVdzZ7ftpHZhCMuhvk2HLYhCZzLgPFQ9MnM1YaxMnh3TILFiQ==", + "dev": true, + "dependencies": { + "@jest/test-result": "^28.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } }, - "node_modules/w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", - "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "packages/sdk/node_modules/@jest/transform": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.0.tgz", + "integrity": "sha512-omy2xe5WxlAfqmsTjTPxw+iXRTRnf+NtX0ToG+4S0tABeb4KsKmPUHq5UBuwunHg3tJRwgEQhEp0M/8oiatLEA==", "dev": true, "dependencies": { - "browser-process-hrtime": "^1.0.0" + "@babel/core": "^7.11.6", + "@jest/types": "^28.1.0", + "@jridgewell/trace-mapping": "^0.3.7", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/w3c-xmlserializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", - "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "packages/sdk/node_modules/@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", "dev": true, "dependencies": { - "xml-name-validator": "^3.0.0" + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "packages/sdk/node_modules/@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", "dev": true, "dependencies": { - "makeerror": "1.0.12" + "@types/yargs-parser": "*" } }, - "node_modules/webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "packages/sdk/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "engines": { - "node": ">=10.4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "packages/sdk/node_modules/babel-jest": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.0.tgz", + "integrity": "sha512-zNKk0yhDZ6QUwfxh9k07GII6siNGMJWVUU49gmFj5gfdqDKLqa2RArXOF2CODp4Dr7dLxN2cvAV+667dGJ4b4w==", "dev": true, "dependencies": { - "iconv-lite": "0.4.24" + "@jest/transform": "^28.1.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^28.0.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" } }, - "node_modules/whatwg-encoding/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==", + "packages/sdk/node_modules/babel-plugin-jest-hoist": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.0.2.tgz", + "integrity": "sha512-Kizhn/ZL+68ZQHxSnHyuvJv8IchXD62KQxV77TBDV/xoBFBOfgRAk97GNs6hXdTTCiVES9nB2I6+7MXXrk5llQ==", "dev": true, "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" }, "engines": { - "node": ">=0.10.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true - }, - "node_modules/whatwg-url": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", - "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "packages/sdk/node_modules/babel-preset-jest": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.0.2.tgz", + "integrity": "sha512-sYzXIdgIXXroJTFeB3S6sNDWtlJ2dllCdTEsnZ65ACrMojj3hVNFRmnJ1HZtomGi+Be7aqpY/HJ92fr8OhKVkQ==", "dev": true, "dependencies": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" + "babel-plugin-jest-hoist": "^28.0.2", + "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "packages/sdk/node_modules/ci-info": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "dev": true + }, + "packages/sdk/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { "node": ">= 8" } }, - "node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "packages/sdk/node_modules/diff-sequences": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", + "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "packages/sdk/node_modules/emittery": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", + "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", "dev": true, - "dependencies": { - "string-width": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" } }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "packages/sdk/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "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==", + "packages/sdk/node_modules/expect": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.0.tgz", + "integrity": "sha512-qFXKl8Pmxk8TBGfaFKRtcQjfXEnKAs+dmlxdwvukJZorwrAabT7M3h8oLOG01I2utEhkmUTi17CHaPBovZsKdw==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "@jest/expect-utils": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0" }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "packages/sdk/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "packages/sdk/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ws": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", - "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", + "packages/sdk/node_modules/jest": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.0.tgz", + "integrity": "sha512-TZR+tHxopPhzw3c3560IJXZWLNHgpcz1Zh0w5A65vynLGNcg/5pZ+VildAd7+XGOu6jd58XMY/HNn0IkZIXVXg==", "dev": true, + "dependencies": { + "@jest/core": "^28.1.0", + "import-local": "^3.0.2", + "jest-cli": "^28.1.0" + }, + "bin": { + "jest": "bin/jest.js" + }, "engines": { - "node": ">=8.3.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" }, "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" }, "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { + "node-notifier": { "optional": true } } }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "packages/sdk/node_modules/jest-changed-files": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.2.tgz", + "integrity": "sha512-QX9u+5I2s54ZnGoMEjiM2WeBvJR2J7w/8ZUmH2um/WLAuGAYFQcsVXY9+1YL6k0H/AGUdH8pXUAv6erDqEsvIA==", "dev": true, + "dependencies": { + "execa": "^5.0.0", + "throat": "^6.0.1" + }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true - }, - "node_modules/xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "packages/sdk/node_modules/jest-circus": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.0.tgz", + "integrity": "sha512-rNYfqfLC0L0zQKRKsg4n4J+W1A2fbyGH7Ss/kDIocp9KXD9iaL111glsLu7+Z7FHuZxwzInMDXq+N1ZIBkI/TQ==", "dev": true, + "dependencies": { + "@jest/environment": "^28.1.0", + "@jest/expect": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^28.1.0", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-runtime": "^28.1.0", + "jest-snapshot": "^28.1.0", + "jest-util": "^28.1.0", + "pretty-format": "^28.1.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3", + "throat": "^6.0.1" + }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "packages/sdk/node_modules/jest-cli": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.0.tgz", + "integrity": "sha512-fDJRt6WPRriHrBsvvgb93OxgajHHsJbk4jZxiPqmZbMDRcHskfJBBfTyjFko0jjfprP544hOktdSi9HVgl4VUQ==", "dev": true, + "dependencies": { + "@jest/core": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/types": "^28.1.0", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^28.1.0", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, "engines": { - "node": ">= 6" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "packages/sdk/node_modules/jest-config": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.0.tgz", + "integrity": "sha512-aOV80E9LeWrmflp7hfZNn/zGA4QKv/xsn2w8QCBP0t0+YqObuCWTSgNbHJ0j9YsTuCO08ZR/wsvlxqqHX20iUA==", "dev": true, "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^28.1.0", + "@jest/types": "^28.1.0", + "babel-jest": "^28.1.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^28.1.0", + "jest-environment-node": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.0", + "jest-runner": "^28.1.0", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^28.1.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } } }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "packages/sdk/node_modules/jest-diff": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", + "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^28.0.2", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "packages/sdk/node_modules/jest-docblock": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.0.2.tgz", + "integrity": "sha512-FH10WWw5NxLoeSdQlJwu+MTiv60aXV/t8KEwIRGEv74WARE1cXIqh1vGdy2CraHuWOOrnzTWj/azQKqW4fO7xg==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "detect-newline": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "packages/e2ee": { - "name": "@sora/e2ee", - "version": "2021.1.0", - "license": "Apache-2.0", + "packages/sdk/node_modules/jest-each": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.0.tgz", + "integrity": "sha512-a/XX02xF5NTspceMpHujmOexvJ4GftpYXqr6HhhmKmExtMXsyIN/fvanQlt/BcgFoRKN4OCXxLQKth9/n6OPFg==", + "dev": true, "dependencies": { - "@sora/go-wasm": "^2021.1.0" + "@jest/types": "^28.1.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "jest-util": "^28.1.0", + "pretty-format": "^28.1.0" }, - "devDependencies": { - "@rollup/plugin-node-resolve": "^13.2.1", - "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.21.0", - "@typescript-eslint/parser": "^5.21.0", - "eslint": "^8.14.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.6.2", - "rollup": "^2.70.2", - "typescript": "^4.6.3" + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "packages/go-wasm": { - "name": "@sora/go-wasm", - "version": "2021.1.0" - }, - "packages/sdk": { - "name": "@sora/sdk", + "packages/sdk/node_modules/jest-environment-node": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.0.tgz", + "integrity": "sha512-gBLZNiyrPw9CSMlTXF1yJhaBgWDPVvH0Pq6bOEwGMXaYNzhzhw2kA/OijNF8egbCgDS0/veRv97249x2CX+udQ==", + "dev": true, "dependencies": { - "@sora/e2ee": "^2021.1.0", - "fflate": "^0.7.3" + "@jest/environment": "^28.1.0", + "@jest/fake-timers": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "jest-mock": "^28.1.0", + "jest-util": "^28.1.0" }, - "devDependencies": { - "@rollup/plugin-commonjs": "^22.0.0", - "@rollup/plugin-node-resolve": "^13.2.1", - "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", - "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.21.0", - "@typescript-eslint/parser": "5.21.0", - "eslint": "8.14.0", - "eslint-config-prettier": "8.5.0", - "eslint-plugin-prettier": "4.0.0", - "jest": "^27.5.1", - "prettier": "^2.6.2", - "rollup": "^2.70.2", - "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^27.1.4", - "typescript": "^4.6.3" + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } - } - }, - "dependencies": { - "@ampproject/remapping": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", - "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", + }, + "packages/sdk/node_modules/jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.0" + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "packages/sdk/node_modules/jest-haste-map": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.0.tgz", + "integrity": "sha512-xyZ9sXV8PtKi6NCrJlmq53PyNVHzxmcfXNVvIRHpHmh1j/HChC4pwKgyjj7Z9us19JMw8PpQTJsFWOsIfT93Dw==", "dev": true, - "requires": { - "@babel/highlight": "^7.16.7" + "dependencies": { + "@jest/types": "^28.1.0", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.0", + "jest-worker": "^28.1.0", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" } }, - "@babel/compat-data": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", - "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", - "dev": true - }, - "@babel/core": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", - "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", + "packages/sdk/node_modules/jest-leak-detector": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.0.tgz", + "integrity": "sha512-uIJDQbxwEL2AMMs2xjhZl2hw8s77c3wrPaQ9v6tXJLGaaQ+4QrNJH5vuw7hA7w/uGT/iJ42a83opAqxGHeyRIA==", "dev": true, - "requires": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.7", - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.8", - "@babel/parser": "^7.17.8", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0" - }, "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "@babel/generator": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", - "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "packages/sdk/node_modules/jest-matcher-utils": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", + "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", "dev": true, - "requires": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "chalk": "^4.0.0", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "@babel/helper-compilation-targets": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", - "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", + "packages/sdk/node_modules/jest-regex-util": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", "dev": true, - "requires": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-validator-option": "^7.16.7", - "browserslist": "^4.17.5", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "@babel/helper-environment-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", - "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", + "packages/sdk/node_modules/jest-resolve": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.0.tgz", + "integrity": "sha512-vvfN7+tPNnnhDvISuzD1P+CRVP8cK0FHXRwPAcdDaQv4zgvwvag2n55/h5VjYcM5UJG7L4TwE5tZlzcI0X2Lhw==", "dev": true, - "requires": { - "@babel/types": "^7.16.7" + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "@babel/helper-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", - "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", + "packages/sdk/node_modules/jest-resolve-dependencies": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.0.tgz", + "integrity": "sha512-Ue1VYoSZquPwEvng7Uefw8RmZR+me/1kr30H2jMINjGeHgeO/JgrR6wxj2ofkJ7KSAA11W3cOrhNCbj5Dqqd9g==", "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/types": "^7.16.7" + "dependencies": { + "jest-regex-util": "^28.0.2", + "jest-snapshot": "^28.1.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "@babel/helper-get-function-arity": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", - "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", + "packages/sdk/node_modules/jest-runner": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.0.tgz", + "integrity": "sha512-FBpmuh1HB2dsLklAlRdOxNTTHKFR6G1Qmd80pVDvwbZXTriqjWqjei5DKFC1UlM732KjYcE6yuCdiF0WUCOS2w==", "dev": true, - "requires": { - "@babel/types": "^7.16.7" + "dependencies": { + "@jest/console": "^28.1.0", + "@jest/environment": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "graceful-fs": "^4.2.9", + "jest-docblock": "^28.0.2", + "jest-environment-node": "^28.1.0", + "jest-haste-map": "^28.1.0", + "jest-leak-detector": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-resolve": "^28.1.0", + "jest-runtime": "^28.1.0", + "jest-util": "^28.1.0", + "jest-watcher": "^28.1.0", + "jest-worker": "^28.1.0", + "source-map-support": "0.5.13", + "throat": "^6.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "packages/sdk/node_modules/jest-runtime": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.0.tgz", + "integrity": "sha512-wNYDiwhdH/TV3agaIyVF0lsJ33MhyujOe+lNTUiolqKt8pchy1Hq4+tDMGbtD5P/oNLA3zYrpx73T9dMTOCAcg==", "dev": true, - "requires": { - "@babel/types": "^7.16.7" + "dependencies": { + "@jest/environment": "^28.1.0", + "@jest/fake-timers": "^28.1.0", + "@jest/globals": "^28.1.0", + "@jest/source-map": "^28.0.2", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "execa": "^5.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-mock": "^28.1.0", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.0", + "jest-snapshot": "^28.1.0", + "jest-util": "^28.1.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "@babel/helper-module-imports": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", - "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", + "packages/sdk/node_modules/jest-snapshot": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.0.tgz", + "integrity": "sha512-ex49M2ZrZsUyQLpLGxQtDbahvgBjlLPgklkqGM0hq/F7W/f8DyqZxVHjdy19QKBm4O93eDp+H5S23EiTbbUmHw==", "dev": true, - "requires": { - "@babel/types": "^7.16.7" + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^28.1.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-haste-map": "^28.1.0", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0", + "natural-compare": "^1.4.0", + "pretty-format": "^28.1.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "@babel/helper-module-transforms": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz", - "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==", + "packages/sdk/node_modules/jest-util": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", + "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.17.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0" + "dependencies": { + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "@babel/helper-plugin-utils": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", - "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", - "dev": true - }, - "@babel/helper-simple-access": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", - "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", + "packages/sdk/node_modules/jest-validate": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.0.tgz", + "integrity": "sha512-Lly7CJYih3vQBfjLeANGgBSBJ7pEa18cxpQfQEq2go2xyEzehnHfQTjoUia8xUv4x4J80XKFIDwJJThXtRFQXQ==", "dev": true, - "requires": { - "@babel/types": "^7.17.0" + "dependencies": { + "@jest/types": "^28.1.0", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "leven": "^3.1.0", + "pretty-format": "^28.1.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "packages/sdk/node_modules/jest-watcher": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.0.tgz", + "integrity": "sha512-tNHMtfLE8Njcr2IRS+5rXYA4BhU90gAOwI9frTGOqd+jX0P/Au/JfRSNqsf5nUTcWdbVYuLxS1KjnzILSoR5hA==", "dev": true, - "requires": { - "@babel/types": "^7.16.7" + "dependencies": { + "@jest/test-result": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "jest-util": "^28.1.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", - "dev": true + "packages/sdk/node_modules/jest-worker": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.0.tgz", + "integrity": "sha512-ZHwM6mNwaWBR52Snff8ZvsCTqQsvhCxP/bT1I6T6DAnb6ygkshsyLQIMxFwHpYxht0HOoqt23JlC01viI7T03A==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } }, - "@babel/helper-validator-option": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", - "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", - "dev": true + "packages/sdk/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } }, - "@babel/helpers": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", - "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", + "packages/sdk/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "requires": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0" + "engines": { + "node": ">=8" } }, - "@babel/highlight": { - "version": "7.16.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", - "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "packages/sdk/node_modules/pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "@babel/parser": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", - "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", + "packages/sdk/node_modules/react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", "dev": true }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "packages/sdk/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "packages/sdk/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "engines": { + "node": ">=8" } }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "packages/sdk/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } }, - "@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "packages/sdk/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "packages/sdk/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "packages/sdk/node_modules/ts-jest": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.2.tgz", + "integrity": "sha512-IOZMb3D0gx6IHO9ywPgiQxJ3Zl4ECylEFwoVpENB55aTn5sdO0Ptyx/7noNBxAaUff708RqQL4XBNxxOVjY0vQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^28.0.0", + "json5": "2.x", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "^20.x" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@types/jest": "^27.0.0", + "babel-jest": "^28.0.0", + "jest": "^28.0.0", + "typescript": ">=4.3" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@types/jest": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } } }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "packages/sdk/node_modules/v8-to-istanbul": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", + "integrity": "sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.7", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + }, + "engines": { + "node": ">=10.12.0" } }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "packages/sdk/node_modules/write-file-atomic": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "packages/sdk/node_modules/yargs": { + "version": "17.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz", + "integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "dependencies": { + "cliui": "^7.0.2", + "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.0.0" + }, + "engines": { + "node": ">=12" } }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "packages/sdk/node_modules/yargs/node_modules/yargs-parser": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "engines": { + "node": ">=12" } - }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", + "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@jridgewell/trace-mapping": "^0.3.0" } }, - "@babel/plugin-syntax-typescript": { + "@babel/code-frame": { "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz", - "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/highlight": "^7.16.7" } }, - "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" - } + "@babel/compat-data": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", + "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", + "dev": true }, - "@babel/traverse": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", - "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "@babel/core": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", + "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", "dev": true, "requires": { + "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", + "@babel/generator": "^7.17.7", + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-module-transforms": "^7.17.7", + "@babel/helpers": "^7.17.8", + "@babel/parser": "^7.17.8", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", "@babel/types": "^7.17.0", + "convert-source-map": "^1.7.0", "debug": "^4.1.0", - "globals": "^11.1.0" + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0" }, "dependencies": { - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } }, - "@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "@babel/generator": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } } }, - "@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "@eslint/eslintrc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", - "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", + "@babel/helper-compilation-targets": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", + "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", "dev": true, "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.3.1", - "globals": "^13.9.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" + "@babel/compat-data": "^7.17.7", + "@babel/helper-validator-option": "^7.16.7", + "browserslist": "^4.17.5", + "semver": "^6.3.0" }, "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } }, - "@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", - "dev": true - }, - "@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } + "@babel/types": "^7.16.7" } }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "@babel/helper-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", "dev": true, "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" } }, - "@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true - }, - "@jest/console": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", - "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", + "@babel/helper-get-function-arity": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", "dev": true, "requires": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", - "slash": "^3.0.0" + "@babel/types": "^7.16.7" } }, - "@jest/core": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", - "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", + "@babel/helper-hoist-variables": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dev": true, "requires": { - "@jest/console": "^27.5.1", - "@jest/reporters": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^27.5.1", - "jest-config": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-resolve-dependencies": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "jest-watcher": "^27.5.1", - "micromatch": "^4.0.4", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" + "@babel/types": "^7.16.7" } }, - "@jest/environment": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", - "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", + "@babel/helper-module-imports": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", "dev": true, "requires": { - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1" + "@babel/types": "^7.16.7" } }, - "@jest/fake-timers": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", - "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", + "@babel/helper-module-transforms": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz", + "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==", "dev": true, "requires": { - "@jest/types": "^27.5.1", - "@sinonjs/fake-timers": "^8.0.1", - "@types/node": "*", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.17.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0" } }, - "@jest/globals": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", - "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", + "@babel/helper-plugin-utils": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", + "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", + "dev": true + }, + "@babel/helper-simple-access": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", + "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", "dev": true, "requires": { - "@jest/environment": "^27.5.1", - "@jest/types": "^27.5.1", - "expect": "^27.5.1" + "@babel/types": "^7.17.0" } }, - "@jest/reporters": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", - "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", + "@babel/helper-split-export-declaration": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dev": true, "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-haste-map": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "slash": "^3.0.0", - "source-map": "^0.6.0", - "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" + "@babel/types": "^7.16.7" } }, - "@jest/source-map": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", - "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", + "@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", + "dev": true + }, + "@babel/helpers": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", + "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", "dev": true, "requires": { - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9", - "source-map": "^0.6.0" + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.17.3", + "@babel/types": "^7.17.0" } }, - "@jest/test-result": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", - "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", + "@babel/highlight": { + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", "dev": true, "requires": { - "@jest/console": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, - "@jest/test-sequencer": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", - "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", + "@babel/parser": { + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", + "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", + "dev": true + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, "requires": { - "@jest/test-result": "^27.5.1", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-runtime": "^27.5.1" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@jest/transform": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", - "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, "requires": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.5.1", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-util": "^27.5.1", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@jest/types": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", - "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" + "@babel/helper-plugin-utils": "^7.12.13" } }, - "@jridgewell/resolve-uri": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", - "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", - "dev": true + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", - "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", - "dev": true + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } }, - "@jridgewell/trace-mapping": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz", - "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==", + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@npmcli/fs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.0.tgz", - "integrity": "sha512-DmfBvNXGaetMxj9LTp8NAN9vEidXURrf5ZTslQzEAi/6GbW+4yjaLFQc6Tue5cpZ9Frlk4OBo/Snf1Bh/S7qTQ==", + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, "requires": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@npmcli/git": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.0.tgz", - "integrity": "sha512-xfSBJ+KBMZWWqRHFbEgIaXG/LtELHrQZMJ72Gkb3yWdHysu/7+VGOs8ME0c3td7QNQX57Ggo3kYL6ylcd70/kA==", + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, "requires": { - "@npmcli/promise-spawn": "^1.3.2", - "lru-cache": "^7.3.1", - "mkdirp": "^1.0.4", - "npm-pick-manifest": "^7.0.0", - "proc-log": "^2.0.0", - "promise-inflight": "^1.0.1", - "promise-retry": "^2.0.1", - "semver": "^7.3.5", - "which": "^2.0.2" + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz", + "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/template": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/traverse": { + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", + "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.17.3", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.17.3", + "@babel/types": "^7.17.0", + "debug": "^4.1.0", + "globals": "^11.1.0" }, "dependencies": { - "lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + } + }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "@eslint/eslintrc": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.3.tgz", + "integrity": "sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.3.2", + "globals": "^13.9.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + } + } + }, + "@gar/promisify": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", + "dev": true + }, + "@humanwhocodes/config-array": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", + "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jest/environment": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.0.tgz", + "integrity": "sha512-S44WGSxkRngzHslhV6RoAExekfF7Qhwa6R5+IYFa81mpcj0YgdBnRSmvHe3SNwOt64yXaE5GG8Y2xM28ii5ssA==", + "dev": true, + "requires": { + "@jest/fake-timers": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "jest-mock": "^28.1.0" + }, + "dependencies": { + "@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + } + } + }, + "@jest/expect": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.0.tgz", + "integrity": "sha512-be9ETznPLaHOmeJqzYNIXv1ADEzENuQonIoobzThOYPuK/6GhrWNIJDVTgBLCrz3Am73PyEU2urQClZp0hLTtA==", + "dev": true, + "requires": { + "expect": "^28.1.0", + "jest-snapshot": "^28.1.0" + }, + "dependencies": { + "@jest/transform": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.0.tgz", + "integrity": "sha512-omy2xe5WxlAfqmsTjTPxw+iXRTRnf+NtX0ToG+4S0tABeb4KsKmPUHq5UBuwunHg3tJRwgEQhEp0M/8oiatLEA==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/types": "^28.1.0", + "@jridgewell/trace-mapping": "^0.3.7", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" + } + }, + "@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "ci-info": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "dev": true + }, + "diff-sequences": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", + "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "dev": true + }, + "expect": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.0.tgz", + "integrity": "sha512-qFXKl8Pmxk8TBGfaFKRtcQjfXEnKAs+dmlxdwvukJZorwrAabT7M3h8oLOG01I2utEhkmUTi17CHaPBovZsKdw==", + "dev": true, + "requires": { + "@jest/expect-utils": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0" + } + }, + "jest-diff": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", + "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^28.0.2", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + } + }, + "jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true + }, + "jest-haste-map": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.0.tgz", + "integrity": "sha512-xyZ9sXV8PtKi6NCrJlmq53PyNVHzxmcfXNVvIRHpHmh1j/HChC4pwKgyjj7Z9us19JMw8PpQTJsFWOsIfT93Dw==", + "dev": true, + "requires": { + "@jest/types": "^28.1.0", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.0", + "jest-worker": "^28.1.0", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + } + }, + "jest-matcher-utils": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", + "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + } + }, + "jest-regex-util": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "dev": true + }, + "jest-snapshot": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.0.tgz", + "integrity": "sha512-ex49M2ZrZsUyQLpLGxQtDbahvgBjlLPgklkqGM0hq/F7W/f8DyqZxVHjdy19QKBm4O93eDp+H5S23EiTbbUmHw==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^28.1.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-haste-map": "^28.1.0", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0", + "natural-compare": "^1.4.0", + "pretty-format": "^28.1.0", + "semver": "^7.3.5" + } + }, + "jest-util": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", + "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", + "dev": true, + "requires": { + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "jest-worker": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.0.tgz", + "integrity": "sha512-ZHwM6mNwaWBR52Snff8ZvsCTqQsvhCxP/bT1I6T6DAnb6ygkshsyLQIMxFwHpYxht0HOoqt23JlC01viI7T03A==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "write-file-atomic": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } + } + } + }, + "@jest/expect-utils": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.0.tgz", + "integrity": "sha512-5BrG48dpC0sB80wpeIX5FU6kolDJI4K0n5BM9a5V38MGx0pyRvUBSS0u2aNTdDzmOrCjhOg8pGs6a20ivYkdmw==", + "dev": true, + "requires": { + "jest-get-type": "^28.0.2" + }, + "dependencies": { + "jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true + } + } + }, + "@jest/fake-timers": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.0.tgz", + "integrity": "sha512-Xqsf/6VLeAAq78+GNPzI7FZQRf5cCHj1qgQxCjws9n8rKw8r1UYoeaALwBvyuzOkpU3c1I6emeMySPa96rxtIg==", + "dev": true, + "requires": { + "@jest/types": "^28.1.0", + "@sinonjs/fake-timers": "^9.1.1", + "@types/node": "*", + "jest-message-util": "^28.1.0", + "jest-mock": "^28.1.0", + "jest-util": "^28.1.0" + }, + "dependencies": { + "@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ci-info": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "dev": true + }, + "jest-util": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", + "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", + "dev": true, + "requires": { + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + } + } + }, + "@jest/schemas": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.2.tgz", + "integrity": "sha512-YVDJZjd4izeTDkij00vHHAymNXQ6WWsdChFRK86qck6Jpr3DCL5W3Is3vslviRlP+bLuMYRLbdp98amMvqudhA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.23.3" + } + }, + "@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", + "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", + "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.10.tgz", + "integrity": "sha512-Q0YbBd6OTsXm8Y21+YUSDXupHnodNC2M4O18jtd3iwJ3+vMZNdKGols0a9G6JOK0dcJ3IdUUHoh908ZI6qhk8Q==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@npmcli/fs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.0.tgz", + "integrity": "sha512-DmfBvNXGaetMxj9LTp8NAN9vEidXURrf5ZTslQzEAi/6GbW+4yjaLFQc6Tue5cpZ9Frlk4OBo/Snf1Bh/S7qTQ==", + "dev": true, + "requires": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + } + }, + "@npmcli/git": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.0.tgz", + "integrity": "sha512-xfSBJ+KBMZWWqRHFbEgIaXG/LtELHrQZMJ72Gkb3yWdHysu/7+VGOs8ME0c3td7QNQX57Ggo3kYL6ylcd70/kA==", + "dev": true, + "requires": { + "@npmcli/promise-spawn": "^1.3.2", + "lru-cache": "^7.3.1", + "mkdirp": "^1.0.4", + "npm-pick-manifest": "^7.0.0", + "proc-log": "^2.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^2.0.2" + }, + "dependencies": { + "lru-cache": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", + "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "dev": true + } + } + }, + "@npmcli/installed-package-contents": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", + "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", + "dev": true, + "requires": { + "npm-bundled": "^1.1.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "@npmcli/move-file": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "dev": true, + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + } + }, + "@npmcli/node-gyp": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", + "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", + "dev": true + }, + "@npmcli/promise-spawn": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", + "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", + "dev": true, + "requires": { + "infer-owner": "^1.0.4" + } + }, + "@npmcli/run-script": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.1.tgz", + "integrity": "sha512-o2fkld5hYwu9sKYzoXTpqEocMnDLaigobaPzLaGB63k/ExmLBTaB+KpfKlpcIePPnuP8RFR+0GDI4KopJCM6Xg==", + "dev": true, + "requires": { + "@npmcli/node-gyp": "^1.0.3", + "@npmcli/promise-spawn": "^1.3.2", + "node-gyp": "^9.0.0", + "read-package-json-fast": "^2.0.3" + } + }, + "@rollup/plugin-commonjs": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.0.tgz", + "integrity": "sha512-Ktvf2j+bAO+30awhbYoCaXpBcyPmJbaEUYClQns/+6SNCYFURbvBiNbWgHITEsIgDDWCDUclWRKEuf8cwZCFoQ==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "commondir": "^1.0.1", + "estree-walker": "^2.0.1", + "glob": "^7.1.6", + "is-reference": "^1.2.1", + "magic-string": "^0.25.7", + "resolve": "^1.17.0" + } + }, + "@rollup/plugin-node-resolve": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.3.0.tgz", + "integrity": "sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "deepmerge": "^4.2.2", + "is-builtin-module": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.19.0" + } + }, + "@rollup/plugin-replace": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-4.0.0.tgz", + "integrity": "sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "magic-string": "^0.25.7" + } + }, + "@rollup/plugin-typescript": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.2.tgz", + "integrity": "sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "resolve": "^1.17.0" + } + }, + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "dependencies": { + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + } + } + }, + "@sinclair/typebox": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.5.tgz", + "integrity": "sha512-AFBVi/iT4g20DHoujvMH1aEDn8fGJh4xsRGCP6d8RpLPMqsNPvW01Jcn0QysXTsg++/xj25NmJsGyH9xug/wKg==", + "dev": true + }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true + }, + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", + "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sora/e2ee": { + "version": "file:packages/e2ee", + "requires": { + "@rollup/plugin-node-resolve": "^13.3.0", + "@rollup/plugin-replace": "^4.0.0", + "@rollup/plugin-typescript": "^8.3.2", + "@sora/go-wasm": "^2021.1.0", + "@typescript-eslint/eslint-plugin": "^5.23.0", + "@typescript-eslint/parser": "^5.23.0", + "eslint": "^8.15.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.0.0", + "prettier": "^2.6.2", + "rollup": "^2.72.1", + "typescript": "^4.6.4" + } + }, + "@sora/go-wasm": { + "version": "file:packages/go-wasm" + }, + "@sora/sdk": { + "version": "file:packages/sdk", + "requires": { + "@rollup/plugin-commonjs": "^22.0.0", + "@rollup/plugin-node-resolve": "^13.3.0", + "@rollup/plugin-replace": "^4.0.0", + "@rollup/plugin-typescript": "^8.3.2", + "@sora/e2ee": "^2021.1.0", + "@types/jest": "^27.5.0", + "@typescript-eslint/eslint-plugin": "5.23.0", + "@typescript-eslint/parser": "5.23.0", + "eslint": "8.15.0", + "eslint-config-prettier": "8.5.0", + "eslint-plugin-prettier": "4.0.0", + "fflate": "^0.7.3", + "jest": "^28.1.0", + "jest-environment-jsdom": "^28.1.0", + "prettier": "^2.6.2", + "rollup": "^2.72.1", + "rollup-plugin-terser": "^7.0.2", + "ts-jest": "^28.0.2", + "typescript": "^4.6.4" + }, + "dependencies": { + "@jest/console": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.0.tgz", + "integrity": "sha512-tscn3dlJFGay47kb4qVruQg/XWlmvU0xp3EJOjzzY+sBaI+YgwKcvAmTcyYU7xEiLLIY5HCdWRooAL8dqkFlDA==", + "dev": true, + "requires": { + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0", + "slash": "^3.0.0" + } + }, + "@jest/core": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.0.tgz", + "integrity": "sha512-/2PTt0ywhjZ4NwNO4bUqD9IVJfmFVhVKGlhvSpmEfUCuxYf/3NHcKmRFI+I71lYzbTT3wMuYpETDCTHo81gC/g==", + "dev": true, + "requires": { + "@jest/console": "^28.1.0", + "@jest/reporters": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^28.0.2", + "jest-config": "^28.1.0", + "jest-haste-map": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.0", + "jest-resolve-dependencies": "^28.1.0", + "jest-runner": "^28.1.0", + "jest-runtime": "^28.1.0", + "jest-snapshot": "^28.1.0", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "jest-watcher": "^28.1.0", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "@jest/globals": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.0.tgz", + "integrity": "sha512-3m7sTg52OTQR6dPhsEQSxAvU+LOBbMivZBwOvKEZ+Rb+GyxVnXi9HKgOTYkx/S99T8yvh17U4tNNJPIEQmtwYw==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.0", + "@jest/expect": "^28.1.0", + "@jest/types": "^28.1.0" + } + }, + "@jest/reporters": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.0.tgz", + "integrity": "sha512-qxbFfqap/5QlSpIizH9c/bFCDKsQlM4uAKSOvZrP+nIdrjqre3FmKzpTtYyhsaVcOSNK7TTt2kjm+4BJIjysFA==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@jridgewell/trace-mapping": "^0.3.7", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-util": "^28.1.0", + "jest-worker": "^28.1.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^9.0.0" + } + }, + "@jest/source-map": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.0.2.tgz", + "integrity": "sha512-Y9dxC8ZpN3kImkk0LkK5XCEneYMAXlZ8m5bflmSL5vrwyeUpJfentacCUg6fOb8NOpOO7hz2+l37MV77T6BFPw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.7", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + } + }, + "@jest/test-result": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.0.tgz", + "integrity": "sha512-sBBFIyoPzrZho3N+80P35A5oAkSKlGfsEFfXFWuPGBsW40UAjCkGakZhn4UQK4iQlW2vgCDMRDOob9FGKV8YoQ==", + "dev": true, + "requires": { + "@jest/console": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.0.tgz", + "integrity": "sha512-tZCEiVWlWNTs/2iK9yi6o3AlMfbbYgV4uuZInSVdzZ7ftpHZhCMuhvk2HLYhCZzLgPFQ9MnM1YaxMnh3TILFiQ==", + "dev": true, + "requires": { + "@jest/test-result": "^28.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "slash": "^3.0.0" + } + }, + "@jest/transform": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.0.tgz", + "integrity": "sha512-omy2xe5WxlAfqmsTjTPxw+iXRTRnf+NtX0ToG+4S0tABeb4KsKmPUHq5UBuwunHg3tJRwgEQhEp0M/8oiatLEA==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/types": "^28.1.0", + "@jridgewell/trace-mapping": "^0.3.7", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" + } + }, + "@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "babel-jest": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.0.tgz", + "integrity": "sha512-zNKk0yhDZ6QUwfxh9k07GII6siNGMJWVUU49gmFj5gfdqDKLqa2RArXOF2CODp4Dr7dLxN2cvAV+667dGJ4b4w==", + "dev": true, + "requires": { + "@jest/transform": "^28.1.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^28.0.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + } + }, + "babel-plugin-jest-hoist": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.0.2.tgz", + "integrity": "sha512-Kizhn/ZL+68ZQHxSnHyuvJv8IchXD62KQxV77TBDV/xoBFBOfgRAk97GNs6hXdTTCiVES9nB2I6+7MXXrk5llQ==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-preset-jest": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.0.2.tgz", + "integrity": "sha512-sYzXIdgIXXroJTFeB3S6sNDWtlJ2dllCdTEsnZ65ACrMojj3hVNFRmnJ1HZtomGi+Be7aqpY/HJ92fr8OhKVkQ==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^28.0.2", + "babel-preset-current-node-syntax": "^1.0.0" + } + }, + "ci-info": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", + "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "diff-sequences": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", + "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "dev": true + }, + "emittery": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", + "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "dev": true + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "expect": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.0.tgz", + "integrity": "sha512-qFXKl8Pmxk8TBGfaFKRtcQjfXEnKAs+dmlxdwvukJZorwrAabT7M3h8oLOG01I2utEhkmUTi17CHaPBovZsKdw==", + "dev": true, + "requires": { + "@jest/expect-utils": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "jest": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.0.tgz", + "integrity": "sha512-TZR+tHxopPhzw3c3560IJXZWLNHgpcz1Zh0w5A65vynLGNcg/5pZ+VildAd7+XGOu6jd58XMY/HNn0IkZIXVXg==", + "dev": true, + "requires": { + "@jest/core": "^28.1.0", + "import-local": "^3.0.2", + "jest-cli": "^28.1.0" + } + }, + "jest-changed-files": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.2.tgz", + "integrity": "sha512-QX9u+5I2s54ZnGoMEjiM2WeBvJR2J7w/8ZUmH2um/WLAuGAYFQcsVXY9+1YL6k0H/AGUdH8pXUAv6erDqEsvIA==", + "dev": true, + "requires": { + "execa": "^5.0.0", + "throat": "^6.0.1" + } + }, + "jest-circus": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.0.tgz", + "integrity": "sha512-rNYfqfLC0L0zQKRKsg4n4J+W1A2fbyGH7Ss/kDIocp9KXD9iaL111glsLu7+Z7FHuZxwzInMDXq+N1ZIBkI/TQ==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.0", + "@jest/expect": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^28.1.0", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-runtime": "^28.1.0", + "jest-snapshot": "^28.1.0", + "jest-util": "^28.1.0", + "pretty-format": "^28.1.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3", + "throat": "^6.0.1" + } + }, + "jest-cli": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.0.tgz", + "integrity": "sha512-fDJRt6WPRriHrBsvvgb93OxgajHHsJbk4jZxiPqmZbMDRcHskfJBBfTyjFko0jjfprP544hOktdSi9HVgl4VUQ==", + "dev": true, + "requires": { + "@jest/core": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/types": "^28.1.0", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^28.1.0", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + } + }, + "jest-config": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.0.tgz", + "integrity": "sha512-aOV80E9LeWrmflp7hfZNn/zGA4QKv/xsn2w8QCBP0t0+YqObuCWTSgNbHJ0j9YsTuCO08ZR/wsvlxqqHX20iUA==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^28.1.0", + "@jest/types": "^28.1.0", + "babel-jest": "^28.1.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^28.1.0", + "jest-environment-node": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.0", + "jest-runner": "^28.1.0", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^28.1.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + } + }, + "jest-diff": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", + "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^28.0.2", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + } + }, + "jest-docblock": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.0.2.tgz", + "integrity": "sha512-FH10WWw5NxLoeSdQlJwu+MTiv60aXV/t8KEwIRGEv74WARE1cXIqh1vGdy2CraHuWOOrnzTWj/azQKqW4fO7xg==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.0.tgz", + "integrity": "sha512-a/XX02xF5NTspceMpHujmOexvJ4GftpYXqr6HhhmKmExtMXsyIN/fvanQlt/BcgFoRKN4OCXxLQKth9/n6OPFg==", + "dev": true, + "requires": { + "@jest/types": "^28.1.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "jest-util": "^28.1.0", + "pretty-format": "^28.1.0" + } + }, + "jest-environment-node": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.0.tgz", + "integrity": "sha512-gBLZNiyrPw9CSMlTXF1yJhaBgWDPVvH0Pq6bOEwGMXaYNzhzhw2kA/OijNF8egbCgDS0/veRv97249x2CX+udQ==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.0", + "@jest/fake-timers": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "jest-mock": "^28.1.0", + "jest-util": "^28.1.0" + } + }, + "jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true + }, + "jest-haste-map": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.0.tgz", + "integrity": "sha512-xyZ9sXV8PtKi6NCrJlmq53PyNVHzxmcfXNVvIRHpHmh1j/HChC4pwKgyjj7Z9us19JMw8PpQTJsFWOsIfT93Dw==", + "dev": true, + "requires": { + "@jest/types": "^28.1.0", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.0", + "jest-worker": "^28.1.0", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + } + }, + "jest-leak-detector": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.0.tgz", + "integrity": "sha512-uIJDQbxwEL2AMMs2xjhZl2hw8s77c3wrPaQ9v6tXJLGaaQ+4QrNJH5vuw7hA7w/uGT/iJ42a83opAqxGHeyRIA==", + "dev": true, + "requires": { + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + } + }, + "jest-matcher-utils": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", + "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + } + }, + "jest-regex-util": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "dev": true + }, + "jest-resolve": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.0.tgz", + "integrity": "sha512-vvfN7+tPNnnhDvISuzD1P+CRVP8cK0FHXRwPAcdDaQv4zgvwvag2n55/h5VjYcM5UJG7L4TwE5tZlzcI0X2Lhw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" + } + }, + "jest-resolve-dependencies": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.0.tgz", + "integrity": "sha512-Ue1VYoSZquPwEvng7Uefw8RmZR+me/1kr30H2jMINjGeHgeO/JgrR6wxj2ofkJ7KSAA11W3cOrhNCbj5Dqqd9g==", + "dev": true, + "requires": { + "jest-regex-util": "^28.0.2", + "jest-snapshot": "^28.1.0" + } + }, + "jest-runner": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.0.tgz", + "integrity": "sha512-FBpmuh1HB2dsLklAlRdOxNTTHKFR6G1Qmd80pVDvwbZXTriqjWqjei5DKFC1UlM732KjYcE6yuCdiF0WUCOS2w==", + "dev": true, + "requires": { + "@jest/console": "^28.1.0", + "@jest/environment": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "graceful-fs": "^4.2.9", + "jest-docblock": "^28.0.2", + "jest-environment-node": "^28.1.0", + "jest-haste-map": "^28.1.0", + "jest-leak-detector": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-resolve": "^28.1.0", + "jest-runtime": "^28.1.0", + "jest-util": "^28.1.0", + "jest-watcher": "^28.1.0", + "jest-worker": "^28.1.0", + "source-map-support": "0.5.13", + "throat": "^6.0.1" + } + }, + "jest-runtime": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.0.tgz", + "integrity": "sha512-wNYDiwhdH/TV3agaIyVF0lsJ33MhyujOe+lNTUiolqKt8pchy1Hq4+tDMGbtD5P/oNLA3zYrpx73T9dMTOCAcg==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.0", + "@jest/fake-timers": "^28.1.0", + "@jest/globals": "^28.1.0", + "@jest/source-map": "^28.0.2", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "execa": "^5.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-mock": "^28.1.0", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.0", + "jest-snapshot": "^28.1.0", + "jest-util": "^28.1.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + } + }, + "jest-snapshot": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.0.tgz", + "integrity": "sha512-ex49M2ZrZsUyQLpLGxQtDbahvgBjlLPgklkqGM0hq/F7W/f8DyqZxVHjdy19QKBm4O93eDp+H5S23EiTbbUmHw==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^28.1.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-haste-map": "^28.1.0", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0", + "natural-compare": "^1.4.0", + "pretty-format": "^28.1.0", + "semver": "^7.3.5" + } + }, + "jest-util": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", + "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", + "dev": true, + "requires": { + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "jest-validate": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.0.tgz", + "integrity": "sha512-Lly7CJYih3vQBfjLeANGgBSBJ7pEa18cxpQfQEq2go2xyEzehnHfQTjoUia8xUv4x4J80XKFIDwJJThXtRFQXQ==", + "dev": true, + "requires": { + "@jest/types": "^28.1.0", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "leven": "^3.1.0", + "pretty-format": "^28.1.0" + } + }, + "jest-watcher": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.0.tgz", + "integrity": "sha512-tNHMtfLE8Njcr2IRS+5rXYA4BhU90gAOwI9frTGOqd+jX0P/Au/JfRSNqsf5nUTcWdbVYuLxS1KjnzILSoR5hA==", + "dev": true, + "requires": { + "@jest/test-result": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "jest-util": "^28.1.0", + "string-length": "^4.0.1" + } + }, + "jest-worker": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.0.tgz", + "integrity": "sha512-ZHwM6mNwaWBR52Snff8ZvsCTqQsvhCxP/bT1I6T6DAnb6ygkshsyLQIMxFwHpYxht0HOoqt23JlC01viI7T03A==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true - } - } - }, - "@npmcli/installed-package-contents": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", - "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", - "dev": true, - "requires": { - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1" - } - }, - "@npmcli/move-file": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", - "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", - "dev": true, - "requires": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - } - }, - "@npmcli/node-gyp": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", - "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", - "dev": true - }, - "@npmcli/promise-spawn": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", - "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", - "dev": true, - "requires": { - "infer-owner": "^1.0.4" - } - }, - "@npmcli/run-script": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.1.tgz", - "integrity": "sha512-o2fkld5hYwu9sKYzoXTpqEocMnDLaigobaPzLaGB63k/ExmLBTaB+KpfKlpcIePPnuP8RFR+0GDI4KopJCM6Xg==", - "dev": true, - "requires": { - "@npmcli/node-gyp": "^1.0.3", - "@npmcli/promise-spawn": "^1.3.2", - "node-gyp": "^9.0.0", - "read-package-json-fast": "^2.0.3" - } - }, - "@rollup/plugin-commonjs": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.0.tgz", - "integrity": "sha512-Ktvf2j+bAO+30awhbYoCaXpBcyPmJbaEUYClQns/+6SNCYFURbvBiNbWgHITEsIgDDWCDUclWRKEuf8cwZCFoQ==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "commondir": "^1.0.1", - "estree-walker": "^2.0.1", - "glob": "^7.1.6", - "is-reference": "^1.2.1", - "magic-string": "^0.25.7", - "resolve": "^1.17.0" - } - }, - "@rollup/plugin-node-resolve": { - "version": "13.2.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.2.1.tgz", - "integrity": "sha512-btX7kzGvp1JwShQI9V6IM841YKNPYjKCvUbNrQ2EcVYbULtUd/GH6wZ/qdqH13j9pOHBER+EZXNN2L8RSJhVRA==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "@types/resolve": "1.17.1", - "builtin-modules": "^3.1.0", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.19.0" - } - }, - "@rollup/plugin-replace": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-4.0.0.tgz", - "integrity": "sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "magic-string": "^0.25.7" - } - }, - "@rollup/plugin-typescript": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.2.tgz", - "integrity": "sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "resolve": "^1.17.0" - } - }, - "@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "requires": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - }, - "dependencies": { - "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + }, + "pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "ts-jest": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.2.tgz", + "integrity": "sha512-IOZMb3D0gx6IHO9ywPgiQxJ3Zl4ECylEFwoVpENB55aTn5sdO0Ptyx/7noNBxAaUff708RqQL4XBNxxOVjY0vQ==", + "dev": true, + "requires": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^28.0.0", + "json5": "2.x", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "^20.x" + } + }, + "v8-to-istanbul": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", + "integrity": "sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.7", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + } + }, + "write-file-atomic": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } + }, + "yargs": { + "version": "17.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz", + "integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "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.0.0" + }, + "dependencies": { + "yargs-parser": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", + "dev": true + } + } } } }, - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true - }, - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@sora/e2ee": { - "version": "file:packages/e2ee", - "requires": { - "@rollup/plugin-node-resolve": "^13.2.1", - "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", - "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^5.21.0", - "@typescript-eslint/parser": "^5.21.0", - "eslint": "^8.14.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.6.2", - "rollup": "^2.70.2", - "typescript": "^4.6.3" - } - }, - "@sora/go-wasm": { - "version": "file:packages/go-wasm" - }, - "@sora/sdk": { - "version": "file:packages/sdk", - "requires": { - "@rollup/plugin-commonjs": "^22.0.0", - "@rollup/plugin-node-resolve": "^13.2.1", - "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", - "@sora/e2ee": "^2021.1.0", - "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.21.0", - "@typescript-eslint/parser": "5.21.0", - "eslint": "8.14.0", - "eslint-config-prettier": "8.5.0", - "eslint-plugin-prettier": "4.0.0", - "fflate": "^0.7.3", - "jest": "^27.5.1", - "prettier": "^2.6.2", - "rollup": "^2.70.2", - "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^27.1.4", - "typescript": "^4.6.3" - } - }, "@szmarczak/http-timer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", @@ -9655,15 +11338,26 @@ } }, "@types/jest": { - "version": "27.4.1", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.1.tgz", - "integrity": "sha512-23iPJADSmicDVrWk+HT58LMJtzLAnB2AgIzplQuq/bSrGaxCrlvRFjGbXmamnnk/mAmCdLStiGqggu28ocUyiw==", + "version": "27.5.0", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.0.tgz", + "integrity": "sha512-9RBFx7r4k+msyj/arpfaa0WOOEcaAZNmN+j80KFbFCoSqCJGHTz7YMAMGQW9Xmqm5w6l5c25vbSjMwlikJi5+g==", "dev": true, "requires": { "jest-matcher-utils": "^27.0.0", "pretty-format": "^27.0.0" } }, + "@types/jsdom": { + "version": "16.2.14", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-16.2.14.tgz", + "integrity": "sha512-6BAy1xXEmMuHeAJ4Fv4yXKwBDTGTOseExKE3OaHiNycdHdZw59KfYzrt0DkDluvwmik1HRt6QS7bImxUmpSy+w==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/parse5": "*", + "@types/tough-cookie": "*" + } + }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -9676,6 +11370,12 @@ "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==", "dev": true }, + "@types/parse5": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", + "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==", + "dev": true + }, "@types/prettier": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.4.tgz", @@ -9697,11 +11397,19 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, + "@types/tough-cookie": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz", + "integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==", + "dev": true + }, "@types/yargs": { "version": "16.0.4", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", "dev": true, + "optional": true, + "peer": true, "requires": { "@types/yargs-parser": "*" } @@ -9713,14 +11421,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.21.0.tgz", - "integrity": "sha512-fTU85q8v5ZLpoZEyn/u1S2qrFOhi33Edo2CZ0+q1gDaWWm0JuPh3bgOyU8lM0edIEYgKLDkPFiZX2MOupgjlyg==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.23.0.tgz", + "integrity": "sha512-hEcSmG4XodSLiAp1uxv/OQSGsDY6QN3TcRU32gANp+19wGE1QQZLRS8/GV58VRUoXhnkuJ3ZxNQ3T6Z6zM59DA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.21.0", - "@typescript-eslint/type-utils": "5.21.0", - "@typescript-eslint/utils": "5.21.0", + "@typescript-eslint/scope-manager": "5.23.0", + "@typescript-eslint/type-utils": "5.23.0", + "@typescript-eslint/utils": "5.23.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -9730,52 +11438,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.21.0.tgz", - "integrity": "sha512-8RUwTO77hstXUr3pZoWZbRQUxXcSXafZ8/5gpnQCfXvgmP9gpNlRGlWzvfbEQ14TLjmtU8eGnONkff8U2ui2Eg==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.23.0.tgz", + "integrity": "sha512-V06cYUkqcGqpFjb8ttVgzNF53tgbB/KoQT/iB++DOIExKmzI9vBJKjZKt/6FuV9c+zrDsvJKbJ2DOCYwX91cbw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.21.0", - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/typescript-estree": "5.21.0", + "@typescript-eslint/scope-manager": "5.23.0", + "@typescript-eslint/types": "5.23.0", + "@typescript-eslint/typescript-estree": "5.23.0", "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.21.0.tgz", - "integrity": "sha512-XTX0g0IhvzcH/e3393SvjRCfYQxgxtYzL3UREteUneo72EFlt7UNoiYnikUtmGVobTbhUDByhJ4xRBNe+34kOQ==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.23.0.tgz", + "integrity": "sha512-EhjaFELQHCRb5wTwlGsNMvzK9b8Oco4aYNleeDlNuL6qXWDF47ch4EhVNPh8Rdhf9tmqbN4sWDk/8g+Z/J8JVw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/visitor-keys": "5.21.0" + "@typescript-eslint/types": "5.23.0", + "@typescript-eslint/visitor-keys": "5.23.0" } }, "@typescript-eslint/type-utils": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.21.0.tgz", - "integrity": "sha512-MxmLZj0tkGlkcZCSE17ORaHl8Th3JQwBzyXL/uvC6sNmu128LsgjTX0NIzy+wdH2J7Pd02GN8FaoudJntFvSOw==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.23.0.tgz", + "integrity": "sha512-iuI05JsJl/SUnOTXA9f4oI+/4qS/Zcgk+s2ir+lRmXI+80D8GaGwoUqs4p+X+4AxDolPpEpVUdlEH4ADxFy4gw==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.21.0", + "@typescript-eslint/utils": "5.23.0", "debug": "^4.3.2", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.21.0.tgz", - "integrity": "sha512-XnOOo5Wc2cBlq8Lh5WNvAgHzpjnEzxn4CJBwGkcau7b/tZ556qrWXQz4DJyChYg8JZAD06kczrdgFPpEQZfDsA==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.23.0.tgz", + "integrity": "sha512-NfBsV/h4dir/8mJwdZz7JFibaKC3E/QdeMEDJhiAE3/eMkoniZ7MjbEMCGXw6MZnZDMN3G9S0mH/6WUIj91dmw==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.21.0.tgz", - "integrity": "sha512-Y8Y2T2FNvm08qlcoSMoNchh9y2Uj3QmjtwNMdRQkcFG7Muz//wfJBGBxh8R7HAGQFpgYpdHqUpEoPQk+q9Kjfg==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.23.0.tgz", + "integrity": "sha512-xE9e0lrHhI647SlGMl+m+3E3CKPF1wzvvOEWnuE3CCjjT7UiRnDGJxmAcVKJIlFgK6DY9RB98eLr1OPigPEOGg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/visitor-keys": "5.21.0", + "@typescript-eslint/types": "5.23.0", + "@typescript-eslint/visitor-keys": "5.23.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -9784,26 +11492,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.21.0.tgz", - "integrity": "sha512-q/emogbND9wry7zxy7VYri+7ydawo2HDZhRZ5k6yggIvXa7PvBbAAZ4PFH/oZLem72ezC4Pr63rJvDK/sTlL8Q==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.23.0.tgz", + "integrity": "sha512-dbgaKN21drqpkbbedGMNPCtRPZo1IOUr5EI9Jrrh99r5UW5Q0dz46RKXeSBoPV+56R6dFKpbrdhgUNSJsDDRZA==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.21.0", - "@typescript-eslint/types": "5.21.0", - "@typescript-eslint/typescript-estree": "5.21.0", + "@typescript-eslint/scope-manager": "5.23.0", + "@typescript-eslint/types": "5.23.0", + "@typescript-eslint/typescript-estree": "5.23.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.21.0.tgz", - "integrity": "sha512-SX8jNN+iHqAF0riZQMkm7e8+POXa/fXw5cxL+gjpyP+FI+JVNhii53EmQgDAfDcBpFekYSlO0fGytMQwRiMQCA==", + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.23.0.tgz", + "integrity": "sha512-Vd4mFNchU62sJB8pX19ZSPog05B0Y0CE2UxAZPT5k4iqhRYjPnqyY3woMxCd0++t9OTqkgjST+1ydLBi7e2Fvg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.21.0", + "@typescript-eslint/types": "5.23.0", "eslint-visitor-keys": "^3.0.0" } }, @@ -9814,9 +11522,9 @@ "dev": true }, "abab": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", - "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", "dev": true }, "abbrev": { @@ -9836,9 +11544,9 @@ } }, "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", "dev": true }, "acorn-globals": { @@ -10005,27 +11713,11 @@ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "babel-jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", - "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==", - "dev": true, - "requires": { - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^27.5.1", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - } + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true }, "babel-plugin-istanbul": { "version": "6.1.1", @@ -10040,18 +11732,6 @@ "test-exclude": "^6.0.0" } }, - "babel-plugin-jest-hoist": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz", - "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==", - "dev": true, - "requires": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", - "@types/babel__traverse": "^7.0.6" - } - }, "babel-preset-current-node-syntax": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", @@ -10072,16 +11752,6 @@ "@babel/plugin-syntax-top-level-await": "^7.8.3" } }, - "babel-preset-jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", - "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==", - "dev": true, - "requires": { - "babel-plugin-jest-hoist": "^27.5.1", - "babel-preset-current-node-syntax": "^1.0.0" - } - }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -10538,9 +12208,9 @@ "dev": true }, "cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", + "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==", "dev": true }, "cssstyle": { @@ -10561,14 +12231,26 @@ } }, "data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", + "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", "dev": true, "requires": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0" + }, + "dependencies": { + "whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "dev": true, + "requires": { + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + } + } } }, "debug": { @@ -10674,20 +12356,12 @@ } }, "domexception": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", - "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", "dev": true, "requires": { - "webidl-conversions": "^5.0.0" - }, - "dependencies": { - "webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "dev": true - } + "webidl-conversions": "^7.0.0" } }, "dot-prop": { @@ -10711,12 +12385,6 @@ "integrity": "sha512-Z7Jkc4+ouEg8F6RrrgLOs0kkJjI0cnyFQmnGVpln8pPifuKBNbUr37GMgJsCTSwy6Z9TK7oTwW33Oe+3aERYew==", "dev": true }, - "emittery": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", - "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", - "dev": true - }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -10842,12 +12510,12 @@ } }, "eslint": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", - "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.15.0.tgz", + "integrity": "sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.2.2", + "@eslint/eslintrc": "^1.2.3", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -10858,7 +12526,7 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.1", + "espree": "^9.3.2", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -10874,7 +12542,7 @@ "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", "regexpp": "^3.2.0", @@ -11024,13 +12692,13 @@ "dev": true }, "espree": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", - "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", + "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", "dev": true, "requires": { - "acorn": "^8.7.0", - "acorn-jsx": "^5.3.1", + "acorn": "^8.7.1", + "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" } }, @@ -11113,18 +12781,6 @@ "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", "dev": true }, - "expect": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", - "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", - "dev": true, - "requires": { - "@jest/types": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1" - } - }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -11251,9 +12907,9 @@ "dev": true }, "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, "requires": { "asynckit": "^0.4.0", @@ -11412,9 +13068,9 @@ } }, "globals": { - "version": "13.13.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", - "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", + "version": "13.14.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.14.0.tgz", + "integrity": "sha512-ERO68sOYwm5UuLvSJTY7w7NP2c8S4UcXs3X1GBX8cwOr+ShOcDBbCY5mH4zxz0jsYCdJ8ve8Mv9n2YGJMB1aeg==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -11504,12 +13160,12 @@ } }, "html-encoding-sniffer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", - "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", "dev": true, "requires": { - "whatwg-encoding": "^1.0.5" + "whatwg-encoding": "^2.0.0" } }, "html-escaper": { @@ -11565,7 +13221,6 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, - "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3.0.0" } @@ -11684,6 +13339,15 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, + "is-builtin-module": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.1.0.tgz", + "integrity": "sha512-OV7JjAgOTfAFJmHZLvpSTb4qi0nIILDV1gWPYDnDJUTNFM5aGlRAhk4QcT8i7TuAleeEV5Fdkqn3t4mS+Q11fg==", + "dev": true, + "requires": { + "builtin-modules": "^3.0.0" + } + }, "is-ci": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", @@ -11888,256 +13552,79 @@ "istanbul-lib-report": "^3.0.0" } }, - "jest": { + "jest-diff": { "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", - "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", + "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", "dev": true, "requires": { - "@jest/core": "^27.5.1", - "import-local": "^3.0.2", - "jest-cli": "^27.5.1" + "chalk": "^4.0.0", + "diff-sequences": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" } }, - "jest-changed-files": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz", - "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==", + "jest-environment-jsdom": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.0.tgz", + "integrity": "sha512-8n6P4xiDjNVqTWv6W6vJPuQdLx+ZiA3dbYg7YJ+DPzR+9B61K6pMVJrSs2IxfGRG4J7pyAUA5shQ9G0KEun78w==", "dev": true, "requires": { - "@jest/types": "^27.5.1", - "execa": "^5.0.0", - "throat": "^6.0.1" + "@jest/environment": "^28.1.0", + "@jest/fake-timers": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/jsdom": "^16.2.4", + "@types/node": "*", + "jest-mock": "^28.1.0", + "jest-util": "^28.1.0", + "jsdom": "^19.0.0" }, "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", "dev": true, "requires": { - "path-key": "^3.0.0" + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" } }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", "dev": true, "requires": { - "shebang-regex": "^3.0.0" + "@types/yargs-parser": "*" } }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - } - } - }, - "jest-circus": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz", - "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==", - "dev": true, - "requires": { - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "expect": "^27.5.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" - } - }, - "jest-cli": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz", - "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==", - "dev": true, - "requires": { - "@jest/core": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "prompts": "^2.0.1", - "yargs": "^16.2.0" - } - }, - "jest-config": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz", - "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==", - "dev": true, - "requires": { - "@babel/core": "^7.8.0", - "@jest/test-sequencer": "^27.5.1", - "@jest/types": "^27.5.1", - "babel-jest": "^27.5.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.1", - "graceful-fs": "^4.2.9", - "jest-circus": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-jasmine2": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^27.5.1", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { "ci-info": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", "dev": true }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true + "jest-util": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", + "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", + "dev": true, + "requires": { + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } } } }, - "jest-diff": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", - "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - } - }, - "jest-docblock": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz", - "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==", - "dev": true, - "requires": { - "detect-newline": "^3.0.0" - } - }, - "jest-each": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz", - "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==", - "dev": true, - "requires": { - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1" - } - }, - "jest-environment-jsdom": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz", - "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==", - "dev": true, - "requires": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1", - "jsdom": "^16.6.0" - } - }, - "jest-environment-node": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", - "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", - "dev": true, - "requires": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" - } - }, "jest-get-type": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", @@ -12149,6 +13636,8 @@ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", "dev": true, + "optional": true, + "peer": true, "requires": { "@jest/types": "^27.5.1", "@types/graceful-fs": "^4.1.2", @@ -12159,45 +13648,10 @@ "graceful-fs": "^4.2.9", "jest-regex-util": "^27.5.1", "jest-serializer": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "micromatch": "^4.0.4", - "walker": "^1.0.7" - } - }, - "jest-jasmine2": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz", - "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==", - "dev": true, - "requires": { - "@jest/environment": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^27.5.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", - "throat": "^6.0.1" - } - }, - "jest-leak-detector": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz", - "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==", - "dev": true, - "requires": { - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "jest-util": "^27.5.1", + "jest-worker": "^27.5.1", + "micromatch": "^4.0.4", + "walker": "^1.0.7" } }, "jest-matcher-utils": { @@ -12213,30 +13667,104 @@ } }, "jest-message-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", - "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.0.tgz", + "integrity": "sha512-RpA8mpaJ/B2HphDMiDlrAZdDytkmwFqgjDZovM21F35lHGeUeCvYmm6W+sbQ0ydaLpg5bFAUuWG1cjqOl8vqrw==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.5.1", + "@jest/types": "^28.1.0", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^27.5.1", + "pretty-format": "^28.1.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" + }, + "dependencies": { + "@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + } } }, "jest-mock": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", - "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.0.tgz", + "integrity": "sha512-H7BrhggNn77WhdL7O1apG0Q/iwl0Bdd5E1ydhCJzL3oBLh/UYxAwR3EJLsBZ9XA3ZU4PA3UNw4tQjduBTCTmLw==", "dev": true, "requires": { - "@jest/types": "^27.5.1", + "@jest/types": "^28.1.0", "@types/node": "*" + }, + "dependencies": { + "@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + } } }, "jest-pnp-resolver": { @@ -12250,13 +13778,17 @@ "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "jest-resolve": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", "dev": true, + "optional": true, + "peer": true, "requires": { "@jest/types": "^27.5.1", "chalk": "^4.0.0", @@ -12270,193 +13802,25 @@ "slash": "^3.0.0" } }, - "jest-resolve-dependencies": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz", - "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==", - "dev": true, - "requires": { - "@jest/types": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-snapshot": "^27.5.1" - } - }, - "jest-runner": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz", - "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==", - "dev": true, - "requires": { - "@jest/console": "^27.5.1", - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-leak-detector": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "source-map-support": "^0.5.6", - "throat": "^6.0.1" - } - }, - "jest-runtime": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz", - "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==", - "dev": true, - "requires": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/globals": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - } - } - }, "jest-serializer": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", "dev": true, + "optional": true, + "peer": true, "requires": { "@types/node": "*", "graceful-fs": "^4.2.9" } }, - "jest-snapshot": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz", - "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==", - "dev": true, - "requires": { - "@babel/core": "^7.7.2", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.0.0", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^27.5.1", - "graceful-fs": "^4.2.9", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", - "natural-compare": "^1.4.0", - "pretty-format": "^27.5.1", - "semver": "^7.3.2" - } - }, "jest-util": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", "dev": true, + "optional": true, + "peer": true, "requires": { "@jest/types": "^27.5.1", "@types/node": "*", @@ -12470,7 +13834,9 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true + "dev": true, + "optional": true, + "peer": true } } }, @@ -12479,6 +13845,8 @@ "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", "dev": true, + "optional": true, + "peer": true, "requires": { "@jest/types": "^27.5.1", "camelcase": "^6.2.0", @@ -12488,26 +13856,13 @@ "pretty-format": "^27.5.1" } }, - "jest-watcher": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz", - "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==", - "dev": true, - "requires": { - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "jest-util": "^27.5.1", - "string-length": "^4.0.1" - } - }, "jest-worker": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "dev": true, + "optional": true, + "peer": true, "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -12519,6 +13874,8 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "optional": true, + "peer": true, "requires": { "has-flag": "^4.0.0" } @@ -12547,23 +13904,23 @@ } }, "jsdom": { - "version": "16.7.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", - "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-19.0.0.tgz", + "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==", "dev": true, "requires": { "abab": "^2.0.5", - "acorn": "^8.2.4", + "acorn": "^8.5.0", "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", + "cssom": "^0.5.0", "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", + "data-urls": "^3.0.1", + "decimal.js": "^10.3.1", + "domexception": "^4.0.0", "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-potential-custom-element-name": "^1.0.1", "nwsapi": "^2.2.0", @@ -12572,32 +13929,13 @@ "symbol-tree": "^3.2.4", "tough-cookie": "^4.0.0", "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" - }, - "dependencies": { - "@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true - }, - "http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "dev": true, - "requires": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - } - } + "w3c-xmlserializer": "^3.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^10.0.0", + "ws": "^8.2.3", + "xml-name-validator": "^4.0.0" } }, "jsesc": { @@ -13136,9 +14474,9 @@ } }, "npm-check-updates": { - "version": "12.5.9", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.9.tgz", - "integrity": "sha512-l9iOvD7EsQb96gFJL45V01YG6bP8+dmobYnSguvehPuNwgdWNMrE8RC8bSfURX5iUmX4bkobN4T8XMHXN9GMHA==", + "version": "12.5.11", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.11.tgz", + "integrity": "sha512-uS3yYYK/F1VvZlJRymuCkq+MY2R7v/WlORo5WPUTYx+1OwkqeDMC/CEEGfCN7ATwT2M+JxVVKk9Gq/TGiZjJOw==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -13868,9 +15206,9 @@ } }, "rollup": { - "version": "2.70.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.2.tgz", - "integrity": "sha512-EitogNZnfku65I1DD5Mxe8JYRUCy0hkK5X84IlDtUs+O6JRMpRciXTzyCUuX11b5L5pvjH+OmFXiQ3XjabcXgg==", + "version": "2.72.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.72.1.tgz", + "integrity": "sha512-NTc5UGy/NWFGpSqF1lFY8z9Adri6uhyMLI6LvPAXdBKoPRFhIIiBUpt+Qg2awixqO3xvzSijjhnb4+QEZwJmxA==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -14505,9 +15843,9 @@ } }, "tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", "dev": true, "requires": { "punycode": "^2.1.1" @@ -14521,22 +15859,6 @@ } } }, - "ts-jest": { - "version": "27.1.4", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.4.tgz", - "integrity": "sha512-qjkZlVPWVctAezwsOD1OPzbZ+k7zA5z3oxII4dGdZo5ggX/PL7kvwTM0pXTr10fAtbiVpJaL3bWd502zAhpgSQ==", - "dev": true, - "requires": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^27.0.0", - "json5": "2.x", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "20.x" - } - }, "tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", @@ -14605,9 +15927,9 @@ } }, "typescript": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", - "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", + "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", "dev": true }, "unique-filename": { @@ -14713,25 +16035,6 @@ "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, - "v8-to-istanbul": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", - "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - } - } - }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -14779,12 +16082,12 @@ } }, "w3c-xmlserializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", - "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz", + "integrity": "sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==", "dev": true, "requires": { - "xml-name-validator": "^3.0.0" + "xml-name-validator": "^4.0.0" } }, "walker": { @@ -14797,46 +16100,34 @@ } }, "webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "dev": true }, "whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", "dev": true, "requires": { - "iconv-lite": "0.4.24" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - } + "iconv-lite": "0.6.3" } }, "whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", "dev": true }, "whatwg-url": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", - "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-10.0.0.tgz", + "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==", "dev": true, "requires": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" } }, "which": { @@ -14902,9 +16193,9 @@ } }, "ws": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", - "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.6.0.tgz", + "integrity": "sha512-AzmM3aH3gk0aX7/rZLYvjdvZooofDu3fFOzGqcSnQ1tOcTWwhM/o+q++E8mAyVVIyUdajrkzWUGftaVSDLn1bw==", "dev": true, "requires": {} }, @@ -14915,9 +16206,9 @@ "dev": true }, "xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", "dev": true }, "xmlchars": { @@ -14944,21 +16235,6 @@ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, "yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", diff --git a/package.json b/package.json index aef9f85f..b261577a 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "dist" ], "devDependencies": { - "npm-check-updates": "^12.5.9", + "npm-check-updates": "^12.5.11", "serve": "^13.0.2", "typedoc": "^0.22.15" }, diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index 6fc389b5..93302333 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -16,17 +16,17 @@ "test": "echo \"no test\"" }, "devDependencies": { - "@rollup/plugin-node-resolve": "^13.2.1", + "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.21.0", - "@typescript-eslint/parser": "^5.21.0", - "eslint": "^8.14.0", + "@typescript-eslint/eslint-plugin": "^5.23.0", + "@typescript-eslint/parser": "^5.23.0", + "eslint": "^8.15.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", - "rollup": "^2.70.2", - "typescript": "^4.6.3" + "rollup": "^2.72.1", + "typescript": "^4.6.4" }, "dependencies": { "@sora/go-wasm": "^2021.1.0" diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 53e07eb2..45e52654 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -9,21 +9,22 @@ }, "devDependencies": { "@rollup/plugin-commonjs": "^22.0.0", - "@rollup/plugin-node-resolve": "^13.2.1", + "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@types/jest": "^27.4.1", - "@typescript-eslint/eslint-plugin": "5.21.0", - "@typescript-eslint/parser": "5.21.0", - "eslint": "8.14.0", + "@types/jest": "^27.5.0", + "@typescript-eslint/eslint-plugin": "5.23.0", + "@typescript-eslint/parser": "5.23.0", + "eslint": "8.15.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", - "jest": "^27.5.1", + "jest": "^28.1.0", + "jest-environment-jsdom": "^28.1.0", "prettier": "^2.6.2", - "rollup": "^2.70.2", + "rollup": "^2.72.1", "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^27.1.4", - "typescript": "^4.6.3" + "ts-jest": "^28.0.2", + "typescript": "^4.6.4" }, "dependencies": { "@sora/e2ee": "^2021.1.0", From 923f853480a806cf720d23856401fd144fcbf1c5 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 10 May 2022 10:16:48 +0900 Subject: [PATCH 67/86] =?UTF-8?q?jest=20=E3=81=AE=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/jest.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sdk/jest.config.js b/packages/sdk/jest.config.js index c3d7216c..72845d7b 100644 --- a/packages/sdk/jest.config.js +++ b/packages/sdk/jest.config.js @@ -117,7 +117,7 @@ module.exports = { // restoreMocks: false, // The root directory that Jest should scan for tests and modules within - rootDir: path.join(__dirname, "../../"), + rootDir: __dirname, // A list of paths to directories that Jest should use to search for files in // roots: [ @@ -137,7 +137,7 @@ module.exports = { // snapshotSerializers: [], // The test environment that will be used for testing - testEnvironment: "jsdom", + testEnvironment: "jest-environment-jsdom", // Options that will be passed to the testEnvironment // testEnvironmentOptions: {}, From bf66b7a0d292a28d6a685ab352bbc6f285b360e3 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 17 May 2022 09:55:34 +0900 Subject: [PATCH 68/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 938 ++++++++++++++++++++----------------- package.json | 2 +- packages/e2ee/package.json | 6 +- packages/sdk/package.json | 8 +- 4 files changed, 513 insertions(+), 441 deletions(-) diff --git a/package-lock.json b/package-lock.json index fdabb4fe..eb4a3742 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "packages/sdk" ], "devDependencies": { - "npm-check-updates": "^12.5.11", + "npm-check-updates": "^13.0.0", "serve": "^13.0.2", "typedoc": "^0.22.15" } @@ -1346,13 +1346,13 @@ } }, "node_modules/@npmcli/git": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.0.tgz", - "integrity": "sha512-xfSBJ+KBMZWWqRHFbEgIaXG/LtELHrQZMJ72Gkb3yWdHysu/7+VGOs8ME0c3td7QNQX57Ggo3kYL6ylcd70/kA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.1.tgz", + "integrity": "sha512-UU85F/T+F1oVn3IsB/L6k9zXIMpXBuUBE25QDH0SsURwT6IOBqkC7M16uqo2vVZIyji3X1K4XH9luip7YekH1A==", "dev": true, "dependencies": { - "@npmcli/promise-spawn": "^1.3.2", - "lru-cache": "^7.3.1", + "@npmcli/promise-spawn": "^3.0.0", + "lru-cache": "^7.4.4", "mkdirp": "^1.0.4", "npm-pick-manifest": "^7.0.0", "proc-log": "^2.0.0", @@ -1362,13 +1362,13 @@ "which": "^2.0.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/@npmcli/git/node_modules/lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.10.1.tgz", + "integrity": "sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A==", "dev": true, "engines": { "node": ">=12" @@ -1391,46 +1391,52 @@ } }, "node_modules/@npmcli/move-file": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", - "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.0.tgz", + "integrity": "sha512-UR6D5f4KEGWJV6BGPH3Qb2EtgH+t+1XQ1Tt85c7qicN6cezzuHPdZwwAxqZr4JLtnQu0LZsTza/5gmNmSl8XLg==", "dev": true, "dependencies": { "mkdirp": "^1.0.4", "rimraf": "^3.0.2" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/@npmcli/node-gyp": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", - "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", - "dev": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-2.0.0.tgz", + "integrity": "sha512-doNI35wIe3bBaEgrlPfdJPaCpUR89pJWep4Hq3aRdh6gKazIVWfs0jHttvSSoq47ZXgC7h73kDsUl8AoIQUB+A==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } }, "node_modules/@npmcli/promise-spawn": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", - "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-3.0.0.tgz", + "integrity": "sha512-s9SgS+p3a9Eohe68cSI3fi+hpcZUmXq5P7w0kMlAsWVtR7XbK3ptkZqKT2cK1zLDObJ3sR+8P59sJE0w/KTL1g==", "dev": true, "dependencies": { "infer-owner": "^1.0.4" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/@npmcli/run-script": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.1.tgz", - "integrity": "sha512-o2fkld5hYwu9sKYzoXTpqEocMnDLaigobaPzLaGB63k/ExmLBTaB+KpfKlpcIePPnuP8RFR+0GDI4KopJCM6Xg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.2.tgz", + "integrity": "sha512-vdjD/PMBl+OX9j9C9irx5sCCIKfp2PWkpPNH9zxvlJAfSZ3Qp5aU412v+O3PFJl3R1PFNwuyChCqHg4ma6ci2Q==", "dev": true, "dependencies": { - "@npmcli/node-gyp": "^1.0.3", - "@npmcli/promise-spawn": "^1.3.2", + "@npmcli/node-gyp": "^2.0.0", + "@npmcli/promise-spawn": "^3.0.0", "node-gyp": "^9.0.0", "read-package-json-fast": "^2.0.3" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/@rollup/plugin-commonjs": { @@ -1675,9 +1681,9 @@ } }, "node_modules/@types/jest": { - "version": "27.5.0", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.0.tgz", - "integrity": "sha512-9RBFx7r4k+msyj/arpfaa0WOOEcaAZNmN+j80KFbFCoSqCJGHTz7YMAMGQW9Xmqm5w6l5c25vbSjMwlikJi5+g==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.1.tgz", + "integrity": "sha512-fUy7YRpT+rHXto1YlL+J9rs0uLGyiqVt3ZOTQR+4ROc47yNl8WLdVLgUloBRhOxP1PZvguHl44T3H0wAWxahYQ==", "dev": true, "dependencies": { "jest-matcher-utils": "^27.0.0", @@ -1758,19 +1764,19 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.23.0.tgz", - "integrity": "sha512-hEcSmG4XodSLiAp1uxv/OQSGsDY6QN3TcRU32gANp+19wGE1QQZLRS8/GV58VRUoXhnkuJ3ZxNQ3T6Z6zM59DA==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.24.0.tgz", + "integrity": "sha512-6bqFGk6wa9+6RrU++eLknKyDqXU1Oc8nyoLu5a1fU17PNRJd9UBr56rMF7c4DRaRtnarlkQ4jwxUbvBo8cNlpw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.23.0", - "@typescript-eslint/type-utils": "5.23.0", - "@typescript-eslint/utils": "5.23.0", - "debug": "^4.3.2", + "@typescript-eslint/scope-manager": "5.24.0", + "@typescript-eslint/type-utils": "5.24.0", + "@typescript-eslint/utils": "5.24.0", + "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", + "ignore": "^5.2.0", "regexpp": "^3.2.0", - "semver": "^7.3.5", + "semver": "^7.3.7", "tsutils": "^3.21.0" }, "engines": { @@ -1791,15 +1797,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.23.0.tgz", - "integrity": "sha512-V06cYUkqcGqpFjb8ttVgzNF53tgbB/KoQT/iB++DOIExKmzI9vBJKjZKt/6FuV9c+zrDsvJKbJ2DOCYwX91cbw==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.24.0.tgz", + "integrity": "sha512-4q29C6xFYZ5B2CXqSBBdcS0lPyfM9M09DoQLtHS5kf+WbpV8pBBhHDLNhXfgyVwFnhrhYzOu7xmg02DzxeF2Uw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.23.0", - "@typescript-eslint/types": "5.23.0", - "@typescript-eslint/typescript-estree": "5.23.0", - "debug": "^4.3.2" + "@typescript-eslint/scope-manager": "5.24.0", + "@typescript-eslint/types": "5.24.0", + "@typescript-eslint/typescript-estree": "5.24.0", + "debug": "^4.3.4" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1818,13 +1824,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.23.0.tgz", - "integrity": "sha512-EhjaFELQHCRb5wTwlGsNMvzK9b8Oco4aYNleeDlNuL6qXWDF47ch4EhVNPh8Rdhf9tmqbN4sWDk/8g+Z/J8JVw==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.24.0.tgz", + "integrity": "sha512-WpMWipcDzGmMzdT7NtTjRXFabx10WleLUGrJpuJLGaxSqpcyq5ACpKSD5VE40h2nz3melQ91aP4Du7lh9FliCA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.23.0", - "@typescript-eslint/visitor-keys": "5.23.0" + "@typescript-eslint/types": "5.24.0", + "@typescript-eslint/visitor-keys": "5.24.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1835,13 +1841,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.23.0.tgz", - "integrity": "sha512-iuI05JsJl/SUnOTXA9f4oI+/4qS/Zcgk+s2ir+lRmXI+80D8GaGwoUqs4p+X+4AxDolPpEpVUdlEH4ADxFy4gw==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.24.0.tgz", + "integrity": "sha512-uGi+sQiM6E5CeCZYBXiaIvIChBXru4LZ1tMoeKbh1Lze+8BO9syUG07594C4lvN2YPT4KVeIupOJkVI+9/DAmQ==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.23.0", - "debug": "^4.3.2", + "@typescript-eslint/utils": "5.24.0", + "debug": "^4.3.4", "tsutils": "^3.21.0" }, "engines": { @@ -1861,9 +1867,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.23.0.tgz", - "integrity": "sha512-NfBsV/h4dir/8mJwdZz7JFibaKC3E/QdeMEDJhiAE3/eMkoniZ7MjbEMCGXw6MZnZDMN3G9S0mH/6WUIj91dmw==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.24.0.tgz", + "integrity": "sha512-Tpg1c3shTDgTmZd3qdUyd+16r/pGmVaVEbLs+ufuWP0EruVbUiEOmpBBQxBb9a8iPRxi8Rb2oiwOxuZJzSq11A==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1874,17 +1880,17 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.23.0.tgz", - "integrity": "sha512-xE9e0lrHhI647SlGMl+m+3E3CKPF1wzvvOEWnuE3CCjjT7UiRnDGJxmAcVKJIlFgK6DY9RB98eLr1OPigPEOGg==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.24.0.tgz", + "integrity": "sha512-zcor6vQkQmZAQfebSPVwUk/FD+CvnsnlfKXYeQDsWXRF+t7SBPmIfNia/wQxCSeu1h1JIjwV2i9f5/DdSp/uDw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.23.0", - "@typescript-eslint/visitor-keys": "5.23.0", - "debug": "^4.3.2", - "globby": "^11.0.4", + "@typescript-eslint/types": "5.24.0", + "@typescript-eslint/visitor-keys": "5.24.0", + "debug": "^4.3.4", + "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.5", + "semver": "^7.3.7", "tsutils": "^3.21.0" }, "engines": { @@ -1901,15 +1907,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.23.0.tgz", - "integrity": "sha512-dbgaKN21drqpkbbedGMNPCtRPZo1IOUr5EI9Jrrh99r5UW5Q0dz46RKXeSBoPV+56R6dFKpbrdhgUNSJsDDRZA==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.24.0.tgz", + "integrity": "sha512-K05sbWoeCBJH8KXu6hetBJ+ukG0k2u2KlgD3bN+v+oBKm8adJqVHpSSLHNzqyuv0Lh4GVSAUgZ5lB4icmPmWLw==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.23.0", - "@typescript-eslint/types": "5.23.0", - "@typescript-eslint/typescript-estree": "5.23.0", + "@typescript-eslint/scope-manager": "5.24.0", + "@typescript-eslint/types": "5.24.0", + "@typescript-eslint/typescript-estree": "5.24.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1925,13 +1931,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.23.0.tgz", - "integrity": "sha512-Vd4mFNchU62sJB8pX19ZSPog05B0Y0CE2UxAZPT5k4iqhRYjPnqyY3woMxCd0++t9OTqkgjST+1ydLBi7e2Fvg==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.24.0.tgz", + "integrity": "sha512-qzGwSXMyMnogcAo+/2fU+jhlPPVMXlIH2PeAonIKjJSoDKl1+lJVvG5Z5Oud36yU0TWK2cs1p/FaSN5J2OUFYA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.23.0", - "eslint-visitor-keys": "^3.0.0" + "@typescript-eslint/types": "5.24.0", + "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2381,10 +2387,13 @@ } }, "node_modules/builtins": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", - "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", - "dev": true + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dev": true, + "dependencies": { + "semver": "^7.0.0" + } }, "node_modules/bytes": { "version": "3.0.0", @@ -2396,16 +2405,16 @@ } }, "node_modules/cacache": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.0.3.tgz", - "integrity": "sha512-eC7wYodNCVb97kuHGk5P+xZsvUJHkhSEOyNwkenqQPAsOtrTjvWOE5vSPNBpz9d8X3acIf6w2Ub5s4rvOCTs4g==", + "version": "16.0.7", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.0.7.tgz", + "integrity": "sha512-a4zfQpp5vm4Ipdvbj+ZrPonikRhm6WBEd4zT1Yc1DXsmAxrPgDwWBLF/u/wTVXSFPIgOJ1U3ghSa2Xm4s3h28w==", "dev": true, "dependencies": { "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^1.1.2", + "@npmcli/move-file": "^2.0.0", "chownr": "^2.0.0", "fs-minipass": "^2.1.0", - "glob": "^7.2.0", + "glob": "^8.0.1", "infer-owner": "^1.0.4", "lru-cache": "^7.7.1", "minipass": "^3.1.6", @@ -2416,7 +2425,7 @@ "p-map": "^4.0.0", "promise-inflight": "^1.0.1", "rimraf": "^3.0.2", - "ssri": "^8.0.1", + "ssri": "^9.0.0", "tar": "^6.1.11", "unique-filename": "^1.1.1" }, @@ -2424,10 +2433,29 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/cacache/node_modules/glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/cacache/node_modules/lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.10.1.tgz", + "integrity": "sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A==", "dev": true, "engines": { "node": ">=12" @@ -2696,9 +2724,9 @@ } }, "node_modules/commander": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.1.0.tgz", - "integrity": "sha512-i0/MaqBtdbnJ4XQs4Pmyb+oFQl+q0lsAmokVUH92SlSw4fkeAcG3bVon+Qt7hmtF+u3Het6o4VgrcY3qAoEB6w==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.2.0.tgz", + "integrity": "sha512-e2i4wANQiSXgnrBlIatyHtP1odfUp0BbV5Y5nEGbxtIrStkEOAAzCUirvLBNXHLr7kwLvJl6V+4V3XV9x7Wd9w==", "dev": true, "engines": { "node": "^12.20.0 || >=14" @@ -3819,9 +3847,9 @@ "dev": true }, "node_modules/gauge": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.3.tgz", - "integrity": "sha512-ICw1DhAwMtb22rYFwEHgJcx1JCwJGv3x6G0OQUq56Nge+H4Q8JEwr8iveS0XFlsUNSI67F5ffMGK25bK4Pmskw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", "dev": true, "dependencies": { "aproba": "^1.0.3 || ^2.0.0", @@ -3834,7 +3862,7 @@ "wide-align": "^1.1.5" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/gensync": { @@ -4078,9 +4106,9 @@ } }, "node_modules/hosted-git-info/node_modules/lru-cache": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.3.tgz", - "integrity": "sha512-WY9wjJNQt9+PZilnLbuFKM+SwDull9+6IAguOrarOMoOHTcJ9GnXSO11+Gw6c7xtDkBkthR57OZMtZKYr+1CEw==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.10.1.tgz", + "integrity": "sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A==", "dev": true, "engines": { "node": ">=12" @@ -4177,37 +4205,15 @@ } }, "node_modules/ignore-walk": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-4.0.1.tgz", - "integrity": "sha512-rzDQLaW4jQbh2YrOFlJdCtX8qgJTehFRYiUB2r1osqTeDzV/3+Jh8fz1oAPzUThf3iku8Ds4IDqawI5d8mUiQw==", - "dev": true, - "dependencies": { - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ignore-walk/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/ignore-walk/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz", + "integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "minimatch": "^5.0.1" }, "engines": { - "node": "*" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/import-fresh": { @@ -4301,9 +4307,9 @@ "dev": true }, "node_modules/ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", + "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==", "dev": true }, "node_modules/is-arrayish": { @@ -5374,18 +5380,18 @@ "dev": true }, "node_modules/make-fetch-happen": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.6.tgz", - "integrity": "sha512-4Gfh6lV3TLXmj7qz79hBFuvVqjYSMW6v2+sxtdX4LFQU0rK3V/txRjE0DoZb7X0IF3t9f8NO3CxPSWlvdckhVA==", + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.1.3.tgz", + "integrity": "sha512-s/UjmGjUHn9m52cctFhN2ITObbT+axoUhgeir8xGrOlPbKDyJsdhQzb8PGncPQQ28uduHybFJ6Iumy2OZnreXw==", "dev": true, "dependencies": { "agentkeepalive": "^4.2.1", - "cacache": "^16.0.0", + "cacache": "^16.0.2", "http-cache-semantics": "^4.1.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", - "lru-cache": "^7.5.1", + "lru-cache": "^7.7.1", "minipass": "^3.1.6", "minipass-collect": "^1.0.2", "minipass-fetch": "^2.0.3", @@ -5394,16 +5400,16 @@ "negotiator": "^0.6.3", "promise-retry": "^2.0.1", "socks-proxy-agent": "^6.1.1", - "ssri": "^8.0.1" + "ssri": "^9.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/make-fetch-happen/node_modules/lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.10.1.tgz", + "integrity": "sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A==", "dev": true, "engines": { "node": ">=12" @@ -5540,9 +5546,9 @@ } }, "node_modules/minipass-fetch": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.0.3.tgz", - "integrity": "sha512-VA+eiiUtaIvpQJXISwE3OiMvQwAWrgKb97F0aXlCS1Ahikr8fEQq8m3Hf7Kv9KT3nokuHigJKsDMB6atU04olQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.0.tgz", + "integrity": "sha512-H9U4UVBGXEyyWJnqYDCLp1PwD8XIkJ4akNHp1aGVI+2Ym7wQMlxDKi4IB4JbmyU+pl9pEs/cVrK6cOuvmbK4Sg==", "dev": true, "dependencies": { "minipass": "^3.1.6", @@ -5550,7 +5556,7 @@ "minizlib": "^2.1.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" }, "optionalDependencies": { "encoding": "^0.1.13" @@ -5748,15 +5754,15 @@ } }, "node_modules/npm-check-updates": { - "version": "12.5.11", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.11.tgz", - "integrity": "sha512-uS3yYYK/F1VvZlJRymuCkq+MY2R7v/WlORo5WPUTYx+1OwkqeDMC/CEEGfCN7ATwT2M+JxVVKk9Gq/TGiZjJOw==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.0.0.tgz", + "integrity": "sha512-xy19rT3Al1uZSWMYb2kJFryM33tzXjaeLWhdzHdadw4aVfwz+GQrnuehpK2RwgYol1n+LyxrDzPHrwmmJnWiTg==", "dev": true, "dependencies": { "chalk": "^4.1.2", "cint": "^8.2.1", "cli-table": "^0.3.11", - "commander": "^9.1.0", + "commander": "^9.2.0", "fast-memoize": "^2.5.2", "find-up": "5.0.0", "fp-and-or": "^0.1.3", @@ -5769,38 +5775,38 @@ "lodash": "^4.17.21", "minimatch": "^5.0.1", "p-map": "^4.0.0", - "pacote": "^13.0.5", + "pacote": "^13.3.0", "parse-github-url": "^1.0.2", "progress": "^2.0.3", "prompts": "^2.4.2", "rc-config-loader": "^4.1.0", "remote-git-tags": "^3.0.0", "rimraf": "^3.0.2", - "semver": "^7.3.5", + "semver": "^7.3.7", "semver-utils": "^1.1.4", "source-map-support": "^0.5.21", "spawn-please": "^1.0.0", "update-notifier": "^5.1.0", - "yaml": "^1.10.2" + "yaml": "^2.1.0" }, "bin": { "ncu": "build/src/bin/cli.js", "npm-check-updates": "build/src/bin/cli.js" }, "engines": { - "node": ">=12" + "node": ">=14" } }, "node_modules/npm-install-checks": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-4.0.0.tgz", - "integrity": "sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-5.0.0.tgz", + "integrity": "sha512-65lUsMI8ztHCxFz5ckCEC44DRvEGdZX5usQFriauxHEwt7upv1FKaQEmAtU0YnOAdwuNWCmk64xYiQABNrEyLA==", "dev": true, "dependencies": { "semver": "^7.1.1" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/npm-normalize-package-bin": { @@ -5810,27 +5816,27 @@ "dev": true }, "node_modules/npm-package-arg": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.1.tgz", - "integrity": "sha512-Xs9wznfEAmZAR61qsYH3iN24V/qMYYkvAR5CRQNMvC6PjN2fHtO8y9XP/xdp5K+Icx+u1wMBMgWRPCmAEChSog==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.2.tgz", + "integrity": "sha512-v/miORuX8cndiOheW8p2moNuPJ7QhcFh9WGlTorruG8hXSA23vMTEp5hTCmDxic0nD8KHhj/NQgFuySD3GYY3g==", "dev": true, "dependencies": { "hosted-git-info": "^5.0.0", "semver": "^7.3.5", - "validate-npm-package-name": "^3.0.0" + "validate-npm-package-name": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/npm-packlist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-4.0.0.tgz", - "integrity": "sha512-gL6XC/iw9YSmqArmZOGSkyy+yIZf2f7uH0p4Vmxef/irn73vd9/rDkCtvm+a9rh/QK2xGYfCAMOghM06ymzC0A==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.0.3.tgz", + "integrity": "sha512-KuSbzgejxdsAWbNNyEs8EsyDHsO+nJF6k+9WuWzFbSNh5tFHs4lDApXw7kntKpuehfp8lKRzJkMtz0+WmGvTIw==", "dev": true, "dependencies": { - "glob": "^7.2.0", - "ignore-walk": "^4.0.1", + "glob": "^8.0.1", + "ignore-walk": "^5.0.1", "npm-bundled": "^1.1.2", "npm-normalize-package-bin": "^1.0.1" }, @@ -5838,28 +5844,47 @@ "npm-packlist": "bin/index.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm-packlist/node_modules/glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/npm-pick-manifest": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.0.tgz", - "integrity": "sha512-njM1AcdioFaKd0JSGtLO09YA1WRwctjGQJbnHGmKS+u+uwP8oFvtZtOQWPYdxrnY5eJud3wn8OpH4sEIx6+GEQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.1.tgz", + "integrity": "sha512-IA8+tuv8KujbsbLQvselW2XQgmXWS47t3CB0ZrzsRZ82DbDfkcFunOaPm4X7qNuhMfq+FmV7hQT4iFVpHqV7mg==", "dev": true, "dependencies": { - "npm-install-checks": "^4.0.0", + "npm-install-checks": "^5.0.0", "npm-normalize-package-bin": "^1.0.1", "npm-package-arg": "^9.0.0", "semver": "^7.3.5" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/npm-registry-fetch": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.1.0.tgz", - "integrity": "sha512-TIYL5X8CcwDhbFMXFDShNcpG6OMCYK6VzvSr6MUWP20tCU2DJ4ao2qQg3DT+3Pet8mO6/cgbZpon4LMh3duYLg==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.1.1.tgz", + "integrity": "sha512-5p8rwe6wQPLJ8dMqeTnA57Dp9Ox6GH9H60xkyJup07FmVlu3Mk7pf/kIIpl9gaN5bM8NM+UUx3emUWvDNTt39w==", "dev": true, "dependencies": { "make-fetch-happen": "^10.0.6", @@ -5887,18 +5912,18 @@ } }, "node_modules/npmlog": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.1.tgz", - "integrity": "sha512-BTHDvY6nrRHuRfyjt1MAufLxYdVXZfd099H4+i1f0lPywNQyI4foeNXJRObB/uy+TYqUW0vAD9gbdSOXPst7Eg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", "dev": true, "dependencies": { "are-we-there-yet": "^3.0.0", "console-control-strings": "^1.1.0", - "gauge": "^4.0.0", + "gauge": "^4.0.3", "set-blocking": "^2.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/nwsapi": { @@ -6078,14 +6103,14 @@ } }, "node_modules/pacote": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.0.5.tgz", - "integrity": "sha512-6CYfot3/rUAn3qqzF2d/jrrXm5HlBtvaSgfmg0VtOUAdJ8fbSq21BJwftMGArkL71yXHIbUJ7Bt5B04547HELA==", + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.3.0.tgz", + "integrity": "sha512-auhJAUlfC2TALo6I0s1vFoPvVFgWGx+uz/PnIojTTgkGwlK3Np8sGJ0ghfFhiuzJXTZoTycMLk8uLskdntPbDw==", "dev": true, "dependencies": { "@npmcli/git": "^3.0.0", "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/promise-spawn": "^1.2.0", + "@npmcli/promise-spawn": "^3.0.0", "@npmcli/run-script": "^3.0.1", "cacache": "^16.0.0", "chownr": "^2.0.0", @@ -6094,7 +6119,7 @@ "minipass": "^3.1.6", "mkdirp": "^1.0.4", "npm-package-arg": "^9.0.0", - "npm-packlist": "^4.0.0", + "npm-packlist": "^5.0.0", "npm-pick-manifest": "^7.0.0", "npm-registry-fetch": "^13.0.1", "proc-log": "^2.0.0", @@ -6102,14 +6127,14 @@ "read-package-json": "^5.0.0", "read-package-json-fast": "^2.0.3", "rimraf": "^3.0.2", - "ssri": "^8.0.1", + "ssri": "^9.0.0", "tar": "^6.1.11" }, "bin": { "pacote": "lib/bin.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/parent-module": { @@ -6377,12 +6402,12 @@ } }, "node_modules/proc-log": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.0.tgz", - "integrity": "sha512-I/35MfCX2H8jBUhKN8JB8nmqvQo/nKdrBodBY7L3RhDSPPyvOHwLYNmPuhwuJq7a7C3vgFKWGQM+ecPStcvOHA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", + "integrity": "sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==", "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/progress": { @@ -6532,18 +6557,18 @@ "dev": true }, "node_modules/read-package-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.0.tgz", - "integrity": "sha512-1cjk2MV5ONDMn34uxSID3X8NY7VKsXfJnjbcVdFMvHEnJOBzU6MJ7/3yg6QFVZDq5/1yFNrKBUK9kGnonyGP2Q==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.1.tgz", + "integrity": "sha512-MALHuNgYWdGW3gKzuNMuYtcSSZbGQm94fAp16xt8VsYTLBjUSc55bLMKe6gzpWue0Tfi6CBgwCSdDAqutGDhMg==", "dev": true, "dependencies": { - "glob": "^7.2.0", + "glob": "^8.0.1", "json-parse-even-better-errors": "^2.3.1", "normalize-package-data": "^4.0.0", "npm-normalize-package-bin": "^1.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/read-package-json-fast": { @@ -6559,6 +6584,25 @@ "node": ">=10" } }, + "node_modules/read-package-json/node_modules/glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -6734,9 +6778,9 @@ } }, "node_modules/rollup": { - "version": "2.72.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.72.1.tgz", - "integrity": "sha512-NTc5UGy/NWFGpSqF1lFY8z9Adri6uhyMLI6LvPAXdBKoPRFhIIiBUpt+Qg2awixqO3xvzSijjhnb4+QEZwJmxA==", + "version": "2.73.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.73.0.tgz", + "integrity": "sha512-h/UngC3S4Zt28mB3g0+2YCMegT5yoftnQplwzPqGZcKvlld5e+kT/QRmJiL+qxGyZKOYpgirWGdLyEO1b0dpLQ==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -6825,9 +6869,9 @@ } }, "node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -7100,14 +7144,14 @@ } }, "node_modules/socks-proxy-agent": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz", - "integrity": "sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.0.tgz", + "integrity": "sha512-wWqJhjb32Q6GsrUqzuFkukxb/zzide5quXYcMVpIjxalDBBYy2nqKCFQ/9+Ie4dvOYSQdOk3hUlZSdzZOd3zMQ==", "dev": true, "dependencies": { "agent-base": "^6.0.2", - "debug": "^4.3.1", - "socks": "^2.6.1" + "debug": "^4.3.3", + "socks": "^2.6.2" }, "engines": { "node": ">= 10" @@ -7186,15 +7230,15 @@ "dev": true }, "node_modules/ssri": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", - "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.0.tgz", + "integrity": "sha512-Y1Z6J8UYnexKFN1R/hxUaYoY2LVdKEzziPmVAFKiKX8fiwvCJTVzn/xYE9TEWod5OVyNfIHHuVfIEuBClL/uJQ==", "dev": true, "dependencies": { "minipass": "^3.1.1" }, "engines": { - "node": ">= 8" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/stack-utils": { @@ -7794,12 +7838,15 @@ } }, "node_modules/validate-npm-package-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-4.0.0.tgz", + "integrity": "sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==", "dev": true, "dependencies": { - "builtins": "^1.0.3" + "builtins": "^5.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/vary": { @@ -8037,12 +8084,12 @@ "dev": true }, "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.0.tgz", + "integrity": "sha512-OuAINfTsoJrY5H7CBWnKZhX6nZciXBydrMtTHr1dC4nP40X5jyTIVlogZHxSlVZM8zSgXRfgZGsaHF4+pV+JRw==", "dev": true, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/yargs-parser": { @@ -8077,13 +8124,13 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.23.0", - "@typescript-eslint/parser": "^5.23.0", + "@typescript-eslint/eslint-plugin": "^5.24.0", + "@typescript-eslint/parser": "^5.24.0", "eslint": "^8.15.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", - "rollup": "^2.72.1", + "rollup": "^2.73.0", "typescript": "^4.6.4" } }, @@ -8102,16 +8149,16 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@types/jest": "^27.5.0", - "@typescript-eslint/eslint-plugin": "5.23.0", - "@typescript-eslint/parser": "5.23.0", + "@types/jest": "^27.5.1", + "@typescript-eslint/eslint-plugin": "5.24.0", + "@typescript-eslint/parser": "5.24.0", "eslint": "8.15.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", "prettier": "^2.6.2", - "rollup": "^2.72.1", + "rollup": "^2.73.0", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^28.0.2", "typescript": "^4.6.4" @@ -10233,13 +10280,13 @@ } }, "@npmcli/git": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.0.tgz", - "integrity": "sha512-xfSBJ+KBMZWWqRHFbEgIaXG/LtELHrQZMJ72Gkb3yWdHysu/7+VGOs8ME0c3td7QNQX57Ggo3kYL6ylcd70/kA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.1.tgz", + "integrity": "sha512-UU85F/T+F1oVn3IsB/L6k9zXIMpXBuUBE25QDH0SsURwT6IOBqkC7M16uqo2vVZIyji3X1K4XH9luip7YekH1A==", "dev": true, "requires": { - "@npmcli/promise-spawn": "^1.3.2", - "lru-cache": "^7.3.1", + "@npmcli/promise-spawn": "^3.0.0", + "lru-cache": "^7.4.4", "mkdirp": "^1.0.4", "npm-pick-manifest": "^7.0.0", "proc-log": "^2.0.0", @@ -10250,9 +10297,9 @@ }, "dependencies": { "lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.10.1.tgz", + "integrity": "sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A==", "dev": true } } @@ -10268,9 +10315,9 @@ } }, "@npmcli/move-file": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", - "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.0.tgz", + "integrity": "sha512-UR6D5f4KEGWJV6BGPH3Qb2EtgH+t+1XQ1Tt85c7qicN6cezzuHPdZwwAxqZr4JLtnQu0LZsTza/5gmNmSl8XLg==", "dev": true, "requires": { "mkdirp": "^1.0.4", @@ -10278,28 +10325,28 @@ } }, "@npmcli/node-gyp": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", - "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-2.0.0.tgz", + "integrity": "sha512-doNI35wIe3bBaEgrlPfdJPaCpUR89pJWep4Hq3aRdh6gKazIVWfs0jHttvSSoq47ZXgC7h73kDsUl8AoIQUB+A==", "dev": true }, "@npmcli/promise-spawn": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", - "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-3.0.0.tgz", + "integrity": "sha512-s9SgS+p3a9Eohe68cSI3fi+hpcZUmXq5P7w0kMlAsWVtR7XbK3ptkZqKT2cK1zLDObJ3sR+8P59sJE0w/KTL1g==", "dev": true, "requires": { "infer-owner": "^1.0.4" } }, "@npmcli/run-script": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.1.tgz", - "integrity": "sha512-o2fkld5hYwu9sKYzoXTpqEocMnDLaigobaPzLaGB63k/ExmLBTaB+KpfKlpcIePPnuP8RFR+0GDI4KopJCM6Xg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.2.tgz", + "integrity": "sha512-vdjD/PMBl+OX9j9C9irx5sCCIKfp2PWkpPNH9zxvlJAfSZ3Qp5aU412v+O3PFJl3R1PFNwuyChCqHg4ma6ci2Q==", "dev": true, "requires": { - "@npmcli/node-gyp": "^1.0.3", - "@npmcli/promise-spawn": "^1.3.2", + "@npmcli/node-gyp": "^2.0.0", + "@npmcli/promise-spawn": "^3.0.0", "node-gyp": "^9.0.0", "read-package-json-fast": "^2.0.3" } @@ -10409,13 +10456,13 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^5.23.0", - "@typescript-eslint/parser": "^5.23.0", + "@typescript-eslint/eslint-plugin": "^5.24.0", + "@typescript-eslint/parser": "^5.24.0", "eslint": "^8.15.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", - "rollup": "^2.72.1", + "rollup": "^2.73.0", "typescript": "^4.6.4" } }, @@ -10430,9 +10477,9 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@sora/e2ee": "^2021.1.0", - "@types/jest": "^27.5.0", - "@typescript-eslint/eslint-plugin": "5.23.0", - "@typescript-eslint/parser": "5.23.0", + "@types/jest": "^27.5.1", + "@typescript-eslint/eslint-plugin": "5.24.0", + "@typescript-eslint/parser": "5.24.0", "eslint": "8.15.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", @@ -10440,7 +10487,7 @@ "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", "prettier": "^2.6.2", - "rollup": "^2.72.1", + "rollup": "^2.73.0", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^28.0.2", "typescript": "^4.6.4" @@ -11338,9 +11385,9 @@ } }, "@types/jest": { - "version": "27.5.0", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.0.tgz", - "integrity": "sha512-9RBFx7r4k+msyj/arpfaa0WOOEcaAZNmN+j80KFbFCoSqCJGHTz7YMAMGQW9Xmqm5w6l5c25vbSjMwlikJi5+g==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.1.tgz", + "integrity": "sha512-fUy7YRpT+rHXto1YlL+J9rs0uLGyiqVt3ZOTQR+4ROc47yNl8WLdVLgUloBRhOxP1PZvguHl44T3H0wAWxahYQ==", "dev": true, "requires": { "jest-matcher-utils": "^27.0.0", @@ -11421,98 +11468,98 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.23.0.tgz", - "integrity": "sha512-hEcSmG4XodSLiAp1uxv/OQSGsDY6QN3TcRU32gANp+19wGE1QQZLRS8/GV58VRUoXhnkuJ3ZxNQ3T6Z6zM59DA==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.24.0.tgz", + "integrity": "sha512-6bqFGk6wa9+6RrU++eLknKyDqXU1Oc8nyoLu5a1fU17PNRJd9UBr56rMF7c4DRaRtnarlkQ4jwxUbvBo8cNlpw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.23.0", - "@typescript-eslint/type-utils": "5.23.0", - "@typescript-eslint/utils": "5.23.0", - "debug": "^4.3.2", + "@typescript-eslint/scope-manager": "5.24.0", + "@typescript-eslint/type-utils": "5.24.0", + "@typescript-eslint/utils": "5.24.0", + "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", + "ignore": "^5.2.0", "regexpp": "^3.2.0", - "semver": "^7.3.5", + "semver": "^7.3.7", "tsutils": "^3.21.0" } }, "@typescript-eslint/parser": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.23.0.tgz", - "integrity": "sha512-V06cYUkqcGqpFjb8ttVgzNF53tgbB/KoQT/iB++DOIExKmzI9vBJKjZKt/6FuV9c+zrDsvJKbJ2DOCYwX91cbw==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.24.0.tgz", + "integrity": "sha512-4q29C6xFYZ5B2CXqSBBdcS0lPyfM9M09DoQLtHS5kf+WbpV8pBBhHDLNhXfgyVwFnhrhYzOu7xmg02DzxeF2Uw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.23.0", - "@typescript-eslint/types": "5.23.0", - "@typescript-eslint/typescript-estree": "5.23.0", - "debug": "^4.3.2" + "@typescript-eslint/scope-manager": "5.24.0", + "@typescript-eslint/types": "5.24.0", + "@typescript-eslint/typescript-estree": "5.24.0", + "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.23.0.tgz", - "integrity": "sha512-EhjaFELQHCRb5wTwlGsNMvzK9b8Oco4aYNleeDlNuL6qXWDF47ch4EhVNPh8Rdhf9tmqbN4sWDk/8g+Z/J8JVw==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.24.0.tgz", + "integrity": "sha512-WpMWipcDzGmMzdT7NtTjRXFabx10WleLUGrJpuJLGaxSqpcyq5ACpKSD5VE40h2nz3melQ91aP4Du7lh9FliCA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.23.0", - "@typescript-eslint/visitor-keys": "5.23.0" + "@typescript-eslint/types": "5.24.0", + "@typescript-eslint/visitor-keys": "5.24.0" } }, "@typescript-eslint/type-utils": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.23.0.tgz", - "integrity": "sha512-iuI05JsJl/SUnOTXA9f4oI+/4qS/Zcgk+s2ir+lRmXI+80D8GaGwoUqs4p+X+4AxDolPpEpVUdlEH4ADxFy4gw==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.24.0.tgz", + "integrity": "sha512-uGi+sQiM6E5CeCZYBXiaIvIChBXru4LZ1tMoeKbh1Lze+8BO9syUG07594C4lvN2YPT4KVeIupOJkVI+9/DAmQ==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.23.0", - "debug": "^4.3.2", + "@typescript-eslint/utils": "5.24.0", + "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.23.0.tgz", - "integrity": "sha512-NfBsV/h4dir/8mJwdZz7JFibaKC3E/QdeMEDJhiAE3/eMkoniZ7MjbEMCGXw6MZnZDMN3G9S0mH/6WUIj91dmw==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.24.0.tgz", + "integrity": "sha512-Tpg1c3shTDgTmZd3qdUyd+16r/pGmVaVEbLs+ufuWP0EruVbUiEOmpBBQxBb9a8iPRxi8Rb2oiwOxuZJzSq11A==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.23.0.tgz", - "integrity": "sha512-xE9e0lrHhI647SlGMl+m+3E3CKPF1wzvvOEWnuE3CCjjT7UiRnDGJxmAcVKJIlFgK6DY9RB98eLr1OPigPEOGg==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.24.0.tgz", + "integrity": "sha512-zcor6vQkQmZAQfebSPVwUk/FD+CvnsnlfKXYeQDsWXRF+t7SBPmIfNia/wQxCSeu1h1JIjwV2i9f5/DdSp/uDw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.23.0", - "@typescript-eslint/visitor-keys": "5.23.0", - "debug": "^4.3.2", - "globby": "^11.0.4", + "@typescript-eslint/types": "5.24.0", + "@typescript-eslint/visitor-keys": "5.24.0", + "debug": "^4.3.4", + "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.5", + "semver": "^7.3.7", "tsutils": "^3.21.0" } }, "@typescript-eslint/utils": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.23.0.tgz", - "integrity": "sha512-dbgaKN21drqpkbbedGMNPCtRPZo1IOUr5EI9Jrrh99r5UW5Q0dz46RKXeSBoPV+56R6dFKpbrdhgUNSJsDDRZA==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.24.0.tgz", + "integrity": "sha512-K05sbWoeCBJH8KXu6hetBJ+ukG0k2u2KlgD3bN+v+oBKm8adJqVHpSSLHNzqyuv0Lh4GVSAUgZ5lB4icmPmWLw==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.23.0", - "@typescript-eslint/types": "5.23.0", - "@typescript-eslint/typescript-estree": "5.23.0", + "@typescript-eslint/scope-manager": "5.24.0", + "@typescript-eslint/types": "5.24.0", + "@typescript-eslint/typescript-estree": "5.24.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.23.0.tgz", - "integrity": "sha512-Vd4mFNchU62sJB8pX19ZSPog05B0Y0CE2UxAZPT5k4iqhRYjPnqyY3woMxCd0++t9OTqkgjST+1ydLBi7e2Fvg==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.24.0.tgz", + "integrity": "sha512-qzGwSXMyMnogcAo+/2fU+jhlPPVMXlIH2PeAonIKjJSoDKl1+lJVvG5Z5Oud36yU0TWK2cs1p/FaSN5J2OUFYA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.23.0", - "eslint-visitor-keys": "^3.0.0" + "@typescript-eslint/types": "5.24.0", + "eslint-visitor-keys": "^3.3.0" } }, "@zeit/schemas": { @@ -11842,10 +11889,13 @@ "dev": true }, "builtins": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", - "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", - "dev": true + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dev": true, + "requires": { + "semver": "^7.0.0" + } }, "bytes": { "version": "3.0.0", @@ -11854,16 +11904,16 @@ "dev": true }, "cacache": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.0.3.tgz", - "integrity": "sha512-eC7wYodNCVb97kuHGk5P+xZsvUJHkhSEOyNwkenqQPAsOtrTjvWOE5vSPNBpz9d8X3acIf6w2Ub5s4rvOCTs4g==", + "version": "16.0.7", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.0.7.tgz", + "integrity": "sha512-a4zfQpp5vm4Ipdvbj+ZrPonikRhm6WBEd4zT1Yc1DXsmAxrPgDwWBLF/u/wTVXSFPIgOJ1U3ghSa2Xm4s3h28w==", "dev": true, "requires": { "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^1.1.2", + "@npmcli/move-file": "^2.0.0", "chownr": "^2.0.0", "fs-minipass": "^2.1.0", - "glob": "^7.2.0", + "glob": "^8.0.1", "infer-owner": "^1.0.4", "lru-cache": "^7.7.1", "minipass": "^3.1.6", @@ -11874,15 +11924,28 @@ "p-map": "^4.0.0", "promise-inflight": "^1.0.1", "rimraf": "^3.0.2", - "ssri": "^8.0.1", + "ssri": "^9.0.0", "tar": "^6.1.11", "unique-filename": "^1.1.1" }, "dependencies": { + "glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, "lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.10.1.tgz", + "integrity": "sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A==", "dev": true } } @@ -12078,9 +12141,9 @@ } }, "commander": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.1.0.tgz", - "integrity": "sha512-i0/MaqBtdbnJ4XQs4Pmyb+oFQl+q0lsAmokVUH92SlSw4fkeAcG3bVon+Qt7hmtF+u3Het6o4VgrcY3qAoEB6w==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.2.0.tgz", + "integrity": "sha512-e2i4wANQiSXgnrBlIatyHtP1odfUp0BbV5Y5nEGbxtIrStkEOAAzCUirvLBNXHLr7kwLvJl6V+4V3XV9x7Wd9w==", "dev": true }, "commondir": { @@ -12958,9 +13021,9 @@ "dev": true }, "gauge": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.3.tgz", - "integrity": "sha512-ICw1DhAwMtb22rYFwEHgJcx1JCwJGv3x6G0OQUq56Nge+H4Q8JEwr8iveS0XFlsUNSI67F5ffMGK25bK4Pmskw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", "dev": true, "requires": { "aproba": "^1.0.3 || ^2.0.0", @@ -13152,9 +13215,9 @@ }, "dependencies": { "lru-cache": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.3.tgz", - "integrity": "sha512-WY9wjJNQt9+PZilnLbuFKM+SwDull9+6IAguOrarOMoOHTcJ9GnXSO11+Gw6c7xtDkBkthR57OZMtZKYr+1CEw==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.10.1.tgz", + "integrity": "sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A==", "dev": true } } @@ -13232,33 +13295,12 @@ "dev": true }, "ignore-walk": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-4.0.1.tgz", - "integrity": "sha512-rzDQLaW4jQbh2YrOFlJdCtX8qgJTehFRYiUB2r1osqTeDzV/3+Jh8fz1oAPzUThf3iku8Ds4IDqawI5d8mUiQw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz", + "integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==", "dev": true, "requires": { - "minimatch": "^3.0.4" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } + "minimatch": "^5.0.1" } }, "import-fresh": { @@ -13328,9 +13370,9 @@ "dev": true }, "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", + "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==", "dev": true }, "is-arrayish": { @@ -14184,18 +14226,18 @@ "dev": true }, "make-fetch-happen": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.6.tgz", - "integrity": "sha512-4Gfh6lV3TLXmj7qz79hBFuvVqjYSMW6v2+sxtdX4LFQU0rK3V/txRjE0DoZb7X0IF3t9f8NO3CxPSWlvdckhVA==", + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.1.3.tgz", + "integrity": "sha512-s/UjmGjUHn9m52cctFhN2ITObbT+axoUhgeir8xGrOlPbKDyJsdhQzb8PGncPQQ28uduHybFJ6Iumy2OZnreXw==", "dev": true, "requires": { "agentkeepalive": "^4.2.1", - "cacache": "^16.0.0", + "cacache": "^16.0.2", "http-cache-semantics": "^4.1.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", - "lru-cache": "^7.5.1", + "lru-cache": "^7.7.1", "minipass": "^3.1.6", "minipass-collect": "^1.0.2", "minipass-fetch": "^2.0.3", @@ -14204,13 +14246,13 @@ "negotiator": "^0.6.3", "promise-retry": "^2.0.1", "socks-proxy-agent": "^6.1.1", - "ssri": "^8.0.1" + "ssri": "^9.0.0" }, "dependencies": { "lru-cache": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.7.1.tgz", - "integrity": "sha512-cRffBiTW8s73eH4aTXqBcTLU0xQnwGV3/imttRHGWCrbergmnK4D6JXQd8qin5z43HnDwRI+o7mVW0LEB+tpAw==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.10.1.tgz", + "integrity": "sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A==", "dev": true } } @@ -14313,9 +14355,9 @@ } }, "minipass-fetch": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.0.3.tgz", - "integrity": "sha512-VA+eiiUtaIvpQJXISwE3OiMvQwAWrgKb97F0aXlCS1Ahikr8fEQq8m3Hf7Kv9KT3nokuHigJKsDMB6atU04olQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.0.tgz", + "integrity": "sha512-H9U4UVBGXEyyWJnqYDCLp1PwD8XIkJ4akNHp1aGVI+2Ym7wQMlxDKi4IB4JbmyU+pl9pEs/cVrK6cOuvmbK4Sg==", "dev": true, "requires": { "encoding": "^0.1.13", @@ -14474,15 +14516,15 @@ } }, "npm-check-updates": { - "version": "12.5.11", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-12.5.11.tgz", - "integrity": "sha512-uS3yYYK/F1VvZlJRymuCkq+MY2R7v/WlORo5WPUTYx+1OwkqeDMC/CEEGfCN7ATwT2M+JxVVKk9Gq/TGiZjJOw==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.0.0.tgz", + "integrity": "sha512-xy19rT3Al1uZSWMYb2kJFryM33tzXjaeLWhdzHdadw4aVfwz+GQrnuehpK2RwgYol1n+LyxrDzPHrwmmJnWiTg==", "dev": true, "requires": { "chalk": "^4.1.2", "cint": "^8.2.1", "cli-table": "^0.3.11", - "commander": "^9.1.0", + "commander": "^9.2.0", "fast-memoize": "^2.5.2", "find-up": "5.0.0", "fp-and-or": "^0.1.3", @@ -14495,25 +14537,25 @@ "lodash": "^4.17.21", "minimatch": "^5.0.1", "p-map": "^4.0.0", - "pacote": "^13.0.5", + "pacote": "^13.3.0", "parse-github-url": "^1.0.2", "progress": "^2.0.3", "prompts": "^2.4.2", "rc-config-loader": "^4.1.0", "remote-git-tags": "^3.0.0", "rimraf": "^3.0.2", - "semver": "^7.3.5", + "semver": "^7.3.7", "semver-utils": "^1.1.4", "source-map-support": "^0.5.21", "spawn-please": "^1.0.0", "update-notifier": "^5.1.0", - "yaml": "^1.10.2" + "yaml": "^2.1.0" } }, "npm-install-checks": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-4.0.0.tgz", - "integrity": "sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-5.0.0.tgz", + "integrity": "sha512-65lUsMI8ztHCxFz5ckCEC44DRvEGdZX5usQFriauxHEwt7upv1FKaQEmAtU0YnOAdwuNWCmk64xYiQABNrEyLA==", "dev": true, "requires": { "semver": "^7.1.1" @@ -14526,44 +14568,59 @@ "dev": true }, "npm-package-arg": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.1.tgz", - "integrity": "sha512-Xs9wznfEAmZAR61qsYH3iN24V/qMYYkvAR5CRQNMvC6PjN2fHtO8y9XP/xdp5K+Icx+u1wMBMgWRPCmAEChSog==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.2.tgz", + "integrity": "sha512-v/miORuX8cndiOheW8p2moNuPJ7QhcFh9WGlTorruG8hXSA23vMTEp5hTCmDxic0nD8KHhj/NQgFuySD3GYY3g==", "dev": true, "requires": { "hosted-git-info": "^5.0.0", "semver": "^7.3.5", - "validate-npm-package-name": "^3.0.0" + "validate-npm-package-name": "^4.0.0" } }, "npm-packlist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-4.0.0.tgz", - "integrity": "sha512-gL6XC/iw9YSmqArmZOGSkyy+yIZf2f7uH0p4Vmxef/irn73vd9/rDkCtvm+a9rh/QK2xGYfCAMOghM06ymzC0A==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.0.3.tgz", + "integrity": "sha512-KuSbzgejxdsAWbNNyEs8EsyDHsO+nJF6k+9WuWzFbSNh5tFHs4lDApXw7kntKpuehfp8lKRzJkMtz0+WmGvTIw==", "dev": true, "requires": { - "glob": "^7.2.0", - "ignore-walk": "^4.0.1", + "glob": "^8.0.1", + "ignore-walk": "^5.0.1", "npm-bundled": "^1.1.2", "npm-normalize-package-bin": "^1.0.1" + }, + "dependencies": { + "glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + } } }, "npm-pick-manifest": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.0.tgz", - "integrity": "sha512-njM1AcdioFaKd0JSGtLO09YA1WRwctjGQJbnHGmKS+u+uwP8oFvtZtOQWPYdxrnY5eJud3wn8OpH4sEIx6+GEQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.1.tgz", + "integrity": "sha512-IA8+tuv8KujbsbLQvselW2XQgmXWS47t3CB0ZrzsRZ82DbDfkcFunOaPm4X7qNuhMfq+FmV7hQT4iFVpHqV7mg==", "dev": true, "requires": { - "npm-install-checks": "^4.0.0", + "npm-install-checks": "^5.0.0", "npm-normalize-package-bin": "^1.0.1", "npm-package-arg": "^9.0.0", "semver": "^7.3.5" } }, "npm-registry-fetch": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.1.0.tgz", - "integrity": "sha512-TIYL5X8CcwDhbFMXFDShNcpG6OMCYK6VzvSr6MUWP20tCU2DJ4ao2qQg3DT+3Pet8mO6/cgbZpon4LMh3duYLg==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.1.1.tgz", + "integrity": "sha512-5p8rwe6wQPLJ8dMqeTnA57Dp9Ox6GH9H60xkyJup07FmVlu3Mk7pf/kIIpl9gaN5bM8NM+UUx3emUWvDNTt39w==", "dev": true, "requires": { "make-fetch-happen": "^10.0.6", @@ -14585,14 +14642,14 @@ } }, "npmlog": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.1.tgz", - "integrity": "sha512-BTHDvY6nrRHuRfyjt1MAufLxYdVXZfd099H4+i1f0lPywNQyI4foeNXJRObB/uy+TYqUW0vAD9gbdSOXPst7Eg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", "dev": true, "requires": { "are-we-there-yet": "^3.0.0", "console-control-strings": "^1.1.0", - "gauge": "^4.0.0", + "gauge": "^4.0.3", "set-blocking": "^2.0.0" } }, @@ -14724,14 +14781,14 @@ } }, "pacote": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.0.5.tgz", - "integrity": "sha512-6CYfot3/rUAn3qqzF2d/jrrXm5HlBtvaSgfmg0VtOUAdJ8fbSq21BJwftMGArkL71yXHIbUJ7Bt5B04547HELA==", + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.3.0.tgz", + "integrity": "sha512-auhJAUlfC2TALo6I0s1vFoPvVFgWGx+uz/PnIojTTgkGwlK3Np8sGJ0ghfFhiuzJXTZoTycMLk8uLskdntPbDw==", "dev": true, "requires": { "@npmcli/git": "^3.0.0", "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/promise-spawn": "^1.2.0", + "@npmcli/promise-spawn": "^3.0.0", "@npmcli/run-script": "^3.0.1", "cacache": "^16.0.0", "chownr": "^2.0.0", @@ -14740,7 +14797,7 @@ "minipass": "^3.1.6", "mkdirp": "^1.0.4", "npm-package-arg": "^9.0.0", - "npm-packlist": "^4.0.0", + "npm-packlist": "^5.0.0", "npm-pick-manifest": "^7.0.0", "npm-registry-fetch": "^13.0.1", "proc-log": "^2.0.0", @@ -14748,7 +14805,7 @@ "read-package-json": "^5.0.0", "read-package-json-fast": "^2.0.3", "rimraf": "^3.0.2", - "ssri": "^8.0.1", + "ssri": "^9.0.0", "tar": "^6.1.11" } }, @@ -14940,9 +14997,9 @@ } }, "proc-log": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.0.tgz", - "integrity": "sha512-I/35MfCX2H8jBUhKN8JB8nmqvQo/nKdrBodBY7L3RhDSPPyvOHwLYNmPuhwuJq7a7C3vgFKWGQM+ecPStcvOHA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", + "integrity": "sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==", "dev": true }, "progress": { @@ -15060,15 +15117,30 @@ "dev": true }, "read-package-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.0.tgz", - "integrity": "sha512-1cjk2MV5ONDMn34uxSID3X8NY7VKsXfJnjbcVdFMvHEnJOBzU6MJ7/3yg6QFVZDq5/1yFNrKBUK9kGnonyGP2Q==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.1.tgz", + "integrity": "sha512-MALHuNgYWdGW3gKzuNMuYtcSSZbGQm94fAp16xt8VsYTLBjUSc55bLMKe6gzpWue0Tfi6CBgwCSdDAqutGDhMg==", "dev": true, "requires": { - "glob": "^7.2.0", + "glob": "^8.0.1", "json-parse-even-better-errors": "^2.3.1", "normalize-package-data": "^4.0.0", "npm-normalize-package-bin": "^1.0.1" + }, + "dependencies": { + "glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + } } }, "read-package-json-fast": { @@ -15206,9 +15278,9 @@ } }, "rollup": { - "version": "2.72.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.72.1.tgz", - "integrity": "sha512-NTc5UGy/NWFGpSqF1lFY8z9Adri6uhyMLI6LvPAXdBKoPRFhIIiBUpt+Qg2awixqO3xvzSijjhnb4+QEZwJmxA==", + "version": "2.73.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.73.0.tgz", + "integrity": "sha512-h/UngC3S4Zt28mB3g0+2YCMegT5yoftnQplwzPqGZcKvlld5e+kT/QRmJiL+qxGyZKOYpgirWGdLyEO1b0dpLQ==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -15270,9 +15342,9 @@ } }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -15498,14 +15570,14 @@ } }, "socks-proxy-agent": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz", - "integrity": "sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.0.tgz", + "integrity": "sha512-wWqJhjb32Q6GsrUqzuFkukxb/zzide5quXYcMVpIjxalDBBYy2nqKCFQ/9+Ie4dvOYSQdOk3hUlZSdzZOd3zMQ==", "dev": true, "requires": { "agent-base": "^6.0.2", - "debug": "^4.3.1", - "socks": "^2.6.1" + "debug": "^4.3.3", + "socks": "^2.6.2" } }, "source-map": { @@ -15575,9 +15647,9 @@ "dev": true }, "ssri": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", - "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.0.tgz", + "integrity": "sha512-Y1Z6J8UYnexKFN1R/hxUaYoY2LVdKEzziPmVAFKiKX8fiwvCJTVzn/xYE9TEWod5OVyNfIHHuVfIEuBClL/uJQ==", "dev": true, "requires": { "minipass": "^3.1.1" @@ -16046,12 +16118,12 @@ } }, "validate-npm-package-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-4.0.0.tgz", + "integrity": "sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==", "dev": true, "requires": { - "builtins": "^1.0.3" + "builtins": "^5.0.0" } }, "vary": { @@ -16230,9 +16302,9 @@ "dev": true }, "yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.0.tgz", + "integrity": "sha512-OuAINfTsoJrY5H7CBWnKZhX6nZciXBydrMtTHr1dC4nP40X5jyTIVlogZHxSlVZM8zSgXRfgZGsaHF4+pV+JRw==", "dev": true }, "yargs-parser": { diff --git a/package.json b/package.json index b261577a..ee49677c 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "dist" ], "devDependencies": { - "npm-check-updates": "^12.5.11", + "npm-check-updates": "^13.0.0", "serve": "^13.0.2", "typedoc": "^0.22.15" }, diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index 93302333..ea2fdb63 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -19,13 +19,13 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.23.0", - "@typescript-eslint/parser": "^5.23.0", + "@typescript-eslint/eslint-plugin": "^5.24.0", + "@typescript-eslint/parser": "^5.24.0", "eslint": "^8.15.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", - "rollup": "^2.72.1", + "rollup": "^2.73.0", "typescript": "^4.6.4" }, "dependencies": { diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 45e52654..1dad2f13 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -12,16 +12,16 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@types/jest": "^27.5.0", - "@typescript-eslint/eslint-plugin": "5.23.0", - "@typescript-eslint/parser": "5.23.0", + "@types/jest": "^27.5.1", + "@typescript-eslint/eslint-plugin": "5.24.0", + "@typescript-eslint/parser": "5.24.0", "eslint": "8.15.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", "prettier": "^2.6.2", - "rollup": "^2.72.1", + "rollup": "^2.73.0", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^28.0.2", "typescript": "^4.6.4" From 9374bb98b062368bbc7e3ce8c95232cf5b4b4566 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 May 2022 16:01:15 +0000 Subject: [PATCH 69/86] Bump npm-check-updates from 13.0.0 to 13.0.3 Bumps [npm-check-updates](https://github.com/raineorshine/npm-check-updates) from 13.0.0 to 13.0.3. - [Release notes](https://github.com/raineorshine/npm-check-updates/releases) - [Changelog](https://github.com/raineorshine/npm-check-updates/blob/main/CHANGELOG.md) - [Commits](https://github.com/raineorshine/npm-check-updates/compare/v13.0.0...v13.0.3) --- updated-dependencies: - dependency-name: npm-check-updates dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 154 ++-------------------------------------------- 1 file changed, 6 insertions(+), 148 deletions(-) diff --git a/package-lock.json b/package-lock.json index eb4a3742..007c7df2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3714,12 +3714,6 @@ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.3.tgz", "integrity": "sha512-0Zz1jOzJWERhyhsimS54VTqOteCNwRtIlh8isdL0AXLo0g7xNTfTL7oWrkmCnPhZGocKIkWHBistBrrpoNH3aw==" }, - "node_modules/figgy-pudding": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", - "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", - "dev": true - }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -5202,78 +5196,6 @@ "node": ">= 0.8.0" } }, - "node_modules/libnpmconfig": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/libnpmconfig/-/libnpmconfig-1.2.1.tgz", - "integrity": "sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA==", - "dev": true, - "dependencies": { - "figgy-pudding": "^3.5.1", - "find-up": "^3.0.0", - "ini": "^1.3.5" - } - }, - "node_modules/libnpmconfig/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/libnpmconfig/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/libnpmconfig/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/libnpmconfig/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/libnpmconfig/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -5754,9 +5676,9 @@ } }, "node_modules/npm-check-updates": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.0.0.tgz", - "integrity": "sha512-xy19rT3Al1uZSWMYb2kJFryM33tzXjaeLWhdzHdadw4aVfwz+GQrnuehpK2RwgYol1n+LyxrDzPHrwmmJnWiTg==", + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.0.3.tgz", + "integrity": "sha512-a8CVklJjXZhmN5Kup8rKiejArobCbOaMnubhvM/LkYVumO17dBuWuaHUuiSrYglQUb88lGSdbNNfHDNN7b+3pQ==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -5771,7 +5693,6 @@ "hosted-git-info": "^5.0.0", "json-parse-helpfulerror": "^1.0.3", "jsonlines": "^0.1.1", - "libnpmconfig": "^1.2.1", "lodash": "^4.17.21", "minimatch": "^5.0.1", "p-map": "^4.0.0", @@ -12919,12 +12840,6 @@ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.3.tgz", "integrity": "sha512-0Zz1jOzJWERhyhsimS54VTqOteCNwRtIlh8isdL0AXLo0g7xNTfTL7oWrkmCnPhZGocKIkWHBistBrrpoNH3aw==" }, - "figgy-pudding": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", - "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", - "dev": true - }, "file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -14083,62 +13998,6 @@ "type-check": "~0.4.0" } }, - "libnpmconfig": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/libnpmconfig/-/libnpmconfig-1.2.1.tgz", - "integrity": "sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1", - "find-up": "^3.0.0", - "ini": "^1.3.5" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } - } - }, "lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -14516,9 +14375,9 @@ } }, "npm-check-updates": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.0.0.tgz", - "integrity": "sha512-xy19rT3Al1uZSWMYb2kJFryM33tzXjaeLWhdzHdadw4aVfwz+GQrnuehpK2RwgYol1n+LyxrDzPHrwmmJnWiTg==", + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.0.3.tgz", + "integrity": "sha512-a8CVklJjXZhmN5Kup8rKiejArobCbOaMnubhvM/LkYVumO17dBuWuaHUuiSrYglQUb88lGSdbNNfHDNN7b+3pQ==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -14533,7 +14392,6 @@ "hosted-git-info": "^5.0.0", "json-parse-helpfulerror": "^1.0.3", "jsonlines": "^0.1.1", - "libnpmconfig": "^1.2.1", "lodash": "^4.17.21", "minimatch": "^5.0.1", "p-map": "^4.0.0", From 98fa18489536a4eb6ec2da59ced92390b7f6fa1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 May 2022 16:01:31 +0000 Subject: [PATCH 70/86] Bump @typescript-eslint/parser from 5.24.0 to 5.25.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.24.0 to 5.25.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.25.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 145 ++++++++++++++++++++++++++++++++++---- packages/sdk/package.json | 2 +- 2 files changed, 132 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index eb4a3742..4fc08707 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1797,14 +1797,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.24.0.tgz", - "integrity": "sha512-4q29C6xFYZ5B2CXqSBBdcS0lPyfM9M09DoQLtHS5kf+WbpV8pBBhHDLNhXfgyVwFnhrhYzOu7xmg02DzxeF2Uw==", + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.25.0.tgz", + "integrity": "sha512-r3hwrOWYbNKP1nTcIw/aZoH+8bBnh/Lh1iDHoFpyG4DnCpvEdctrSl6LOo19fZbzypjQMHdajolxs6VpYoChgA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.24.0", - "@typescript-eslint/types": "5.24.0", - "@typescript-eslint/typescript-estree": "5.24.0", + "@typescript-eslint/scope-manager": "5.25.0", + "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/typescript-estree": "5.25.0", "debug": "^4.3.4" }, "engines": { @@ -1823,6 +1823,80 @@ } } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.25.0.tgz", + "integrity": "sha512-p4SKTFWj+2VpreUZ5xMQsBMDdQ9XdRvODKXN4EksyBjFp2YvQdLkyHqOffakYZPuWJUDNu3jVXtHALDyTv3cww==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/visitor-keys": "5.25.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.25.0.tgz", + "integrity": "sha512-7fWqfxr0KNHj75PFqlGX24gWjdV/FDBABXL5dyvBOWHpACGyveok8Uj4ipPX/1fGU63fBkzSIycEje4XsOxUFA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.25.0.tgz", + "integrity": "sha512-MrPODKDych/oWs/71LCnuO7NyR681HuBly2uLnX3r5i4ME7q/yBqC4hW33kmxtuauLTM0OuBOhhkFaxCCOjEEw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/visitor-keys": "5.25.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.25.0.tgz", + "integrity": "sha512-yd26vFgMsC4h2dgX4+LR+GeicSKIfUvZREFLf3DDjZPtqgLx5AJZr6TetMNwFP9hcKreTTeztQYBTNbNoOycwA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.25.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.24.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.24.0.tgz", @@ -8151,7 +8225,7 @@ "@rollup/plugin-typescript": "^8.3.2", "@types/jest": "^27.5.1", "@typescript-eslint/eslint-plugin": "5.24.0", - "@typescript-eslint/parser": "5.24.0", + "@typescript-eslint/parser": "5.25.0", "eslint": "8.15.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", @@ -10479,7 +10553,7 @@ "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.5.1", "@typescript-eslint/eslint-plugin": "5.24.0", - "@typescript-eslint/parser": "5.24.0", + "@typescript-eslint/parser": "5.25.0", "eslint": "8.15.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", @@ -11485,15 +11559,58 @@ } }, "@typescript-eslint/parser": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.24.0.tgz", - "integrity": "sha512-4q29C6xFYZ5B2CXqSBBdcS0lPyfM9M09DoQLtHS5kf+WbpV8pBBhHDLNhXfgyVwFnhrhYzOu7xmg02DzxeF2Uw==", + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.25.0.tgz", + "integrity": "sha512-r3hwrOWYbNKP1nTcIw/aZoH+8bBnh/Lh1iDHoFpyG4DnCpvEdctrSl6LOo19fZbzypjQMHdajolxs6VpYoChgA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.24.0", - "@typescript-eslint/types": "5.24.0", - "@typescript-eslint/typescript-estree": "5.24.0", + "@typescript-eslint/scope-manager": "5.25.0", + "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/typescript-estree": "5.25.0", "debug": "^4.3.4" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.25.0.tgz", + "integrity": "sha512-p4SKTFWj+2VpreUZ5xMQsBMDdQ9XdRvODKXN4EksyBjFp2YvQdLkyHqOffakYZPuWJUDNu3jVXtHALDyTv3cww==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/visitor-keys": "5.25.0" + } + }, + "@typescript-eslint/types": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.25.0.tgz", + "integrity": "sha512-7fWqfxr0KNHj75PFqlGX24gWjdV/FDBABXL5dyvBOWHpACGyveok8Uj4ipPX/1fGU63fBkzSIycEje4XsOxUFA==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.25.0.tgz", + "integrity": "sha512-MrPODKDych/oWs/71LCnuO7NyR681HuBly2uLnX3r5i4ME7q/yBqC4hW33kmxtuauLTM0OuBOhhkFaxCCOjEEw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/visitor-keys": "5.25.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.25.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.25.0.tgz", + "integrity": "sha512-yd26vFgMsC4h2dgX4+LR+GeicSKIfUvZREFLf3DDjZPtqgLx5AJZr6TetMNwFP9hcKreTTeztQYBTNbNoOycwA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.25.0", + "eslint-visitor-keys": "^3.3.0" + } + } } }, "@typescript-eslint/scope-manager": { diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 1dad2f13..43a0a603 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -14,7 +14,7 @@ "@rollup/plugin-typescript": "^8.3.2", "@types/jest": "^27.5.1", "@typescript-eslint/eslint-plugin": "5.24.0", - "@typescript-eslint/parser": "5.24.0", + "@typescript-eslint/parser": "5.25.0", "eslint": "8.15.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", From e8d133b47851e4674a4e60e7ced58120b1536d61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 May 2022 00:53:30 +0000 Subject: [PATCH 71/86] Bump @typescript-eslint/parser from 5.25.0 to 5.26.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.25.0 to 5.26.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.26.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 96 +++++++++++++++++++-------------------- packages/sdk/package.json | 2 +- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1285626a..d8abe1ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1797,14 +1797,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.25.0.tgz", - "integrity": "sha512-r3hwrOWYbNKP1nTcIw/aZoH+8bBnh/Lh1iDHoFpyG4DnCpvEdctrSl6LOo19fZbzypjQMHdajolxs6VpYoChgA==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.26.0.tgz", + "integrity": "sha512-n/IzU87ttzIdnAH5vQ4BBDnLPly7rC5VnjN3m0xBG82HK6rhRxnCb3w/GyWbNDghPd+NktJqB/wl6+YkzZ5T5Q==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.25.0", - "@typescript-eslint/types": "5.25.0", - "@typescript-eslint/typescript-estree": "5.25.0", + "@typescript-eslint/scope-manager": "5.26.0", + "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/typescript-estree": "5.26.0", "debug": "^4.3.4" }, "engines": { @@ -1824,13 +1824,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "5.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.25.0.tgz", - "integrity": "sha512-p4SKTFWj+2VpreUZ5xMQsBMDdQ9XdRvODKXN4EksyBjFp2YvQdLkyHqOffakYZPuWJUDNu3jVXtHALDyTv3cww==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.26.0.tgz", + "integrity": "sha512-gVzTJUESuTwiju/7NiTb4c5oqod8xt5GhMbExKsCTp6adU3mya6AGJ4Pl9xC7x2DX9UYFsjImC0mA62BCY22Iw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.25.0", - "@typescript-eslint/visitor-keys": "5.25.0" + "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/visitor-keys": "5.26.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1841,9 +1841,9 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "5.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.25.0.tgz", - "integrity": "sha512-7fWqfxr0KNHj75PFqlGX24gWjdV/FDBABXL5dyvBOWHpACGyveok8Uj4ipPX/1fGU63fBkzSIycEje4XsOxUFA==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.26.0.tgz", + "integrity": "sha512-8794JZFE1RN4XaExLWLI2oSXsVImNkl79PzTOOWt9h0UHROwJedNOD2IJyfL0NbddFllcktGIO2aOu10avQQyA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1854,13 +1854,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.25.0.tgz", - "integrity": "sha512-MrPODKDych/oWs/71LCnuO7NyR681HuBly2uLnX3r5i4ME7q/yBqC4hW33kmxtuauLTM0OuBOhhkFaxCCOjEEw==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.26.0.tgz", + "integrity": "sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.25.0", - "@typescript-eslint/visitor-keys": "5.25.0", + "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/visitor-keys": "5.26.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1881,12 +1881,12 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.25.0.tgz", - "integrity": "sha512-yd26vFgMsC4h2dgX4+LR+GeicSKIfUvZREFLf3DDjZPtqgLx5AJZr6TetMNwFP9hcKreTTeztQYBTNbNoOycwA==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.26.0.tgz", + "integrity": "sha512-wei+ffqHanYDOQgg/fS6Hcar6wAWv0CUPQ3TZzOWd2BLfgP539rb49bwua8WRAs7R6kOSLn82rfEu2ro6Llt8Q==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/types": "5.26.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -8146,7 +8146,7 @@ "@rollup/plugin-typescript": "^8.3.2", "@types/jest": "^27.5.1", "@typescript-eslint/eslint-plugin": "5.24.0", - "@typescript-eslint/parser": "5.25.0", + "@typescript-eslint/parser": "5.26.0", "eslint": "8.15.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", @@ -10474,7 +10474,7 @@ "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.5.1", "@typescript-eslint/eslint-plugin": "5.24.0", - "@typescript-eslint/parser": "5.25.0", + "@typescript-eslint/parser": "5.26.0", "eslint": "8.15.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", @@ -11480,41 +11480,41 @@ } }, "@typescript-eslint/parser": { - "version": "5.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.25.0.tgz", - "integrity": "sha512-r3hwrOWYbNKP1nTcIw/aZoH+8bBnh/Lh1iDHoFpyG4DnCpvEdctrSl6LOo19fZbzypjQMHdajolxs6VpYoChgA==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.26.0.tgz", + "integrity": "sha512-n/IzU87ttzIdnAH5vQ4BBDnLPly7rC5VnjN3m0xBG82HK6rhRxnCb3w/GyWbNDghPd+NktJqB/wl6+YkzZ5T5Q==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.25.0", - "@typescript-eslint/types": "5.25.0", - "@typescript-eslint/typescript-estree": "5.25.0", + "@typescript-eslint/scope-manager": "5.26.0", + "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/typescript-estree": "5.26.0", "debug": "^4.3.4" }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "5.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.25.0.tgz", - "integrity": "sha512-p4SKTFWj+2VpreUZ5xMQsBMDdQ9XdRvODKXN4EksyBjFp2YvQdLkyHqOffakYZPuWJUDNu3jVXtHALDyTv3cww==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.26.0.tgz", + "integrity": "sha512-gVzTJUESuTwiju/7NiTb4c5oqod8xt5GhMbExKsCTp6adU3mya6AGJ4Pl9xC7x2DX9UYFsjImC0mA62BCY22Iw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.25.0", - "@typescript-eslint/visitor-keys": "5.25.0" + "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/visitor-keys": "5.26.0" } }, "@typescript-eslint/types": { - "version": "5.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.25.0.tgz", - "integrity": "sha512-7fWqfxr0KNHj75PFqlGX24gWjdV/FDBABXL5dyvBOWHpACGyveok8Uj4ipPX/1fGU63fBkzSIycEje4XsOxUFA==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.26.0.tgz", + "integrity": "sha512-8794JZFE1RN4XaExLWLI2oSXsVImNkl79PzTOOWt9h0UHROwJedNOD2IJyfL0NbddFllcktGIO2aOu10avQQyA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.25.0.tgz", - "integrity": "sha512-MrPODKDych/oWs/71LCnuO7NyR681HuBly2uLnX3r5i4ME7q/yBqC4hW33kmxtuauLTM0OuBOhhkFaxCCOjEEw==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.26.0.tgz", + "integrity": "sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==", "dev": true, "requires": { - "@typescript-eslint/types": "5.25.0", - "@typescript-eslint/visitor-keys": "5.25.0", + "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/visitor-keys": "5.26.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -11523,12 +11523,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.25.0.tgz", - "integrity": "sha512-yd26vFgMsC4h2dgX4+LR+GeicSKIfUvZREFLf3DDjZPtqgLx5AJZr6TetMNwFP9hcKreTTeztQYBTNbNoOycwA==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.26.0.tgz", + "integrity": "sha512-wei+ffqHanYDOQgg/fS6Hcar6wAWv0CUPQ3TZzOWd2BLfgP539rb49bwua8WRAs7R6kOSLn82rfEu2ro6Llt8Q==", "dev": true, "requires": { - "@typescript-eslint/types": "5.25.0", + "@typescript-eslint/types": "5.26.0", "eslint-visitor-keys": "^3.3.0" } } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 43a0a603..667eecb4 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -14,7 +14,7 @@ "@rollup/plugin-typescript": "^8.3.2", "@types/jest": "^27.5.1", "@typescript-eslint/eslint-plugin": "5.24.0", - "@typescript-eslint/parser": "5.25.0", + "@typescript-eslint/parser": "5.26.0", "eslint": "8.15.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", From c90e951e0a3288c5b81cd8ca86d8eeab31fb4ec2 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 24 May 2022 10:05:15 +0900 Subject: [PATCH 72/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 331 ++++++++++++------------------------- package.json | 2 +- packages/e2ee/package.json | 8 +- packages/sdk/package.json | 6 +- 4 files changed, 115 insertions(+), 232 deletions(-) diff --git a/package-lock.json b/package-lock.json index d8abe1ab..e26027c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "packages/sdk" ], "devDependencies": { - "npm-check-updates": "^13.0.0", + "npm-check-updates": "^13.0.3", "serve": "^13.0.2", "typedoc": "^0.22.15" } @@ -601,15 +601,15 @@ "dev": true }, "node_modules/@eslint/eslintrc": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.3.tgz", - "integrity": "sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", + "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.3.2", - "globals": "^13.9.0", + "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -1764,14 +1764,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.24.0.tgz", - "integrity": "sha512-6bqFGk6wa9+6RrU++eLknKyDqXU1Oc8nyoLu5a1fU17PNRJd9UBr56rMF7c4DRaRtnarlkQ4jwxUbvBo8cNlpw==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.26.0.tgz", + "integrity": "sha512-oGCmo0PqnRZZndr+KwvvAUvD3kNE4AfyoGCwOZpoCncSh4MVD06JTE8XQa2u9u+NX5CsyZMBTEc2C72zx38eYA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.24.0", - "@typescript-eslint/type-utils": "5.24.0", - "@typescript-eslint/utils": "5.24.0", + "@typescript-eslint/scope-manager": "5.26.0", + "@typescript-eslint/type-utils": "5.26.0", + "@typescript-eslint/utils": "5.26.0", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -1823,7 +1823,7 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "node_modules/@typescript-eslint/scope-manager": { "version": "5.26.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.26.0.tgz", "integrity": "sha512-gVzTJUESuTwiju/7NiTb4c5oqod8xt5GhMbExKsCTp6adU3mya6AGJ4Pl9xC7x2DX9UYFsjImC0mA62BCY22Iw==", @@ -1840,87 +1840,13 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.26.0.tgz", - "integrity": "sha512-8794JZFE1RN4XaExLWLI2oSXsVImNkl79PzTOOWt9h0UHROwJedNOD2IJyfL0NbddFllcktGIO2aOu10avQQyA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.26.0.tgz", - "integrity": "sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.26.0.tgz", - "integrity": "sha512-wei+ffqHanYDOQgg/fS6Hcar6wAWv0CUPQ3TZzOWd2BLfgP539rb49bwua8WRAs7R6kOSLn82rfEu2ro6Llt8Q==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.26.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.24.0.tgz", - "integrity": "sha512-WpMWipcDzGmMzdT7NtTjRXFabx10WleLUGrJpuJLGaxSqpcyq5ACpKSD5VE40h2nz3melQ91aP4Du7lh9FliCA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.24.0", - "@typescript-eslint/visitor-keys": "5.24.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.24.0.tgz", - "integrity": "sha512-uGi+sQiM6E5CeCZYBXiaIvIChBXru4LZ1tMoeKbh1Lze+8BO9syUG07594C4lvN2YPT4KVeIupOJkVI+9/DAmQ==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.26.0.tgz", + "integrity": "sha512-7ccbUVWGLmcRDSA1+ADkDBl5fP87EJt0fnijsMFTVHXKGduYMgienC/i3QwoVhDADUAPoytgjbZbCOMj4TY55A==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.24.0", + "@typescript-eslint/utils": "5.26.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1941,9 +1867,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.24.0.tgz", - "integrity": "sha512-Tpg1c3shTDgTmZd3qdUyd+16r/pGmVaVEbLs+ufuWP0EruVbUiEOmpBBQxBb9a8iPRxi8Rb2oiwOxuZJzSq11A==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.26.0.tgz", + "integrity": "sha512-8794JZFE1RN4XaExLWLI2oSXsVImNkl79PzTOOWt9h0UHROwJedNOD2IJyfL0NbddFllcktGIO2aOu10avQQyA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1954,13 +1880,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.24.0.tgz", - "integrity": "sha512-zcor6vQkQmZAQfebSPVwUk/FD+CvnsnlfKXYeQDsWXRF+t7SBPmIfNia/wQxCSeu1h1JIjwV2i9f5/DdSp/uDw==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.26.0.tgz", + "integrity": "sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.24.0", - "@typescript-eslint/visitor-keys": "5.24.0", + "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/visitor-keys": "5.26.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1981,15 +1907,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.24.0.tgz", - "integrity": "sha512-K05sbWoeCBJH8KXu6hetBJ+ukG0k2u2KlgD3bN+v+oBKm8adJqVHpSSLHNzqyuv0Lh4GVSAUgZ5lB4icmPmWLw==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.26.0.tgz", + "integrity": "sha512-PJFwcTq2Pt4AMOKfe3zQOdez6InIDOjUJJD3v3LyEtxHGVVRK3Vo7Dd923t/4M9hSH2q2CLvcTdxlLPjcIk3eg==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.24.0", - "@typescript-eslint/types": "5.24.0", - "@typescript-eslint/typescript-estree": "5.24.0", + "@typescript-eslint/scope-manager": "5.26.0", + "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/typescript-estree": "5.26.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -2005,12 +1931,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.24.0.tgz", - "integrity": "sha512-qzGwSXMyMnogcAo+/2fU+jhlPPVMXlIH2PeAonIKjJSoDKl1+lJVvG5Z5Oud36yU0TWK2cs1p/FaSN5J2OUFYA==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.26.0.tgz", + "integrity": "sha512-wei+ffqHanYDOQgg/fS6Hcar6wAWv0CUPQ3TZzOWd2BLfgP539rb49bwua8WRAs7R6kOSLn82rfEu2ro6Llt8Q==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.24.0", + "@typescript-eslint/types": "5.26.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -3333,12 +3259,12 @@ } }, "node_modules/eslint": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.15.0.tgz", - "integrity": "sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", + "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.2.3", + "@eslint/eslintrc": "^1.3.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -3356,7 +3282,7 @@ "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", - "globals": "^13.6.0", + "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -4063,9 +3989,9 @@ } }, "node_modules/globals": { - "version": "13.14.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.14.0.tgz", - "integrity": "sha512-ERO68sOYwm5UuLvSJTY7w7NP2c8S4UcXs3X1GBX8cwOr+ShOcDBbCY5mH4zxz0jsYCdJ8ve8Mv9n2YGJMB1aeg==", + "version": "13.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", + "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -6773,9 +6699,9 @@ } }, "node_modules/rollup": { - "version": "2.73.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.73.0.tgz", - "integrity": "sha512-h/UngC3S4Zt28mB3g0+2YCMegT5yoftnQplwzPqGZcKvlld5e+kT/QRmJiL+qxGyZKOYpgirWGdLyEO1b0dpLQ==", + "version": "2.74.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.74.1.tgz", + "integrity": "sha512-K2zW7kV8Voua5eGkbnBtWYfMIhYhT9Pel2uhBk2WO5eMee161nPze/XRfvEQPFYz7KgrCCnmh2Wy0AMFLGGmMA==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -8119,13 +8045,13 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.24.0", - "@typescript-eslint/parser": "^5.24.0", - "eslint": "^8.15.0", + "@typescript-eslint/eslint-plugin": "^5.26.0", + "@typescript-eslint/parser": "^5.26.0", + "eslint": "^8.16.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", - "rollup": "^2.73.0", + "rollup": "^2.74.1", "typescript": "^4.6.4" } }, @@ -8145,15 +8071,15 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@types/jest": "^27.5.1", - "@typescript-eslint/eslint-plugin": "5.24.0", + "@typescript-eslint/eslint-plugin": "5.26.0", "@typescript-eslint/parser": "5.26.0", - "eslint": "8.15.0", + "eslint": "8.16.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", "prettier": "^2.6.2", - "rollup": "^2.73.0", + "rollup": "^2.74.1", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^28.0.2", "typescript": "^4.6.4" @@ -9665,15 +9591,15 @@ "dev": true }, "@eslint/eslintrc": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.3.tgz", - "integrity": "sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", + "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.3.2", - "globals": "^13.9.0", + "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -10451,13 +10377,13 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^5.24.0", - "@typescript-eslint/parser": "^5.24.0", - "eslint": "^8.15.0", + "@typescript-eslint/eslint-plugin": "^5.26.0", + "@typescript-eslint/parser": "^5.26.0", + "eslint": "^8.16.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", - "rollup": "^2.73.0", + "rollup": "^2.74.1", "typescript": "^4.6.4" } }, @@ -10473,16 +10399,16 @@ "@rollup/plugin-typescript": "^8.3.2", "@sora/e2ee": "^2021.1.0", "@types/jest": "^27.5.1", - "@typescript-eslint/eslint-plugin": "5.24.0", + "@typescript-eslint/eslint-plugin": "5.26.0", "@typescript-eslint/parser": "5.26.0", - "eslint": "8.15.0", + "eslint": "8.16.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "fflate": "^0.7.3", "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", "prettier": "^2.6.2", - "rollup": "^2.73.0", + "rollup": "^2.74.1", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^28.0.2", "typescript": "^4.6.4" @@ -11463,14 +11389,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.24.0.tgz", - "integrity": "sha512-6bqFGk6wa9+6RrU++eLknKyDqXU1Oc8nyoLu5a1fU17PNRJd9UBr56rMF7c4DRaRtnarlkQ4jwxUbvBo8cNlpw==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.26.0.tgz", + "integrity": "sha512-oGCmo0PqnRZZndr+KwvvAUvD3kNE4AfyoGCwOZpoCncSh4MVD06JTE8XQa2u9u+NX5CsyZMBTEc2C72zx38eYA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.24.0", - "@typescript-eslint/type-utils": "5.24.0", - "@typescript-eslint/utils": "5.24.0", + "@typescript-eslint/scope-manager": "5.26.0", + "@typescript-eslint/type-utils": "5.26.0", + "@typescript-eslint/utils": "5.26.0", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -11489,86 +11415,43 @@ "@typescript-eslint/types": "5.26.0", "@typescript-eslint/typescript-estree": "5.26.0", "debug": "^4.3.4" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.26.0.tgz", - "integrity": "sha512-gVzTJUESuTwiju/7NiTb4c5oqod8xt5GhMbExKsCTp6adU3mya6AGJ4Pl9xC7x2DX9UYFsjImC0mA62BCY22Iw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0" - } - }, - "@typescript-eslint/types": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.26.0.tgz", - "integrity": "sha512-8794JZFE1RN4XaExLWLI2oSXsVImNkl79PzTOOWt9h0UHROwJedNOD2IJyfL0NbddFllcktGIO2aOu10avQQyA==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.26.0.tgz", - "integrity": "sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.26.0.tgz", - "integrity": "sha512-wei+ffqHanYDOQgg/fS6Hcar6wAWv0CUPQ3TZzOWd2BLfgP539rb49bwua8WRAs7R6kOSLn82rfEu2ro6Llt8Q==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.26.0", - "eslint-visitor-keys": "^3.3.0" - } - } } }, "@typescript-eslint/scope-manager": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.24.0.tgz", - "integrity": "sha512-WpMWipcDzGmMzdT7NtTjRXFabx10WleLUGrJpuJLGaxSqpcyq5ACpKSD5VE40h2nz3melQ91aP4Du7lh9FliCA==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.26.0.tgz", + "integrity": "sha512-gVzTJUESuTwiju/7NiTb4c5oqod8xt5GhMbExKsCTp6adU3mya6AGJ4Pl9xC7x2DX9UYFsjImC0mA62BCY22Iw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.24.0", - "@typescript-eslint/visitor-keys": "5.24.0" + "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/visitor-keys": "5.26.0" } }, "@typescript-eslint/type-utils": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.24.0.tgz", - "integrity": "sha512-uGi+sQiM6E5CeCZYBXiaIvIChBXru4LZ1tMoeKbh1Lze+8BO9syUG07594C4lvN2YPT4KVeIupOJkVI+9/DAmQ==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.26.0.tgz", + "integrity": "sha512-7ccbUVWGLmcRDSA1+ADkDBl5fP87EJt0fnijsMFTVHXKGduYMgienC/i3QwoVhDADUAPoytgjbZbCOMj4TY55A==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.24.0", + "@typescript-eslint/utils": "5.26.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.24.0.tgz", - "integrity": "sha512-Tpg1c3shTDgTmZd3qdUyd+16r/pGmVaVEbLs+ufuWP0EruVbUiEOmpBBQxBb9a8iPRxi8Rb2oiwOxuZJzSq11A==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.26.0.tgz", + "integrity": "sha512-8794JZFE1RN4XaExLWLI2oSXsVImNkl79PzTOOWt9h0UHROwJedNOD2IJyfL0NbddFllcktGIO2aOu10avQQyA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.24.0.tgz", - "integrity": "sha512-zcor6vQkQmZAQfebSPVwUk/FD+CvnsnlfKXYeQDsWXRF+t7SBPmIfNia/wQxCSeu1h1JIjwV2i9f5/DdSp/uDw==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.26.0.tgz", + "integrity": "sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==", "dev": true, "requires": { - "@typescript-eslint/types": "5.24.0", - "@typescript-eslint/visitor-keys": "5.24.0", + "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/visitor-keys": "5.26.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -11577,26 +11460,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.24.0.tgz", - "integrity": "sha512-K05sbWoeCBJH8KXu6hetBJ+ukG0k2u2KlgD3bN+v+oBKm8adJqVHpSSLHNzqyuv0Lh4GVSAUgZ5lB4icmPmWLw==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.26.0.tgz", + "integrity": "sha512-PJFwcTq2Pt4AMOKfe3zQOdez6InIDOjUJJD3v3LyEtxHGVVRK3Vo7Dd923t/4M9hSH2q2CLvcTdxlLPjcIk3eg==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.24.0", - "@typescript-eslint/types": "5.24.0", - "@typescript-eslint/typescript-estree": "5.24.0", + "@typescript-eslint/scope-manager": "5.26.0", + "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/typescript-estree": "5.26.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.24.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.24.0.tgz", - "integrity": "sha512-qzGwSXMyMnogcAo+/2fU+jhlPPVMXlIH2PeAonIKjJSoDKl1+lJVvG5Z5Oud36yU0TWK2cs1p/FaSN5J2OUFYA==", + "version": "5.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.26.0.tgz", + "integrity": "sha512-wei+ffqHanYDOQgg/fS6Hcar6wAWv0CUPQ3TZzOWd2BLfgP539rb49bwua8WRAs7R6kOSLn82rfEu2ro6Llt8Q==", "dev": true, "requires": { - "@typescript-eslint/types": "5.24.0", + "@typescript-eslint/types": "5.26.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -12611,12 +12494,12 @@ } }, "eslint": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.15.0.tgz", - "integrity": "sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", + "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.2.3", + "@eslint/eslintrc": "^1.3.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -12634,7 +12517,7 @@ "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", - "globals": "^13.6.0", + "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -13163,9 +13046,9 @@ } }, "globals": { - "version": "13.14.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.14.0.tgz", - "integrity": "sha512-ERO68sOYwm5UuLvSJTY7w7NP2c8S4UcXs3X1GBX8cwOr+ShOcDBbCY5mH4zxz0jsYCdJ8ve8Mv9n2YGJMB1aeg==", + "version": "13.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", + "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -15253,9 +15136,9 @@ } }, "rollup": { - "version": "2.73.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.73.0.tgz", - "integrity": "sha512-h/UngC3S4Zt28mB3g0+2YCMegT5yoftnQplwzPqGZcKvlld5e+kT/QRmJiL+qxGyZKOYpgirWGdLyEO1b0dpLQ==", + "version": "2.74.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.74.1.tgz", + "integrity": "sha512-K2zW7kV8Voua5eGkbnBtWYfMIhYhT9Pel2uhBk2WO5eMee161nPze/XRfvEQPFYz7KgrCCnmh2Wy0AMFLGGmMA==", "dev": true, "requires": { "fsevents": "~2.3.2" diff --git a/package.json b/package.json index ee49677c..0447b067 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "dist" ], "devDependencies": { - "npm-check-updates": "^13.0.0", + "npm-check-updates": "^13.0.3", "serve": "^13.0.2", "typedoc": "^0.22.15" }, diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index ea2fdb63..0113fe49 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -19,13 +19,13 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.24.0", - "@typescript-eslint/parser": "^5.24.0", - "eslint": "^8.15.0", + "@typescript-eslint/eslint-plugin": "^5.26.0", + "@typescript-eslint/parser": "^5.26.0", + "eslint": "^8.16.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", - "rollup": "^2.73.0", + "rollup": "^2.74.1", "typescript": "^4.6.4" }, "dependencies": { diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 667eecb4..5d40466b 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -13,15 +13,15 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@types/jest": "^27.5.1", - "@typescript-eslint/eslint-plugin": "5.24.0", + "@typescript-eslint/eslint-plugin": "5.26.0", "@typescript-eslint/parser": "5.26.0", - "eslint": "8.15.0", + "eslint": "8.16.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", "prettier": "^2.6.2", - "rollup": "^2.73.0", + "rollup": "^2.74.1", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^28.0.2", "typescript": "^4.6.4" From 1bb972c7899a53c5487a765771b8ce9f888ee6e8 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Fri, 3 Jun 2022 10:15:52 +0900 Subject: [PATCH 73/86] =?UTF-8?q?=E5=88=87=E6=96=AD=E6=99=82=E3=81=AB=20Me?= =?UTF-8?q?diaStream=20=E3=82=92=E6=AD=A2=E3=82=81=E3=82=8B=E5=87=A6?= =?UTF-8?q?=E7=90=86=E3=82=92=E5=89=8A=E9=99=A4=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/src/base.ts | 57 +++++++++++----------------------------- 1 file changed, 16 insertions(+), 41 deletions(-) diff --git a/packages/sdk/src/base.ts b/packages/sdk/src/base.ts index 91ecdd10..94d97c53 100644 --- a/packages/sdk/src/base.ts +++ b/packages/sdk/src/base.ts @@ -435,32 +435,10 @@ export default class ConnectionBase { await transceiver.sender.replaceTrack(videoTrack); } - /** - * stream を停止するメソッド - */ - private stopStream(): Promise { - return new Promise((resolve, _) => { - if (this.debug) { - console.warn( - "@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself." - ); - } - if (!this.stream) { - return resolve(); - } - this.stream.getTracks().forEach((t) => { - t.stop(); - }); - this.stream = null; - return resolve(); - }); - } - /** * connect 処理中に例外が発生した場合の切断処理をするメソッド */ - private async signalingTerminate(): Promise { - await this.stopStream(); + private signalingTerminate(): void { for (const key of Object.keys(this.soraDataChannels)) { const dataChannel = this.soraDataChannels[key]; if (dataChannel) { @@ -486,9 +464,8 @@ export default class ConnectionBase { * * @param title - disconnect callback に渡すイベントのタイトル */ - private async abendPeerConnectionState(title: SoraAbendTitle): Promise { + private abendPeerConnectionState(title: SoraAbendTitle): void { this.clearMonitorIceConnectionStateChange(); - await this.stopStream(); // callback を止める if (this.pc) { this.pc.ondatachannel = null; @@ -552,7 +529,6 @@ export default class ConnectionBase { */ private async abend(title: SoraAbendTitle, params?: Record): Promise { this.clearMonitorIceConnectionStateChange(); - await this.stopStream(); // callback を止める if (this.pc) { this.pc.ondatachannel = null; @@ -866,7 +842,6 @@ export default class ConnectionBase { */ async disconnect(): Promise { this.clearMonitorIceConnectionStateChange(); - await this.stopStream(); // callback を止める if (this.pc) { this.pc.ondatachannel = null; @@ -1097,14 +1072,14 @@ export default class ConnectionBase { this.writeWebSocketSignalingLog("new-websocket", ws.url); // websocket の各 callback を設定する ws.binaryType = "arraybuffer"; - ws.onclose = async (event): Promise => { + ws.onclose = (event) => { const error = new ConnectError( `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'` ); error.code = event.code; error.reason = event.reason; this.writeWebSocketTimelineLog("onclose", error); - await this.signalingTerminate(); + this.signalingTerminate(); reject(error); }; ws.onmessage = async (event): Promise => { @@ -1409,20 +1384,20 @@ export default class ConnectionBase { return; } this.clearMonitorSignalingWebSocketEvent(); - this.ws.onclose = async (event) => { + this.ws.onclose = (event) => { const error = new ConnectError( `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'` ); error.code = event.code; error.reason = event.reason; this.writeWebSocketTimelineLog("onclose", error); - await this.signalingTerminate(); + this.signalingTerminate(); reject(error); }; - this.ws.onerror = async (_) => { + this.ws.onerror = (_) => { const error = new ConnectError(`Signaling failed. WebSocket onerror was called`); this.writeWebSocketSignalingLog("onerror", error); - await this.signalingTerminate(); + this.signalingTerminate(); reject(error); }; }, 100); @@ -1459,7 +1434,7 @@ export default class ConnectionBase { if (!this.pc) { return; } - this.pc.oniceconnectionstatechange = async (_): Promise => { + this.pc.oniceconnectionstatechange = (_) => { // connectionState が undefined の場合は iceConnectionState を見て判定する if (this.pc && this.pc.connectionState === undefined) { this.writePeerConnectionTimelineLog("oniceconnectionstatechange", { @@ -1471,19 +1446,19 @@ export default class ConnectionBase { clearTimeout(this.monitorIceConnectionStateChangeTimerId); // iceConnectionState "failed" で切断する if (this.pc.iceConnectionState === "failed") { - await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"); + this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"); } // iceConnectionState "disconnected" になってから 10000ms の間変化がない場合切断する else if (this.pc.iceConnectionState === "disconnected") { - this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => { + this.monitorIceConnectionStateChangeTimerId = setTimeout(() => { if (this.pc && this.pc.iceConnectionState === "disconnected") { - await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT"); + this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT"); } }, 10000); } } }; - this.pc.onconnectionstatechange = async (_): Promise => { + this.pc.onconnectionstatechange = (_) => { if (this.pc) { this.writePeerConnectionTimelineLog("onconnectionstatechange", { connectionState: this.pc.connectionState, @@ -1491,7 +1466,7 @@ export default class ConnectionBase { iceGatheringState: this.pc.iceGatheringState, }); if (this.pc.connectionState === "failed") { - await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"); + this.abendPeerConnectionState("CONNECTION-STATE-FAILED"); } } }; @@ -1503,7 +1478,7 @@ export default class ConnectionBase { protected setConnectionTimeout(): Promise { return new Promise((_, reject) => { if (0 < this.connectionTimeout) { - this.connectionTimeoutTimerId = setTimeout(async () => { + this.connectionTimeoutTimerId = setTimeout(() => { if ( !this.pc || (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== "connected") @@ -1515,7 +1490,7 @@ export default class ConnectionBase { this.writePeerConnectionTimelineLog("signaling-connection-timeout", { connectionTimeout: this.connectionTimeout, }); - await this.signalingTerminate(); + this.signalingTerminate(); reject(error); } }, this.connectionTimeout); From 2f8ffc8e6205594b4c472784a1fb793e2455f2d6 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Fri, 3 Jun 2022 10:48:43 +0900 Subject: [PATCH 74/86] =?UTF-8?q?CHANGES=20=E3=82=92=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index bc47137f..b10dbf53 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,8 @@ - バグ修正 ## develop +- [CHANGE] 切断処理時に MediaStream の停止処理をしないように変更する + - @yuitowest - [CHANGE] ConnectionOptions からシグナリング type: connect メッセージを生成する仕組みを変更する - multistream オプションが false の場合、シグナリングメッセージに multistream: false を含めるように変更する - spotlight オプションは multistream: true の場合のみシグナリングメッセージに含まれていたが、multistream フラグに関係なく含まれるように変更する @@ -17,7 +19,7 @@ - spotlightUnfocusRid オプションは spotlight: true の場合のみシグナリングメッセージに含まれていたが、spotlight フラグに関係なく含まれるように変更する - spotlightNumber オプションは spotlight: true の場合のみシグナリングメッセージに含まれていたが、spotlight フラグに関係なく含まれるように変更する - simulcastRid オプションは simulcast: true の場合のみシグナリングメッセージに含まれていたが、simulcast フラグに関係なく含まれるように変更する - + - @yuitowest - [ADD] sendrecv オブジェクトのオプションに bundle_id を追加する - @yuitowest - [UPDATE] sendrecv API を使用して接続する場合に multistream option の初期値が true になるよう修正する From e4e13c84f8dda88444a7d9abcaf31ffd38c21a32 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Fri, 3 Jun 2022 11:15:06 +0900 Subject: [PATCH 75/86] 2022.1.0-canary.6 --- dist/base.d.ts | 4 --- dist/sora.d.ts | 6 ++--- dist/sora.js | 60 ++++++++++++++------------------------------ dist/sora.min.js | 2 +- dist/sora.min.js.map | 2 +- dist/sora.mjs | 60 ++++++++++++++------------------------------ package-lock.json | 4 +-- package.json | 2 +- 8 files changed, 46 insertions(+), 94 deletions(-) diff --git a/dist/base.d.ts b/dist/base.d.ts index 48209550..dfb66911 100644 --- a/dist/base.d.ts +++ b/dist/base.d.ts @@ -239,10 +239,6 @@ export default class ConnectionBase { * @public */ replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise; - /** - * stream を停止するメソッド - */ - private stopStream; /** * connect 処理中に例外が発生した場合の切断処理をするメソッド */ diff --git a/dist/sora.d.ts b/dist/sora.d.ts index 38ec6aae..ab7f15c3 100644 --- a/dist/sora.d.ts +++ b/dist/sora.d.ts @@ -84,6 +84,9 @@ declare class SoraConnection { */ get signalingUrl(): string | string[]; } +/** + * Sora JS SDK package + */ declare const _default: { /** * E2EE で使用する WASM の読み込みを行うメソッド @@ -127,8 +130,5 @@ declare const _default: { applyMediaStreamConstraints: typeof applyMediaStreamConstraints; }; }; -/** - * Sora JS SDK package - */ export default _default; export type { AudioCodecType, Callbacks, ConnectionBase, ConnectionOptions, ConnectionPublisher, ConnectionSubscriber, DataChannelConfiguration, DataChannelDirection, DataChannelEvent, DataChannelMessageEvent, JSONType, Role, SignalingEvent, SignalingNotifyConnectionCreated, SignalingNotifyConnectionDestroyed, SignalingNotifyConnectionUpdated, SignalingNotifyMessage, SignalingNotifyMetadata, SignalingNotifyNetworkStatus, SignalingNotifySpotlightChanged, SignalingNotifySpotlightFocused, SignalingNotifySpotlightUnfocused, SignalingPushMessage, Simulcast, SimulcastRid, SoraAbendTitle, SoraCloseEvent, SoraCloseEventInitDict, SoraCloseEventType, SoraConnection, SpotlightFocusRid, TimelineEvent, TimelineEventLogType, TransportType, VideoCodecType, }; diff --git a/dist/sora.js b/dist/sora.js index db7c0b45..8fb82bde 100644 --- a/dist/sora.js +++ b/dist/sora.js @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2022.1.0-canary.5 + * @version: 2022.1.0-canary.6 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -1633,7 +1633,7 @@ } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2022.1.0-canary.5", + sora_client: "Sora JavaScript SDK 2022.1.0-canary.6", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -2195,29 +2195,10 @@ stream.addTrack(videoTrack); await transceiver.sender.replaceTrack(videoTrack); } - /** - * stream を停止するメソッド - */ - stopStream() { - return new Promise((resolve, _) => { - if (this.debug) { - console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."); - } - if (!this.stream) { - return resolve(); - } - this.stream.getTracks().forEach((t) => { - t.stop(); - }); - this.stream = null; - return resolve(); - }); - } /** * connect 処理中に例外が発生した場合の切断処理をするメソッド */ - async signalingTerminate() { - await this.stopStream(); + signalingTerminate() { for (const key of Object.keys(this.soraDataChannels)) { const dataChannel = this.soraDataChannels[key]; if (dataChannel) { @@ -2242,9 +2223,8 @@ * * @param title - disconnect callback に渡すイベントのタイトル */ - async abendPeerConnectionState(title) { + abendPeerConnectionState(title) { this.clearMonitorIceConnectionStateChange(); - await this.stopStream(); // callback を止める if (this.pc) { this.pc.ondatachannel = null; @@ -2307,7 +2287,6 @@ */ async abend(title, params) { this.clearMonitorIceConnectionStateChange(); - await this.stopStream(); // callback を止める if (this.pc) { this.pc.ondatachannel = null; @@ -2603,7 +2582,6 @@ */ async disconnect() { this.clearMonitorIceConnectionStateChange(); - await this.stopStream(); // callback を止める if (this.pc) { this.pc.ondatachannel = null; @@ -2834,12 +2812,12 @@ this.writeWebSocketSignalingLog("new-websocket", ws.url); // websocket の各 callback を設定する ws.binaryType = "arraybuffer"; - ws.onclose = async (event) => { + ws.onclose = (event) => { const error = new ConnectError(`Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`); error.code = event.code; error.reason = event.reason; this.writeWebSocketTimelineLog("onclose", error); - await this.signalingTerminate(); + this.signalingTerminate(); reject(error); }; ws.onmessage = async (event) => { @@ -3138,18 +3116,18 @@ return; } this.clearMonitorSignalingWebSocketEvent(); - this.ws.onclose = async (event) => { + this.ws.onclose = (event) => { const error = new ConnectError(`Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`); error.code = event.code; error.reason = event.reason; this.writeWebSocketTimelineLog("onclose", error); - await this.signalingTerminate(); + this.signalingTerminate(); reject(error); }; - this.ws.onerror = async (_) => { + this.ws.onerror = (_) => { const error = new ConnectError(`Signaling failed. WebSocket onerror was called`); this.writeWebSocketSignalingLog("onerror", error); - await this.signalingTerminate(); + this.signalingTerminate(); reject(error); }; }, 100); @@ -3184,7 +3162,7 @@ if (!this.pc) { return; } - this.pc.oniceconnectionstatechange = async (_) => { + this.pc.oniceconnectionstatechange = (_) => { // connectionState が undefined の場合は iceConnectionState を見て判定する if (this.pc && this.pc.connectionState === undefined) { this.writePeerConnectionTimelineLog("oniceconnectionstatechange", { @@ -3196,19 +3174,19 @@ clearTimeout(this.monitorIceConnectionStateChangeTimerId); // iceConnectionState "failed" で切断する if (this.pc.iceConnectionState === "failed") { - await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"); + this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"); } // iceConnectionState "disconnected" になってから 10000ms の間変化がない場合切断する else if (this.pc.iceConnectionState === "disconnected") { - this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => { + this.monitorIceConnectionStateChangeTimerId = setTimeout(() => { if (this.pc && this.pc.iceConnectionState === "disconnected") { - await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT"); + this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT"); } }, 10000); } } }; - this.pc.onconnectionstatechange = async (_) => { + this.pc.onconnectionstatechange = (_) => { if (this.pc) { this.writePeerConnectionTimelineLog("onconnectionstatechange", { connectionState: this.pc.connectionState, @@ -3216,7 +3194,7 @@ iceGatheringState: this.pc.iceGatheringState, }); if (this.pc.connectionState === "failed") { - await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"); + this.abendPeerConnectionState("CONNECTION-STATE-FAILED"); } } }; @@ -3227,7 +3205,7 @@ setConnectionTimeout() { return new Promise((_, reject) => { if (0 < this.connectionTimeout) { - this.connectionTimeoutTimerId = setTimeout(async () => { + this.connectionTimeoutTimerId = setTimeout(() => { if (!this.pc || (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== "connected")) { const error = new Error(); @@ -3237,7 +3215,7 @@ this.writePeerConnectionTimelineLog("signaling-connection-timeout", { connectionTimeout: this.connectionTimeout, }); - await this.signalingTerminate(); + this.signalingTerminate(); reject(error); } }, this.connectionTimeout); @@ -4413,7 +4391,7 @@ * @public */ version: function () { - return "2022.1.0-canary.5"; + return "2022.1.0-canary.6"; }, /** * WebRTC のユーティリティ関数群 diff --git a/dist/sora.min.js b/dist/sora.min.js index f6ea7cdc..31c90e5c 100644 --- a/dist/sora.min.js +++ b/dist/sora.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sora=t()}(this,(function(){"use strict";class e{constructor(){if(!!!RTCRtpSender.prototype.createEncodedStreams)throw new Error("E2EE is not supported in this browser.");this.worker=null,this.onWorkerDisconnect=null}startWorker(){const e=atob("InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCkgPSBsb2coeCkgLyBsb2coMjU2KQogICAgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5sb2cobikgLyBNYXRoLmxvZygyICoqIDgpICsgMSk7Cn0KZnVuY3Rpb24gYXJyYXlCdWZmZXJUb051bWJlcihhcnJheUJ1ZmZlcikgewogICAgLy8gMzJiaXQg44G+44Gn44KS5oOz5a6aIChCaWdJbnQg44G444Gu5pu444GN5o+b44GI5pmC44Gr6KaB5L+u5q2jKQogICAgY29uc3QgbmV3QXJyYXlCdWZmZXIgPSBuZXcgQXJyYXlCdWZmZXIoVWludDMyQXJyYXkuQllURVNfUEVSX0VMRU1FTlQpOwogICAgY29uc3QgbmV3RGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcobmV3QXJyYXlCdWZmZXIpOwogICAgY29uc3QgZGF0YVZpZXcgPSBuZXcgRGF0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GZDb25uZWN0aW9uSWQsIHNlbGZLZXlJZCwgZGVyaXZlS2V5KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgZ2VuZXJhdGVXcml0ZUlWKG1hdGVyaWFsKS50aGVuKCh3cml0ZUlWKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2V0V3JpdGVJVihzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5lY3Rpb25JZCwga2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBzZXRMYXRlc3RSZW1vdGVLZXlJZChjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gInJlbW92ZVJlbW90ZURlcml2ZUtleSIpIHsKICAgICAgICBjb25zdCB7IGNvbm5lY3Rpb25JZCB9ID0gZXZlbnQuZGF0YTsKICAgICAgICByZW1vdmVEZXJpdmVLZXkoY29ubmVjdGlvbklkKTsKICAgIH0KICAgIGVsc2UgaWYgKHR5cGUgPT09ICJlbmNyeXB0IikgewogICAgICAgIGNvbnN0IHsgcmVhZGFibGVTdHJlYW0sIHdyaXRhYmxlU3RyZWFtIH0gPSBldmVudC5kYXRhOwogICAgICAgIGNvbnN0IHRyYW5zZm9ybVN0cmVhbSA9IG5ldyBUcmFuc2Zvcm1TdHJlYW0oewogICAgICAgICAgICB0cmFuc2Zvcm06IGVuY3J5cHRGdW5jdGlvbiwKICAgICAgICB9KTsKICAgICAgICByZWFkYWJsZVN0cmVhbS5waXBlVGhyb3VnaCh0cmFuc2Zvcm1TdHJlYW0pLnBpcGVUbyh3cml0YWJsZVN0cmVhbSk7CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAiZGVjcnlwdCIpIHsKICAgICAgICBjb25zdCB7IHJlYWRhYmxlU3RyZWFtLCB3cml0YWJsZVN0cmVhbSB9ID0gZXZlbnQuZGF0YTsKICAgICAgICBjb25zdCB0cmFuc2Zvcm1TdHJlYW0gPSBuZXcgVHJhbnNmb3JtU3RyZWFtKHsKICAgICAgICAgICAgdHJhbnNmb3JtOiBkZWNyeXB0RnVuY3Rpb24sCiAgICAgICAgfSk7CiAgICAgICAgcmVhZGFibGVTdHJlYW0ucGlwZVRocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=");this.worker=new Worker(URL.createObjectURL(new Blob([e],{type:"application/javascript"}))),this.worker.onmessage=e=>{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var p=new t(32);for(m=0;m<32;++m)p[m]=5;var Z=A(b,9,0),w=A(b,9,1),S=A(p,5,0),V=A(p,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(2==e.BYTES_PER_ELEMENT?n:4==e.BYTES_PER_ELEMENT?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},E=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},X=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=O(s[C-1],m,0);if(u>i){a=0;var A=0,b=u-i,p=1<i))break;A+=p-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},O=function(e,t,n){return-1==e.s?Math.max(O(e.l,t,n+1),O(e.r,t,n+1)):t[e.s]=n},B=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},N=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!D[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=N(g,b)+N(r,p)+c,z=N(g,u)+N(r,f)+c+14+3*U+N(K,D)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(C,C+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=Z,j=b,Q=S,H=p;for(L=0;L255){te=l[L]>>>18&31;E(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];E(t,I,Q[ne]),I+=H[ne],ne>3&&(E(t,I,l[L]>>>5&8191),I+=a[ne])}else E(t,I,M[l[L]]),I+=j[l[L]];return E(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),J=new t(0),D=function(e,o,l,g,r){return function(e,o,l,g,r,d){var C=e.length,I=new t(g+C+5*(1+Math.ceil(C/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||C<8)for(var A=0;A<=C;A+=65535){var b=A+65535;b>=C&&(m[u>>3]=d),u=Y(m,u+1,e.subarray(A,b))}else{for(var p=L[o-1],Z=p>>>13,w=8191&p,S=(1<7e3||B>24576)&&j>423){u=K(e,m,0,v,T,E,O,B,D,A-D,u),B=X=O=0,D=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)E[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(Z,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[B++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];O+=s[ae]+a[oe],++T[257+ae],++E[oe],N=A+H,++X}else v[B++]=e[A],++T[e[A]]}}u=K(e,m,d,v,T,E,O,B,D,A-D,u),!d&&7&u&&(u=Y(m,u+1,J))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=D(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var d=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,p=i.m,Z=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,E=F+T;if(E>l){c&&v(0);break}g&&d(m+T),n.set(e.subarray(F,E),m),i.b=m+=T,i.p=I=8*E,i.f=h;continue}if(1==R)u=w,b=V,p=9,Z=5;else if(2==R){var X=y(e,I,31)+257,O=y(e,I+10,15)+4,B=X+y(e,I+5,31)+1;I+=14;for(var N=new t(B),Y=new t(19),K=0;K>>4)<16)N[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=N[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)N[K++]=M}}var Q=N.subarray(0,X),H=N.subarray(X);p=f(Q),Z=f(H),u=A(Q,p,1),b=A(H,Z,1)}else v(1);if(I>S){c&&v(0);break}}g&&d(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=C[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&d(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(J,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0-canary.5",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if("sendrecv"===t&&!0!==s.multistream)throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'");!0===a&&(o.redirect=!0),"boolean"==typeof s.multistream&&(o.multistream=s.multistream),"boolean"==typeof s.simulcast&&(o.simulcast=s.simulcast);void 0!==s.simulcastRid&&0<=["r0","r1","r2"].indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid),"boolean"==typeof s.spotlight&&(o.spotlight=s.spotlight),"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber);const l=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=l.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=l.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid),void 0!==i&&(o.metadata=i),void 0!==s.signalingNotifyMetadata&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),void 0!==s.clientId&&(o.client_id=s.clientId),void 0!==s.bundleId&&(o.bundle_id=s.bundleId),"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const g=["audioCodecType","audioBitRate"],r=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],c=["videoCodecType","videoBitRate"],d=Object.assign({},s);Object.keys(d).forEach((e=>{"audio"===e&&"boolean"==typeof d[e]||"video"===e&&"boolean"==typeof d[e]||0<=g.indexOf(e)&&null!==d[e]||0<=r.indexOf(e)&&null!==d[e]||0<=c.indexOf(e)&&null!==d[e]||delete d[e]})),void 0!==d.audio&&(o.audio=d.audio);const C=Object.keys(d).some((e=>0<=g.indexOf(e)));o.audio&&C&&(o.audio={},"audioCodecType"in d&&(o.audio.codec_type=d.audioCodecType),"audioBitRate"in d&&(o.audio.bit_rate=d.audioBitRate));const h=Object.keys(d).some((e=>0<=r.indexOf(e)));o.audio&&h&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in d&&(o.audio.opus_params.channels=d.audioOpusParamsChannels),"audioOpusParamsClockRate"in d&&(o.audio.opus_params.clock_rate=d.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in d&&(o.audio.opus_params.maxplaybackrate=d.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in d&&(o.audio.opus_params.stereo=d.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in d&&(o.audio.opus_params.sprop_stereo=d.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in d&&(o.audio.opus_params.minptime=d.audioOpusParamsMinptime),"audioOpusParamsPtime"in d&&(o.audio.opus_params.ptime=d.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in d&&(o.audio.opus_params.useinbandfec=d.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in d&&(o.audio.opus_params.usedtx=d.audioOpusParamsUsedtx)),void 0!==d.video&&(o.video=d.video);const I=Object.keys(d).some((e=>0<=c.indexOf(e)));if(o.video&&I&&(o.video={},"videoCodecType"in d&&(o.video.codec_type=d.videoCodecType),"videoBitRate"in d&&(o.video.bit_rate=d.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if("boolean"==typeof s.e2ee&&(o.e2ee=s.e2ee),!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8")}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.connectedSignalingUrl="",this.contactSignalingUrl=""}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}stopStream(){return new Promise(((e,t)=>(this.debug&&console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."),this.stream?(this.stream.getTracks().forEach((e=>{e.stop()})),this.stream=null,e()):e())))}async signalingTerminate(){await this.stopStream();for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}async abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.contactSignalingUrl="",this.connectedSignalingUrl="",this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),await this.stopStream(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=async e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),await this.signalingTerminate(),s(t)},e.onmessage=async t=>{if(t.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",t.data),void this.signalingOnMessageE2EE(t.data);if("string"!=typeof t.data)throw new Error("Received invalid signaling data");const n=JSON.parse(t.data);if("offer"==n.type)this.writeWebSocketSignalingLog("onmessage-offer",n),this.signalingOnMessageTypeOffer(n),this.connectedSignalingUrl=e.url,i(n);else if("update"==n.type)this.writeWebSocketSignalingLog("onmessage-update",n),await this.signalingOnMessageTypeUpdate(n);else if("re-offer"==n.type)this.writeWebSocketSignalingLog("onmessage-re-offer",n),await this.signalingOnMessageTypeReOffer(n);else if("ping"==n.type)await this.signalingOnMessageTypePing(n);else if("push"==n.type)this.callbacks.push(n,"websocket");else if("notify"==n.type)"connection.created"===n.event_type?this.writeWebSocketTimelineLog("notify-connection.created",n):"connection.destroyed"===n.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",n),this.signalingOnMessageTypeNotify(n,"websocket");else if("switched"==n.type)this.writeWebSocketSignalingLog("onmessage-switched",n),this.signalingOnMessageTypeSwitched(n);else if("redirect"==n.type){this.writeWebSocketSignalingLog("onmessage-redirect",n);try{const e=await this.signalingOnMessageTypeRedirect(n);i(e)}catch(e){s(e)}}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e,t||(this.contactSignalingUrl=e.url,this.writeWebSocketSignalingLog("contact-signaling-url",this.contactSignalingUrl)))})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=async e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),await this.signalingTerminate(),t(n)},this.ws.onerror=async e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),await this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=async e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((async()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=async e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),await this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=e.target;let s;"string"==typeof e.data?s=(new TextEncoder).encode(e.data):e.data instanceof ArrayBuffer?s=e.data:console.warn("Received onmessage event data is not of type String or ArrayBuffer."),void 0!==s&&(!0===n.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(i.label,s)))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");if("open"!==n.readyState)throw new Error("Messaging DataChannel is not open");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var p=new t(32);for(m=0;m<32;++m)p[m]=5;var Z=A(b,9,0),w=A(b,9,1),S=A(p,5,0),V=A(p,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(2==e.BYTES_PER_ELEMENT?n:4==e.BYTES_PER_ELEMENT?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},X=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},E=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=O(s[C-1],m,0);if(u>i){a=0;var A=0,b=u-i,p=1<i))break;A+=p-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},O=function(e,t,n){return-1==e.s?Math.max(O(e.l,t,n+1),O(e.r,t,n+1)):t[e.s]=n},B=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},N=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!D[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=N(g,b)+N(r,p)+c,z=N(g,u)+N(r,f)+c+14+3*U+N(K,D)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(C,C+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=Z,j=b,Q=S,H=p;for(L=0;L255){te=l[L]>>>18&31;X(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];X(t,I,Q[ne]),I+=H[ne],ne>3&&(X(t,I,l[L]>>>5&8191),I+=a[ne])}else X(t,I,M[l[L]]),I+=j[l[L]];return X(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),J=new t(0),D=function(e,o,l,g,r){return function(e,o,l,g,r,d){var C=e.length,I=new t(g+C+5*(1+Math.ceil(C/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||C<8)for(var A=0;A<=C;A+=65535){var b=A+65535;b>=C&&(m[u>>3]=d),u=Y(m,u+1,e.subarray(A,b))}else{for(var p=L[o-1],Z=p>>>13,w=8191&p,S=(1<7e3||B>24576)&&j>423){u=K(e,m,0,v,T,X,O,B,D,A-D,u),B=E=O=0,D=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)X[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(Z,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[B++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];O+=s[ae]+a[oe],++T[257+ae],++X[oe],N=A+H,++E}else v[B++]=e[A],++T[e[A]]}}u=K(e,m,d,v,T,X,O,B,D,A-D,u),!d&&7&u&&(u=Y(m,u+1,J))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=D(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var d=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,p=i.m,Z=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,X=F+T;if(X>l){c&&v(0);break}g&&d(m+T),n.set(e.subarray(F,X),m),i.b=m+=T,i.p=I=8*X,i.f=h;continue}if(1==R)u=w,b=V,p=9,Z=5;else if(2==R){var E=y(e,I,31)+257,O=y(e,I+10,15)+4,B=E+y(e,I+5,31)+1;I+=14;for(var N=new t(B),Y=new t(19),K=0;K>>4)<16)N[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=N[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)N[K++]=M}}var Q=N.subarray(0,E),H=N.subarray(E);p=f(Q),Z=f(H),u=A(Q,p,1),b=A(H,Z,1)}else v(1);if(I>S){c&&v(0);break}}g&&d(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=C[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&d(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(J,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0-canary.6",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if("sendrecv"===t&&!0!==s.multistream)throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'");!0===a&&(o.redirect=!0),"boolean"==typeof s.multistream&&(o.multistream=s.multistream),"boolean"==typeof s.simulcast&&(o.simulcast=s.simulcast);void 0!==s.simulcastRid&&0<=["r0","r1","r2"].indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid),"boolean"==typeof s.spotlight&&(o.spotlight=s.spotlight),"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber);const l=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=l.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=l.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid),void 0!==i&&(o.metadata=i),void 0!==s.signalingNotifyMetadata&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),void 0!==s.clientId&&(o.client_id=s.clientId),void 0!==s.bundleId&&(o.bundle_id=s.bundleId),"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const g=["audioCodecType","audioBitRate"],r=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],c=["videoCodecType","videoBitRate"],d=Object.assign({},s);Object.keys(d).forEach((e=>{"audio"===e&&"boolean"==typeof d[e]||"video"===e&&"boolean"==typeof d[e]||0<=g.indexOf(e)&&null!==d[e]||0<=r.indexOf(e)&&null!==d[e]||0<=c.indexOf(e)&&null!==d[e]||delete d[e]})),void 0!==d.audio&&(o.audio=d.audio);const C=Object.keys(d).some((e=>0<=g.indexOf(e)));o.audio&&C&&(o.audio={},"audioCodecType"in d&&(o.audio.codec_type=d.audioCodecType),"audioBitRate"in d&&(o.audio.bit_rate=d.audioBitRate));const h=Object.keys(d).some((e=>0<=r.indexOf(e)));o.audio&&h&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in d&&(o.audio.opus_params.channels=d.audioOpusParamsChannels),"audioOpusParamsClockRate"in d&&(o.audio.opus_params.clock_rate=d.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in d&&(o.audio.opus_params.maxplaybackrate=d.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in d&&(o.audio.opus_params.stereo=d.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in d&&(o.audio.opus_params.sprop_stereo=d.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in d&&(o.audio.opus_params.minptime=d.audioOpusParamsMinptime),"audioOpusParamsPtime"in d&&(o.audio.opus_params.ptime=d.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in d&&(o.audio.opus_params.useinbandfec=d.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in d&&(o.audio.opus_params.usedtx=d.audioOpusParamsUsedtx)),void 0!==d.video&&(o.video=d.video);const I=Object.keys(d).some((e=>0<=c.indexOf(e)));if(o.video&&I&&(o.video={},"videoCodecType"in d&&(o.video.codec_type=d.videoCodecType),"videoBitRate"in d&&(o.video.bit_rate=d.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if("boolean"==typeof s.e2ee&&(o.e2ee=s.e2ee),!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8")}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.connectedSignalingUrl="",this.contactSignalingUrl=""}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}signalingTerminate(){for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.contactSignalingUrl="",this.connectedSignalingUrl="",this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),this.signalingTerminate(),s(t)},e.onmessage=async t=>{if(t.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",t.data),void this.signalingOnMessageE2EE(t.data);if("string"!=typeof t.data)throw new Error("Received invalid signaling data");const n=JSON.parse(t.data);if("offer"==n.type)this.writeWebSocketSignalingLog("onmessage-offer",n),this.signalingOnMessageTypeOffer(n),this.connectedSignalingUrl=e.url,i(n);else if("update"==n.type)this.writeWebSocketSignalingLog("onmessage-update",n),await this.signalingOnMessageTypeUpdate(n);else if("re-offer"==n.type)this.writeWebSocketSignalingLog("onmessage-re-offer",n),await this.signalingOnMessageTypeReOffer(n);else if("ping"==n.type)await this.signalingOnMessageTypePing(n);else if("push"==n.type)this.callbacks.push(n,"websocket");else if("notify"==n.type)"connection.created"===n.event_type?this.writeWebSocketTimelineLog("notify-connection.created",n):"connection.destroyed"===n.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",n),this.signalingOnMessageTypeNotify(n,"websocket");else if("switched"==n.type)this.writeWebSocketSignalingLog("onmessage-switched",n),this.signalingOnMessageTypeSwitched(n);else if("redirect"==n.type){this.writeWebSocketSignalingLog("onmessage-redirect",n);try{const e=await this.signalingOnMessageTypeRedirect(n);i(e)}catch(e){s(e)}}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e,t||(this.contactSignalingUrl=e.url,this.writeWebSocketSignalingLog("contact-signaling-url",this.contactSignalingUrl)))})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),this.signalingTerminate(),t(n)},this.ws.onerror=e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=e.target;let s;"string"==typeof e.data?s=(new TextEncoder).encode(e.data):e.data instanceof ArrayBuffer?s=e.data:console.warn("Received onmessage event data is not of type String or ArrayBuffer."),void 0!==s&&(!0===n.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(i.label,s)))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");if("open"!==n.readyState)throw new Error("Messaging DataChannel is not open");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1 {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") ; else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t};\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t};\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t};\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});\n\t\t}\n\t})();\n}\n\nconst WORKER_SCRIPT = \"InVzZSBzdHJpY3QiOwovKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi8KY29uc3QgY29ubmVjdGlvbklkTGVuZ3RoID0gMjY7CmZ1bmN0aW9uIGJ5dGVDb3VudChuKSB7CiAgICBpZiAobiA9PSAwKSB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICAvLyBsb2cyNTYoeCkgPSBsb2coeCkgLyBsb2coMjU2KQogICAgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5sb2cobikgLyBNYXRoLmxvZygyICoqIDgpICsgMSk7Cn0KZnVuY3Rpb24gYXJyYXlCdWZmZXJUb051bWJlcihhcnJheUJ1ZmZlcikgewogICAgLy8gMzJiaXQg44G+44Gn44KS5oOz5a6aIChCaWdJbnQg44G444Gu5pu444GN5o+b44GI5pmC44Gr6KaB5L+u5q2jKQogICAgY29uc3QgbmV3QXJyYXlCdWZmZXIgPSBuZXcgQXJyYXlCdWZmZXIoVWludDMyQXJyYXk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sKICAgICAgICAgICAgICAgIGdlbmVyYXRlRGVyaXZlS2V5KG1hdGVyaWFsKS50aGVuKChkZXJpdmVLZXkpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRTZWxmRGVyaXZlS2V5KHNlbGZDb25uZWN0aW9uSWQsIHNlbGZLZXlJZCwgZGVyaXZlS2V5KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgZ2VuZXJhdGVXcml0ZUlWKG1hdGVyaWFsKS50aGVuKCh3cml0ZUlWKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2V0V3JpdGVJVihzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5lY3Rpb25JZCwga2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBzZXRMYXRlc3RSZW1vdGVLZXlJZChjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gInJlbW92ZVJlbW90ZURlcml2ZUtleSIpIHsKICAgICAgICBjb25zdCB7IGNvbm5lY3Rpb25JZCB9ID0gZXZlbnQuZGF0YTsKICAgICAgICByZW1vdmVEZXJpdmVLZXkoY29ubmVjdGlvbklkKTsKICAgIH0KICAgIGVsc2UgaWYgKHR5cGUgPT09ICJlbmNyeXB0IikgewogICAgICAgIGNvbnN0IHsgcmVhZGFibGVTdHJlYW0sIHdyaXRhYmxlU3RyZWFtIH0gPSBldmVudC5kYXRhOwogICAgICAgIGNvbnN0IHRyYW5zZm9ybVN0cmVhbSA9IG5ldyBUcmFuc2Zvcm1TdHJlYW0oewogICAgICAgICAgICB0cmFuc2Zvcm06IGVuY3J5cHRGdW5jdGlvbiwKICAgICAgICB9KTsKICAgICAgICByZWFkYWJsZVN0cmVhbS5waXBlVGhyb3VnaCh0cmFuc2Zvcm1TdHJlYW0pLnBpcGVUbyh3cml0YWJsZVN0cmVhbSk7CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAiZGVjcnlwdCIpIHsKICAgICAgICBjb25zdCB7IHJlYWRhYmxlU3RyZWFtLCB3cml0YWJsZVN0cmVhbSB9ID0gZXZlbnQuZGF0YTsKICAgICAgICBjb25zdCB0cmFuc2Zvcm1TdHJlYW0gPSBuZXcgVHJhbnNmb3JtU3RyZWFtKHsKICAgICAgICAgICAgdHJhbnNmb3JtOiBkZWNyeXB0RnVuY3Rpb24sCiAgICAgICAgfSk7CiAgICAgICAgcmVhZGFibGVTdHJlYW0ucGlwZVRocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=\";\nclass SoraE2EE {\n constructor() {\n // 対応しているかどうかの判断\n // @ts-ignore トライアル段階の API なので無視する\n const supportsInsertableStreams = !!RTCRtpSender.prototype.createEncodedStreams;\n if (!supportsInsertableStreams) {\n throw new Error(\"E2EE is not supported in this browser.\");\n }\n this.worker = null;\n this.onWorkerDisconnect = null;\n }\n // worker を起動する\n startWorker() {\n // ワーカーを起動する\n const workerScript = atob(WORKER_SCRIPT);\n this.worker = new Worker(URL.createObjectURL(new Blob([workerScript], { type: \"application/javascript\" })));\n this.worker.onmessage = (event) => {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n // role: sendrecv で multistream: false の場合は例外を発生させる\n if (role === \"sendrecv\" && options.multistream !== true) {\n throw new Error(\"Failed to parse options. Options multistream must be true when connecting using 'sendrecv'\");\n }\n if (redirect === true) {\n message.redirect = true;\n }\n if (typeof options.multistream === \"boolean\") {\n message.multistream = options.multistream;\n }\n if (typeof options.simulcast === \"boolean\") {\n message.simulcast = options.simulcast;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n if (typeof options.spotlight === \"boolean\") {\n message.spotlight = options.spotlight;\n }\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n if (options.signalingNotifyMetadata !== undefined) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n if (options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n if (options.bundleId !== undefined) {\n message.bundle_id = options.bundleId;\n }\n if (typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n if (typeof options.e2ee === \"boolean\") {\n message.e2ee = options.e2ee;\n }\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WS シグナリングで type offer メッセージを受信したシグナリング URL\n */\n connectedSignalingUrl: string;\n /**\n * WS シグナリングで最初に type connect を送信したシグナリング URL\n */\n contactSignalingUrl: string;\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.connectedSignalingUrl = \"\";\n this.contactSignalingUrl = \"\";\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * stream を停止するメソッド\n */\n private stopStream(): Promise {\n return new Promise((resolve, _) => {\n if (this.debug) {\n console.warn(\n \"@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself.\"\n );\n }\n if (!this.stream) {\n return resolve();\n }\n this.stream.getTracks().forEach((t) => {\n t.stop();\n });\n this.stream = null;\n return resolve();\n });\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private async signalingTerminate(): Promise {\n await this.stopStream();\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private async abendPeerConnectionState(title: SoraAbendTitle): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.contactSignalingUrl = \"\";\n this.connectedSignalingUrl = \"\";\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n await this.stopStream();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = async (event): Promise => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n this.connectedSignalingUrl = ws.url;\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n try {\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n } catch (error) {\n reject(error);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n // 初回に接続した URL を状態管理する\n if (!redirect) {\n this.contactSignalingUrl = ws.url;\n this.writeWebSocketSignalingLog(\"contact-signaling-url\", this.contactSignalingUrl);\n }\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = async (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n await this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = async (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n await this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = async (_): Promise => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n await this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = async (_): Promise => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n await this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(async () => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n await this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n dataChannel.bufferedAmountLowThreshold = 65536;\n dataChannel.binaryType = \"arraybuffer\";\n this.soraDataChannels[dataChannel.label] = dataChannel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const dataChannel = event.target as RTCDataChannel;\n let data: ArrayBuffer | undefined = undefined;\n if (typeof event.data === \"string\") {\n data = new TextEncoder().encode(event.data);\n } else if (event.data instanceof ArrayBuffer) {\n data = event.data;\n } else {\n console.warn(\"Received onmessage event data is not of type String or ArrayBuffer.\");\n }\n\n if (data !== undefined) {\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n }\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n if (dataChannel.readyState !== \"open\") {\n throw new Error(\"Messaging DataChannel is not open\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n // sendrecv の場合、multistream に初期値を指定する\n const sendrecvOptions: ConnectionOptions = Object.assign({ multistream: true }, options);\n return new ConnectionPublisher(\n this.signalingUrlCandidates,\n \"sendrecv\",\n channelId,\n metadata,\n sendrecvOptions,\n this.debug\n );\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","BYTES_PER_ELEMENT","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","multistream","simulcast","simulcastRid","simulcast_rid","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","signalingNotifyMetadata","signaling_notify_metadata","clientId","client_id","bundleId","bundle_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","connectedSignalingUrl","contactSignalingUrl","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","stopStream","getTracks","dataChannel","initializeConnection","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","signalingTerminate","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","abendPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmountLowThreshold","bufferedAmount","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","target","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","ontrack","streams","muted","onremovetrack","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendrecvOptions","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMediaStreamConstraints","mediastream","applyConstraints"],"mappings":"qOAslBA,MAAMA,EACFC,cAII,MADoCC,aAAaC,UAAUC,qBAEvD,MAAM,IAAIC,MAAM,0CAEpBC,KAAKC,OAAS,KACdD,KAAKE,mBAAqB,KAG9BC,cAEI,MAAMC,EAAeC,KAfP,wjwBAgBdL,KAAKC,OAAS,IAAIK,OAAOC,IAAIC,gBAAgB,IAAIC,KAAK,CAACL,GAAe,CAAEM,KAAM,6BAC9EV,KAAKC,OAAOU,UAAaC,IACrB,MAAMC,UAAEA,GAAcD,EAAME,KACV,eAAdD,GAAiE,mBAA5Bb,KAAKE,oBAC1CF,KAAKE,sBAKjBa,cACQf,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KAAK2O,OAoB7GmjB,SACE/T,EACAC,EAAqB,KACrBC,EAA6B,CAAEM,OAAO,EAAMC,OAAO,IAEnD,OAAO,IAAI8S,GAAqBtxB,KAAKokB,uBAAwB,WAAYrG,EAAWC,EAAUC,EAASje,KAAK2O,OAQ1Gmb,mBACF,OAAO9pB,KAAKokB,8BAOD,CAYb2N,SAAU5wB,eAAgBuC,SAClBhE,EAASsyB,SAAStuB,IAgB1BuuB,WAAY,SAAU7N,EAA2CzV,GAAQ,GACvE,OAAO,IAAI+iB,GAAetN,EAAwBzV,IAOpDoC,QAAS,WACP,MAAO,qBAOTmhB,QAAS,CACPC,4BCnMJhxB,eACEixB,EACA3N,GAEA,GAAIA,EAAYlG,OAAsC,kBAAtBkG,EAAYlG,MAC1C,IAAK,MAAM7c,KAAS0wB,EAAYlM,uBACxBxkB,EAAM2wB,iBAAiB5N,EAAYlG,OAG7C,GAAIkG,EAAYjG,OAAsC,kBAAtBiG,EAAYjG,MAC1C,IAAK,MAAM9c,KAAS0wB,EAAY1L,uBACxBhlB,EAAM2wB,iBAAiB5N,EAAYjG"} \ No newline at end of file +{"version":3,"file":"sora.min.js","sources":["../packages/e2ee/dist/sora_e2ee.mjs","../node_modules/fflate/esm/browser.js","../packages/sdk/src/utils.ts","../packages/sdk/src/base.ts","../packages/sdk/src/publisher.ts","../packages/sdk/src/subscriber.ts","../packages/sdk/src/sora.ts","../packages/sdk/src/helpers.ts"],"sourcesContent":["/**\n * @sora/e2ee\n * WebRTC SFU Sora JavaScript E2EE Library\n * @version: 2021.1.0\n * @author: Shiguredo Inc.\n * @license: Apache-2.0\n **/\n\n// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nfunction WasmExec () {\n\t(() => {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") ; else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t};\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t};\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t};\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\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kQnl0ZXNbZW5jb2RlZEZyYW1lLnR5cGVdKSk7CiAgICAgICAgY29uc3Qgc2ZyYW1lSGVhZGVyID0gbmV3IFVpbnQ4QXJyYXkoc2ZyYW1lSGVhZGVyQnVmZmVyKTsKICAgICAgICBjb25zdCBjb25uZWN0aW9uSWQgPSB0ZXh0RGVjb2Rlci5kZWNvZGUoY29ubmVjdGlvbklkQnVmZmVyKTsKICAgICAgICBjb25zdCBbcywgY291bnQsIGtleUlkXSA9IHBhcnNlU0ZyYW1lSGVhZGVyKHNmcmFtZUhlYWRlckJ1ZmZlcik7CiAgICAgICAgLy8g5LuK5Zue44GvIHMgZmxhZyDjga8gMCDjga7jgb8KICAgICAgICBpZiAocyAhPT0gMCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlVORVhQRUNURUQtUy1GTEFHIik7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGRlcml2ZUtleSA9IGdldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICBpZiAoIWRlcml2ZUtleSkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGl2ID0gZ2VuZXJhdGVJVihjb3VudCwgY29ubmVjdGlvbklkLCBrZXlJZCk7CiAgICAgICAgaWYgKCFpdikgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGZyYW1lQWRkID0gZW5jb2RlRnJhbWVBZGQoZnJhbWVNZXRhZGF0YSwgc2ZyYW1lSGVhZGVyLCBjb25uZWN0aW9uSWQpOwogICAgICAgIGNyeXB0by5zdWJ0bGUKICAgICAgICAgICAgLmRlY3J5cHQoewogICAgICAgICAgICBuYW1lOiAiQUVTLUdDTSIsCiAgICAgICAgICAgIGl2OiBpdiwKICAgICAgICAgICAgYWRkaXRpb25hbERhdGE6IGZyYW1lQWRkLAogICAgICAgIH0sIGRlcml2ZUtleSwgbmV3IFVpbnQ4QXJyYXkoZW5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vdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oK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GlwZVRocm91Z2godHJhbnNmb3JtU3RyZWFtKS5waXBlVG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=\";\nclass SoraE2EE {\n constructor() {\n // 対応しているかどうかの判断\n // @ts-ignore トライアル段階の API なので無視する\n const supportsInsertableStreams = !!RTCRtpSender.prototype.createEncodedStreams;\n if (!supportsInsertableStreams) {\n throw new Error(\"E2EE is not supported in this browser.\");\n }\n this.worker = null;\n this.onWorkerDisconnect = null;\n }\n // worker を起動する\n startWorker() {\n // ワーカーを起動する\n const workerScript = atob(WORKER_SCRIPT);\n this.worker = new Worker(URL.createObjectURL(new Blob([workerScript], { type: \"application/javascript\" })));\n this.worker.onmessage = (event) => {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n // role: sendrecv で multistream: false の場合は例外を発生させる\n if (role === \"sendrecv\" && options.multistream !== true) {\n throw new Error(\"Failed to parse options. Options multistream must be true when connecting using 'sendrecv'\");\n }\n if (redirect === true) {\n message.redirect = true;\n }\n if (typeof options.multistream === \"boolean\") {\n message.multistream = options.multistream;\n }\n if (typeof options.simulcast === \"boolean\") {\n message.simulcast = options.simulcast;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n if (typeof options.spotlight === \"boolean\") {\n message.spotlight = options.spotlight;\n }\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n if (options.signalingNotifyMetadata !== undefined) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n if (options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n if (options.bundleId !== undefined) {\n message.bundle_id = options.bundleId;\n }\n if (typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n if (typeof options.e2ee === \"boolean\") {\n message.e2ee = options.e2ee;\n }\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WS シグナリングで type offer メッセージを受信したシグナリング URL\n */\n connectedSignalingUrl: string;\n /**\n * WS シグナリングで最初に type connect を送信したシグナリング URL\n */\n contactSignalingUrl: string;\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.connectedSignalingUrl = \"\";\n this.contactSignalingUrl = \"\";\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private signalingTerminate(): void {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private abendPeerConnectionState(title: SoraAbendTitle): void {\n this.clearMonitorIceConnectionStateChange();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.contactSignalingUrl = \"\";\n this.connectedSignalingUrl = \"\";\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n this.connectedSignalingUrl = ws.url;\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n try {\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n } catch (error) {\n reject(error);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n // 初回に接続した URL を状態管理する\n if (!redirect) {\n this.contactSignalingUrl = ws.url;\n this.writeWebSocketSignalingLog(\"contact-signaling-url\", this.contactSignalingUrl);\n }\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = (_) => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(() => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = (_) => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(() => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n dataChannel.bufferedAmountLowThreshold = 65536;\n dataChannel.binaryType = \"arraybuffer\";\n this.soraDataChannels[dataChannel.label] = dataChannel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const dataChannel = event.target as RTCDataChannel;\n let data: ArrayBuffer | undefined = undefined;\n if (typeof event.data === \"string\") {\n data = new TextEncoder().encode(event.data);\n } else if (event.data instanceof ArrayBuffer) {\n data = event.data;\n } else {\n console.warn(\"Received onmessage event data is not of type String or ArrayBuffer.\");\n }\n\n if (data !== undefined) {\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n }\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n if (dataChannel.readyState !== \"open\") {\n throw new Error(\"Messaging DataChannel is not open\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n // sendrecv の場合、multistream に初期値を指定する\n const sendrecvOptions: ConnectionOptions = Object.assign({ multistream: true }, options);\n return new ConnectionPublisher(\n this.signalingUrlCandidates,\n \"sendrecv\",\n channelId,\n metadata,\n sendrecvOptions,\n this.debug\n );\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","BYTES_PER_ELEMENT","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","multistream","simulcast","simulcastRid","simulcast_rid","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","signalingNotifyMetadata","signaling_notify_metadata","clientId","client_id","bundleId","bundle_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","connectedSignalingUrl","contactSignalingUrl","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","signalingTerminate","dataChannel","initializeConnection","abendPeerConnectionState","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmountLowThreshold","bufferedAmount","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","target","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","getTracks","ontrack","streams","muted","onremovetrack","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendrecvOptions","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMediaSt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OAAO,IAAIkS,GAAoB1wB,KAAKokB,uBAAwB,WAAYrG,EAAWC,EAAUC,EAASje,KAAK2O,OAoB7GkjB,SACE9T,EACAC,EAAqB,KACrBC,EAA6B,CAAEM,OAAO,EAAMC,OAAO,IAEnD,OAAO,IAAI6S,GAAqBrxB,KAAKokB,uBAAwB,WAAYrG,EAAWC,EAAUC,EAASje,KAAK2O,OAQ1Gmb,mBACF,OAAO9pB,KAAKokB,8BAOD,CAYb0N,SAAU3wB,eAAgBuC,SAClBhE,EAASqyB,SAASruB,IAgB1BsuB,WAAY,SAAU5N,EAA2CzV,GAAQ,GACvE,OAAO,IAAI8iB,GAAerN,EAAwBzV,IAOpDoC,QAAS,WACP,MAAO,qBAOTkhB,QAAS,CACPC,4BCnMJ/wB,eACEgxB,EACA1N,GAEA,GAAIA,EAAYlG,OAAsC,kBAAtBkG,EAAYlG,MAC1C,IAAK,MAAM7c,KAASywB,EAAYjM,uBACxBxkB,EAAM0wB,iBAAiB3N,EAAYlG,OAG7C,GAAIkG,EAAYjG,OAAsC,kBAAtBiG,EAAYjG,MAC1C,IAAK,MAAM9c,KAASywB,EAAYzL,uBACxBhlB,EAAM0wB,iBAAiB3N,EAAYjG"} \ No newline at end of file diff --git a/dist/sora.mjs b/dist/sora.mjs index 0f94c8d1..76ad39a9 100644 --- a/dist/sora.mjs +++ b/dist/sora.mjs @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2022.1.0-canary.5 + * @version: 2022.1.0-canary.6 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -1627,7 +1627,7 @@ function createSignalingMessage(offerSDP, role, channelId, metadata, options, re } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2022.1.0-canary.5", + sora_client: "Sora JavaScript SDK 2022.1.0-canary.6", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -2189,29 +2189,10 @@ class ConnectionBase { stream.addTrack(videoTrack); await transceiver.sender.replaceTrack(videoTrack); } - /** - * stream を停止するメソッド - */ - stopStream() { - return new Promise((resolve, _) => { - if (this.debug) { - console.warn("@deprecated closing MediaStream in disconnect will be removed in a future version. Close every track in the MediaStream by yourself."); - } - if (!this.stream) { - return resolve(); - } - this.stream.getTracks().forEach((t) => { - t.stop(); - }); - this.stream = null; - return resolve(); - }); - } /** * connect 処理中に例外が発生した場合の切断処理をするメソッド */ - async signalingTerminate() { - await this.stopStream(); + signalingTerminate() { for (const key of Object.keys(this.soraDataChannels)) { const dataChannel = this.soraDataChannels[key]; if (dataChannel) { @@ -2236,9 +2217,8 @@ class ConnectionBase { * * @param title - disconnect callback に渡すイベントのタイトル */ - async abendPeerConnectionState(title) { + abendPeerConnectionState(title) { this.clearMonitorIceConnectionStateChange(); - await this.stopStream(); // callback を止める if (this.pc) { this.pc.ondatachannel = null; @@ -2301,7 +2281,6 @@ class ConnectionBase { */ async abend(title, params) { this.clearMonitorIceConnectionStateChange(); - await this.stopStream(); // callback を止める if (this.pc) { this.pc.ondatachannel = null; @@ -2597,7 +2576,6 @@ class ConnectionBase { */ async disconnect() { this.clearMonitorIceConnectionStateChange(); - await this.stopStream(); // callback を止める if (this.pc) { this.pc.ondatachannel = null; @@ -2828,12 +2806,12 @@ class ConnectionBase { this.writeWebSocketSignalingLog("new-websocket", ws.url); // websocket の各 callback を設定する ws.binaryType = "arraybuffer"; - ws.onclose = async (event) => { + ws.onclose = (event) => { const error = new ConnectError(`Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`); error.code = event.code; error.reason = event.reason; this.writeWebSocketTimelineLog("onclose", error); - await this.signalingTerminate(); + this.signalingTerminate(); reject(error); }; ws.onmessage = async (event) => { @@ -3132,18 +3110,18 @@ class ConnectionBase { return; } this.clearMonitorSignalingWebSocketEvent(); - this.ws.onclose = async (event) => { + this.ws.onclose = (event) => { const error = new ConnectError(`Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`); error.code = event.code; error.reason = event.reason; this.writeWebSocketTimelineLog("onclose", error); - await this.signalingTerminate(); + this.signalingTerminate(); reject(error); }; - this.ws.onerror = async (_) => { + this.ws.onerror = (_) => { const error = new ConnectError(`Signaling failed. WebSocket onerror was called`); this.writeWebSocketSignalingLog("onerror", error); - await this.signalingTerminate(); + this.signalingTerminate(); reject(error); }; }, 100); @@ -3178,7 +3156,7 @@ class ConnectionBase { if (!this.pc) { return; } - this.pc.oniceconnectionstatechange = async (_) => { + this.pc.oniceconnectionstatechange = (_) => { // connectionState が undefined の場合は iceConnectionState を見て判定する if (this.pc && this.pc.connectionState === undefined) { this.writePeerConnectionTimelineLog("oniceconnectionstatechange", { @@ -3190,19 +3168,19 @@ class ConnectionBase { clearTimeout(this.monitorIceConnectionStateChangeTimerId); // iceConnectionState "failed" で切断する if (this.pc.iceConnectionState === "failed") { - await this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"); + this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"); } // iceConnectionState "disconnected" になってから 10000ms の間変化がない場合切断する else if (this.pc.iceConnectionState === "disconnected") { - this.monitorIceConnectionStateChangeTimerId = setTimeout(async () => { + this.monitorIceConnectionStateChangeTimerId = setTimeout(() => { if (this.pc && this.pc.iceConnectionState === "disconnected") { - await this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT"); + this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT"); } }, 10000); } } }; - this.pc.onconnectionstatechange = async (_) => { + this.pc.onconnectionstatechange = (_) => { if (this.pc) { this.writePeerConnectionTimelineLog("onconnectionstatechange", { connectionState: this.pc.connectionState, @@ -3210,7 +3188,7 @@ class ConnectionBase { iceGatheringState: this.pc.iceGatheringState, }); if (this.pc.connectionState === "failed") { - await this.abendPeerConnectionState("CONNECTION-STATE-FAILED"); + this.abendPeerConnectionState("CONNECTION-STATE-FAILED"); } } }; @@ -3221,7 +3199,7 @@ class ConnectionBase { setConnectionTimeout() { return new Promise((_, reject) => { if (0 < this.connectionTimeout) { - this.connectionTimeoutTimerId = setTimeout(async () => { + this.connectionTimeoutTimerId = setTimeout(() => { if (!this.pc || (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== "connected")) { const error = new Error(); @@ -3231,7 +3209,7 @@ class ConnectionBase { this.writePeerConnectionTimelineLog("signaling-connection-timeout", { connectionTimeout: this.connectionTimeout, }); - await this.signalingTerminate(); + this.signalingTerminate(); reject(error); } }, this.connectionTimeout); @@ -4407,7 +4385,7 @@ var sora = { * @public */ version: function () { - return "2022.1.0-canary.5"; + return "2022.1.0-canary.6"; }, /** * WebRTC のユーティリティ関数群 diff --git a/package-lock.json b/package-lock.json index e26027c5..22b314d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sora-js-sdk", - "version": "2022.1.0-canary.5", + "version": "2022.1.0-canary.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "sora-js-sdk", - "version": "2022.1.0-canary.5", + "version": "2022.1.0-canary.6", "license": "Apache-2.0", "workspaces": [ "packages/go-wasm", diff --git a/package.json b/package.json index 0447b067..4d492c69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sora-js-sdk", - "version": "2022.1.0-canary.5", + "version": "2022.1.0-canary.6", "description": "WebRTC SFU Sora JavaScript SDK", "main": "dist/sora.min.js", "module": "dist/sora.mjs", From 513bf445a3ddb13c453dcee1a22889f0bd1aa6dd Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 7 Jun 2022 10:15:04 +0900 Subject: [PATCH 76/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 9963 ++++++++++++++++++------------------ package.json | 4 +- packages/e2ee/package.json | 10 +- packages/sdk/package.json | 14 +- 4 files changed, 4974 insertions(+), 5017 deletions(-) diff --git a/package-lock.json b/package-lock.json index 22b314d6..5f88130e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,9 +14,9 @@ "packages/sdk" ], "devDependencies": { - "npm-check-updates": "^13.0.3", + "npm-check-updates": "^13.1.1", "serve": "^13.0.2", - "typedoc": "^0.22.15" + "typedoc": "^0.22.17" } }, "node_modules/@ampproject/remapping": { @@ -223,9 +223,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", - "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz", + "integrity": "sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA==", "dev": true, "engines": { "node": ">=6.9.0" @@ -523,12 +523,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz", - "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.12.tgz", + "integrity": "sha512-TYY0SXFiO31YXtNg3HtFwNJHjLsAyIIhAhNWkQ5whPPS7HWUFlg9z0Ta4qAQNjQbP1wsSt/oKkmZ/4/WWdMUpw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.17.12" }, "engines": { "node": ">=6.9.0" @@ -819,45 +819,123 @@ "node": ">=8" } }, - "node_modules/@jest/environment": { + "node_modules/@jest/console": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.0.tgz", - "integrity": "sha512-S44WGSxkRngzHslhV6RoAExekfF7Qhwa6R5+IYFa81mpcj0YgdBnRSmvHe3SNwOt64yXaE5GG8Y2xM28ii5ssA==", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.0.tgz", + "integrity": "sha512-tscn3dlJFGay47kb4qVruQg/XWlmvU0xp3EJOjzzY+sBaI+YgwKcvAmTcyYU7xEiLLIY5HCdWRooAL8dqkFlDA==", "dev": true, "dependencies": { - "@jest/fake-timers": "^28.1.0", "@jest/types": "^28.1.0", "@types/node": "*", - "jest-mock": "^28.1.0" + "chalk": "^4.0.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0", + "slash": "^3.0.0" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/environment/node_modules/@jest/types": { + "node_modules/@jest/core": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.0.tgz", + "integrity": "sha512-/2PTt0ywhjZ4NwNO4bUqD9IVJfmFVhVKGlhvSpmEfUCuxYf/3NHcKmRFI+I71lYzbTT3wMuYpETDCTHo81gC/g==", "dev": true, "dependencies": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", + "@jest/console": "^28.1.0", + "@jest/reporters": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^28.0.2", + "jest-config": "^28.1.0", + "jest-haste-map": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.0", + "jest-resolve-dependencies": "^28.1.0", + "jest-runner": "^28.1.0", + "jest-runtime": "^28.1.0", + "jest-snapshot": "^28.1.0", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "jest-watcher": "^28.1.0", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/@jest/environment/node_modules/@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "node_modules/@jest/core/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/core/node_modules/ci-info": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", + "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", + "dev": true + }, + "node_modules/@jest/core/node_modules/pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/@jest/core/node_modules/react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + }, + "node_modules/@jest/environment": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.0.tgz", + "integrity": "sha512-S44WGSxkRngzHslhV6RoAExekfF7Qhwa6R5+IYFa81mpcj0YgdBnRSmvHe3SNwOt64yXaE5GG8Y2xM28ii5ssA==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "jest-mock": "^28.1.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/@jest/expect": { @@ -894,276 +972,163 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/expect/node_modules/@jest/transform": { + "node_modules/@jest/fake-timers": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.0.tgz", - "integrity": "sha512-omy2xe5WxlAfqmsTjTPxw+iXRTRnf+NtX0ToG+4S0tABeb4KsKmPUHq5UBuwunHg3tJRwgEQhEp0M/8oiatLEA==", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.0.tgz", + "integrity": "sha512-Xqsf/6VLeAAq78+GNPzI7FZQRf5cCHj1qgQxCjws9n8rKw8r1UYoeaALwBvyuzOkpU3c1I6emeMySPa96rxtIg==", "dev": true, "dependencies": { - "@babel/core": "^7.11.6", "@jest/types": "^28.1.0", - "@jridgewell/trace-mapping": "^0.3.7", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" + "@sinonjs/fake-timers": "^9.1.1", + "@types/node": "*", + "jest-message-util": "^28.1.0", + "jest-mock": "^28.1.0", + "jest-util": "^28.1.0" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/expect/node_modules/@jest/types": { + "node_modules/@jest/globals": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.0.tgz", + "integrity": "sha512-3m7sTg52OTQR6dPhsEQSxAvU+LOBbMivZBwOvKEZ+Rb+GyxVnXi9HKgOTYkx/S99T8yvh17U4tNNJPIEQmtwYw==", "dev": true, "dependencies": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@jest/environment": "^28.1.0", + "@jest/expect": "^28.1.0", + "@jest/types": "^28.1.0" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/expect/node_modules/@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "node_modules/@jest/reporters": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.0.tgz", + "integrity": "sha512-qxbFfqap/5QlSpIizH9c/bFCDKsQlM4uAKSOvZrP+nIdrjqre3FmKzpTtYyhsaVcOSNK7TTt2kjm+4BJIjysFA==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@jest/expect/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@jridgewell/trace-mapping": "^0.3.7", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-util": "^28.1.0", + "jest-worker": "^28.1.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^9.0.0" + }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/@jest/expect/node_modules/ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true - }, - "node_modules/@jest/expect/node_modules/diff-sequences": { + "node_modules/@jest/schemas": { "version": "28.0.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", - "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.2.tgz", + "integrity": "sha512-YVDJZjd4izeTDkij00vHHAymNXQ6WWsdChFRK86qck6Jpr3DCL5W3Is3vslviRlP+bLuMYRLbdp98amMvqudhA==", "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.23.3" + }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/expect/node_modules/expect": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.0.tgz", - "integrity": "sha512-qFXKl8Pmxk8TBGfaFKRtcQjfXEnKAs+dmlxdwvukJZorwrAabT7M3h8oLOG01I2utEhkmUTi17CHaPBovZsKdw==", + "node_modules/@jest/source-map": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.0.2.tgz", + "integrity": "sha512-Y9dxC8ZpN3kImkk0LkK5XCEneYMAXlZ8m5bflmSL5vrwyeUpJfentacCUg6fOb8NOpOO7hz2+l37MV77T6BFPw==", "dev": true, "dependencies": { - "@jest/expect-utils": "^28.1.0", - "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0" + "@jridgewell/trace-mapping": "^0.3.7", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/expect/node_modules/jest-diff": { + "node_modules/@jest/test-result": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", - "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.0.tgz", + "integrity": "sha512-sBBFIyoPzrZho3N+80P35A5oAkSKlGfsEFfXFWuPGBsW40UAjCkGakZhn4UQK4iQlW2vgCDMRDOob9FGKV8YoQ==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^28.0.2", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "@jest/console": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/expect/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "node_modules/@jest/test-sequencer": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.0.tgz", + "integrity": "sha512-tZCEiVWlWNTs/2iK9yi6o3AlMfbbYgV4uuZInSVdzZ7ftpHZhCMuhvk2HLYhCZzLgPFQ9MnM1YaxMnh3TILFiQ==", "dev": true, + "dependencies": { + "@jest/test-result": "^28.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "slash": "^3.0.0" + }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/expect/node_modules/jest-haste-map": { + "node_modules/@jest/transform": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.0.tgz", - "integrity": "sha512-xyZ9sXV8PtKi6NCrJlmq53PyNVHzxmcfXNVvIRHpHmh1j/HChC4pwKgyjj7Z9us19JMw8PpQTJsFWOsIfT93Dw==", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.0.tgz", + "integrity": "sha512-omy2xe5WxlAfqmsTjTPxw+iXRTRnf+NtX0ToG+4S0tABeb4KsKmPUHq5UBuwunHg3tJRwgEQhEp0M/8oiatLEA==", "dev": true, "dependencies": { + "@babel/core": "^7.11.6", "@jest/types": "^28.1.0", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", + "@jridgewell/trace-mapping": "^0.3.7", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", "jest-regex-util": "^28.0.2", "jest-util": "^28.1.0", - "jest-worker": "^28.1.0", "micromatch": "^4.0.4", - "walker": "^1.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/@jest/expect/node_modules/jest-matcher-utils": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", - "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.0", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-snapshot": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.0.tgz", - "integrity": "sha512-ex49M2ZrZsUyQLpLGxQtDbahvgBjlLPgklkqGM0hq/F7W/f8DyqZxVHjdy19QKBm4O93eDp+H5S23EiTbbUmHw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^28.1.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^28.1.0", - "jest-get-type": "^28.0.2", - "jest-haste-map": "^28.1.0", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0", - "natural-compare": "^1.4.0", - "pretty-format": "^28.1.0", - "semver": "^7.3.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-util": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", - "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", - "dev": true, - "dependencies": { - "@jest/types": "^28.1.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-worker": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.0.tgz", - "integrity": "sha512-ZHwM6mNwaWBR52Snff8ZvsCTqQsvhCxP/bT1I6T6DAnb6ygkshsyLQIMxFwHpYxht0HOoqt23JlC01viI7T03A==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/expect/node_modules/pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/expect/node_modules/react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - }, - "node_modules/@jest/expect/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/@jest/expect/node_modules/write-file-atomic": { + "node_modules/@jest/transform/node_modules/write-file-atomic": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", @@ -1176,24 +1141,7 @@ "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/@jest/fake-timers": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.0.tgz", - "integrity": "sha512-Xqsf/6VLeAAq78+GNPzI7FZQRf5cCHj1qgQxCjws9n8rKw8r1UYoeaALwBvyuzOkpU3c1I6emeMySPa96rxtIg==", - "dev": true, - "dependencies": { - "@jest/types": "^28.1.0", - "@sinonjs/fake-timers": "^9.1.1", - "@types/node": "*", - "jest-message-util": "^28.1.0", - "jest-mock": "^28.1.0", - "jest-util": "^28.1.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/fake-timers/node_modules/@jest/types": { + "node_modules/@jest/types": { "version": "28.1.0", "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", @@ -1210,68 +1158,6 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/fake-timers/node_modules/@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@jest/fake-timers/node_modules/ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true - }, - "node_modules/@jest/fake-timers/node_modules/jest-util": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", - "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", - "dev": true, - "dependencies": { - "@jest/types": "^28.1.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/schemas": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.2.tgz", - "integrity": "sha512-YVDJZjd4izeTDkij00vHHAymNXQ6WWsdChFRK86qck6Jpr3DCL5W3Is3vslviRlP+bLuMYRLbdp98amMvqudhA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.23.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/types": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", - "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, "node_modules/@jridgewell/resolve-uri": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", @@ -1425,14 +1311,14 @@ } }, "node_modules/@npmcli/run-script": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.2.tgz", - "integrity": "sha512-vdjD/PMBl+OX9j9C9irx5sCCIKfp2PWkpPNH9zxvlJAfSZ3Qp5aU412v+O3PFJl3R1PFNwuyChCqHg4ma6ci2Q==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.3.tgz", + "integrity": "sha512-ZXL6qgC5NjwfZJ2nET+ZSLEz/PJgJ/5CU90C2S66dZY4Jw73DasS4ZCXuy/KHWYP0imjJ4VtA+Gebb5BxxKp9Q==", "dev": true, "dependencies": { "@npmcli/node-gyp": "^2.0.0", "@npmcli/promise-spawn": "^3.0.0", - "node-gyp": "^9.0.0", + "node-gyp": "^8.4.1", "read-package-json-fast": "^2.0.3" }, "engines": { @@ -1633,9 +1519,9 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.14.2.tgz", - "integrity": "sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==", + "version": "7.17.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.17.1.tgz", + "integrity": "sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA==", "dev": true, "dependencies": { "@babel/types": "^7.3.0" @@ -1680,16 +1566,6 @@ "@types/istanbul-lib-report": "*" } }, - "node_modules/@types/jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.1.tgz", - "integrity": "sha512-fUy7YRpT+rHXto1YlL+J9rs0uLGyiqVt3ZOTQR+4ROc47yNl8WLdVLgUloBRhOxP1PZvguHl44T3H0wAWxahYQ==", - "dev": true, - "dependencies": { - "jest-matcher-utils": "^27.0.0", - "pretty-format": "^27.0.0" - } - }, "node_modules/@types/jsdom": { "version": "16.2.14", "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-16.2.14.tgz", @@ -1720,9 +1596,9 @@ "dev": true }, "node_modules/@types/prettier": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.4.tgz", - "integrity": "sha512-ReVR2rLTV1kvtlWFyuot+d1pkpG2Fw/XKE3PDAdj57rbM97ttSp9JZ2UsP+2EHTylra9cUf6JA7tGwW1INzUrA==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.3.tgz", + "integrity": "sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==", "dev": true }, "node_modules/@types/resolve": { @@ -1747,12 +1623,10 @@ "dev": true }, "node_modules/@types/yargs": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", - "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", "dev": true, - "optional": true, - "peer": true, "dependencies": { "@types/yargs-parser": "*" } @@ -1764,14 +1638,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.26.0.tgz", - "integrity": "sha512-oGCmo0PqnRZZndr+KwvvAUvD3kNE4AfyoGCwOZpoCncSh4MVD06JTE8XQa2u9u+NX5CsyZMBTEc2C72zx38eYA==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.1.tgz", + "integrity": "sha512-6dM5NKT57ZduNnJfpY81Phe9nc9wolnMCnknb1im6brWi1RYv84nbMS3olJa27B6+irUVV1X/Wb+Am0FjJdGFw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/type-utils": "5.26.0", - "@typescript-eslint/utils": "5.26.0", + "@typescript-eslint/scope-manager": "5.27.1", + "@typescript-eslint/type-utils": "5.27.1", + "@typescript-eslint/utils": "5.27.1", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -1797,14 +1671,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.26.0.tgz", - "integrity": "sha512-n/IzU87ttzIdnAH5vQ4BBDnLPly7rC5VnjN3m0xBG82HK6rhRxnCb3w/GyWbNDghPd+NktJqB/wl6+YkzZ5T5Q==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.27.1.tgz", + "integrity": "sha512-7Va2ZOkHi5NP+AZwb5ReLgNF6nWLGTeUJfxdkVUAPPSaAdbWNnFZzLZ4EGGmmiCTg+AwlbE1KyUYTBglosSLHQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/typescript-estree": "5.26.0", + "@typescript-eslint/scope-manager": "5.27.1", + "@typescript-eslint/types": "5.27.1", + "@typescript-eslint/typescript-estree": "5.27.1", "debug": "^4.3.4" }, "engines": { @@ -1824,13 +1698,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.26.0.tgz", - "integrity": "sha512-gVzTJUESuTwiju/7NiTb4c5oqod8xt5GhMbExKsCTp6adU3mya6AGJ4Pl9xC7x2DX9UYFsjImC0mA62BCY22Iw==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.27.1.tgz", + "integrity": "sha512-fQEOSa/QroWE6fAEg+bJxtRZJTH8NTskggybogHt4H9Da8zd4cJji76gA5SBlR0MgtwF7rebxTbDKB49YUCpAg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0" + "@typescript-eslint/types": "5.27.1", + "@typescript-eslint/visitor-keys": "5.27.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1841,12 +1715,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.26.0.tgz", - "integrity": "sha512-7ccbUVWGLmcRDSA1+ADkDBl5fP87EJt0fnijsMFTVHXKGduYMgienC/i3QwoVhDADUAPoytgjbZbCOMj4TY55A==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.27.1.tgz", + "integrity": "sha512-+UC1vVUWaDHRnC2cQrCJ4QtVjpjjCgjNFpg8b03nERmkHv9JV9X5M19D7UFMd+/G7T/sgFwX2pGmWK38rqyvXw==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.26.0", + "@typescript-eslint/utils": "5.27.1", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1867,9 +1741,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.26.0.tgz", - "integrity": "sha512-8794JZFE1RN4XaExLWLI2oSXsVImNkl79PzTOOWt9h0UHROwJedNOD2IJyfL0NbddFllcktGIO2aOu10avQQyA==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.27.1.tgz", + "integrity": "sha512-LgogNVkBhCTZU/m8XgEYIWICD6m4dmEDbKXESCbqOXfKZxRKeqpiJXQIErv66sdopRKZPo5l32ymNqibYEH/xg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1880,13 +1754,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.26.0.tgz", - "integrity": "sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.1.tgz", + "integrity": "sha512-DnZvvq3TAJ5ke+hk0LklvxwYsnXpRdqUY5gaVS0D4raKtbznPz71UJGnPTHEFo0GDxqLOLdMkkmVZjSpET1hFw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0", + "@typescript-eslint/types": "5.27.1", + "@typescript-eslint/visitor-keys": "5.27.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1907,15 +1781,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.26.0.tgz", - "integrity": "sha512-PJFwcTq2Pt4AMOKfe3zQOdez6InIDOjUJJD3v3LyEtxHGVVRK3Vo7Dd923t/4M9hSH2q2CLvcTdxlLPjcIk3eg==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.27.1.tgz", + "integrity": "sha512-mZ9WEn1ZLDaVrhRaYgzbkXBkTPghPFsup8zDbbsYTxC5OmqrFE7skkKS/sraVsLP3TcT3Ki5CSyEFBRkLH/H/w==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/typescript-estree": "5.26.0", + "@typescript-eslint/scope-manager": "5.27.1", + "@typescript-eslint/types": "5.27.1", + "@typescript-eslint/typescript-estree": "5.27.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1931,12 +1805,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.26.0.tgz", - "integrity": "sha512-wei+ffqHanYDOQgg/fS6Hcar6wAWv0CUPQ3TZzOWd2BLfgP539rb49bwua8WRAs7R6kOSLn82rfEu2ro6Llt8Q==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.1.tgz", + "integrity": "sha512-xYs6ffo01nhdJgPieyk7HAOpjhTsx7r/oB9LWEhwAXgwn33tkr+W8DI2ChboqhZlC4q3TC6geDYPoiX8ROqyOQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/types": "5.27.1", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -2224,6 +2098,27 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, + "node_modules/babel-jest": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.0.tgz", + "integrity": "sha512-zNKk0yhDZ6QUwfxh9k07GII6siNGMJWVUU49gmFj5gfdqDKLqa2RArXOF2CODp4Dr7dLxN2cvAV+667dGJ4b4w==", + "dev": true, + "dependencies": { + "@jest/transform": "^28.1.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^28.0.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, "node_modules/babel-plugin-istanbul": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", @@ -2240,6 +2135,21 @@ "node": ">=8" } }, + "node_modules/babel-plugin-jest-hoist": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.0.2.tgz", + "integrity": "sha512-Kizhn/ZL+68ZQHxSnHyuvJv8IchXD62KQxV77TBDV/xoBFBOfgRAk97GNs6hXdTTCiVES9nB2I6+7MXXrk5llQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, "node_modules/babel-preset-current-node-syntax": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", @@ -2263,19 +2173,35 @@ "@babel/core": "^7.0.0" } }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "node_modules/babel-preset-jest": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.0.2.tgz", + "integrity": "sha512-sYzXIdgIXXroJTFeB3S6sNDWtlJ2dllCdTEsnZ65ACrMojj3hVNFRmnJ1HZtomGi+Be7aqpY/HJ92fr8OhKVkQ==", "dev": true, "dependencies": { - "ansi-align": "^3.0.0", + "babel-plugin-jest-hoist": "^28.0.2", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "dev": true, + "dependencies": { + "ansi-align": "^3.0.0", "camelcase": "^6.2.0", "chalk": "^4.1.0", "cli-boxes": "^2.2.1", @@ -2405,9 +2331,9 @@ } }, "node_modules/cacache": { - "version": "16.0.7", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.0.7.tgz", - "integrity": "sha512-a4zfQpp5vm4Ipdvbj+ZrPonikRhm6WBEd4zT1Yc1DXsmAxrPgDwWBLF/u/wTVXSFPIgOJ1U3ghSa2Xm4s3h28w==", + "version": "16.1.1", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.1.tgz", + "integrity": "sha512-VDKN+LHyCQXaaYZ7rA/qtkURU+/yYhviUdvqEv2LT6QPZU8jpyzEkEVAcKlKLt5dJ5BRp11ym8lo3NKLluEPLg==", "dev": true, "dependencies": { "@npmcli/fs": "^2.1.0", @@ -2662,7 +2588,7 @@ "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, "engines": { "iojs": ">= 1.0.0", @@ -2724,9 +2650,9 @@ } }, "node_modules/commander": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.2.0.tgz", - "integrity": "sha512-e2i4wANQiSXgnrBlIatyHtP1odfUp0BbV5Y5nEGbxtIrStkEOAAzCUirvLBNXHLr7kwLvJl6V+4V3XV9x7Wd9w==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.3.0.tgz", + "integrity": "sha512-hv95iU5uXPbK83mjrJKuZyFM/LBAoCV/XhVGkS5Je6tl7sxr6A0ITMw5WoRV46/UaJ46Nllm3Xt7IaJhXTIkzw==", "dev": true, "engines": { "node": "^12.20.0 || >=14" @@ -2809,7 +2735,7 @@ "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "dev": true }, "node_modules/content-disposition": { @@ -2965,7 +2891,7 @@ "node_modules/dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", "dev": true }, "node_modules/deep-extend": { @@ -3010,13 +2936,13 @@ "node_modules/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", "dev": true }, "node_modules/depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", "dev": true, "engines": { "node": ">= 0.6" @@ -3100,6 +3026,18 @@ "integrity": "sha512-Z7Jkc4+ouEg8F6RrrgLOs0kkJjI0cnyFQmnGVpln8pPifuKBNbUr37GMgJsCTSwy6Z9TK7oTwW33Oe+3aERYew==", "dev": true }, + "node_modules/emittery": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", + "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -3259,9 +3197,9 @@ } }, "node_modules/eslint": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", - "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.17.0.tgz", + "integrity": "sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.0", @@ -3630,12 +3568,109 @@ "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, "engines": { "node": ">= 0.8.0" } }, + "node_modules/expect": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.0.tgz", + "integrity": "sha512-qFXKl8Pmxk8TBGfaFKRtcQjfXEnKAs+dmlxdwvukJZorwrAabT7M3h8oLOG01I2utEhkmUTi17CHaPBovZsKdw==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/expect/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/expect/node_modules/diff-sequences": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", + "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/expect/node_modules/jest-diff": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", + "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^28.0.2", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/expect/node_modules/jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/expect/node_modules/jest-matcher-utils": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", + "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/expect/node_modules/pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "dev": true, + "dependencies": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/expect/node_modules/react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4075,7 +4110,7 @@ "node_modules/has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", "dev": true }, "node_modules/has-yarn": { @@ -4171,7 +4206,7 @@ "node_modules/humanize-ms": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", "dev": true, "dependencies": { "ms": "^2.0.0" @@ -4309,7 +4344,7 @@ "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, "node_modules/is-builtin-module": { @@ -4421,7 +4456,7 @@ "node_modules/is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", - "integrity": "sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU=", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", "dev": true }, "node_modules/is-module": { @@ -4533,9 +4568,9 @@ } }, "node_modules/istanbul-lib-instrument": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz", - "integrity": "sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", + "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", "dev": true, "dependencies": { "@babel/core": "^7.12.3", @@ -4598,200 +4633,238 @@ "node": ">=8" } }, - "node_modules/jest-diff": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", - "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", + "node_modules/jest": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.0.tgz", + "integrity": "sha512-TZR+tHxopPhzw3c3560IJXZWLNHgpcz1Zh0w5A65vynLGNcg/5pZ+VildAd7+XGOu6jd58XMY/HNn0IkZIXVXg==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "@jest/core": "^28.1.0", + "import-local": "^3.0.2", + "jest-cli": "^28.1.0" + }, + "bin": { + "jest": "bin/jest.js" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/jest-environment-jsdom": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.0.tgz", - "integrity": "sha512-8n6P4xiDjNVqTWv6W6vJPuQdLx+ZiA3dbYg7YJ+DPzR+9B61K6pMVJrSs2IxfGRG4J7pyAUA5shQ9G0KEun78w==", + "node_modules/jest-changed-files": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.2.tgz", + "integrity": "sha512-QX9u+5I2s54ZnGoMEjiM2WeBvJR2J7w/8ZUmH2um/WLAuGAYFQcsVXY9+1YL6k0H/AGUdH8pXUAv6erDqEsvIA==", "dev": true, "dependencies": { - "@jest/environment": "^28.1.0", - "@jest/fake-timers": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/jsdom": "^16.2.4", - "@types/node": "*", - "jest-mock": "^28.1.0", - "jest-util": "^28.1.0", - "jsdom": "^19.0.0" + "execa": "^5.0.0", + "throat": "^6.0.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/@jest/types": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "node_modules/jest-changed-files/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "dependencies": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">= 8" } }, - "node_modules/jest-environment-jsdom/node_modules/@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "node_modules/jest-changed-files/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/jest-environment-jsdom/node_modules/ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true - }, - "node_modules/jest-environment-jsdom/node_modules/jest-util": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", - "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", + "node_modules/jest-changed-files/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "dependencies": { - "@jest/types": "^28.1.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-get-type": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", - "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", + "node_modules/jest-changed-files/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-haste-map": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", - "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", + "node_modules/jest-changed-files/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "optional": true, - "peer": true, "dependencies": { - "@jest/types": "^27.5.1", - "@types/graceful-fs": "^4.1.2", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^27.5.1", - "jest-serializer": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "micromatch": "^4.0.4", - "walker": "^1.0.7" + "path-key": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" + "node": ">=8" } }, - "node_modules/jest-matcher-utils": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", - "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", + "node_modules/jest-changed-files/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-changed-files/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "shebang-regex": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=8" } }, - "node_modules/jest-message-util": { + "node_modules/jest-changed-files/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-circus": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.0.tgz", - "integrity": "sha512-RpA8mpaJ/B2HphDMiDlrAZdDytkmwFqgjDZovM21F35lHGeUeCvYmm6W+sbQ0ydaLpg5bFAUuWG1cjqOl8vqrw==", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.0.tgz", + "integrity": "sha512-rNYfqfLC0L0zQKRKsg4n4J+W1A2fbyGH7Ss/kDIocp9KXD9iaL111glsLu7+Z7FHuZxwzInMDXq+N1ZIBkI/TQ==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.12.13", + "@jest/environment": "^28.1.0", + "@jest/expect": "^28.1.0", + "@jest/test-result": "^28.1.0", "@jest/types": "^28.1.0", - "@types/stack-utils": "^2.0.0", + "@types/node": "*", "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", + "co": "^4.6.0", + "dedent": "^0.7.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^28.1.0", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-runtime": "^28.1.0", + "jest-snapshot": "^28.1.0", + "jest-util": "^28.1.0", "pretty-format": "^28.1.0", "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "stack-utils": "^2.0.3", + "throat": "^6.0.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-message-util/node_modules/@jest/types": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "node_modules/jest-circus/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "engines": { + "node": ">=10" }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-circus/node_modules/diff-sequences": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", + "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "dev": true, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-message-util/node_modules/@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "node_modules/jest-circus/node_modules/jest-diff": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", + "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" + "chalk": "^4.0.0", + "diff-sequences": "^28.0.2", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-message-util/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/jest-circus/node_modules/jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", "dev": true, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-circus/node_modules/jest-matcher-utils": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", + "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-message-util/node_modules/pretty-format": { + "node_modules/jest-circus/node_modules/pretty-format": { "version": "28.1.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", @@ -4806,1128 +4879,1137 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-message-util/node_modules/react-is": { + "node_modules/jest-circus/node_modules/react-is": { "version": "18.1.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", "dev": true }, - "node_modules/jest-mock": { + "node_modules/jest-cli": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.0.tgz", - "integrity": "sha512-H7BrhggNn77WhdL7O1apG0Q/iwl0Bdd5E1ydhCJzL3oBLh/UYxAwR3EJLsBZ9XA3ZU4PA3UNw4tQjduBTCTmLw==", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.0.tgz", + "integrity": "sha512-fDJRt6WPRriHrBsvvgb93OxgajHHsJbk4jZxiPqmZbMDRcHskfJBBfTyjFko0jjfprP544hOktdSi9HVgl4VUQ==", "dev": true, "dependencies": { + "@jest/core": "^28.1.0", + "@jest/test-result": "^28.1.0", "@jest/types": "^28.1.0", - "@types/node": "*" + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^28.1.0", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/jest-mock/node_modules/@jest/types": { + "node_modules/jest-config": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.0.tgz", + "integrity": "sha512-aOV80E9LeWrmflp7hfZNn/zGA4QKv/xsn2w8QCBP0t0+YqObuCWTSgNbHJ0j9YsTuCO08ZR/wsvlxqqHX20iUA==", "dev": true, "dependencies": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^28.1.0", + "@jest/types": "^28.1.0", + "babel-jest": "^28.1.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^28.1.0", + "jest-environment-node": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.0", + "jest-runner": "^28.1.0", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^28.1.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-mock/node_modules/@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "engines": { - "node": ">=6" }, "peerDependencies": { - "jest-resolve": "*" + "@types/node": "*", + "ts-node": ">=9.0.0" }, "peerDependenciesMeta": { - "jest-resolve": { + "@types/node": { + "optional": true + }, + "ts-node": { "optional": true } } }, - "node_modules/jest-regex-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", - "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", + "node_modules/jest-config/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "optional": true, - "peer": true, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-resolve": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", - "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", + "node_modules/jest-config/node_modules/ci-info": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", + "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", + "dev": true + }, + "node_modules/jest-config/node_modules/jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-serializer": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", - "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", + "node_modules/jest-config/node_modules/pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", "dev": true, - "optional": true, - "peer": true, "dependencies": { - "@types/node": "*", - "graceful-fs": "^4.2.9" + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", - "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } + "node_modules/jest-config/node_modules/react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true }, - "node_modules/jest-util/node_modules/ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "node_modules/jest-config/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "optional": true, - "peer": true + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/jest-validate": { + "node_modules/jest-diff": { "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", - "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", + "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", "dev": true, - "optional": true, - "peer": true, "dependencies": { - "@jest/types": "^27.5.1", - "camelcase": "^6.2.0", "chalk": "^4.0.0", + "diff-sequences": "^27.5.1", "jest-get-type": "^27.5.1", - "leven": "^3.1.0", "pretty-format": "^27.5.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "node_modules/jest-docblock": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.0.2.tgz", + "integrity": "sha512-FH10WWw5NxLoeSdQlJwu+MTiv60aXV/t8KEwIRGEv74WARE1cXIqh1vGdy2CraHuWOOrnzTWj/azQKqW4fO7xg==", "dev": true, - "optional": true, - "peer": true, "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "detect-newline": "^3.0.0" }, "engines": { - "node": ">= 10.13.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/jest-each": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.0.tgz", + "integrity": "sha512-a/XX02xF5NTspceMpHujmOexvJ4GftpYXqr6HhhmKmExtMXsyIN/fvanQlt/BcgFoRKN4OCXxLQKth9/n6OPFg==", "dev": true, - "optional": true, - "peer": true, "dependencies": { - "has-flag": "^4.0.0" + "@jest/types": "^28.1.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "jest-util": "^28.1.0", + "pretty-format": "^28.1.0" }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } + }, + "node_modules/jest-each/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jju": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", - "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", - "dev": true - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "node_modules/jest-each/node_modules/jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + } }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/jest-each/node_modules/pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", "dev": true, "dependencies": { - "argparse": "^2.0.1" + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jsdom": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-19.0.0.tgz", - "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==", + "node_modules/jest-each/node_modules/react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + }, + "node_modules/jest-environment-jsdom": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.0.tgz", + "integrity": "sha512-8n6P4xiDjNVqTWv6W6vJPuQdLx+ZiA3dbYg7YJ+DPzR+9B61K6pMVJrSs2IxfGRG4J7pyAUA5shQ9G0KEun78w==", "dev": true, "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.5.0", - "acorn-globals": "^6.0.0", - "cssom": "^0.5.0", - "cssstyle": "^2.3.0", - "data-urls": "^3.0.1", - "decimal.js": "^10.3.1", - "domexception": "^4.0.0", - "escodegen": "^2.0.0", - "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^3.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^10.0.0", - "ws": "^8.2.3", - "xml-name-validator": "^4.0.0" + "@jest/environment": "^28.1.0", + "@jest/fake-timers": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/jsdom": "^16.2.4", + "@types/node": "*", + "jest-mock": "^28.1.0", + "jest-util": "^28.1.0", + "jsdom": "^19.0.0" }, "engines": { - "node": ">=12" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "node_modules/jest-environment-node": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.0.tgz", + "integrity": "sha512-gBLZNiyrPw9CSMlTXF1yJhaBgWDPVvH0Pq6bOEwGMXaYNzhzhw2kA/OijNF8egbCgDS0/veRv97249x2CX+udQ==", "dev": true, - "bin": { - "jsesc": "bin/jsesc" + "dependencies": { + "@jest/environment": "^28.1.0", + "@jest/fake-timers": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "jest-mock": "^28.1.0", + "jest-util": "^28.1.0" }, "engines": { - "node": ">=4" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "node_modules/jest-get-type": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", + "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", + "dev": true, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } }, - "node_modules/json-parse-helpfulerror": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", - "integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", + "node_modules/jest-haste-map": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.0.tgz", + "integrity": "sha512-xyZ9sXV8PtKi6NCrJlmq53PyNVHzxmcfXNVvIRHpHmh1j/HChC4pwKgyjj7Z9us19JMw8PpQTJsFWOsIfT93Dw==", "dev": true, "dependencies": { - "jju": "^1.1.0" + "@jest/types": "^28.1.0", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.0", + "jest-worker": "^28.1.0", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" } }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "node_modules/jest-leak-detector": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.0.tgz", + "integrity": "sha512-uIJDQbxwEL2AMMs2xjhZl2hw8s77c3wrPaQ9v6tXJLGaaQ+4QrNJH5vuw7hA7w/uGT/iJ42a83opAqxGHeyRIA==", "dev": true, - "bin": { - "json5": "lib/cli.js" + "dependencies": { + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" }, "engines": { - "node": ">=6" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jsonc-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", - "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", - "dev": true - }, - "node_modules/jsonlines": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsonlines/-/jsonlines-0.1.1.tgz", - "integrity": "sha1-T80kbcXQ44aRkHxEqwAveC0dlMw=", - "dev": true - }, - "node_modules/jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true, - "engines": [ - "node >= 0.2.0" - ] - }, - "node_modules/keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "node_modules/jest-leak-detector/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "dependencies": { - "json-buffer": "3.0.0" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "node_modules/jest-leak-detector/node_modules/jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", "dev": true, "engines": { - "node": ">=6" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "node_modules/jest-leak-detector/node_modules/pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", "dev": true, "dependencies": { - "package-json": "^6.3.0" + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "engines": { - "node": ">=6" - } + "node_modules/jest-leak-detector/node_modules/react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "node_modules/jest-matcher-utils": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", + "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", "dev": true, "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" + "chalk": "^4.0.0", + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" }, "engines": { - "node": ">= 0.8.0" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "node_modules/jest-message-util": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.0.tgz", + "integrity": "sha512-RpA8mpaJ/B2HphDMiDlrAZdDytkmwFqgjDZovM21F35lHGeUeCvYmm6W+sbQ0ydaLpg5bFAUuWG1cjqOl8vqrw==", "dev": true, "dependencies": { - "p-locate": "^5.0.0" + "@babel/code-frame": "^7.12.13", + "@jest/types": "^28.1.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "node_modules/jest-message-util/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "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==", + "node_modules/jest-message-util/node_modules/pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", "dev": true, "dependencies": { - "yallist": "^4.0.0" + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/lunr": { - "version": "2.3.9", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", - "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "node_modules/jest-message-util/node_modules/react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", "dev": true }, - "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "node_modules/jest-mock": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.0.tgz", + "integrity": "sha512-H7BrhggNn77WhdL7O1apG0Q/iwl0Bdd5E1ydhCJzL3oBLh/UYxAwR3EJLsBZ9XA3ZU4PA3UNw4tQjduBTCTmLw==", "dev": true, "dependencies": { - "sourcemap-codec": "^1.4.8" + "@jest/types": "^28.1.0", + "@types/node": "*" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, "engines": { - "node": ">=8" + "node": ">=6" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } } }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "node_modules/jest-regex-util": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "node_modules/make-fetch-happen": { - "version": "10.1.3", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.1.3.tgz", - "integrity": "sha512-s/UjmGjUHn9m52cctFhN2ITObbT+axoUhgeir8xGrOlPbKDyJsdhQzb8PGncPQQ28uduHybFJ6Iumy2OZnreXw==", + "node_modules/jest-resolve": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.0.tgz", + "integrity": "sha512-vvfN7+tPNnnhDvISuzD1P+CRVP8cK0FHXRwPAcdDaQv4zgvwvag2n55/h5VjYcM5UJG7L4TwE5tZlzcI0X2Lhw==", "dev": true, "dependencies": { - "agentkeepalive": "^4.2.1", - "cacache": "^16.0.2", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.1.1", - "ssri": "^9.0.0" + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/make-fetch-happen/node_modules/lru-cache": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.10.1.tgz", - "integrity": "sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A==", + "node_modules/jest-resolve-dependencies": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.0.tgz", + "integrity": "sha512-Ue1VYoSZquPwEvng7Uefw8RmZR+me/1kr30H2jMINjGeHgeO/JgrR6wxj2ofkJ7KSAA11W3cOrhNCbj5Dqqd9g==", "dev": true, + "dependencies": { + "jest-regex-util": "^28.0.2", + "jest-snapshot": "^28.1.0" + }, "engines": { - "node": ">=12" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "node_modules/jest-runner": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.0.tgz", + "integrity": "sha512-FBpmuh1HB2dsLklAlRdOxNTTHKFR6G1Qmd80pVDvwbZXTriqjWqjei5DKFC1UlM732KjYcE6yuCdiF0WUCOS2w==", "dev": true, "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/marked": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.12.tgz", - "integrity": "sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==", - "dev": true, - "bin": { - "marked": "bin/marked.js" + "@jest/console": "^28.1.0", + "@jest/environment": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "graceful-fs": "^4.2.9", + "jest-docblock": "^28.0.2", + "jest-environment-node": "^28.1.0", + "jest-haste-map": "^28.1.0", + "jest-leak-detector": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-resolve": "^28.1.0", + "jest-runtime": "^28.1.0", + "jest-util": "^28.1.0", + "jest-watcher": "^28.1.0", + "jest-worker": "^28.1.0", + "source-map-support": "0.5.13", + "throat": "^6.0.1" }, "engines": { - "node": ">= 12" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "node_modules/jest-runner/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, - "engines": { - "node": ">= 8" + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } }, - "node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "node_modules/jest-runtime": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.0.tgz", + "integrity": "sha512-wNYDiwhdH/TV3agaIyVF0lsJ33MhyujOe+lNTUiolqKt8pchy1Hq4+tDMGbtD5P/oNLA3zYrpx73T9dMTOCAcg==", "dev": true, "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "@jest/environment": "^28.1.0", + "@jest/fake-timers": "^28.1.0", + "@jest/globals": "^28.1.0", + "@jest/source-map": "^28.0.2", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "execa": "^5.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-mock": "^28.1.0", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.0", + "jest-snapshot": "^28.1.0", + "jest-util": "^28.1.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" }, "engines": { - "node": ">=8.6" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "node_modules/jest-runtime/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, "engines": { - "node": ">= 0.6" + "node": ">= 8" } }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "node_modules/jest-runtime/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "dependencies": { - "mime-db": "1.52.0" + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" }, "engines": { - "node": ">= 0.6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "node_modules/jest-runtime/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "node_modules/jest-runtime/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "node_modules/jest-runtime/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" + "path-key": "^3.0.0" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "node_modules/jest-runtime/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "node_modules/minipass": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", - "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", + "node_modules/jest-runtime/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "dependencies": { - "yallist": "^4.0.0" + "shebang-regex": "^3.0.0" }, "engines": { "node": ">=8" } }, - "node_modules/minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "node_modules/jest-runtime/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, "engines": { - "node": ">= 8" + "node": ">=8" } }, - "node_modules/minipass-fetch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.0.tgz", - "integrity": "sha512-H9U4UVBGXEyyWJnqYDCLp1PwD8XIkJ4akNHp1aGVI+2Ym7wQMlxDKi4IB4JbmyU+pl9pEs/cVrK6cOuvmbK4Sg==", + "node_modules/jest-snapshot": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.0.tgz", + "integrity": "sha512-ex49M2ZrZsUyQLpLGxQtDbahvgBjlLPgklkqGM0hq/F7W/f8DyqZxVHjdy19QKBm4O93eDp+H5S23EiTbbUmHw==", "dev": true, "dependencies": { - "minipass": "^3.1.6", - "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^28.1.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-haste-map": "^28.1.0", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0", + "natural-compare": "^1.4.0", + "pretty-format": "^28.1.0", + "semver": "^7.3.5" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - }, - "optionalDependencies": { - "encoding": "^0.1.13" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "node_modules/jest-snapshot/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, "engines": { - "node": ">= 8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/minipass-json-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", - "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", + "node_modules/jest-snapshot/node_modules/diff-sequences": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", + "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", "dev": true, - "dependencies": { - "jsonparse": "^1.3.1", - "minipass": "^3.0.0" + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "node_modules/jest-snapshot/node_modules/jest-diff": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", + "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", "dev": true, "dependencies": { - "minipass": "^3.0.0" + "chalk": "^4.0.0", + "diff-sequences": "^28.0.2", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/minipass-sized": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", - "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "node_modules/jest-snapshot/node_modules/jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "node_modules/jest-snapshot/node_modules/jest-matcher-utils": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", + "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", "dev": true, "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" + "chalk": "^4.0.0", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" }, "engines": { - "node": ">= 8" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "node_modules/jest-snapshot/node_modules/pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" + "dependencies": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">=10" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "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==", - "dev": true, - "engines": { - "node": ">= 0.6" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "node_modules/jest-snapshot/node_modules/react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", "dev": true }, - "node_modules/node-gyp": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.0.0.tgz", - "integrity": "sha512-Ma6p4s+XCTPxCuAMrOA/IJRmVy16R8Sdhtwl4PrCr7IBlj4cPawF0vg/l7nOT1jPbuNS7lIRJpBSvVsXwEZuzw==", + "node_modules/jest-util": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", + "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", "dev": true, "dependencies": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^10.0.3", - "nopt": "^5.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "bin": { - "node-gyp": "bin/node-gyp.js" + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" }, "engines": { - "node": "^12.22 || ^14.13 || >=16" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", - "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==", + "node_modules/jest-util/node_modules/ci-info": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", + "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", "dev": true }, - "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "node_modules/jest-validate": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.0.tgz", + "integrity": "sha512-Lly7CJYih3vQBfjLeANGgBSBJ7pEa18cxpQfQEq2go2xyEzehnHfQTjoUia8xUv4x4J80XKFIDwJJThXtRFQXQ==", "dev": true, "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" + "@jest/types": "^28.1.0", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "leven": "^3.1.0", + "pretty-format": "^28.1.0" }, "engines": { - "node": ">=6" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/normalize-package-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.0.tgz", - "integrity": "sha512-m+GL22VXJKkKbw62ZaBBjv8u6IE3UI4Mh5QakIqs3fWiKe0Xyi6L97hakwZK41/LD4R/2ly71Bayx0NLMwLA/g==", + "node_modules/jest-validate/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "dependencies": { - "hosted-git-info": "^5.0.0", - "is-core-module": "^2.8.1", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "node_modules/jest-validate/node_modules/jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "node_modules/jest-validate/node_modules/pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", "dev": true, + "dependencies": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/npm-bundled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", - "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", + "node_modules/jest-validate/node_modules/react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + }, + "node_modules/jest-watcher": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.0.tgz", + "integrity": "sha512-tNHMtfLE8Njcr2IRS+5rXYA4BhU90gAOwI9frTGOqd+jX0P/Au/JfRSNqsf5nUTcWdbVYuLxS1KjnzILSoR5hA==", "dev": true, "dependencies": { - "npm-normalize-package-bin": "^1.0.1" + "@jest/test-result": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "jest-util": "^28.1.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/npm-check-updates": { - "version": "13.0.3", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.0.3.tgz", - "integrity": "sha512-a8CVklJjXZhmN5Kup8rKiejArobCbOaMnubhvM/LkYVumO17dBuWuaHUuiSrYglQUb88lGSdbNNfHDNN7b+3pQ==", + "node_modules/jest-worker": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.0.tgz", + "integrity": "sha512-ZHwM6mNwaWBR52Snff8ZvsCTqQsvhCxP/bT1I6T6DAnb6ygkshsyLQIMxFwHpYxht0HOoqt23JlC01viI7T03A==", "dev": true, "dependencies": { - "chalk": "^4.1.2", - "cint": "^8.2.1", - "cli-table": "^0.3.11", - "commander": "^9.2.0", - "fast-memoize": "^2.5.2", - "find-up": "5.0.0", - "fp-and-or": "^0.1.3", - "get-stdin": "^8.0.0", - "globby": "^11.0.4", - "hosted-git-info": "^5.0.0", - "json-parse-helpfulerror": "^1.0.3", - "jsonlines": "^0.1.1", - "lodash": "^4.17.21", - "minimatch": "^5.0.1", - "p-map": "^4.0.0", - "pacote": "^13.3.0", - "parse-github-url": "^1.0.2", - "progress": "^2.0.3", - "prompts": "^2.4.2", - "rc-config-loader": "^4.1.0", - "remote-git-tags": "^3.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.7", - "semver-utils": "^1.1.4", - "source-map-support": "^0.5.21", - "spawn-please": "^1.0.0", - "update-notifier": "^5.1.0", - "yaml": "^2.1.0" - }, - "bin": { - "ncu": "build/src/bin/cli.js", - "npm-check-updates": "build/src/bin/cli.js" + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" }, "engines": { - "node": ">=14" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/npm-install-checks": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-5.0.0.tgz", - "integrity": "sha512-65lUsMI8ztHCxFz5ckCEC44DRvEGdZX5usQFriauxHEwt7upv1FKaQEmAtU0YnOAdwuNWCmk64xYiQABNrEyLA==", + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "dependencies": { - "semver": "^7.1.1" + "has-flag": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "node_modules/jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", "dev": true }, - "node_modules/npm-package-arg": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.2.tgz", - "integrity": "sha512-v/miORuX8cndiOheW8p2moNuPJ7QhcFh9WGlTorruG8hXSA23vMTEp5hTCmDxic0nD8KHhj/NQgFuySD3GYY3g==", - "dev": true, - "dependencies": { - "hosted-git-info": "^5.0.0", - "semver": "^7.3.5", - "validate-npm-package-name": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, - "node_modules/npm-packlist": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.0.3.tgz", - "integrity": "sha512-KuSbzgejxdsAWbNNyEs8EsyDHsO+nJF6k+9WuWzFbSNh5tFHs4lDApXw7kntKpuehfp8lKRzJkMtz0+WmGvTIw==", + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "glob": "^8.0.1", - "ignore-walk": "^5.0.1", - "npm-bundled": "^1.1.2", - "npm-normalize-package-bin": "^1.0.1" + "argparse": "^2.0.1" }, "bin": { - "npm-packlist": "bin/index.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/npm-packlist/node_modules/glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "node_modules/jsdom": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-19.0.0.tgz", + "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "abab": "^2.0.5", + "acorn": "^8.5.0", + "acorn-globals": "^6.0.0", + "cssom": "^0.5.0", + "cssstyle": "^2.3.0", + "data-urls": "^3.0.1", + "decimal.js": "^10.3.1", + "domexception": "^4.0.0", + "escodegen": "^2.0.0", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^3.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^10.0.0", + "ws": "^8.2.3", + "xml-name-validator": "^4.0.0" }, "engines": { "node": ">=12" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm-pick-manifest": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.1.tgz", - "integrity": "sha512-IA8+tuv8KujbsbLQvselW2XQgmXWS47t3CB0ZrzsRZ82DbDfkcFunOaPm4X7qNuhMfq+FmV7hQT4iFVpHqV7mg==", - "dev": true, - "dependencies": { - "npm-install-checks": "^5.0.0", - "npm-normalize-package-bin": "^1.0.1", - "npm-package-arg": "^9.0.0", - "semver": "^7.3.5" + "peerDependencies": { + "canvas": "^2.5.0" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "peerDependenciesMeta": { + "canvas": { + "optional": true + } } }, - "node_modules/npm-registry-fetch": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.1.1.tgz", - "integrity": "sha512-5p8rwe6wQPLJ8dMqeTnA57Dp9Ox6GH9H60xkyJup07FmVlu3Mk7pf/kIIpl9gaN5bM8NM+UUx3emUWvDNTt39w==", + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true, - "dependencies": { - "make-fetch-happen": "^10.0.6", - "minipass": "^3.1.6", - "minipass-fetch": "^2.0.3", - "minipass-json-stream": "^1.0.1", - "minizlib": "^2.1.2", - "npm-package-arg": "^9.0.1", - "proc-log": "^2.0.0" + "bin": { + "jsesc": "bin/jsesc" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=4" } }, - "node_modules/npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "node_modules/json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-parse-helpfulerror": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", + "integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", "dev": true, "dependencies": { - "path-key": "^2.0.0" - }, - "engines": { - "node": ">=4" + "jju": "^1.1.0" } }, - "node_modules/npmlog": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", - "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", "dev": true, - "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" + "bin": { + "json5": "lib/cli.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=6" } }, - "node_modules/nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", - "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "node_modules/jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", "dev": true }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "node_modules/jsonlines": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsonlines/-/jsonlines-0.1.1.tgz", + "integrity": "sha1-T80kbcXQ44aRkHxEqwAveC0dlMw=", + "dev": true + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", "dev": true, - "engines": { - "node": ">= 0.8" - } + "engines": [ + "node >= 0.2.0" + ] }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "node_modules/keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", "dev": true, "dependencies": { - "wrappy": "1" + "json-buffer": "3.0.0" } }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, "engines": { "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "node_modules/latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", "dev": true, "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "package-json": "^6.3.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">=8" } }, - "node_modules/p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true, - "engines": { - "node": ">=6" + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" } }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, "engines": { - "node": ">=4" + "node": ">= 0.8.0" } }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "dependencies": { - "yocto-queue": "^0.1.0" + "p-locate": "^5.0.0" }, "engines": { "node": ">=10" @@ -5936,576 +6018,636 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "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": { - "p-limit": "^3.0.2" + "yallist": "^4.0.0" }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true + }, + "node_modules/magic-string": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", "dev": true, "dependencies": { - "aggregate-error": "^3.0.0" + "sourcemap-codec": "^1.4.8" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "engines": { - "node": ">=6" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/make-fetch-happen": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", + "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", "dev": true, "dependencies": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" + "agentkeepalive": "^4.1.3", + "cacache": "^15.2.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^6.0.0", + "minipass": "^3.1.3", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^1.3.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.2", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^6.0.0", + "ssri": "^8.0.0" }, "engines": { - "node": ">=8" + "node": ">= 10" } }, - "node_modules/package-json/node_modules/registry-auth-token": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", - "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", + "node_modules/make-fetch-happen/node_modules/@npmcli/fs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", + "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", "dev": true, "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=6.0.0" + "@gar/promisify": "^1.0.1", + "semver": "^7.3.5" } }, - "node_modules/package-json/node_modules/registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "node_modules/make-fetch-happen/node_modules/@npmcli/move-file": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", "dev": true, "dependencies": { - "rc": "^1.2.8" + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/package-json/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "node_modules/make-fetch-happen/node_modules/@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">= 6" } }, - "node_modules/pacote": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.3.0.tgz", - "integrity": "sha512-auhJAUlfC2TALo6I0s1vFoPvVFgWGx+uz/PnIojTTgkGwlK3Np8sGJ0ghfFhiuzJXTZoTycMLk8uLskdntPbDw==", + "node_modules/make-fetch-happen/node_modules/cacache": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", "dev": true, "dependencies": { - "@npmcli/git": "^3.0.0", - "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/promise-spawn": "^3.0.0", - "@npmcli/run-script": "^3.0.1", - "cacache": "^16.0.0", + "@npmcli/fs": "^1.0.0", + "@npmcli/move-file": "^1.0.1", "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", "infer-owner": "^1.0.4", - "minipass": "^3.1.6", - "mkdirp": "^1.0.4", - "npm-package-arg": "^9.0.0", - "npm-packlist": "^5.0.0", - "npm-pick-manifest": "^7.0.0", - "npm-registry-fetch": "^13.0.1", - "proc-log": "^2.0.0", - "promise-retry": "^2.0.1", - "read-package-json": "^5.0.0", - "read-package-json-fast": "^2.0.3", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", "rimraf": "^3.0.2", - "ssri": "^9.0.0", - "tar": "^6.1.11" - }, - "bin": { - "pacote": "lib/bin.js" + "ssri": "^8.0.1", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">= 10" } }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "node_modules/make-fetch-happen/node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, "dependencies": { - "callsites": "^3.0.0" + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" }, "engines": { - "node": ">=6" + "node": ">= 6" } }, - "node_modules/parse-github-url": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz", - "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==", + "node_modules/make-fetch-happen/node_modules/ssri": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", "dev": true, - "bin": { - "parse-github-url": "cli.js" + "dependencies": { + "minipass": "^3.1.1" }, "engines": { - "node": ">=0.10.0" + "node": ">= 8" } }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "tmpl": "1.0.5" } }, - "node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "node_modules/marked": { + "version": "4.0.16", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.16.tgz", + "integrity": "sha512-wahonIQ5Jnyatt2fn8KqF/nIqZM8mh3oRu2+l5EANGMhu6RFjiSG52QNE2eWzFMI94HqYSgN184NurgNG6CztA==", "dev": true, + "bin": { + "marked": "bin/marked.js" + }, "engines": { - "node": ">=8" + "node": ">= 12" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">= 8" } }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "node_modules/micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, + "dependencies": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + }, "engines": { - "node": ">=4" + "node": ">=8.6" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-to-regexp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", - "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", - "dev": true - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "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==", "dev": true, "engines": { - "node": ">=8" + "node": ">= 0.6" } }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "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==", "dev": true, - "engines": { - "node": ">=8.6" + "dependencies": { + "mime-db": "1.52.0" }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "engines": { + "node": ">= 0.6" } }, - "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, "engines": { - "node": ">= 6" + "node": ">=6" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/minimatch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", "dev": true, "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "node_modules/minipass": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", + "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", "dev": true, "dependencies": { - "p-locate": "^4.1.0" + "yallist": "^4.0.0" }, "engines": { "node": ">=8" } }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", "dev": true, "dependencies": { - "p-try": "^2.0.0" + "minipass": "^3.0.0" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 8" } }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "node_modules/minipass-fetch": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", + "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", "dev": true, "dependencies": { - "p-limit": "^2.2.0" + "minipass": "^3.1.0", + "minipass-sized": "^1.0.3", + "minizlib": "^2.0.0" }, "engines": { "node": ">=8" + }, + "optionalDependencies": { + "encoding": "^0.1.12" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, "engines": { - "node": ">= 0.8.0" + "node": ">= 8" } }, - "node_modules/prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "node_modules/minipass-json-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", + "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" } }, - "node_modules/prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", "dev": true, - "bin": { - "prettier": "bin-prettier.js" + "dependencies": { + "minipass": "^3.0.0" }, "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" + "node": ">=8" } }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", "dev": true, "dependencies": { - "fast-diff": "^1.1.2" + "minipass": "^3.0.0" }, "engines": { - "node": ">=6.0.0" + "node": ">=8" } }, - "node_modules/pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "minipass": "^3.0.0", + "yallist": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">= 8" } }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/proc-log": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", - "integrity": "sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "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==", "dev": true, "engines": { - "node": ">=0.4.0" + "node": ">= 0.6" } }, - "node_modules/promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, - "node_modules/promise-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", - "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "node_modules/node-gyp": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", + "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", "dev": true, "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^9.1.0", + "nopt": "^5.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" }, - "engines": { - "node": ">=10" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" + "bin": { + "node-gyp": "bin/node-gyp.js" }, "engines": { - "node": ">= 6" + "node": ">= 10.12.0" } }, - "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "node_modules/node-releases": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", + "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==", + "dev": true + }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", "dev": true, "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" } }, - "node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "node_modules/pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "node_modules/normalize-package-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.0.tgz", + "integrity": "sha512-m+GL22VXJKkKbw62ZaBBjv8u6IE3UI4Mh5QakIqs3fWiKe0Xyi6L97hakwZK41/LD4R/2ly71Bayx0NLMwLA/g==", "dev": true, "dependencies": { - "escape-goat": "^2.0.0" + "hosted-git-info": "^5.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || >=16" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "node_modules/normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" + "engines": { + "node": ">=8" } }, - "node_modules/range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "node_modules/npm-bundled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", + "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", "dev": true, - "engines": { - "node": ">= 0.6" + "dependencies": { + "npm-normalize-package-bin": "^1.0.1" } }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "node_modules/npm-check-updates": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.1.1.tgz", + "integrity": "sha512-f4gLbUJJh5qvkNvrSG3b05y3ZvyZ4Sl3Uk95DSyCjIWwpwmAwzU9dMCA/Gg2AmIKqkH4ml6X9kxcZsu+tAd94g==", "dev": true, "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "chalk": "^4.1.2", + "cint": "^8.2.1", + "cli-table": "^0.3.11", + "commander": "^9.3.0", + "fast-memoize": "^2.5.2", + "find-up": "5.0.0", + "fp-and-or": "^0.1.3", + "get-stdin": "^8.0.0", + "globby": "^11.0.4", + "hosted-git-info": "^5.0.0", + "json-parse-helpfulerror": "^1.0.3", + "jsonlines": "^0.1.1", + "lodash": "^4.17.21", + "minimatch": "^5.1.0", + "p-map": "^4.0.0", + "pacote": "^13.5.0", + "parse-github-url": "^1.0.2", + "progress": "^2.0.3", + "prompts": "^2.4.2", + "rc-config-loader": "^4.1.0", + "remote-git-tags": "^3.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.7", + "semver-utils": "^1.1.4", + "source-map-support": "^0.5.21", + "spawn-please": "^1.0.0", + "update-notifier": "^5.1.0", + "yaml": "^2.1.1" }, "bin": { - "rc": "cli.js" + "ncu": "build/src/bin/cli.js", + "npm-check-updates": "build/src/bin/cli.js" + }, + "engines": { + "node": ">=14" } }, - "node_modules/rc-config-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.0.tgz", - "integrity": "sha512-aW+kX4qy0CiM9L4fG4Us3oEOpIrOrXzWykAn+xldD07Y9PXWjTH744oHbv0Kc9ZwWaylw3jMjxaf14RgStrNrA==", + "node_modules/npm-install-checks": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-5.0.0.tgz", + "integrity": "sha512-65lUsMI8ztHCxFz5ckCEC44DRvEGdZX5usQFriauxHEwt7upv1FKaQEmAtU0YnOAdwuNWCmk64xYiQABNrEyLA==", "dev": true, "dependencies": { - "debug": "^4.1.1", - "js-yaml": "^4.0.0", - "json5": "^2.1.2", - "require-from-string": "^2.0.2" + "semver": "^7.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "node_modules/npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", "dev": true }, - "node_modules/read-package-json": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.1.tgz", - "integrity": "sha512-MALHuNgYWdGW3gKzuNMuYtcSSZbGQm94fAp16xt8VsYTLBjUSc55bLMKe6gzpWue0Tfi6CBgwCSdDAqutGDhMg==", + "node_modules/npm-package-arg": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.0.2.tgz", + "integrity": "sha512-v/miORuX8cndiOheW8p2moNuPJ7QhcFh9WGlTorruG8hXSA23vMTEp5hTCmDxic0nD8KHhj/NQgFuySD3GYY3g==", "dev": true, "dependencies": { - "glob": "^8.0.1", - "json-parse-even-better-errors": "^2.3.1", - "normalize-package-data": "^4.0.0", - "npm-normalize-package-bin": "^1.0.1" + "hosted-git-info": "^5.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^4.0.0" }, "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/read-package-json-fast": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", - "integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==", + "node_modules/npm-packlist": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.0.tgz", + "integrity": "sha512-a04sqF6FbkyOAFA19AA0e94gS7Et5T2/IMj3VOT9nOF2RaRdVPQ1Q17Fb/HaDRFs+gbC7HOmhVZ29adpWgmDZg==", "dev": true, "dependencies": { - "json-parse-even-better-errors": "^2.3.0", + "glob": "^8.0.1", + "ignore-walk": "^5.0.1", + "npm-bundled": "^1.1.2", "npm-normalize-package-bin": "^1.0.1" }, + "bin": { + "npm-packlist": "bin/index.js" + }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/read-package-json/node_modules/glob": { + "node_modules/npm-packlist/node_modules/glob": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", @@ -6524,299 +6666,301 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "node_modules/npm-pick-manifest": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.1.tgz", + "integrity": "sha512-IA8+tuv8KujbsbLQvselW2XQgmXWS47t3CB0ZrzsRZ82DbDfkcFunOaPm4X7qNuhMfq+FmV7hQT4iFVpHqV7mg==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "npm-install-checks": "^5.0.0", + "npm-normalize-package-bin": "^1.0.1", + "npm-package-arg": "^9.0.0", + "semver": "^7.3.5" }, "engines": { - "node": ">= 6" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "node_modules/npm-registry-fetch": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.1.1.tgz", + "integrity": "sha512-5p8rwe6wQPLJ8dMqeTnA57Dp9Ox6GH9H60xkyJup07FmVlu3Mk7pf/kIIpl9gaN5bM8NM+UUx3emUWvDNTt39w==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "make-fetch-happen": "^10.0.6", + "minipass": "^3.1.6", + "minipass-fetch": "^2.0.3", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^9.0.1", + "proc-log": "^2.0.0" }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/registry-auth-token": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", - "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", + "node_modules/npm-registry-fetch/node_modules/lru-cache": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.10.1.tgz", + "integrity": "sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A==", "dev": true, - "dependencies": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" + "engines": { + "node": ">=12" } }, - "node_modules/registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "node_modules/npm-registry-fetch/node_modules/make-fetch-happen": { + "version": "10.1.7", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.1.7.tgz", + "integrity": "sha512-J/2xa2+7zlIUKqfyXDCXFpH3ypxO4k3rgkZHPSZkyUYcBT/hM80M3oyKLM/9dVriZFiGeGGS2Ei+0v2zfhqj3Q==", "dev": true, "dependencies": { - "rc": "^1.0.1" + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" }, "engines": { - "node": ">=0.10.0" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/remote-git-tags": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remote-git-tags/-/remote-git-tags-3.0.0.tgz", - "integrity": "sha512-C9hAO4eoEsX+OXA4rla66pXZQ+TLQ8T9dttgQj18yuKlPMTVkIkdYXvlMC55IuUsIkV6DpmQYi10JKFLaU+l7w==", + "node_modules/npm-registry-fetch/node_modules/minipass-fetch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.0.tgz", + "integrity": "sha512-H9U4UVBGXEyyWJnqYDCLp1PwD8XIkJ4akNHp1aGVI+2Ym7wQMlxDKi4IB4JbmyU+pl9pEs/cVrK6cOuvmbK4Sg==", "dev": true, + "dependencies": { + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" } }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "node_modules/npm-registry-fetch/node_modules/socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", "dev": true, + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 10" } }, - "node_modules/require-from-string": { + "node_modules/npm-run-path": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", - "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "dependencies": { - "is-core-module": "^2.8.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" + "path-key": "^2.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=4" } }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "node_modules/npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", "dev": true, "dependencies": { - "resolve-from": "^5.0.0" + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "node_modules/nwsapi": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "dev": true + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", "dev": true, "engines": { - "node": ">=8" + "node": ">= 0.8" } }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "wrappy": "1" } }, - "node_modules/resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, "engines": { - "node": ">=10" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "dependencies": { - "lowercase-keys": "^1.0.0" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" } }, - "node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "node_modules/p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", "dev": true, "engines": { - "node": ">= 4" + "node": ">=6" } }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true, "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "glob": "^7.1.3" + "yocto-queue": "^0.1.0" }, - "bin": { - "rimraf": "bin.js" + "engines": { + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/rollup": { - "version": "2.74.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.74.1.tgz", - "integrity": "sha512-K2zW7kV8Voua5eGkbnBtWYfMIhYhT9Pel2uhBk2WO5eMee161nPze/XRfvEQPFYz7KgrCCnmh2Wy0AMFLGGmMA==", + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "bin": { - "rollup": "dist/bin/rollup" + "dependencies": { + "p-limit": "^3.0.2" }, "engines": { - "node": ">=10.0.0" + "node": ">=10" }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/rollup-plugin-terser": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", - "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.10.4", - "jest-worker": "^26.2.1", - "serialize-javascript": "^4.0.0", - "terser": "^5.0.0" - }, - "peerDependencies": { - "rollup": "^2.0.0" - } - }, - "node_modules/rollup-plugin-terser/node_modules/jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" + "aggregate-error": "^3.0.0" }, "engines": { - "node": ">= 10.13.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" + "engines": { + "node": ">=6" } }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "node_modules/package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", "dev": true, "dependencies": { - "xmlchars": "^2.2.0" + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "node_modules/package-json/node_modules/registry-auth-token": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "rc": "^1.2.8" }, "engines": { - "node": ">=10" + "node": ">=6.0.0" } }, - "node_modules/semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "node_modules/package-json/node_modules/registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", "dev": true, "dependencies": { - "semver": "^6.3.0" + "rc": "^1.2.8" }, "engines": { "node": ">=8" } }, - "node_modules/semver-diff/node_modules/semver": { + "node_modules/package-json/node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", @@ -6825,377 +6969,393 @@ "semver": "bin/semver.js" } }, - "node_modules/semver-utils": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/semver-utils/-/semver-utils-1.1.4.tgz", - "integrity": "sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA==", - "dev": true - }, - "node_modules/serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/serve": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/serve/-/serve-13.0.2.tgz", - "integrity": "sha512-71R6fKvNgKrqARAag6lYJNnxDzpH7DCNrMuvPY5PLVaC2PDhJsGTj/34o4o4tPWhTuLgEXqvgnAWbATQ9zGZTQ==", + "node_modules/pacote": { + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.6.0.tgz", + "integrity": "sha512-zHmuCwG4+QKnj47LFlW3LmArwKoglx2k5xtADiMCivVWPgNRP5QyLDGOIjGjwOe61lhl1rO63m/VxT16pEHLWg==", "dev": true, "dependencies": { - "@zeit/schemas": "2.6.0", - "ajv": "6.12.6", - "arg": "2.0.0", - "boxen": "5.1.2", - "chalk": "2.4.1", - "clipboardy": "2.3.0", - "compression": "1.7.3", - "serve-handler": "6.1.3", - "update-check": "1.5.2" + "@npmcli/git": "^3.0.0", + "@npmcli/installed-package-contents": "^1.0.7", + "@npmcli/promise-spawn": "^3.0.0", + "@npmcli/run-script": "^3.0.1", + "cacache": "^16.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "infer-owner": "^1.0.4", + "minipass": "^3.1.6", + "mkdirp": "^1.0.4", + "npm-package-arg": "^9.0.0", + "npm-packlist": "^5.1.0", + "npm-pick-manifest": "^7.0.0", + "npm-registry-fetch": "^13.0.1", + "proc-log": "^2.0.0", + "promise-retry": "^2.0.1", + "read-package-json": "^5.0.0", + "read-package-json-fast": "^2.0.3", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11" }, "bin": { - "serve": "bin/serve.js" - } - }, - "node_modules/serve-handler": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", - "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", - "dev": true, - "dependencies": { - "bytes": "3.0.0", - "content-disposition": "0.5.2", - "fast-url-parser": "1.1.3", - "mime-types": "2.1.18", - "minimatch": "3.0.4", - "path-is-inside": "1.0.2", - "path-to-regexp": "2.2.1", - "range-parser": "1.2.0" - } - }, - "node_modules/serve-handler/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/serve-handler/node_modules/mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", - "dev": true, + "pacote": "lib/bin.js" + }, "engines": { - "node": ">= 0.6" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/serve-handler/node_modules/mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "dependencies": { - "mime-db": "~1.33.0" + "callsites": "^3.0.0" }, "engines": { - "node": ">= 0.6" + "node": ">=6" } }, - "node_modules/serve-handler/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "node_modules/parse-github-url": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz", + "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==", "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" + "bin": { + "parse-github-url": "cli.js" }, "engines": { - "node": "*" + "node": ">=0.10.0" } }, - "node_modules/serve/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, "dependencies": { - "color-convert": "^1.9.0" + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/serve/node_modules/chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/serve/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, - "dependencies": { - "color-name": "1.1.3" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/serve/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", "dev": true }, - "node_modules/serve/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true, "engines": { "node": ">=4" } }, - "node_modules/serve/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", "dev": true }, - "node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "dependencies": { - "shebang-regex": "^1.0.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "node_modules/pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">= 6" } }, - "node_modules/shiki": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", - "integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "dependencies": { - "jsonc-parser": "^3.0.0", - "vscode-oniguruma": "^1.6.1", - "vscode-textmate": "5.2.0" + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, "engines": { "node": ">=8" } }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" + "node": ">=8" } }, - "node_modules/socks": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", - "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "dependencies": { - "ip": "^1.1.5", - "smart-buffer": "^4.2.0" + "p-try": "^2.0.0" }, "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/socks-proxy-agent": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.0.tgz", - "integrity": "sha512-wWqJhjb32Q6GsrUqzuFkukxb/zzide5quXYcMVpIjxalDBBYy2nqKCFQ/9+Ie4dvOYSQdOk3hUlZSdzZOd3zMQ==", + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" + "p-limit": "^2.2.0" }, "engines": { - "node": ">= 10" + "node": ">=8" } }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">= 0.8.0" } }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "node_modules/prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "engines": { + "node": ">=4" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, - "node_modules/spawn-please": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-1.0.0.tgz", - "integrity": "sha512-Kz33ip6NRNKuyTRo3aDWyWxeGeM0ORDO552Fs6E1nj4pLWPkl37SrRtTnq+MEopVaqgmaO6bAvVS+v64BJ5M/A==", + "node_modules/prettier": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", + "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, "engines": { - "node": ">=10" + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", "dev": true, "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" } }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/spdx-license-ids": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", - "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", - "dev": true - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "node_modules/ssri": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.0.tgz", - "integrity": "sha512-Y1Z6J8UYnexKFN1R/hxUaYoY2LVdKEzziPmVAFKiKX8fiwvCJTVzn/xYE9TEWod5OVyNfIHHuVfIEuBClL/uJQ==", + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "dependencies": { - "minipass": "^3.1.1" + "engines": { + "node": ">=10" }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/proc-log": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", + "integrity": "sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==", + "dev": true, "engines": { "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", + "dev": true + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", "dev": true, "dependencies": { - "escape-string-regexp": "^2.0.0" + "err-code": "^2.0.2", + "retry": "^0.12.0" }, "engines": { "node": ">=10" } }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, "engines": { - "node": ">=8" + "node": ">= 6" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "node_modules/psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "dependencies": { - "safe-buffer": "~5.2.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "node_modules/string_decoder/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==", + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "node_modules/pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "dependencies": { + "escape-goat": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -7212,1916 +7372,1669 @@ } ] }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" + "safe-buffer": "^5.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==", + "node_modules/range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, "engines": { - "node": ">=8" + "node": ">= 0.6" } }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.1" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, - "engines": { - "node": ">=8" + "bin": { + "rc": "cli.js" } }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "node_modules/rc-config-loader": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.1.0.tgz", + "integrity": "sha512-aW+kX4qy0CiM9L4fG4Us3oEOpIrOrXzWykAn+xldD07Y9PXWjTH744oHbv0Kc9ZwWaylw3jMjxaf14RgStrNrA==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "debug": "^4.1.1", + "js-yaml": "^4.0.0", + "json5": "^2.1.2", + "require-from-string": "^2.0.2" } }, - "node_modules/strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } + "node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "node_modules/read-package-json": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.1.tgz", + "integrity": "sha512-MALHuNgYWdGW3gKzuNMuYtcSSZbGQm94fAp16xt8VsYTLBjUSc55bLMKe6gzpWue0Tfi6CBgwCSdDAqutGDhMg==", "dev": true, + "dependencies": { + "glob": "^8.0.1", + "json-parse-even-better-errors": "^2.3.1", + "normalize-package-data": "^4.0.0", + "npm-normalize-package-bin": "^1.0.1" + }, "engines": { - "node": ">=6" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "node_modules/read-package-json-fast": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", + "integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==", "dev": true, + "dependencies": { + "json-parse-even-better-errors": "^2.3.0", + "npm-normalize-package-bin": "^1.0.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "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==", + "node_modules/read-package-json/node_modules/glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/supports-hyperlinks": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", - "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" }, "engines": { - "node": ">=8" + "node": ">= 6" } }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true, "engines": { - "node": ">= 0.4" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true - }, - "node_modules/tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "node_modules/registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 10" + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" } }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "node_modules/registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" + "rc": "^1.0.1" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10.0" } }, - "node_modules/terser": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.12.1.tgz", - "integrity": "sha512-NXbs+7nisos5E+yXwAD+y7zrcTkMqb0dEJxIGtSKPdCBzopf7ni4odPul2aechpV7EXNvOudYOX2bb5tln1jbQ==", + "node_modules/remote-git-tags": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remote-git-tags/-/remote-git-tags-3.0.0.tgz", + "integrity": "sha512-C9hAO4eoEsX+OXA4rla66pXZQ+TLQ8T9dttgQj18yuKlPMTVkIkdYXvlMC55IuUsIkV6DpmQYi10JKFLaU+l7w==", "dev": true, - "dependencies": { - "acorn": "^8.5.0", - "commander": "^2.20.0", - "source-map": "~0.7.2", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/terser/node_modules/source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true, "engines": { - "node": ">= 8" + "node": ">=0.10.0" } }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/resolve": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "resolve-from": "^5.0.0" }, "engines": { - "node": "*" + "node": ">=8" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "node_modules/throat": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", - "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", - "dev": true - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, "engines": { "node": ">=4" } }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "node_modules/resolve.exports": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", + "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", "dev": true, "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "node_modules/responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", "dev": true, "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" + "lowercase-keys": "^1.0.0" } }, - "node_modules/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", "dev": true, - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.1.2" - }, "engines": { - "node": ">=6" + "node": ">= 4" } }, - "node_modules/tough-cookie/node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, "engines": { - "node": ">=6" + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, - "node_modules/tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "dependencies": { - "punycode": "^2.1.1" + "glob": "^7.1.3" }, - "engines": { - "node": ">=12" + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/tr46/node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "node_modules/rollup": { + "version": "2.75.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.5.tgz", + "integrity": "sha512-JzNlJZDison3o2mOxVmb44Oz7t74EfSd1SQrplQk0wSaXV7uLQXtVdHbxlcT3w+8tZ1TL4r/eLfc7nAbz38BBA==", "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, "engines": { - "node": ">=6" + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true, - "peer": true - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "node_modules/rollup-plugin-terser": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", "dev": true, "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" }, "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + "rollup": "^2.0.0" } }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "node_modules/rollup-plugin-terser/node_modules/jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", "dev": true, "dependencies": { - "prelude-ls": "^1.2.1" + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">= 10.13.0" } }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, - "engines": { - "node": ">=4" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", "dev": true, "dependencies": { - "is-typedarray": "^1.0.0" + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=10" } }, - "node_modules/typedoc": { - "version": "0.22.15", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.15.tgz", - "integrity": "sha512-CMd1lrqQbFvbx6S9G6fL4HKp3GoIuhujJReWqlIvSb2T26vGai+8Os3Mde7Pn832pXYemd9BMuuYWhFpL5st0Q==", + "node_modules/semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "dev": true, "dependencies": { - "glob": "^7.2.0", - "lunr": "^2.3.9", - "marked": "^4.0.12", - "minimatch": "^5.0.1", - "shiki": "^0.10.1" + "lru-cache": "^6.0.0" }, "bin": { - "typedoc": "bin/typedoc" + "semver": "bin/semver.js" }, "engines": { - "node": ">= 12.10.0" - }, - "peerDependencies": { - "typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x || 4.6.x" + "node": ">=10" } }, - "node_modules/typescript": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", - "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", + "node_modules/semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" + "dependencies": { + "semver": "^6.3.0" }, "engines": { - "node": ">=4.2.0" + "node": ">=8" } }, - "node_modules/unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "node_modules/semver-diff/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "dependencies": { - "unique-slug": "^2.0.0" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "node_modules/semver-utils": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/semver-utils/-/semver-utils-1.1.4.tgz", + "integrity": "sha512-EjnoLE5OGmDAVV/8YDoN5KiajNadjzIp9BAHOhYeQHt7j0UWxjmgsx4YD48wp4Ue1Qogq38F1GNUJNqF1kKKxA==", + "dev": true + }, + "node_modules/serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", "dev": true, "dependencies": { - "imurmurhash": "^0.1.4" + "randombytes": "^2.1.0" } }, - "node_modules/unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "node_modules/serve": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/serve/-/serve-13.0.2.tgz", + "integrity": "sha512-71R6fKvNgKrqARAag6lYJNnxDzpH7DCNrMuvPY5PLVaC2PDhJsGTj/34o4o4tPWhTuLgEXqvgnAWbATQ9zGZTQ==", "dev": true, "dependencies": { - "crypto-random-string": "^2.0.0" + "@zeit/schemas": "2.6.0", + "ajv": "6.12.6", + "arg": "2.0.0", + "boxen": "5.1.2", + "chalk": "2.4.1", + "clipboardy": "2.3.0", + "compression": "1.7.3", + "serve-handler": "6.1.3", + "update-check": "1.5.2" }, - "engines": { - "node": ">=8" + "bin": { + "serve": "bin/serve.js" } }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "node_modules/serve-handler": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", + "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", "dev": true, - "engines": { - "node": ">= 4.0.0" + "dependencies": { + "bytes": "3.0.0", + "content-disposition": "0.5.2", + "fast-url-parser": "1.1.3", + "mime-types": "2.1.18", + "minimatch": "3.0.4", + "path-is-inside": "1.0.2", + "path-to-regexp": "2.2.1", + "range-parser": "1.2.0" } }, - "node_modules/update-check": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.2.tgz", - "integrity": "sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ==", + "node_modules/serve-handler/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "registry-auth-token": "3.3.2", - "registry-url": "3.1.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", + "node_modules/serve-handler/node_modules/mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", "dev": true, - "dependencies": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/yeoman/update-notifier?sponsor=1" + "node": ">= 0.6" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "node_modules/serve-handler/node_modules/mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "dev": true, "dependencies": { - "punycode": "^2.1.0" + "mime-db": "~1.33.0" + }, + "engines": { + "node": ">= 0.6" } }, - "node_modules/uri-js/node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "node_modules/serve-handler/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">=6" + "node": "*" } }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "node_modules/serve/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "dependencies": { - "prepend-http": "^2.0.0" + "color-convert": "^1.9.0" }, "engines": { "node": ">=4" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/validate-npm-package-name": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-4.0.0.tgz", - "integrity": "sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==", + "node_modules/serve/node_modules/chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "dependencies": { - "builtins": "^5.0.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=4" } }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "node_modules/serve/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, - "engines": { - "node": ">= 0.8" + "dependencies": { + "color-name": "1.1.3" } }, - "node_modules/vscode-oniguruma": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", - "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", - "dev": true - }, - "node_modules/vscode-textmate": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", - "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", + "node_modules/serve/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "node_modules/w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", - "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "node_modules/serve/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true, - "dependencies": { - "browser-process-hrtime": "^1.0.0" + "engines": { + "node": ">=4" } }, - "node_modules/w3c-xmlserializer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz", - "integrity": "sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==", + "node_modules/serve/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "dependencies": { - "xml-name-validator": "^4.0.0" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=12" + "node": ">=4" } }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "dependencies": { - "makeerror": "1.0.12" + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true, "engines": { - "node": ">=12" + "node": ">=0.10.0" } }, - "node_modules/whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "node_modules/shiki": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", + "integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", "dev": true, "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=12" + "jsonc-parser": "^3.0.0", + "vscode-oniguruma": "^1.6.1", + "vscode-textmate": "5.2.0" } }, - "node_modules/whatwg-mimetype": { + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", - "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "engines": { - "node": ">=12" + "node": ">=8" } }, - "node_modules/whatwg-url": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-10.0.0.tgz", - "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==", + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true, - "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, "engines": { - "node": ">=12" + "node": ">= 6.0.0", + "npm": ">= 3.0.0" } }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "node_modules/socks": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", + "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", "dev": true, "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" + "ip": "^1.1.5", + "smart-buffer": "^4.2.0" }, "engines": { - "node": ">= 8" - } - }, - "node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" + "node": ">= 10.13.0", + "npm": ">= 3.0.0" } }, - "node_modules/widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "node_modules/socks-proxy-agent": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz", + "integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==", "dev": true, "dependencies": { - "string-width": "^4.0.0" + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" }, "engines": { - "node": ">=8" + "node": ">= 10" } }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "engines": { "node": ">=0.10.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==", + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "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" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", "dev": true }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "node_modules/spawn-please": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/spawn-please/-/spawn-please-1.0.0.tgz", + "integrity": "sha512-Kz33ip6NRNKuyTRo3aDWyWxeGeM0ORDO552Fs6E1nj4pLWPkl37SrRtTnq+MEopVaqgmaO6bAvVS+v64BJ5M/A==", "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "engines": { + "node": ">=10" } }, - "node_modules/ws": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.6.0.tgz", - "integrity": "sha512-AzmM3aH3gk0aX7/rZLYvjdvZooofDu3fFOzGqcSnQ1tOcTWwhM/o+q++E8mAyVVIyUdajrkzWUGftaVSDLn1bw==", - "dev": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/xml-name-validator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", - "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "dev": true, - "engines": { - "node": ">=12" + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, - "node_modules/xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "node_modules/spdx-license-ids": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", + "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", "dev": true }, - "node_modules/yaml": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.0.tgz", - "integrity": "sha512-OuAINfTsoJrY5H7CBWnKZhX6nZciXBydrMtTHr1dC4nP40X5jyTIVlogZHxSlVZM8zSgXRfgZGsaHF4+pV+JRw==", + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/ssri": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", "dev": true, + "dependencies": { + "minipass": "^3.1.1" + }, "engines": { - "node": ">= 14" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "node_modules/stack-utils": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", + "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, "engines": { "node": ">=10" } }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, - "packages/e2ee": { - "name": "@sora/e2ee", - "version": "2021.1.0", - "license": "Apache-2.0", + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "dependencies": { - "@sora/go-wasm": "^2021.1.0" - }, - "devDependencies": { - "@rollup/plugin-node-resolve": "^13.3.0", - "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.26.0", - "@typescript-eslint/parser": "^5.26.0", - "eslint": "^8.16.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.6.2", - "rollup": "^2.74.1", - "typescript": "^4.6.4" + "safe-buffer": "~5.2.0" } }, - "packages/go-wasm": { - "name": "@sora/go-wasm", - "version": "2021.1.0" + "node_modules/string_decoder/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==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "packages/sdk": { - "name": "@sora/sdk", + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, "dependencies": { - "@sora/e2ee": "^2021.1.0", - "fflate": "^0.7.3" + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" }, - "devDependencies": { - "@rollup/plugin-commonjs": "^22.0.0", - "@rollup/plugin-node-resolve": "^13.3.0", - "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", - "@types/jest": "^27.5.1", - "@typescript-eslint/eslint-plugin": "5.26.0", - "@typescript-eslint/parser": "5.26.0", - "eslint": "8.16.0", - "eslint-config-prettier": "8.5.0", - "eslint-plugin-prettier": "4.0.0", - "jest": "^28.1.0", - "jest-environment-jsdom": "^28.1.0", - "prettier": "^2.6.2", - "rollup": "^2.74.1", - "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^28.0.2", - "typescript": "^4.6.4" + "engines": { + "node": ">=10" } }, - "packages/sdk/node_modules/@jest/console": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.0.tgz", - "integrity": "sha512-tscn3dlJFGay47kb4qVruQg/XWlmvU0xp3EJOjzzY+sBaI+YgwKcvAmTcyYU7xEiLLIY5HCdWRooAL8dqkFlDA==", + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "@jest/types": "^28.1.0", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0", - "slash": "^3.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "packages/sdk/node_modules/@jest/core": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.0.tgz", - "integrity": "sha512-/2PTt0ywhjZ4NwNO4bUqD9IVJfmFVhVKGlhvSpmEfUCuxYf/3NHcKmRFI+I71lYzbTT3wMuYpETDCTHo81gC/g==", + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "@jest/console": "^28.1.0", - "@jest/reporters": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^28.0.2", - "jest-config": "^28.1.0", - "jest-haste-map": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.0", - "jest-resolve-dependencies": "^28.1.0", - "jest-runner": "^28.1.0", - "jest-runtime": "^28.1.0", - "jest-snapshot": "^28.1.0", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", - "jest-watcher": "^28.1.0", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.0", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "node": ">=8" } }, - "packages/sdk/node_modules/@jest/globals": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.0.tgz", - "integrity": "sha512-3m7sTg52OTQR6dPhsEQSxAvU+LOBbMivZBwOvKEZ+Rb+GyxVnXi9HKgOTYkx/S99T8yvh17U4tNNJPIEQmtwYw==", + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, - "dependencies": { - "@jest/environment": "^28.1.0", - "@jest/expect": "^28.1.0", - "@jest/types": "^28.1.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "packages/sdk/node_modules/@jest/reporters": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.0.tgz", - "integrity": "sha512-qxbFfqap/5QlSpIizH9c/bFCDKsQlM4uAKSOvZrP+nIdrjqre3FmKzpTtYyhsaVcOSNK7TTt2kjm+4BJIjysFA==", + "node_modules/strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true, - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", - "@jridgewell/trace-mapping": "^0.3.7", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-util": "^28.1.0", - "jest-worker": "^28.1.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^9.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "packages/sdk/node_modules/@jest/source-map": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.0.2.tgz", - "integrity": "sha512-Y9dxC8ZpN3kImkk0LkK5XCEneYMAXlZ8m5bflmSL5vrwyeUpJfentacCUg6fOb8NOpOO7hz2+l37MV77T6BFPw==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.7", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=0.10.0" } }, - "packages/sdk/node_modules/@jest/test-result": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.0.tgz", - "integrity": "sha512-sBBFIyoPzrZho3N+80P35A5oAkSKlGfsEFfXFWuPGBsW40UAjCkGakZhn4UQK4iQlW2vgCDMRDOob9FGKV8YoQ==", + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, - "dependencies": { - "@jest/console": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=6" } }, - "packages/sdk/node_modules/@jest/test-sequencer": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.0.tgz", - "integrity": "sha512-tZCEiVWlWNTs/2iK9yi6o3AlMfbbYgV4uuZInSVdzZ7ftpHZhCMuhvk2HLYhCZzLgPFQ9MnM1YaxMnh3TILFiQ==", + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, - "dependencies": { - "@jest/test-result": "^28.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", - "slash": "^3.0.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=0.10.0" } }, - "packages/sdk/node_modules/@jest/transform": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.0.tgz", - "integrity": "sha512-omy2xe5WxlAfqmsTjTPxw+iXRTRnf+NtX0ToG+4S0tABeb4KsKmPUHq5UBuwunHg3tJRwgEQhEp0M/8oiatLEA==", + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^28.1.0", - "@jridgewell/trace-mapping": "^0.3.7", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" + "has-flag": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "packages/sdk/node_modules/@jest/types": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "node_modules/supports-hyperlinks": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", "dev": true, "dependencies": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "packages/sdk/node_modules/@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" + "node": ">=8" } }, - "packages/sdk/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/ljharb" } }, - "packages/sdk/node_modules/babel-jest": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.0.tgz", - "integrity": "sha512-zNKk0yhDZ6QUwfxh9k07GII6siNGMJWVUU49gmFj5gfdqDKLqa2RArXOF2CODp4Dr7dLxN2cvAV+667dGJ4b4w==", + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, + "node_modules/tar": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", + "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", "dev": true, "dependencies": { - "@jest/transform": "^28.1.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^28.0.2", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" + "node": ">= 10" } }, - "packages/sdk/node_modules/babel-plugin-jest-hoist": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.0.2.tgz", - "integrity": "sha512-Kizhn/ZL+68ZQHxSnHyuvJv8IchXD62KQxV77TBDV/xoBFBOfgRAk97GNs6hXdTTCiVES9nB2I6+7MXXrk5llQ==", + "node_modules/terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", "dev": true, "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "packages/sdk/node_modules/babel-preset-jest": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.0.2.tgz", - "integrity": "sha512-sYzXIdgIXXroJTFeB3S6sNDWtlJ2dllCdTEsnZ65ACrMojj3hVNFRmnJ1HZtomGi+Be7aqpY/HJ92fr8OhKVkQ==", + "node_modules/terser": { + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.12.1.tgz", + "integrity": "sha512-NXbs+7nisos5E+yXwAD+y7zrcTkMqb0dEJxIGtSKPdCBzopf7ni4odPul2aechpV7EXNvOudYOX2bb5tln1jbQ==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^28.0.2", - "babel-preset-current-node-syntax": "^1.0.0" + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.20" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "bin": { + "terser": "bin/terser" }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "engines": { + "node": ">=10" } }, - "packages/sdk/node_modules/ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "packages/sdk/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "node_modules/terser/node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, "engines": { "node": ">= 8" } }, - "packages/sdk/node_modules/diff-sequences": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", - "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "packages/sdk/node_modules/emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "packages/sdk/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "node": "*" } }, - "packages/sdk/node_modules/expect": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.0.tgz", - "integrity": "sha512-qFXKl8Pmxk8TBGfaFKRtcQjfXEnKAs+dmlxdwvukJZorwrAabT7M3h8oLOG01I2utEhkmUTi17CHaPBovZsKdw==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^28.1.0", - "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true }, - "packages/sdk/node_modules/get-stream": { + "node_modules/throat": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", + "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", + "dev": true + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, - "packages/sdk/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "node_modules/to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", "dev": true, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, - "packages/sdk/node_modules/jest": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.0.tgz", - "integrity": "sha512-TZR+tHxopPhzw3c3560IJXZWLNHgpcz1Zh0w5A65vynLGNcg/5pZ+VildAd7+XGOu6jd58XMY/HNn0IkZIXVXg==", + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "dependencies": { - "@jest/core": "^28.1.0", - "import-local": "^3.0.2", - "jest-cli": "^28.1.0" - }, - "bin": { - "jest": "bin/jest.js" + "is-number": "^7.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "node": ">=8.0" } }, - "packages/sdk/node_modules/jest-changed-files": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.2.tgz", - "integrity": "sha512-QX9u+5I2s54ZnGoMEjiM2WeBvJR2J7w/8ZUmH2um/WLAuGAYFQcsVXY9+1YL6k0H/AGUdH8pXUAv6erDqEsvIA==", + "node_modules/tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", "dev": true, "dependencies": { - "execa": "^5.0.0", - "throat": "^6.0.1" + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=6" } }, - "packages/sdk/node_modules/jest-circus": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.0.tgz", - "integrity": "sha512-rNYfqfLC0L0zQKRKsg4n4J+W1A2fbyGH7Ss/kDIocp9KXD9iaL111glsLu7+Z7FHuZxwzInMDXq+N1ZIBkI/TQ==", + "node_modules/tough-cookie/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, - "dependencies": { - "@jest/environment": "^28.1.0", - "@jest/expect": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^28.1.0", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-runtime": "^28.1.0", - "jest-snapshot": "^28.1.0", - "jest-util": "^28.1.0", - "pretty-format": "^28.1.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=6" } }, - "packages/sdk/node_modules/jest-cli": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.0.tgz", - "integrity": "sha512-fDJRt6WPRriHrBsvvgb93OxgajHHsJbk4jZxiPqmZbMDRcHskfJBBfTyjFko0jjfprP544hOktdSi9HVgl4VUQ==", + "node_modules/tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", "dev": true, "dependencies": { - "@jest/core": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/types": "^28.1.0", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^28.1.0", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" + "punycode": "^2.1.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "node": ">=12" } }, - "packages/sdk/node_modules/jest-config": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.0.tgz", - "integrity": "sha512-aOV80E9LeWrmflp7hfZNn/zGA4QKv/xsn2w8QCBP0t0+YqObuCWTSgNbHJ0j9YsTuCO08ZR/wsvlxqqHX20iUA==", + "node_modules/tr46/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ts-jest": { + "version": "28.0.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.4.tgz", + "integrity": "sha512-S6uRDDdCJBvnZqyGjB4VCnwbQrbgdL8WPeP4jevVSpYsBaeGRQAIS08o3Svav2Ex+oXwLgJ/m7F24TNq62kA1A==", "dev": true, "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^28.1.0", - "@jest/types": "^28.1.0", - "babel-jest": "^28.1.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^28.1.0", - "jest-environment-node": "^28.1.0", - "jest-get-type": "^28.0.2", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.0", - "jest-runner": "^28.1.0", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^28.1.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^28.0.0", + "json5": "^2.2.1", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "^20.x" + }, + "bin": { + "ts-jest": "cli.js" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" }, "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" + "@babel/core": ">=7.0.0-beta.0 <8", + "babel-jest": "^28.0.0", + "jest": "^28.0.0", + "typescript": ">=4.3" }, "peerDependenciesMeta": { - "@types/node": { + "@babel/core": { "optional": true }, - "ts-node": { + "babel-jest": { + "optional": true + }, + "esbuild": { "optional": true } } }, - "packages/sdk/node_modules/jest-diff": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", - "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", + "node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true, + "peer": true + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^28.0.2", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "tslib": "^1.8.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "packages/sdk/node_modules/jest-docblock": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.0.2.tgz", - "integrity": "sha512-FH10WWw5NxLoeSdQlJwu+MTiv60aXV/t8KEwIRGEv74WARE1cXIqh1vGdy2CraHuWOOrnzTWj/azQKqW4fO7xg==", - "dev": true, - "dependencies": { - "detect-newline": "^3.0.0" + "node": ">= 6" }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, - "packages/sdk/node_modules/jest-each": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.0.tgz", - "integrity": "sha512-a/XX02xF5NTspceMpHujmOexvJ4GftpYXqr6HhhmKmExtMXsyIN/fvanQlt/BcgFoRKN4OCXxLQKth9/n6OPFg==", + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "dependencies": { - "@jest/types": "^28.1.0", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "jest-util": "^28.1.0", - "pretty-format": "^28.1.0" + "prelude-ls": "^1.2.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">= 0.8.0" } }, - "packages/sdk/node_modules/jest-environment-node": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.0.tgz", - "integrity": "sha512-gBLZNiyrPw9CSMlTXF1yJhaBgWDPVvH0Pq6bOEwGMXaYNzhzhw2kA/OijNF8egbCgDS0/veRv97249x2CX+udQ==", + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, - "dependencies": { - "@jest/environment": "^28.1.0", - "@jest/fake-timers": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/node": "*", - "jest-mock": "^28.1.0", - "jest-util": "^28.1.0" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=4" } }, - "packages/sdk/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "packages/sdk/node_modules/jest-haste-map": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.0.tgz", - "integrity": "sha512-xyZ9sXV8PtKi6NCrJlmq53PyNVHzxmcfXNVvIRHpHmh1j/HChC4pwKgyjj7Z9us19JMw8PpQTJsFWOsIfT93Dw==", + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, "dependencies": { - "@jest/types": "^28.1.0", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.0", - "jest-worker": "^28.1.0", - "micromatch": "^4.0.4", - "walker": "^1.0.7" + "is-typedarray": "^1.0.0" + } + }, + "node_modules/typedoc": { + "version": "0.22.17", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.17.tgz", + "integrity": "sha512-h6+uXHVVCPDaANzjwzdsj9aePBjZiBTpiMpBBeyh1zcN2odVsDCNajz8zyKnixF93HJeGpl34j/70yoEE5BfNg==", + "dev": true, + "dependencies": { + "glob": "^8.0.3", + "lunr": "^2.3.9", + "marked": "^4.0.16", + "minimatch": "^5.1.0", + "shiki": "^0.10.1" + }, + "bin": { + "typedoc": "bin/typedoc" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">= 12.10.0" }, - "optionalDependencies": { - "fsevents": "^2.3.2" + "peerDependencies": { + "typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x || 4.6.x || 4.7.x" } }, - "packages/sdk/node_modules/jest-leak-detector": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.0.tgz", - "integrity": "sha512-uIJDQbxwEL2AMMs2xjhZl2hw8s77c3wrPaQ9v6tXJLGaaQ+4QrNJH5vuw7hA7w/uGT/iJ42a83opAqxGHeyRIA==", + "node_modules/typedoc/node_modules/glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", "dev": true, "dependencies": { - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "packages/sdk/node_modules/jest-matcher-utils": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", - "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", + "node_modules/typescript": { + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.3.tgz", + "integrity": "sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA==", "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.0", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=4.2.0" } }, - "packages/sdk/node_modules/jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "node_modules/unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "dependencies": { + "unique-slug": "^2.0.0" } }, - "packages/sdk/node_modules/jest-resolve": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.0.tgz", - "integrity": "sha512-vvfN7+tPNnnhDvISuzD1P+CRVP8cK0FHXRwPAcdDaQv4zgvwvag2n55/h5VjYcM5UJG7L4TwE5tZlzcI0X2Lhw==", + "node_modules/unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "imurmurhash": "^0.1.4" } }, - "packages/sdk/node_modules/jest-resolve-dependencies": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.0.tgz", - "integrity": "sha512-Ue1VYoSZquPwEvng7Uefw8RmZR+me/1kr30H2jMINjGeHgeO/JgrR6wxj2ofkJ7KSAA11W3cOrhNCbj5Dqqd9g==", + "node_modules/unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", "dev": true, "dependencies": { - "jest-regex-util": "^28.0.2", - "jest-snapshot": "^28.1.0" + "crypto-random-string": "^2.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=8" } }, - "packages/sdk/node_modules/jest-runner": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.0.tgz", - "integrity": "sha512-FBpmuh1HB2dsLklAlRdOxNTTHKFR6G1Qmd80pVDvwbZXTriqjWqjei5DKFC1UlM732KjYcE6yuCdiF0WUCOS2w==", + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, - "dependencies": { - "@jest/console": "^28.1.0", - "@jest/environment": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "graceful-fs": "^4.2.9", - "jest-docblock": "^28.0.2", - "jest-environment-node": "^28.1.0", - "jest-haste-map": "^28.1.0", - "jest-leak-detector": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-resolve": "^28.1.0", - "jest-runtime": "^28.1.0", - "jest-util": "^28.1.0", - "jest-watcher": "^28.1.0", - "jest-worker": "^28.1.0", - "source-map-support": "0.5.13", - "throat": "^6.0.1" - }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">= 4.0.0" } }, - "packages/sdk/node_modules/jest-runtime": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.0.tgz", - "integrity": "sha512-wNYDiwhdH/TV3agaIyVF0lsJ33MhyujOe+lNTUiolqKt8pchy1Hq4+tDMGbtD5P/oNLA3zYrpx73T9dMTOCAcg==", + "node_modules/update-check": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.2.tgz", + "integrity": "sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ==", "dev": true, "dependencies": { - "@jest/environment": "^28.1.0", - "@jest/fake-timers": "^28.1.0", - "@jest/globals": "^28.1.0", - "@jest/source-map": "^28.0.2", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-mock": "^28.1.0", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.0", - "jest-snapshot": "^28.1.0", - "jest-util": "^28.1.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0" } }, - "packages/sdk/node_modules/jest-snapshot": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.0.tgz", - "integrity": "sha512-ex49M2ZrZsUyQLpLGxQtDbahvgBjlLPgklkqGM0hq/F7W/f8DyqZxVHjdy19QKBm4O93eDp+H5S23EiTbbUmHw==", + "node_modules/update-notifier": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", "dev": true, "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^28.1.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^28.1.0", - "jest-get-type": "^28.0.2", - "jest-haste-map": "^28.1.0", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0", - "natural-compare": "^1.4.0", - "pretty-format": "^28.1.0", - "semver": "^7.3.5" + "boxen": "^5.0.0", + "chalk": "^4.1.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.4.0", + "is-npm": "^5.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.1.0", + "pupa": "^2.1.1", + "semver": "^7.3.4", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/yeoman/update-notifier?sponsor=1" } }, - "packages/sdk/node_modules/jest-util": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", - "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "dependencies": { - "@jest/types": "^28.1.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, + "punycode": "^2.1.0" + } + }, + "node_modules/uri-js/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=6" } }, - "packages/sdk/node_modules/jest-validate": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.0.tgz", - "integrity": "sha512-Lly7CJYih3vQBfjLeANGgBSBJ7pEa18cxpQfQEq2go2xyEzehnHfQTjoUia8xUv4x4J80XKFIDwJJThXtRFQXQ==", + "node_modules/url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "dependencies": { - "@jest/types": "^28.1.0", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "leven": "^3.1.0", - "pretty-format": "^28.1.0" + "prepend-http": "^2.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=4" } }, - "packages/sdk/node_modules/jest-watcher": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.0.tgz", - "integrity": "sha512-tNHMtfLE8Njcr2IRS+5rXYA4BhU90gAOwI9frTGOqd+jX0P/Au/JfRSNqsf5nUTcWdbVYuLxS1KjnzILSoR5hA==", + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", + "integrity": "sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==", "dev": true, "dependencies": { - "@jest/test-result": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^28.1.0", - "string-length": "^4.0.1" + "@jridgewell/trace-mapping": "^0.3.7", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": ">=10.12.0" } }, - "packages/sdk/node_modules/jest-worker": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.0.tgz", - "integrity": "sha512-ZHwM6mNwaWBR52Snff8ZvsCTqQsvhCxP/bT1I6T6DAnb6ygkshsyLQIMxFwHpYxht0HOoqt23JlC01viI7T03A==", + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, - "packages/sdk/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "node_modules/validate-npm-package-name": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-4.0.0.tgz", + "integrity": "sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==", "dev": true, "dependencies": { - "path-key": "^3.0.0" + "builtins": "^5.0.0" }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "packages/sdk/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "dev": true, "engines": { - "node": ">=8" + "node": ">= 0.8" } }, - "packages/sdk/node_modules/pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "node_modules/vscode-oniguruma": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", + "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", + "dev": true + }, + "node_modules/vscode-textmate": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", + "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", + "dev": true + }, + "node_modules/w3c-hr-time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", "dev": true, "dependencies": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "browser-process-hrtime": "^1.0.0" } }, - "packages/sdk/node_modules/react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - }, - "packages/sdk/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "node_modules/w3c-xmlserializer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz", + "integrity": "sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==", "dev": true, "dependencies": { - "shebang-regex": "^3.0.0" + "xml-name-validator": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=12" } }, - "packages/sdk/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" } }, - "packages/sdk/node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "node_modules/whatwg-encoding": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", "dev": true, "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=12" } }, - "packages/sdk/node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "node_modules/whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", "dev": true, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, - "packages/sdk/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==", + "node_modules/whatwg-url": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-10.0.0.tgz", + "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": ">=12" } }, - "packages/sdk/node_modules/ts-jest": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.2.tgz", - "integrity": "sha512-IOZMb3D0gx6IHO9ywPgiQxJ3Zl4ECylEFwoVpENB55aTn5sdO0Ptyx/7noNBxAaUff708RqQL4XBNxxOVjY0vQ==", + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^28.0.0", - "json5": "2.x", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "^20.x" + "isexe": "^2.0.0" }, "bin": { - "ts-jest": "cli.js" + "node-which": "bin/node-which" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@types/jest": "^27.0.0", - "babel-jest": "^28.0.0", - "jest": "^28.0.0", - "typescript": ">=4.3" + "node": ">= 8" + } + }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "dependencies": { + "string-width": "^4.0.0" }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@types/jest": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - } + "engines": { + "node": ">=8" } }, - "packages/sdk/node_modules/v8-to-istanbul": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", - "integrity": "sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==", + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.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==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.7", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=10.12.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "packages/sdk/node_modules/write-file-atomic": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", - "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "dependencies": { "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/ws": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.6.0.tgz", + "integrity": "sha512-AzmM3aH3gk0aX7/rZLYvjdvZooofDu3fFOzGqcSnQ1tOcTWwhM/o+q++E8mAyVVIyUdajrkzWUGftaVSDLn1bw==", + "dev": true, + "engines": { + "node": ">=10.0.0" }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "dev": true, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": ">=8" + } + }, + "node_modules/xml-name-validator": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "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/yaml": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", + "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==", + "dev": true, + "engines": { + "node": ">= 14" } }, - "packages/sdk/node_modules/yargs": { - "version": "17.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz", - "integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==", + "node_modules/yargs": { + "version": "17.5.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", + "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", "dev": true, "dependencies": { "cliui": "^7.0.2", @@ -9136,7 +9049,16 @@ "node": ">=12" } }, - "packages/sdk/node_modules/yargs/node_modules/yargs-parser": { + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { "version": "21.0.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", @@ -9144,6 +9066,79 @@ "engines": { "node": ">=12" } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "packages/e2ee": { + "name": "@sora/e2ee", + "version": "2021.1.0", + "license": "Apache-2.0", + "dependencies": { + "@sora/go-wasm": "^2021.1.0" + }, + "devDependencies": { + "@rollup/plugin-node-resolve": "^13.3.0", + "@rollup/plugin-replace": "^4.0.0", + "@rollup/plugin-typescript": "^8.3.2", + "@typescript-eslint/eslint-plugin": "^5.27.1", + "@typescript-eslint/parser": "^5.27.1", + "eslint": "^8.17.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.0.0", + "prettier": "^2.6.2", + "rollup": "^2.75.5", + "typescript": "^4.7.3" + } + }, + "packages/go-wasm": { + "name": "@sora/go-wasm", + "version": "2021.1.0" + }, + "packages/sdk": { + "name": "@sora/sdk", + "dependencies": { + "@sora/e2ee": "^2021.1.0", + "fflate": "^0.7.3" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "^22.0.0", + "@rollup/plugin-node-resolve": "^13.3.0", + "@rollup/plugin-replace": "^4.0.0", + "@rollup/plugin-typescript": "^8.3.2", + "@types/jest": "^28.1.1", + "@typescript-eslint/eslint-plugin": "5.27.1", + "@typescript-eslint/parser": "5.27.1", + "eslint": "8.17.0", + "eslint-config-prettier": "8.5.0", + "eslint-plugin-prettier": "4.0.0", + "jest": "^28.1.0", + "jest-environment-jsdom": "^28.1.0", + "prettier": "^2.6.2", + "rollup": "^2.75.5", + "rollup-plugin-terser": "^7.0.2", + "ts-jest": "^28.0.4", + "typescript": "^4.7.3" + } + }, + "packages/sdk/node_modules/@types/jest": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.1.tgz", + "integrity": "sha512-C2p7yqleUKtCkVjlOur9BWVA4HgUQmEj/HWCt5WzZ5mLXrWnyIfl0wGuArc+kBXsy0ZZfLp+7dywB4HtSVYGVA==", + "dev": true, + "dependencies": { + "jest-matcher-utils": "^27.0.0", + "pretty-format": "^27.0.0" + } } }, "dependencies": { @@ -9305,9 +9300,9 @@ } }, "@babel/helper-plugin-utils": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", - "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz", + "integrity": "sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA==", "dev": true }, "@babel/helper-simple-access": { @@ -9529,12 +9524,12 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz", - "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.12.tgz", + "integrity": "sha512-TYY0SXFiO31YXtNg3HtFwNJHjLsAyIIhAhNWkQ5whPPS7HWUFlg9z0Ta4qAQNjQbP1wsSt/oKkmZ/4/WWdMUpw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.17.12" } }, "@babel/template": { @@ -9767,99 +9762,57 @@ "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true }, - "@jest/environment": { + "@jest/console": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.0.tgz", - "integrity": "sha512-S44WGSxkRngzHslhV6RoAExekfF7Qhwa6R5+IYFa81mpcj0YgdBnRSmvHe3SNwOt64yXaE5GG8Y2xM28ii5ssA==", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.0.tgz", + "integrity": "sha512-tscn3dlJFGay47kb4qVruQg/XWlmvU0xp3EJOjzzY+sBaI+YgwKcvAmTcyYU7xEiLLIY5HCdWRooAL8dqkFlDA==", "dev": true, "requires": { - "@jest/fake-timers": "^28.1.0", "@jest/types": "^28.1.0", "@types/node": "*", - "jest-mock": "^28.1.0" - }, - "dependencies": { - "@jest/types": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - } + "chalk": "^4.0.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0", + "slash": "^3.0.0" } }, - "@jest/expect": { + "@jest/core": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.0.tgz", - "integrity": "sha512-be9ETznPLaHOmeJqzYNIXv1ADEzENuQonIoobzThOYPuK/6GhrWNIJDVTgBLCrz3Am73PyEU2urQClZp0hLTtA==", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.0.tgz", + "integrity": "sha512-/2PTt0ywhjZ4NwNO4bUqD9IVJfmFVhVKGlhvSpmEfUCuxYf/3NHcKmRFI+I71lYzbTT3wMuYpETDCTHo81gC/g==", "dev": true, "requires": { - "expect": "^28.1.0", - "jest-snapshot": "^28.1.0" - }, - "dependencies": { - "@jest/transform": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.0.tgz", - "integrity": "sha512-omy2xe5WxlAfqmsTjTPxw+iXRTRnf+NtX0ToG+4S0tABeb4KsKmPUHq5UBuwunHg3tJRwgEQhEp0M/8oiatLEA==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/types": "^28.1.0", - "@jridgewell/trace-mapping": "^0.3.7", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - } - }, - "@jest/types": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, + "@jest/console": "^28.1.0", + "@jest/reporters": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^28.0.2", + "jest-config": "^28.1.0", + "jest-haste-map": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.0", + "jest-resolve-dependencies": "^28.1.0", + "jest-runner": "^28.1.0", + "jest-runtime": "^28.1.0", + "jest-snapshot": "^28.1.0", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "jest-watcher": "^28.1.0", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { "ansi-styles": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", @@ -9867,142 +9820,11 @@ "dev": true }, "ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true - }, - "diff-sequences": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", - "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", - "dev": true - }, - "expect": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.0.tgz", - "integrity": "sha512-qFXKl8Pmxk8TBGfaFKRtcQjfXEnKAs+dmlxdwvukJZorwrAabT7M3h8oLOG01I2utEhkmUTi17CHaPBovZsKdw==", - "dev": true, - "requires": { - "@jest/expect-utils": "^28.1.0", - "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0" - } - }, - "jest-diff": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", - "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^28.0.2", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" - } - }, - "jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true - }, - "jest-haste-map": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.0.tgz", - "integrity": "sha512-xyZ9sXV8PtKi6NCrJlmq53PyNVHzxmcfXNVvIRHpHmh1j/HChC4pwKgyjj7Z9us19JMw8PpQTJsFWOsIfT93Dw==", - "dev": true, - "requires": { - "@jest/types": "^28.1.0", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "fsevents": "^2.3.2", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.0", - "jest-worker": "^28.1.0", - "micromatch": "^4.0.4", - "walker": "^1.0.7" - } - }, - "jest-matcher-utils": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", - "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.0", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" - } - }, - "jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", + "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", "dev": true }, - "jest-snapshot": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.0.tgz", - "integrity": "sha512-ex49M2ZrZsUyQLpLGxQtDbahvgBjlLPgklkqGM0hq/F7W/f8DyqZxVHjdy19QKBm4O93eDp+H5S23EiTbbUmHw==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^28.1.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^28.1.0", - "jest-get-type": "^28.0.2", - "jest-haste-map": "^28.1.0", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0", - "natural-compare": "^1.4.0", - "pretty-format": "^28.1.0", - "semver": "^7.3.5" - } - }, - "jest-util": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", - "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", - "dev": true, - "requires": { - "@jest/types": "^28.1.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "jest-worker": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.0.tgz", - "integrity": "sha512-ZHwM6mNwaWBR52Snff8ZvsCTqQsvhCxP/bT1I6T6DAnb6ygkshsyLQIMxFwHpYxht0HOoqt23JlC01viI7T03A==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - } - }, "pretty-format": { "version": "28.1.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", @@ -10020,28 +9842,31 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", "dev": true - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "write-file-atomic": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", - "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - } } } }, + "@jest/environment": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.0.tgz", + "integrity": "sha512-S44WGSxkRngzHslhV6RoAExekfF7Qhwa6R5+IYFa81mpcj0YgdBnRSmvHe3SNwOt64yXaE5GG8Y2xM28ii5ssA==", + "dev": true, + "requires": { + "@jest/fake-timers": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "jest-mock": "^28.1.0" + } + }, + "@jest/expect": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.0.tgz", + "integrity": "sha512-be9ETznPLaHOmeJqzYNIXv1ADEzENuQonIoobzThOYPuK/6GhrWNIJDVTgBLCrz3Am73PyEU2urQClZp0hLTtA==", + "dev": true, + "requires": { + "expect": "^28.1.0", + "jest-snapshot": "^28.1.0" + } + }, "@jest/expect-utils": { "version": "28.1.0", "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.0.tgz", @@ -10071,110 +9896,177 @@ "jest-message-util": "^28.1.0", "jest-mock": "^28.1.0", "jest-util": "^28.1.0" - }, - "dependencies": { - "@jest/types": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true - }, - "jest-util": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", - "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", - "dev": true, - "requires": { - "@jest/types": "^28.1.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - } } }, - "@jest/schemas": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.2.tgz", - "integrity": "sha512-YVDJZjd4izeTDkij00vHHAymNXQ6WWsdChFRK86qck6Jpr3DCL5W3Is3vslviRlP+bLuMYRLbdp98amMvqudhA==", + "@jest/globals": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.0.tgz", + "integrity": "sha512-3m7sTg52OTQR6dPhsEQSxAvU+LOBbMivZBwOvKEZ+Rb+GyxVnXi9HKgOTYkx/S99T8yvh17U4tNNJPIEQmtwYw==", "dev": true, "requires": { - "@sinclair/typebox": "^0.23.3" + "@jest/environment": "^28.1.0", + "@jest/expect": "^28.1.0", + "@jest/types": "^28.1.0" } }, - "@jest/types": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", - "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "@jest/reporters": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.0.tgz", + "integrity": "sha512-qxbFfqap/5QlSpIizH9c/bFCDKsQlM4uAKSOvZrP+nIdrjqre3FmKzpTtYyhsaVcOSNK7TTt2kjm+4BJIjysFA==", "dev": true, - "optional": true, - "peer": true, "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@jridgewell/trace-mapping": "^0.3.7", "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-util": "^28.1.0", + "jest-worker": "^28.1.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^9.0.0" } }, - "@jridgewell/resolve-uri": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", - "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", - "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.10.tgz", - "integrity": "sha512-Q0YbBd6OTsXm8Y21+YUSDXupHnodNC2M4O18jtd3iwJ3+vMZNdKGols0a9G6JOK0dcJ3IdUUHoh908ZI6qhk8Q==", + "@jest/schemas": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-28.0.2.tgz", + "integrity": "sha512-YVDJZjd4izeTDkij00vHHAymNXQ6WWsdChFRK86qck6Jpr3DCL5W3Is3vslviRlP+bLuMYRLbdp98amMvqudhA==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@sinclair/typebox": "^0.23.3" } }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "@jest/source-map": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.0.2.tgz", + "integrity": "sha512-Y9dxC8ZpN3kImkk0LkK5XCEneYMAXlZ8m5bflmSL5vrwyeUpJfentacCUg6fOb8NOpOO7hz2+l37MV77T6BFPw==", "dev": true, "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "@jridgewell/trace-mapping": "^0.3.7", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" } }, - "@nodelib/fs.stat": { + "@jest/test-result": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.0.tgz", + "integrity": "sha512-sBBFIyoPzrZho3N+80P35A5oAkSKlGfsEFfXFWuPGBsW40UAjCkGakZhn4UQK4iQlW2vgCDMRDOob9FGKV8YoQ==", + "dev": true, + "requires": { + "@jest/console": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.0.tgz", + "integrity": "sha512-tZCEiVWlWNTs/2iK9yi6o3AlMfbbYgV4uuZInSVdzZ7ftpHZhCMuhvk2HLYhCZzLgPFQ9MnM1YaxMnh3TILFiQ==", + "dev": true, + "requires": { + "@jest/test-result": "^28.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "slash": "^3.0.0" + } + }, + "@jest/transform": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.0.tgz", + "integrity": "sha512-omy2xe5WxlAfqmsTjTPxw+iXRTRnf+NtX0ToG+4S0tABeb4KsKmPUHq5UBuwunHg3tJRwgEQhEp0M/8oiatLEA==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/types": "^28.1.0", + "@jridgewell/trace-mapping": "^0.3.7", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.1" + }, + "dependencies": { + "write-file-atomic": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", + "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } + } + } + }, + "@jest/types": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", + "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", + "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", + "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.10.tgz", + "integrity": "sha512-Q0YbBd6OTsXm8Y21+YUSDXupHnodNC2M4O18jtd3iwJ3+vMZNdKGols0a9G6JOK0dcJ3IdUUHoh908ZI6qhk8Q==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", @@ -10261,14 +10153,14 @@ } }, "@npmcli/run-script": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.2.tgz", - "integrity": "sha512-vdjD/PMBl+OX9j9C9irx5sCCIKfp2PWkpPNH9zxvlJAfSZ3Qp5aU412v+O3PFJl3R1PFNwuyChCqHg4ma6ci2Q==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.3.tgz", + "integrity": "sha512-ZXL6qgC5NjwfZJ2nET+ZSLEz/PJgJ/5CU90C2S66dZY4Jw73DasS4ZCXuy/KHWYP0imjJ4VtA+Gebb5BxxKp9Q==", "dev": true, "requires": { "@npmcli/node-gyp": "^2.0.0", "@npmcli/promise-spawn": "^3.0.0", - "node-gyp": "^9.0.0", + "node-gyp": "^8.4.1", "read-package-json-fast": "^2.0.3" } }, @@ -10377,14 +10269,14 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^5.26.0", - "@typescript-eslint/parser": "^5.26.0", - "eslint": "^8.16.0", + "@typescript-eslint/eslint-plugin": "^5.27.1", + "@typescript-eslint/parser": "^5.27.1", + "eslint": "^8.17.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", - "rollup": "^2.74.1", - "typescript": "^4.6.4" + "rollup": "^2.75.5", + "typescript": "^4.7.3" } }, "@sora/go-wasm": { @@ -10398,814 +10290,30 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", "@sora/e2ee": "^2021.1.0", - "@types/jest": "^27.5.1", - "@typescript-eslint/eslint-plugin": "5.26.0", - "@typescript-eslint/parser": "5.26.0", - "eslint": "8.16.0", + "@types/jest": "^28.1.1", + "@typescript-eslint/eslint-plugin": "5.27.1", + "@typescript-eslint/parser": "5.27.1", + "eslint": "8.17.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "fflate": "^0.7.3", "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", "prettier": "^2.6.2", - "rollup": "^2.74.1", + "rollup": "^2.75.5", "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^28.0.2", - "typescript": "^4.6.4" + "ts-jest": "^28.0.4", + "typescript": "^4.7.3" }, "dependencies": { - "@jest/console": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.0.tgz", - "integrity": "sha512-tscn3dlJFGay47kb4qVruQg/XWlmvU0xp3EJOjzzY+sBaI+YgwKcvAmTcyYU7xEiLLIY5HCdWRooAL8dqkFlDA==", - "dev": true, - "requires": { - "@jest/types": "^28.1.0", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0", - "slash": "^3.0.0" - } - }, - "@jest/core": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.0.tgz", - "integrity": "sha512-/2PTt0ywhjZ4NwNO4bUqD9IVJfmFVhVKGlhvSpmEfUCuxYf/3NHcKmRFI+I71lYzbTT3wMuYpETDCTHo81gC/g==", - "dev": true, - "requires": { - "@jest/console": "^28.1.0", - "@jest/reporters": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^28.0.2", - "jest-config": "^28.1.0", - "jest-haste-map": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.0", - "jest-resolve-dependencies": "^28.1.0", - "jest-runner": "^28.1.0", - "jest-runtime": "^28.1.0", - "jest-snapshot": "^28.1.0", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", - "jest-watcher": "^28.1.0", - "micromatch": "^4.0.4", - "pretty-format": "^28.1.0", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "@jest/globals": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.0.tgz", - "integrity": "sha512-3m7sTg52OTQR6dPhsEQSxAvU+LOBbMivZBwOvKEZ+Rb+GyxVnXi9HKgOTYkx/S99T8yvh17U4tNNJPIEQmtwYw==", - "dev": true, - "requires": { - "@jest/environment": "^28.1.0", - "@jest/expect": "^28.1.0", - "@jest/types": "^28.1.0" - } - }, - "@jest/reporters": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.0.tgz", - "integrity": "sha512-qxbFfqap/5QlSpIizH9c/bFCDKsQlM4uAKSOvZrP+nIdrjqre3FmKzpTtYyhsaVcOSNK7TTt2kjm+4BJIjysFA==", - "dev": true, - "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", - "@jridgewell/trace-mapping": "^0.3.7", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-util": "^28.1.0", - "jest-worker": "^28.1.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^9.0.0" - } - }, - "@jest/source-map": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-28.0.2.tgz", - "integrity": "sha512-Y9dxC8ZpN3kImkk0LkK5XCEneYMAXlZ8m5bflmSL5vrwyeUpJfentacCUg6fOb8NOpOO7hz2+l37MV77T6BFPw==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.7", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - } - }, - "@jest/test-result": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.0.tgz", - "integrity": "sha512-sBBFIyoPzrZho3N+80P35A5oAkSKlGfsEFfXFWuPGBsW40UAjCkGakZhn4UQK4iQlW2vgCDMRDOob9FGKV8YoQ==", - "dev": true, - "requires": { - "@jest/console": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - } - }, - "@jest/test-sequencer": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.0.tgz", - "integrity": "sha512-tZCEiVWlWNTs/2iK9yi6o3AlMfbbYgV4uuZInSVdzZ7ftpHZhCMuhvk2HLYhCZzLgPFQ9MnM1YaxMnh3TILFiQ==", - "dev": true, - "requires": { - "@jest/test-result": "^28.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", - "slash": "^3.0.0" - } - }, - "@jest/transform": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.0.tgz", - "integrity": "sha512-omy2xe5WxlAfqmsTjTPxw+iXRTRnf+NtX0ToG+4S0tABeb4KsKmPUHq5UBuwunHg3tJRwgEQhEp0M/8oiatLEA==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/types": "^28.1.0", - "@jridgewell/trace-mapping": "^0.3.7", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" - } - }, - "@jest/types": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, - "babel-jest": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.0.tgz", - "integrity": "sha512-zNKk0yhDZ6QUwfxh9k07GII6siNGMJWVUU49gmFj5gfdqDKLqa2RArXOF2CODp4Dr7dLxN2cvAV+667dGJ4b4w==", - "dev": true, - "requires": { - "@jest/transform": "^28.1.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^28.0.2", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - } - }, - "babel-plugin-jest-hoist": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.0.2.tgz", - "integrity": "sha512-Kizhn/ZL+68ZQHxSnHyuvJv8IchXD62KQxV77TBDV/xoBFBOfgRAk97GNs6hXdTTCiVES9nB2I6+7MXXrk5llQ==", - "dev": true, - "requires": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - } - }, - "babel-preset-jest": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.0.2.tgz", - "integrity": "sha512-sYzXIdgIXXroJTFeB3S6sNDWtlJ2dllCdTEsnZ65ACrMojj3hVNFRmnJ1HZtomGi+Be7aqpY/HJ92fr8OhKVkQ==", - "dev": true, - "requires": { - "babel-plugin-jest-hoist": "^28.0.2", - "babel-preset-current-node-syntax": "^1.0.0" - } - }, - "ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "diff-sequences": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", - "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", - "dev": true - }, - "emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", - "dev": true - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "expect": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.0.tgz", - "integrity": "sha512-qFXKl8Pmxk8TBGfaFKRtcQjfXEnKAs+dmlxdwvukJZorwrAabT7M3h8oLOG01I2utEhkmUTi17CHaPBovZsKdw==", - "dev": true, - "requires": { - "@jest/expect-utils": "^28.1.0", - "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0" - } - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true - }, - "jest": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.0.tgz", - "integrity": "sha512-TZR+tHxopPhzw3c3560IJXZWLNHgpcz1Zh0w5A65vynLGNcg/5pZ+VildAd7+XGOu6jd58XMY/HNn0IkZIXVXg==", - "dev": true, - "requires": { - "@jest/core": "^28.1.0", - "import-local": "^3.0.2", - "jest-cli": "^28.1.0" - } - }, - "jest-changed-files": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.2.tgz", - "integrity": "sha512-QX9u+5I2s54ZnGoMEjiM2WeBvJR2J7w/8ZUmH2um/WLAuGAYFQcsVXY9+1YL6k0H/AGUdH8pXUAv6erDqEsvIA==", + "@types/jest": { + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.1.tgz", + "integrity": "sha512-C2p7yqleUKtCkVjlOur9BWVA4HgUQmEj/HWCt5WzZ5mLXrWnyIfl0wGuArc+kBXsy0ZZfLp+7dywB4HtSVYGVA==", "dev": true, "requires": { - "execa": "^5.0.0", - "throat": "^6.0.1" - } - }, - "jest-circus": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.0.tgz", - "integrity": "sha512-rNYfqfLC0L0zQKRKsg4n4J+W1A2fbyGH7Ss/kDIocp9KXD9iaL111glsLu7+Z7FHuZxwzInMDXq+N1ZIBkI/TQ==", - "dev": true, - "requires": { - "@jest/environment": "^28.1.0", - "@jest/expect": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^28.1.0", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-runtime": "^28.1.0", - "jest-snapshot": "^28.1.0", - "jest-util": "^28.1.0", - "pretty-format": "^28.1.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" - } - }, - "jest-cli": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.0.tgz", - "integrity": "sha512-fDJRt6WPRriHrBsvvgb93OxgajHHsJbk4jZxiPqmZbMDRcHskfJBBfTyjFko0jjfprP544hOktdSi9HVgl4VUQ==", - "dev": true, - "requires": { - "@jest/core": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/types": "^28.1.0", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^28.1.0", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - } - }, - "jest-config": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.0.tgz", - "integrity": "sha512-aOV80E9LeWrmflp7hfZNn/zGA4QKv/xsn2w8QCBP0t0+YqObuCWTSgNbHJ0j9YsTuCO08ZR/wsvlxqqHX20iUA==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^28.1.0", - "@jest/types": "^28.1.0", - "babel-jest": "^28.1.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^28.1.0", - "jest-environment-node": "^28.1.0", - "jest-get-type": "^28.0.2", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.0", - "jest-runner": "^28.1.0", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^28.1.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - } - }, - "jest-diff": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", - "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^28.0.2", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" - } - }, - "jest-docblock": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.0.2.tgz", - "integrity": "sha512-FH10WWw5NxLoeSdQlJwu+MTiv60aXV/t8KEwIRGEv74WARE1cXIqh1vGdy2CraHuWOOrnzTWj/azQKqW4fO7xg==", - "dev": true, - "requires": { - "detect-newline": "^3.0.0" - } - }, - "jest-each": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.0.tgz", - "integrity": "sha512-a/XX02xF5NTspceMpHujmOexvJ4GftpYXqr6HhhmKmExtMXsyIN/fvanQlt/BcgFoRKN4OCXxLQKth9/n6OPFg==", - "dev": true, - "requires": { - "@jest/types": "^28.1.0", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "jest-util": "^28.1.0", - "pretty-format": "^28.1.0" - } - }, - "jest-environment-node": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.0.tgz", - "integrity": "sha512-gBLZNiyrPw9CSMlTXF1yJhaBgWDPVvH0Pq6bOEwGMXaYNzhzhw2kA/OijNF8egbCgDS0/veRv97249x2CX+udQ==", - "dev": true, - "requires": { - "@jest/environment": "^28.1.0", - "@jest/fake-timers": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/node": "*", - "jest-mock": "^28.1.0", - "jest-util": "^28.1.0" - } - }, - "jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true - }, - "jest-haste-map": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.0.tgz", - "integrity": "sha512-xyZ9sXV8PtKi6NCrJlmq53PyNVHzxmcfXNVvIRHpHmh1j/HChC4pwKgyjj7Z9us19JMw8PpQTJsFWOsIfT93Dw==", - "dev": true, - "requires": { - "@jest/types": "^28.1.0", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "fsevents": "^2.3.2", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.0", - "jest-worker": "^28.1.0", - "micromatch": "^4.0.4", - "walker": "^1.0.7" - } - }, - "jest-leak-detector": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.0.tgz", - "integrity": "sha512-uIJDQbxwEL2AMMs2xjhZl2hw8s77c3wrPaQ9v6tXJLGaaQ+4QrNJH5vuw7hA7w/uGT/iJ42a83opAqxGHeyRIA==", - "dev": true, - "requires": { - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" - } - }, - "jest-matcher-utils": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", - "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.0", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" - } - }, - "jest-regex-util": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", - "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", - "dev": true - }, - "jest-resolve": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.0.tgz", - "integrity": "sha512-vvfN7+tPNnnhDvISuzD1P+CRVP8cK0FHXRwPAcdDaQv4zgvwvag2n55/h5VjYcM5UJG7L4TwE5tZlzcI0X2Lhw==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - } - }, - "jest-resolve-dependencies": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.0.tgz", - "integrity": "sha512-Ue1VYoSZquPwEvng7Uefw8RmZR+me/1kr30H2jMINjGeHgeO/JgrR6wxj2ofkJ7KSAA11W3cOrhNCbj5Dqqd9g==", - "dev": true, - "requires": { - "jest-regex-util": "^28.0.2", - "jest-snapshot": "^28.1.0" - } - }, - "jest-runner": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.0.tgz", - "integrity": "sha512-FBpmuh1HB2dsLklAlRdOxNTTHKFR6G1Qmd80pVDvwbZXTriqjWqjei5DKFC1UlM732KjYcE6yuCdiF0WUCOS2w==", - "dev": true, - "requires": { - "@jest/console": "^28.1.0", - "@jest/environment": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "graceful-fs": "^4.2.9", - "jest-docblock": "^28.0.2", - "jest-environment-node": "^28.1.0", - "jest-haste-map": "^28.1.0", - "jest-leak-detector": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-resolve": "^28.1.0", - "jest-runtime": "^28.1.0", - "jest-util": "^28.1.0", - "jest-watcher": "^28.1.0", - "jest-worker": "^28.1.0", - "source-map-support": "0.5.13", - "throat": "^6.0.1" - } - }, - "jest-runtime": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.0.tgz", - "integrity": "sha512-wNYDiwhdH/TV3agaIyVF0lsJ33MhyujOe+lNTUiolqKt8pchy1Hq4+tDMGbtD5P/oNLA3zYrpx73T9dMTOCAcg==", - "dev": true, - "requires": { - "@jest/environment": "^28.1.0", - "@jest/fake-timers": "^28.1.0", - "@jest/globals": "^28.1.0", - "@jest/source-map": "^28.0.2", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-mock": "^28.1.0", - "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.0", - "jest-snapshot": "^28.1.0", - "jest-util": "^28.1.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - } - }, - "jest-snapshot": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.0.tgz", - "integrity": "sha512-ex49M2ZrZsUyQLpLGxQtDbahvgBjlLPgklkqGM0hq/F7W/f8DyqZxVHjdy19QKBm4O93eDp+H5S23EiTbbUmHw==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^28.1.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^28.1.0", - "jest-get-type": "^28.0.2", - "jest-haste-map": "^28.1.0", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0", - "natural-compare": "^1.4.0", - "pretty-format": "^28.1.0", - "semver": "^7.3.5" - } - }, - "jest-util": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", - "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", - "dev": true, - "requires": { - "@jest/types": "^28.1.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "jest-validate": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.0.tgz", - "integrity": "sha512-Lly7CJYih3vQBfjLeANGgBSBJ7pEa18cxpQfQEq2go2xyEzehnHfQTjoUia8xUv4x4J80XKFIDwJJThXtRFQXQ==", - "dev": true, - "requires": { - "@jest/types": "^28.1.0", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^28.0.2", - "leven": "^3.1.0", - "pretty-format": "^28.1.0" - } - }, - "jest-watcher": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.0.tgz", - "integrity": "sha512-tNHMtfLE8Njcr2IRS+5rXYA4BhU90gAOwI9frTGOqd+jX0P/Au/JfRSNqsf5nUTcWdbVYuLxS1KjnzILSoR5hA==", - "dev": true, - "requires": { - "@jest/test-result": "^28.1.0", - "@jest/types": "^28.1.0", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^28.1.0", - "string-length": "^4.0.1" - } - }, - "jest-worker": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.0.tgz", - "integrity": "sha512-ZHwM6mNwaWBR52Snff8ZvsCTqQsvhCxP/bT1I6T6DAnb6ygkshsyLQIMxFwHpYxht0HOoqt23JlC01viI7T03A==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - } - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "ts-jest": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.2.tgz", - "integrity": "sha512-IOZMb3D0gx6IHO9ywPgiQxJ3Zl4ECylEFwoVpENB55aTn5sdO0Ptyx/7noNBxAaUff708RqQL4XBNxxOVjY0vQ==", - "dev": true, - "requires": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^28.0.0", - "json5": "2.x", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "^20.x" - } - }, - "v8-to-istanbul": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", - "integrity": "sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.7", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - } - }, - "write-file-atomic": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz", - "integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - } - }, - "yargs": { - "version": "17.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz", - "integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "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.0.0" - }, - "dependencies": { - "yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", - "dev": true - } + "jest-matcher-utils": "^27.0.0", + "pretty-format": "^27.0.0" } } } @@ -11258,9 +10366,9 @@ } }, "@types/babel__traverse": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.14.2.tgz", - "integrity": "sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==", + "version": "7.17.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.17.1.tgz", + "integrity": "sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA==", "dev": true, "requires": { "@babel/types": "^7.3.0" @@ -11305,16 +10413,6 @@ "@types/istanbul-lib-report": "*" } }, - "@types/jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.1.tgz", - "integrity": "sha512-fUy7YRpT+rHXto1YlL+J9rs0uLGyiqVt3ZOTQR+4ROc47yNl8WLdVLgUloBRhOxP1PZvguHl44T3H0wAWxahYQ==", - "dev": true, - "requires": { - "jest-matcher-utils": "^27.0.0", - "pretty-format": "^27.0.0" - } - }, "@types/jsdom": { "version": "16.2.14", "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-16.2.14.tgz", @@ -11345,9 +10443,9 @@ "dev": true }, "@types/prettier": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.4.tgz", - "integrity": "sha512-ReVR2rLTV1kvtlWFyuot+d1pkpG2Fw/XKE3PDAdj57rbM97ttSp9JZ2UsP+2EHTylra9cUf6JA7tGwW1INzUrA==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.3.tgz", + "integrity": "sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==", "dev": true }, "@types/resolve": { @@ -11372,12 +10470,10 @@ "dev": true }, "@types/yargs": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", - "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", + "version": "17.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", + "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", "dev": true, - "optional": true, - "peer": true, "requires": { "@types/yargs-parser": "*" } @@ -11389,14 +10485,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.26.0.tgz", - "integrity": "sha512-oGCmo0PqnRZZndr+KwvvAUvD3kNE4AfyoGCwOZpoCncSh4MVD06JTE8XQa2u9u+NX5CsyZMBTEc2C72zx38eYA==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.1.tgz", + "integrity": "sha512-6dM5NKT57ZduNnJfpY81Phe9nc9wolnMCnknb1im6brWi1RYv84nbMS3olJa27B6+irUVV1X/Wb+Am0FjJdGFw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/type-utils": "5.26.0", - "@typescript-eslint/utils": "5.26.0", + "@typescript-eslint/scope-manager": "5.27.1", + "@typescript-eslint/type-utils": "5.27.1", + "@typescript-eslint/utils": "5.27.1", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -11406,52 +10502,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.26.0.tgz", - "integrity": "sha512-n/IzU87ttzIdnAH5vQ4BBDnLPly7rC5VnjN3m0xBG82HK6rhRxnCb3w/GyWbNDghPd+NktJqB/wl6+YkzZ5T5Q==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.27.1.tgz", + "integrity": "sha512-7Va2ZOkHi5NP+AZwb5ReLgNF6nWLGTeUJfxdkVUAPPSaAdbWNnFZzLZ4EGGmmiCTg+AwlbE1KyUYTBglosSLHQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/typescript-estree": "5.26.0", + "@typescript-eslint/scope-manager": "5.27.1", + "@typescript-eslint/types": "5.27.1", + "@typescript-eslint/typescript-estree": "5.27.1", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.26.0.tgz", - "integrity": "sha512-gVzTJUESuTwiju/7NiTb4c5oqod8xt5GhMbExKsCTp6adU3mya6AGJ4Pl9xC7x2DX9UYFsjImC0mA62BCY22Iw==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.27.1.tgz", + "integrity": "sha512-fQEOSa/QroWE6fAEg+bJxtRZJTH8NTskggybogHt4H9Da8zd4cJji76gA5SBlR0MgtwF7rebxTbDKB49YUCpAg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0" + "@typescript-eslint/types": "5.27.1", + "@typescript-eslint/visitor-keys": "5.27.1" } }, "@typescript-eslint/type-utils": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.26.0.tgz", - "integrity": "sha512-7ccbUVWGLmcRDSA1+ADkDBl5fP87EJt0fnijsMFTVHXKGduYMgienC/i3QwoVhDADUAPoytgjbZbCOMj4TY55A==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.27.1.tgz", + "integrity": "sha512-+UC1vVUWaDHRnC2cQrCJ4QtVjpjjCgjNFpg8b03nERmkHv9JV9X5M19D7UFMd+/G7T/sgFwX2pGmWK38rqyvXw==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.26.0", + "@typescript-eslint/utils": "5.27.1", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.26.0.tgz", - "integrity": "sha512-8794JZFE1RN4XaExLWLI2oSXsVImNkl79PzTOOWt9h0UHROwJedNOD2IJyfL0NbddFllcktGIO2aOu10avQQyA==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.27.1.tgz", + "integrity": "sha512-LgogNVkBhCTZU/m8XgEYIWICD6m4dmEDbKXESCbqOXfKZxRKeqpiJXQIErv66sdopRKZPo5l32ymNqibYEH/xg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.26.0.tgz", - "integrity": "sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.1.tgz", + "integrity": "sha512-DnZvvq3TAJ5ke+hk0LklvxwYsnXpRdqUY5gaVS0D4raKtbznPz71UJGnPTHEFo0GDxqLOLdMkkmVZjSpET1hFw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0", + "@typescript-eslint/types": "5.27.1", + "@typescript-eslint/visitor-keys": "5.27.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -11460,26 +10556,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.26.0.tgz", - "integrity": "sha512-PJFwcTq2Pt4AMOKfe3zQOdez6InIDOjUJJD3v3LyEtxHGVVRK3Vo7Dd923t/4M9hSH2q2CLvcTdxlLPjcIk3eg==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.27.1.tgz", + "integrity": "sha512-mZ9WEn1ZLDaVrhRaYgzbkXBkTPghPFsup8zDbbsYTxC5OmqrFE7skkKS/sraVsLP3TcT3Ki5CSyEFBRkLH/H/w==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/typescript-estree": "5.26.0", + "@typescript-eslint/scope-manager": "5.27.1", + "@typescript-eslint/types": "5.27.1", + "@typescript-eslint/typescript-estree": "5.27.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.26.0.tgz", - "integrity": "sha512-wei+ffqHanYDOQgg/fS6Hcar6wAWv0CUPQ3TZzOWd2BLfgP539rb49bwua8WRAs7R6kOSLn82rfEu2ro6Llt8Q==", + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.1.tgz", + "integrity": "sha512-xYs6ffo01nhdJgPieyk7HAOpjhTsx7r/oB9LWEhwAXgwn33tkr+W8DI2ChboqhZlC4q3TC6geDYPoiX8ROqyOQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/types": "5.27.1", "eslint-visitor-keys": "^3.3.0" } }, @@ -11687,12 +10783,27 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, - "babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "requires": { + "babel-jest": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.0.tgz", + "integrity": "sha512-zNKk0yhDZ6QUwfxh9k07GII6siNGMJWVUU49gmFj5gfdqDKLqa2RArXOF2CODp4Dr7dLxN2cvAV+667dGJ4b4w==", + "dev": true, + "requires": { + "@jest/transform": "^28.1.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^28.0.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + } + }, + "babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "requires": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", "@istanbuljs/schema": "^0.1.2", @@ -11700,6 +10811,18 @@ "test-exclude": "^6.0.0" } }, + "babel-plugin-jest-hoist": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.0.2.tgz", + "integrity": "sha512-Kizhn/ZL+68ZQHxSnHyuvJv8IchXD62KQxV77TBDV/xoBFBOfgRAk97GNs6hXdTTCiVES9nB2I6+7MXXrk5llQ==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + } + }, "babel-preset-current-node-syntax": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", @@ -11720,6 +10843,16 @@ "@babel/plugin-syntax-top-level-await": "^7.8.3" } }, + "babel-preset-jest": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.0.2.tgz", + "integrity": "sha512-sYzXIdgIXXroJTFeB3S6sNDWtlJ2dllCdTEsnZ65ACrMojj3hVNFRmnJ1HZtomGi+Be7aqpY/HJ92fr8OhKVkQ==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^28.0.2", + "babel-preset-current-node-syntax": "^1.0.0" + } + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -11825,9 +10958,9 @@ "dev": true }, "cacache": { - "version": "16.0.7", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.0.7.tgz", - "integrity": "sha512-a4zfQpp5vm4Ipdvbj+ZrPonikRhm6WBEd4zT1Yc1DXsmAxrPgDwWBLF/u/wTVXSFPIgOJ1U3ghSa2Xm4s3h28w==", + "version": "16.1.1", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.1.tgz", + "integrity": "sha512-VDKN+LHyCQXaaYZ7rA/qtkURU+/yYhviUdvqEv2LT6QPZU8jpyzEkEVAcKlKLt5dJ5BRp11ym8lo3NKLluEPLg==", "dev": true, "requires": { "@npmcli/fs": "^2.1.0", @@ -12016,7 +11149,7 @@ "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true }, "collect-v8-coverage": { @@ -12062,9 +11195,9 @@ } }, "commander": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.2.0.tgz", - "integrity": "sha512-e2i4wANQiSXgnrBlIatyHtP1odfUp0BbV5Y5nEGbxtIrStkEOAAzCUirvLBNXHLr7kwLvJl6V+4V3XV9x7Wd9w==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.3.0.tgz", + "integrity": "sha512-hv95iU5uXPbK83mjrJKuZyFM/LBAoCV/XhVGkS5Je6tl7sxr6A0ITMw5WoRV46/UaJ46Nllm3Xt7IaJhXTIkzw==", "dev": true }, "commondir": { @@ -12137,7 +11270,7 @@ "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "dev": true }, "content-disposition": { @@ -12264,7 +11397,7 @@ "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", "dev": true }, "deep-extend": { @@ -12300,13 +11433,13 @@ "delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", "dev": true }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", "dev": true }, "detect-newline": { @@ -12369,6 +11502,12 @@ "integrity": "sha512-Z7Jkc4+ouEg8F6RrrgLOs0kkJjI0cnyFQmnGVpln8pPifuKBNbUr37GMgJsCTSwy6Z9TK7oTwW33Oe+3aERYew==", "dev": true }, + "emittery": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", + "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "dev": true + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -12494,9 +11633,9 @@ } }, "eslint": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.16.0.tgz", - "integrity": "sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.17.0.tgz", + "integrity": "sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0", @@ -12762,9 +11901,84 @@ "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true }, + "expect": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.0.tgz", + "integrity": "sha512-qFXKl8Pmxk8TBGfaFKRtcQjfXEnKAs+dmlxdwvukJZorwrAabT7M3h8oLOG01I2utEhkmUTi17CHaPBovZsKdw==", + "dev": true, + "requires": { + "@jest/expect-utils": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "diff-sequences": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", + "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "dev": true + }, + "jest-diff": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", + "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^28.0.2", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + } + }, + "jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true + }, + "jest-matcher-utils": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", + "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + } + }, + "pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + } + } + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -13111,7 +12325,7 @@ "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", "dev": true }, "has-yarn": { @@ -13188,7 +12402,7 @@ "humanize-ms": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", "dev": true, "requires": { "ms": "^2.0.0" @@ -13293,7 +12507,7 @@ "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, "is-builtin-module": { @@ -13369,7 +12583,7 @@ "is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", - "integrity": "sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU=", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", "dev": true }, "is-module": { @@ -13457,9 +12671,9 @@ "dev": true }, "istanbul-lib-instrument": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz", - "integrity": "sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", + "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", "dev": true, "requires": { "@babel/core": "^7.12.3", @@ -13488,187 +12702,788 @@ "supports-color": "^7.1.0" } }, - "istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + } + }, + "istanbul-reports": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", + "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jest": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.0.tgz", + "integrity": "sha512-TZR+tHxopPhzw3c3560IJXZWLNHgpcz1Zh0w5A65vynLGNcg/5pZ+VildAd7+XGOu6jd58XMY/HNn0IkZIXVXg==", + "dev": true, + "requires": { + "@jest/core": "^28.1.0", + "import-local": "^3.0.2", + "jest-cli": "^28.1.0" + } + }, + "jest-changed-files": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-28.0.2.tgz", + "integrity": "sha512-QX9u+5I2s54ZnGoMEjiM2WeBvJR2J7w/8ZUmH2um/WLAuGAYFQcsVXY9+1YL6k0H/AGUdH8pXUAv6erDqEsvIA==", + "dev": true, + "requires": { + "execa": "^5.0.0", + "throat": "^6.0.1" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + } + } + }, + "jest-circus": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.0.tgz", + "integrity": "sha512-rNYfqfLC0L0zQKRKsg4n4J+W1A2fbyGH7Ss/kDIocp9KXD9iaL111glsLu7+Z7FHuZxwzInMDXq+N1ZIBkI/TQ==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.0", + "@jest/expect": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^28.1.0", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-runtime": "^28.1.0", + "jest-snapshot": "^28.1.0", + "jest-util": "^28.1.0", + "pretty-format": "^28.1.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3", + "throat": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "diff-sequences": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", + "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "dev": true + }, + "jest-diff": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", + "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^28.0.2", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + } + }, + "jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true + }, + "jest-matcher-utils": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", + "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + } + }, + "pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + } + } + }, + "jest-cli": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.0.tgz", + "integrity": "sha512-fDJRt6WPRriHrBsvvgb93OxgajHHsJbk4jZxiPqmZbMDRcHskfJBBfTyjFko0jjfprP544hOktdSi9HVgl4VUQ==", + "dev": true, + "requires": { + "@jest/core": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/types": "^28.1.0", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^28.1.0", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + } + }, + "jest-config": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.0.tgz", + "integrity": "sha512-aOV80E9LeWrmflp7hfZNn/zGA4QKv/xsn2w8QCBP0t0+YqObuCWTSgNbHJ0j9YsTuCO08ZR/wsvlxqqHX20iUA==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^28.1.0", + "@jest/types": "^28.1.0", + "babel-jest": "^28.1.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^28.1.0", + "jest-environment-node": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.0", + "jest-runner": "^28.1.0", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^28.1.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "ci-info": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", + "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", + "dev": true + }, + "jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true + }, + "pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + } + } + }, + "jest-diff": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", + "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" + } + }, + "jest-docblock": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.0.2.tgz", + "integrity": "sha512-FH10WWw5NxLoeSdQlJwu+MTiv60aXV/t8KEwIRGEv74WARE1cXIqh1vGdy2CraHuWOOrnzTWj/azQKqW4fO7xg==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.0.tgz", + "integrity": "sha512-a/XX02xF5NTspceMpHujmOexvJ4GftpYXqr6HhhmKmExtMXsyIN/fvanQlt/BcgFoRKN4OCXxLQKth9/n6OPFg==", + "dev": true, + "requires": { + "@jest/types": "^28.1.0", + "chalk": "^4.0.0", + "jest-get-type": "^28.0.2", + "jest-util": "^28.1.0", + "pretty-format": "^28.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true + }, + "pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + } + } + }, + "jest-environment-jsdom": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.0.tgz", + "integrity": "sha512-8n6P4xiDjNVqTWv6W6vJPuQdLx+ZiA3dbYg7YJ+DPzR+9B61K6pMVJrSs2IxfGRG4J7pyAUA5shQ9G0KEun78w==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.0", + "@jest/fake-timers": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/jsdom": "^16.2.4", + "@types/node": "*", + "jest-mock": "^28.1.0", + "jest-util": "^28.1.0", + "jsdom": "^19.0.0" + } + }, + "jest-environment-node": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.0.tgz", + "integrity": "sha512-gBLZNiyrPw9CSMlTXF1yJhaBgWDPVvH0Pq6bOEwGMXaYNzhzhw2kA/OijNF8egbCgDS0/veRv97249x2CX+udQ==", + "dev": true, + "requires": { + "@jest/environment": "^28.1.0", + "@jest/fake-timers": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "jest-mock": "^28.1.0", + "jest-util": "^28.1.0" + } + }, + "jest-get-type": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", + "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", + "dev": true + }, + "jest-haste-map": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.0.tgz", + "integrity": "sha512-xyZ9sXV8PtKi6NCrJlmq53PyNVHzxmcfXNVvIRHpHmh1j/HChC4pwKgyjj7Z9us19JMw8PpQTJsFWOsIfT93Dw==", + "dev": true, + "requires": { + "@jest/types": "^28.1.0", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^28.0.2", + "jest-util": "^28.1.0", + "jest-worker": "^28.1.0", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + } + }, + "jest-leak-detector": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.0.tgz", + "integrity": "sha512-uIJDQbxwEL2AMMs2xjhZl2hw8s77c3wrPaQ9v6tXJLGaaQ+4QrNJH5vuw7hA7w/uGT/iJ42a83opAqxGHeyRIA==", + "dev": true, + "requires": { + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true + }, + "pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + } + } + }, + "jest-matcher-utils": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", + "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" + } + }, + "jest-message-util": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.0.tgz", + "integrity": "sha512-RpA8mpaJ/B2HphDMiDlrAZdDytkmwFqgjDZovM21F35lHGeUeCvYmm6W+sbQ0ydaLpg5bFAUuWG1cjqOl8vqrw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^28.1.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^28.1.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + } + } + }, + "jest-mock": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.0.tgz", + "integrity": "sha512-H7BrhggNn77WhdL7O1apG0Q/iwl0Bdd5E1ydhCJzL3oBLh/UYxAwR3EJLsBZ9XA3ZU4PA3UNw4tQjduBTCTmLw==", + "dev": true, + "requires": { + "@jest/types": "^28.1.0", + "@types/node": "*" + } + }, + "jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "dev": true, + "requires": {} + }, + "jest-regex-util": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-28.0.2.tgz", + "integrity": "sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw==", + "dev": true + }, + "jest-resolve": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.0.tgz", + "integrity": "sha512-vvfN7+tPNnnhDvISuzD1P+CRVP8cK0FHXRwPAcdDaQv4zgvwvag2n55/h5VjYcM5UJG7L4TwE5tZlzcI0X2Lhw==", "dev": true, "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^28.1.0", + "jest-validate": "^28.1.0", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" } }, - "istanbul-reports": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", - "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", + "jest-resolve-dependencies": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.0.tgz", + "integrity": "sha512-Ue1VYoSZquPwEvng7Uefw8RmZR+me/1kr30H2jMINjGeHgeO/JgrR6wxj2ofkJ7KSAA11W3cOrhNCbj5Dqqd9g==", "dev": true, "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" + "jest-regex-util": "^28.0.2", + "jest-snapshot": "^28.1.0" } }, - "jest-diff": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", - "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", + "jest-runner": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.0.tgz", + "integrity": "sha512-FBpmuh1HB2dsLklAlRdOxNTTHKFR6G1Qmd80pVDvwbZXTriqjWqjei5DKFC1UlM732KjYcE6yuCdiF0WUCOS2w==", "dev": true, "requires": { + "@jest/console": "^28.1.0", + "@jest/environment": "^28.1.0", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "emittery": "^0.10.2", + "graceful-fs": "^4.2.9", + "jest-docblock": "^28.0.2", + "jest-environment-node": "^28.1.0", + "jest-haste-map": "^28.1.0", + "jest-leak-detector": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-resolve": "^28.1.0", + "jest-runtime": "^28.1.0", + "jest-util": "^28.1.0", + "jest-watcher": "^28.1.0", + "jest-worker": "^28.1.0", + "source-map-support": "0.5.13", + "throat": "^6.0.1" + }, + "dependencies": { + "source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + } } }, - "jest-environment-jsdom": { + "jest-runtime": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.0.tgz", - "integrity": "sha512-8n6P4xiDjNVqTWv6W6vJPuQdLx+ZiA3dbYg7YJ+DPzR+9B61K6pMVJrSs2IxfGRG4J7pyAUA5shQ9G0KEun78w==", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.0.tgz", + "integrity": "sha512-wNYDiwhdH/TV3agaIyVF0lsJ33MhyujOe+lNTUiolqKt8pchy1Hq4+tDMGbtD5P/oNLA3zYrpx73T9dMTOCAcg==", "dev": true, "requires": { "@jest/environment": "^28.1.0", "@jest/fake-timers": "^28.1.0", + "@jest/globals": "^28.1.0", + "@jest/source-map": "^28.0.2", + "@jest/test-result": "^28.1.0", + "@jest/transform": "^28.1.0", "@jest/types": "^28.1.0", - "@types/jsdom": "^16.2.4", - "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "execa": "^5.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^28.1.0", + "jest-message-util": "^28.1.0", "jest-mock": "^28.1.0", + "jest-regex-util": "^28.0.2", + "jest-resolve": "^28.1.0", + "jest-snapshot": "^28.1.0", "jest-util": "^28.1.0", - "jsdom": "^19.0.0" + "slash": "^3.0.0", + "strip-bom": "^4.0.0" }, "dependencies": { - "@jest/types": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, - "@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "requires": { - "@types/yargs-parser": "*" + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" } }, - "ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true }, - "jest-util": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", - "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "requires": { - "@jest/types": "^28.1.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" + "path-key": "^3.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true } } }, - "jest-get-type": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", - "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", - "dev": true - }, - "jest-haste-map": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", - "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", - "dev": true, - "optional": true, - "peer": true, - "requires": { - "@jest/types": "^27.5.1", - "@types/graceful-fs": "^4.1.2", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "fsevents": "^2.3.2", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^27.5.1", - "jest-serializer": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "micromatch": "^4.0.4", - "walker": "^1.0.7" - } - }, - "jest-matcher-utils": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", - "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - } - }, - "jest-message-util": { + "jest-snapshot": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.0.tgz", - "integrity": "sha512-RpA8mpaJ/B2HphDMiDlrAZdDytkmwFqgjDZovM21F35lHGeUeCvYmm6W+sbQ0ydaLpg5bFAUuWG1cjqOl8vqrw==", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.0.tgz", + "integrity": "sha512-ex49M2ZrZsUyQLpLGxQtDbahvgBjlLPgklkqGM0hq/F7W/f8DyqZxVHjdy19QKBm4O93eDp+H5S23EiTbbUmHw==", "dev": true, "requires": { - "@babel/code-frame": "^7.12.13", + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^28.1.0", + "@jest/transform": "^28.1.0", "@jest/types": "^28.1.0", - "@types/stack-utils": "^2.0.0", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", + "expect": "^28.1.0", "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "jest-haste-map": "^28.1.0", + "jest-matcher-utils": "^28.1.0", + "jest-message-util": "^28.1.0", + "jest-util": "^28.1.0", + "natural-compare": "^1.4.0", "pretty-format": "^28.1.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "semver": "^7.3.5" }, "dependencies": { - "@jest/types": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "diff-sequences": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", + "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "dev": true + }, + "jest-diff": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", + "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", "dev": true, "requires": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "chalk": "^4.0.0", + "diff-sequences": "^28.0.2", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" } }, - "@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", + "jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true + }, + "jest-matcher-utils": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", + "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", "dev": true, "requires": { - "@types/yargs-parser": "*" + "chalk": "^4.0.0", + "jest-diff": "^28.1.0", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.0" } }, - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, "pretty-format": { "version": "28.1.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", @@ -13689,97 +13504,13 @@ } } }, - "jest-mock": { + "jest-util": { "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.0.tgz", - "integrity": "sha512-H7BrhggNn77WhdL7O1apG0Q/iwl0Bdd5E1ydhCJzL3oBLh/UYxAwR3EJLsBZ9XA3ZU4PA3UNw4tQjduBTCTmLw==", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", + "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", "dev": true, "requires": { "@jest/types": "^28.1.0", - "@types/node": "*" - }, - "dependencies": { - "@jest/types": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "@types/yargs": { - "version": "17.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.10.tgz", - "integrity": "sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - } - } - }, - "jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "requires": {} - }, - "jest-regex-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", - "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", - "dev": true, - "optional": true, - "peer": true - }, - "jest-resolve": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", - "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", - "dev": true, - "optional": true, - "peer": true, - "requires": { - "@jest/types": "^27.5.1", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - } - }, - "jest-serializer": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", - "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", - "dev": true, - "optional": true, - "peer": true, - "requires": { - "@types/node": "*", - "graceful-fs": "^4.2.9" - } - }, - "jest-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", - "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", - "dev": true, - "optional": true, - "peer": true, - "requires": { - "@jest/types": "^27.5.1", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -13788,38 +13519,80 @@ }, "dependencies": { "ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true, - "optional": true, - "peer": true + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", + "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", + "dev": true } } }, "jest-validate": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", - "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.0.tgz", + "integrity": "sha512-Lly7CJYih3vQBfjLeANGgBSBJ7pEa18cxpQfQEq2go2xyEzehnHfQTjoUia8xUv4x4J80XKFIDwJJThXtRFQXQ==", "dev": true, - "optional": true, - "peer": true, "requires": { - "@jest/types": "^27.5.1", + "@jest/types": "^28.1.0", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", + "jest-get-type": "^28.0.2", "leven": "^3.1.0", - "pretty-format": "^27.5.1" + "pretty-format": "^28.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "jest-get-type": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", + "dev": true + }, + "pretty-format": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", + "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "dev": true, + "requires": { + "@jest/schemas": "^28.0.2", + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "react-is": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", + "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", + "dev": true + } + } + }, + "jest-watcher": { + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.0.tgz", + "integrity": "sha512-tNHMtfLE8Njcr2IRS+5rXYA4BhU90gAOwI9frTGOqd+jX0P/Au/JfRSNqsf5nUTcWdbVYuLxS1KjnzILSoR5hA==", + "dev": true, + "requires": { + "@jest/test-result": "^28.1.0", + "@jest/types": "^28.1.0", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.10.2", + "jest-util": "^28.1.0", + "string-length": "^4.0.1" } }, "jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.0.tgz", + "integrity": "sha512-ZHwM6mNwaWBR52Snff8ZvsCTqQsvhCxP/bT1I6T6DAnb6ygkshsyLQIMxFwHpYxht0HOoqt23JlC01viI7T03A==", "dev": true, - "optional": true, - "peer": true, "requires": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -13831,8 +13604,6 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "optional": true, - "peer": true, "requires": { "has-flag": "^4.0.0" } @@ -13955,7 +13726,7 @@ "jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", "dev": true }, "keyv": { @@ -14085,34 +13856,100 @@ "dev": true }, "make-fetch-happen": { - "version": "10.1.3", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.1.3.tgz", - "integrity": "sha512-s/UjmGjUHn9m52cctFhN2ITObbT+axoUhgeir8xGrOlPbKDyJsdhQzb8PGncPQQ28uduHybFJ6Iumy2OZnreXw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", + "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", "dev": true, "requires": { - "agentkeepalive": "^4.2.1", - "cacache": "^16.0.2", + "agentkeepalive": "^4.1.3", + "cacache": "^15.2.0", "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", + "http-proxy-agent": "^4.0.1", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", + "lru-cache": "^6.0.0", + "minipass": "^3.1.3", "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", + "minipass-fetch": "^1.3.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", + "negotiator": "^0.6.2", "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.1.1", - "ssri": "^9.0.0" + "socks-proxy-agent": "^6.0.0", + "ssri": "^8.0.0" }, "dependencies": { - "lru-cache": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.10.1.tgz", - "integrity": "sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A==", + "@npmcli/fs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", + "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", + "dev": true, + "requires": { + "@gar/promisify": "^1.0.1", + "semver": "^7.3.5" + } + }, + "@npmcli/move-file": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "dev": true, + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + } + }, + "@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true + }, + "cacache": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", + "dev": true, + "requires": { + "@npmcli/fs": "^1.0.0", + "@npmcli/move-file": "^1.0.1", + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" + } + }, + "http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "requires": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + } + }, + "ssri": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "dev": true, + "requires": { + "minipass": "^3.1.1" + } } } }, @@ -14126,9 +13963,9 @@ } }, "marked": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.12.tgz", - "integrity": "sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==", + "version": "4.0.16", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.16.tgz", + "integrity": "sha512-wahonIQ5Jnyatt2fn8KqF/nIqZM8mh3oRu2+l5EANGMhu6RFjiSG52QNE2eWzFMI94HqYSgN184NurgNG6CztA==", "dev": true }, "merge-stream": { @@ -14181,9 +14018,9 @@ "dev": true }, "minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -14214,15 +14051,15 @@ } }, "minipass-fetch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.0.tgz", - "integrity": "sha512-H9U4UVBGXEyyWJnqYDCLp1PwD8XIkJ4akNHp1aGVI+2Ym7wQMlxDKi4IB4JbmyU+pl9pEs/cVrK6cOuvmbK4Sg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", + "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", "dev": true, "requires": { - "encoding": "^0.1.13", - "minipass": "^3.1.6", + "encoding": "^0.1.12", + "minipass": "^3.1.0", "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" + "minizlib": "^2.0.0" } }, "minipass-flush": { @@ -14303,15 +14140,15 @@ "dev": true }, "node-gyp": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.0.0.tgz", - "integrity": "sha512-Ma6p4s+XCTPxCuAMrOA/IJRmVy16R8Sdhtwl4PrCr7IBlj4cPawF0vg/l7nOT1jPbuNS7lIRJpBSvVsXwEZuzw==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", + "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", "dev": true, "requires": { "env-paths": "^2.2.0", "glob": "^7.1.4", "graceful-fs": "^4.2.6", - "make-fetch-happen": "^10.0.3", + "make-fetch-happen": "^9.1.0", "nopt": "^5.0.0", "npmlog": "^6.0.0", "rimraf": "^3.0.2", @@ -14323,7 +14160,7 @@ "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, "node-releases": { @@ -14375,15 +14212,15 @@ } }, "npm-check-updates": { - "version": "13.0.3", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.0.3.tgz", - "integrity": "sha512-a8CVklJjXZhmN5Kup8rKiejArobCbOaMnubhvM/LkYVumO17dBuWuaHUuiSrYglQUb88lGSdbNNfHDNN7b+3pQ==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.1.1.tgz", + "integrity": "sha512-f4gLbUJJh5qvkNvrSG3b05y3ZvyZ4Sl3Uk95DSyCjIWwpwmAwzU9dMCA/Gg2AmIKqkH4ml6X9kxcZsu+tAd94g==", "dev": true, "requires": { "chalk": "^4.1.2", "cint": "^8.2.1", "cli-table": "^0.3.11", - "commander": "^9.2.0", + "commander": "^9.3.0", "fast-memoize": "^2.5.2", "find-up": "5.0.0", "fp-and-or": "^0.1.3", @@ -14393,9 +14230,9 @@ "json-parse-helpfulerror": "^1.0.3", "jsonlines": "^0.1.1", "lodash": "^4.17.21", - "minimatch": "^5.0.1", + "minimatch": "^5.1.0", "p-map": "^4.0.0", - "pacote": "^13.3.0", + "pacote": "^13.5.0", "parse-github-url": "^1.0.2", "progress": "^2.0.3", "prompts": "^2.4.2", @@ -14407,7 +14244,7 @@ "source-map-support": "^0.5.21", "spawn-please": "^1.0.0", "update-notifier": "^5.1.0", - "yaml": "^2.1.0" + "yaml": "^2.1.1" } }, "npm-install-checks": { @@ -14437,9 +14274,9 @@ } }, "npm-packlist": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.0.3.tgz", - "integrity": "sha512-KuSbzgejxdsAWbNNyEs8EsyDHsO+nJF6k+9WuWzFbSNh5tFHs4lDApXw7kntKpuehfp8lKRzJkMtz0+WmGvTIw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.0.tgz", + "integrity": "sha512-a04sqF6FbkyOAFA19AA0e94gS7Et5T2/IMj3VOT9nOF2RaRdVPQ1Q17Fb/HaDRFs+gbC7HOmhVZ29adpWgmDZg==", "dev": true, "requires": { "glob": "^8.0.1", @@ -14488,6 +14325,61 @@ "minizlib": "^2.1.2", "npm-package-arg": "^9.0.1", "proc-log": "^2.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.10.1.tgz", + "integrity": "sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A==", + "dev": true + }, + "make-fetch-happen": { + "version": "10.1.7", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.1.7.tgz", + "integrity": "sha512-J/2xa2+7zlIUKqfyXDCXFpH3ypxO4k3rgkZHPSZkyUYcBT/hM80M3oyKLM/9dVriZFiGeGGS2Ei+0v2zfhqj3Q==", + "dev": true, + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + } + }, + "minipass-fetch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.0.tgz", + "integrity": "sha512-H9U4UVBGXEyyWJnqYDCLp1PwD8XIkJ4akNHp1aGVI+2Ym7wQMlxDKi4IB4JbmyU+pl9pEs/cVrK6cOuvmbK4Sg==", + "dev": true, + "requires": { + "encoding": "^0.1.13", + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + } + }, + "socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dev": true, + "requires": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + } + } } }, "npm-run-path": { @@ -14639,9 +14531,9 @@ } }, "pacote": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.3.0.tgz", - "integrity": "sha512-auhJAUlfC2TALo6I0s1vFoPvVFgWGx+uz/PnIojTTgkGwlK3Np8sGJ0ghfFhiuzJXTZoTycMLk8uLskdntPbDw==", + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.6.0.tgz", + "integrity": "sha512-zHmuCwG4+QKnj47LFlW3LmArwKoglx2k5xtADiMCivVWPgNRP5QyLDGOIjGjwOe61lhl1rO63m/VxT16pEHLWg==", "dev": true, "requires": { "@npmcli/git": "^3.0.0", @@ -14655,7 +14547,7 @@ "minipass": "^3.1.6", "mkdirp": "^1.0.4", "npm-package-arg": "^9.0.0", - "npm-packlist": "^5.0.0", + "npm-packlist": "^5.1.0", "npm-pick-manifest": "^7.0.0", "npm-registry-fetch": "^13.0.1", "proc-log": "^2.0.0", @@ -14869,7 +14761,7 @@ "promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", "dev": true }, "promise-retry": { @@ -15136,9 +15028,9 @@ } }, "rollup": { - "version": "2.74.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.74.1.tgz", - "integrity": "sha512-K2zW7kV8Voua5eGkbnBtWYfMIhYhT9Pel2uhBk2WO5eMee161nPze/XRfvEQPFYz7KgrCCnmh2Wy0AMFLGGmMA==", + "version": "2.75.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.5.tgz", + "integrity": "sha512-JzNlJZDison3o2mOxVmb44Oz7t74EfSd1SQrplQk0wSaXV7uLQXtVdHbxlcT3w+8tZ1TL4r/eLfc7nAbz38BBA==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -15428,9 +15320,9 @@ } }, "socks-proxy-agent": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.0.tgz", - "integrity": "sha512-wWqJhjb32Q6GsrUqzuFkukxb/zzide5quXYcMVpIjxalDBBYy2nqKCFQ/9+Ie4dvOYSQdOk3hUlZSdzZOd3zMQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz", + "integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==", "dev": true, "requires": { "agent-base": "^6.0.2", @@ -15505,9 +15397,9 @@ "dev": true }, "ssri": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.0.tgz", - "integrity": "sha512-Y1Z6J8UYnexKFN1R/hxUaYoY2LVdKEzziPmVAFKiKX8fiwvCJTVzn/xYE9TEWod5OVyNfIHHuVfIEuBClL/uJQ==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", "dev": true, "requires": { "minipass": "^3.1.1" @@ -15789,6 +15681,22 @@ } } }, + "ts-jest": { + "version": "28.0.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.4.tgz", + "integrity": "sha512-S6uRDDdCJBvnZqyGjB4VCnwbQrbgdL8WPeP4jevVSpYsBaeGRQAIS08o3Svav2Ex+oXwLgJ/m7F24TNq62kA1A==", + "dev": true, + "requires": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^28.0.0", + "json5": "^2.2.1", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "^20.x" + } + }, "tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", @@ -15844,22 +15752,37 @@ } }, "typedoc": { - "version": "0.22.15", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.15.tgz", - "integrity": "sha512-CMd1lrqQbFvbx6S9G6fL4HKp3GoIuhujJReWqlIvSb2T26vGai+8Os3Mde7Pn832pXYemd9BMuuYWhFpL5st0Q==", + "version": "0.22.17", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.17.tgz", + "integrity": "sha512-h6+uXHVVCPDaANzjwzdsj9aePBjZiBTpiMpBBeyh1zcN2odVsDCNajz8zyKnixF93HJeGpl34j/70yoEE5BfNg==", "dev": true, "requires": { - "glob": "^7.2.0", + "glob": "^8.0.3", "lunr": "^2.3.9", - "marked": "^4.0.12", - "minimatch": "^5.0.1", + "marked": "^4.0.16", + "minimatch": "^5.1.0", "shiki": "^0.10.1" + }, + "dependencies": { + "glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + } } }, "typescript": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", - "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.3.tgz", + "integrity": "sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA==", "dev": true }, "unique-filename": { @@ -15965,6 +15888,17 @@ "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, + "v8-to-istanbul": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", + "integrity": "sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.7", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + } + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -16160,11 +16094,34 @@ "dev": true }, "yaml": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.0.tgz", - "integrity": "sha512-OuAINfTsoJrY5H7CBWnKZhX6nZciXBydrMtTHr1dC4nP40X5jyTIVlogZHxSlVZM8zSgXRfgZGsaHF4+pV+JRw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", + "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==", "dev": true }, + "yargs": { + "version": "17.5.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", + "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "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.0.0" + }, + "dependencies": { + "yargs-parser": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", + "dev": true + } + } + }, "yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", diff --git a/package.json b/package.json index 4d492c69..9aa550aa 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ "dist" ], "devDependencies": { - "npm-check-updates": "^13.0.3", + "npm-check-updates": "^13.1.1", "serve": "^13.0.2", - "typedoc": "^0.22.15" + "typedoc": "^0.22.17" }, "resolutions": { "get-pkg-repo": "4.1.2" diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index 0113fe49..34dcd0bf 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -19,14 +19,14 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.26.0", - "@typescript-eslint/parser": "^5.26.0", - "eslint": "^8.16.0", + "@typescript-eslint/eslint-plugin": "^5.27.1", + "@typescript-eslint/parser": "^5.27.1", + "eslint": "^8.17.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", - "rollup": "^2.74.1", - "typescript": "^4.6.4" + "rollup": "^2.75.5", + "typescript": "^4.7.3" }, "dependencies": { "@sora/go-wasm": "^2021.1.0" diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 5d40466b..fbd0effc 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -12,19 +12,19 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.2", - "@types/jest": "^27.5.1", - "@typescript-eslint/eslint-plugin": "5.26.0", - "@typescript-eslint/parser": "5.26.0", - "eslint": "8.16.0", + "@types/jest": "^28.1.1", + "@typescript-eslint/eslint-plugin": "5.27.1", + "@typescript-eslint/parser": "5.27.1", + "eslint": "8.17.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", "prettier": "^2.6.2", - "rollup": "^2.74.1", + "rollup": "^2.75.5", "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^28.0.2", - "typescript": "^4.6.4" + "ts-jest": "^28.0.4", + "typescript": "^4.7.3" }, "dependencies": { "@sora/e2ee": "^2021.1.0", From 65f6a4a1b6ec3337c8c6646e90ef5f7c558d522e Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 7 Jun 2022 10:15:16 +0900 Subject: [PATCH 77/86] =?UTF-8?q?jest=20=E3=81=AE=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/sdk/jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/jest.config.js b/packages/sdk/jest.config.js index 72845d7b..fa169290 100644 --- a/packages/sdk/jest.config.js +++ b/packages/sdk/jest.config.js @@ -172,7 +172,7 @@ module.exports = { // A map from regular expressions to paths to transformers transform: { - "^.+\\.ts$": "/node_modules/ts-jest" + "^.+\\.ts$": "/../../node_modules/ts-jest" }, // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation From 63b5427802e6b0c6f0b7cd947f2de73d898455a6 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Thu, 9 Jun 2022 10:38:15 +0900 Subject: [PATCH 78/86] =?UTF-8?q?multistream=20=E3=81=AE=E3=82=B5=E3=83=B3?= =?UTF-8?q?=E3=83=97=E3=83=AB=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/index.html | 7 +- example/multistream_recvonly.html | 60 -------- example/multistream_sendrecv.html | 128 ------------------ example/recvonly.html | 62 +++++++++ ...ultistream_sendonly.html => sendonly.html} | 28 ++-- example/sendonly_recvonly.html | 71 ---------- example/sendrecv.html | 114 ++++++++++++++++ 7 files changed, 189 insertions(+), 281 deletions(-) delete mode 100644 example/multistream_recvonly.html delete mode 100644 example/multistream_sendrecv.html create mode 100644 example/recvonly.html rename example/{multistream_sendonly.html => sendonly.html} (62%) delete mode 100644 example/sendonly_recvonly.html create mode 100644 example/sendrecv.html diff --git a/example/index.html b/example/index.html index 36818304..5884f64f 100644 --- a/example/index.html +++ b/example/index.html @@ -6,10 +6,9 @@
    -
  • 配信/視聴サンプル
  • -
  • マルチストリーム配信視聴サンプル
  • -
  • マルチストリーム配信サンプル
  • -
  • マルチストリーム視聴サンプル
  • +
  • 配信視聴サンプル
  • +
  • 配信サンプル
  • +
  • 視聴サンプル
  • マルチストリームE2EE配信視聴サンプル
  • スポットライト配信視聴サンプル
  • スポットライト視聴サンプル
  • diff --git a/example/multistream_recvonly.html b/example/multistream_recvonly.html deleted file mode 100644 index 17a3fe69..00000000 --- a/example/multistream_recvonly.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - Multistream Recvonly test - - -
    -

    Multistream Recvonly test

    - -
    -
    -
    -
    -
    - - - - - diff --git a/example/multistream_sendrecv.html b/example/multistream_sendrecv.html deleted file mode 100644 index 57b69d82..00000000 --- a/example/multistream_sendrecv.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - Multistream Sendrecv test - - -
    -

    Multistream Sendrecv test

    -
    -
    -

    sendrecv1

    - -
    - -
    -
    -
    -

    sendrecv2

    - -
    - -
    -
    -
    -
    - - - - - diff --git a/example/recvonly.html b/example/recvonly.html new file mode 100644 index 00000000..2c651d6c --- /dev/null +++ b/example/recvonly.html @@ -0,0 +1,62 @@ + + + + Recvonly test + + +
    +

    Recvonly test

    + +
    +
    +
    +
    +
    + + + + + diff --git a/example/multistream_sendonly.html b/example/sendonly.html similarity index 62% rename from example/multistream_sendonly.html rename to example/sendonly.html index 58c61364..1b88462d 100644 --- a/example/multistream_sendonly.html +++ b/example/sendonly.html @@ -1,11 +1,11 @@ - Multistream Sendonly test + Sendonly test
    -

    Multistream Sendonly test

    +

    Sendonly test

    sendonly1

    @@ -24,23 +24,15 @@

    sendonly1

    } const sendonly = sora.sendonly(channelId, null, options); -document.querySelector('#start-sendonly').addEventListener('click', function() { - navigator.mediaDevices.getUserMedia({audio: true, video: true}) - .then(mediaStream => { - sendonly.connect(mediaStream) - .then(stream => { - document.querySelector('#sendonly-local-video').srcObject = stream; - }); - }) - .catch(e => { - console.error(e); - }); +document.querySelector('#start-sendonly').addEventListener('click', async () => { + const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true}); + await sendonly.connect(mediaStream) + document.querySelector('#sendonly-local-video').srcObject = mediaStream; }); -document.querySelector('#stop-sendonly').addEventListener('click', function() { - sendonly.disconnect() - .then(function() { - document.querySelector('#sendonly-local-video').srcObject = null; - }); + +document.querySelector('#stop-sendonly').addEventListener('click', async () => { + await sendonly.disconnect() + document.querySelector('#sendonly-local-video').srcObject = null; }); diff --git a/example/sendonly_recvonly.html b/example/sendonly_recvonly.html deleted file mode 100644 index 61b63be7..00000000 --- a/example/sendonly_recvonly.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - Sendonly / Recvonly test - - -
    -

    Sendonly / Recvonly test

    - -
    -
    -

    sendonly

    -

    - -
    -
    -

    recvonly1

    -

    - -
    -
    -

    recvonly2

    -

    - -
    -
    -
    - - - - - diff --git a/example/sendrecv.html b/example/sendrecv.html new file mode 100644 index 00000000..1616ec8b --- /dev/null +++ b/example/sendrecv.html @@ -0,0 +1,114 @@ + + + + Sendrecv test + + +
    +

    Sendrecv test

    +
    +
    +

    sendrecv1

    + +
    + +
    +
    +
    +

    sendrecv2

    + +
    + +
    +
    +
    +
    + + + + + From d80d8020e12d8f054ca95be02593835d81b01883 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Thu, 9 Jun 2022 11:14:56 +0900 Subject: [PATCH 79/86] =?UTF-8?q?E2EE=20=E3=81=AE=E3=82=B5=E3=83=B3?= =?UTF-8?q?=E3=83=97=E3=83=AB=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/e2ee.html | 99 ++++++++++++++++++++++++ example/index.html | 2 +- example/multistream_sendrecv_e2ee.html | 103 ------------------------- 3 files changed, 100 insertions(+), 104 deletions(-) create mode 100644 example/e2ee.html delete mode 100644 example/multistream_sendrecv_e2ee.html diff --git a/example/e2ee.html b/example/e2ee.html new file mode 100644 index 00000000..d7497462 --- /dev/null +++ b/example/e2ee.html @@ -0,0 +1,99 @@ + + + + E2EE test + + +
    +

    E2EE test

    +

    +
    +
    +

    local

    + +
    +

    +

    + + +

    remote

    +
    +
    +
    +
    + + + + + diff --git a/example/index.html b/example/index.html index 5884f64f..e6b2c38a 100644 --- a/example/index.html +++ b/example/index.html @@ -9,7 +9,7 @@
  • 配信視聴サンプル
  • 配信サンプル
  • 視聴サンプル
  • -
  • マルチストリームE2EE配信視聴サンプル
  • +
  • E2EE配信視聴サンプル
  • スポットライト配信視聴サンプル
  • スポットライト視聴サンプル
  • サイマルキャスト配信/視聴サンプル
  • diff --git a/example/multistream_sendrecv_e2ee.html b/example/multistream_sendrecv_e2ee.html deleted file mode 100644 index b8709699..00000000 --- a/example/multistream_sendrecv_e2ee.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - Multistream E2EE Sendrecv test - - -
    -

    Multistream E2EE Sendrecv test

    -
    -
    -

    local

    - -
    -

    -

    - - -

    remote

    -
    -
    -
    -
    - - - - - From 5b23a923cf76239d044e715857d0e377575dfd08 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Thu, 9 Jun 2022 11:51:11 +0900 Subject: [PATCH 80/86] =?UTF-8?q?=E3=82=B5=E3=82=A4=E3=83=9E=E3=83=AB?= =?UTF-8?q?=E3=82=AD=E3=83=A3=E3=82=B9=E3=83=88=E3=81=AE=E3=82=B5=E3=83=B3?= =?UTF-8?q?=E3=83=97=E3=83=AB=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/simulcast.html | 64 ++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 40 deletions(-) diff --git a/example/simulcast.html b/example/simulcast.html index 89aa9f83..347d40cc 100644 --- a/example/simulcast.html +++ b/example/simulcast.html @@ -30,50 +30,34 @@

    recvonly r2

    const channelId = 'Sora'; const debug = false; const sora = Sora.connection('ws://localhost:5000/signaling', debug); -const sendonly = sora.sendonly(channelId, null, { videoCodecType: 'VP8', videoBitRate: 3000, simulcast: true }); -const recvonlyR0 = sora.recvonly(channelId, null, { videoCodecType: 'VP8', simulcast: true, simulcastRid: 'r0' }); -const recvonlyR1 = sora.recvonly(channelId, null, { videoCodecType: 'VP8', simulcast: true, simulcastRid: 'r1' }); -const recvonlyR2 = sora.recvonly(channelId, null, { videoCodecType: 'VP8', simulcast: true, simulcastRid: 'r2' }); +const sendonly = sora.sendonly(channelId, null, { videoCodecType: 'VP8', videoBitRate: 3000, simulcast: true, multistream: true }); +const recvonlyR0 = sora.recvonly(channelId, null, { videoCodecType: 'VP8', simulcast: true, multistream: true, simulcastRid: 'r0' }); +recvonlyR0.on('track', (event) => { + document.querySelector('#remote-video-client-id-r0').textContent = '(' + recvonlyR0.clientId + ')'; + document.querySelector('#remote-video-r0').srcObject = event.streams[0]; +}); +const recvonlyR1 = sora.recvonly(channelId, null, { videoCodecType: 'VP8', simulcast: true, multistream: true, simulcastRid: 'r1' }); +recvonlyR1.on('track', (event) => { + document.querySelector('#remote-video-client-id-r1').textContent = '(' + recvonlyR0.clientId + ')'; + document.querySelector('#remote-video-r1').srcObject = event.streams[0]; +}); +const recvonlyR2 = sora.recvonly(channelId, null, { videoCodecType: 'VP8', simulcast: true, multistream: true, simulcastRid: 'r2' }); +recvonlyR2.on('track', (event) => { + document.querySelector('#remote-video-client-id-r2').textContent = '(' + recvonlyR0.clientId + ')'; + document.querySelector('#remote-video-r2').srcObject = event.streams[0]; +}); -document.querySelector('#start').addEventListener('click', function() { +document.querySelector('#start').addEventListener('click', async () => { // sendonly - navigator.mediaDevices.getUserMedia({audio: true, video: {width: {exact: 1280}, height: {exact: 720}}}) - .then(mediaStream => { - sendonly.connect(mediaStream) - .then(stream => { - document.querySelector('#local-video-client-id').textContent = '(' + sendonly.clientId + ')'; - document.querySelector('#local-video').srcObject = stream; - }); - }) - .catch(e => { - console.error(e); - }); + const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: {width: {exact: 1280}, height: {exact: 720}}}); + await sendonly.connect(mediaStream) + document.querySelector('#local-video-client-id').textContent = '(' + sendonly.clientId + ')'; + document.querySelector('#local-video').srcObject = mediaStream; // recvonly - recvonlyR0.connect() - .then(stream => { - document.querySelector('#remote-video-client-id-r0').textContent = '(' + recvonlyR0.clientId + ')'; - document.querySelector('#remote-video-r0').srcObject = stream; - }) - .catch(e => { - console.error(e); - }); - recvonlyR1.connect() - .then(stream => { - document.querySelector('#remote-video-client-id-r1').textContent = '(' + recvonlyR1.clientId + ')'; - document.querySelector('#remote-video-r1').srcObject = stream; - }) - .catch(e => { - console.error(e); - }); - recvonlyR2.connect() - .then(stream => { - document.querySelector('#remote-video-client-id-r2').textContent = '(' + recvonlyR2.clientId + ')'; - document.querySelector('#remote-video-r2').srcObject = stream; - }) - .catch(e => { - console.error(e); - }); + await recvonlyR0.connect(); + await recvonlyR1.connect(); + await recvonlyR2.connect(); }); From 6cc41b8b5251062700875afb19ab87b39f0979bc Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 14 Jun 2022 09:58:34 +0900 Subject: [PATCH 81/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 1596 ++++++++++++++++++------------------ package.json | 2 +- packages/e2ee/package.json | 8 +- packages/sdk/package.json | 14 +- 4 files changed, 807 insertions(+), 813 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5f88130e..393b7002 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "packages/sdk" ], "devDependencies": { - "npm-check-updates": "^13.1.1", + "npm-check-updates": "^13.1.5", "serve": "^13.0.2", "typedoc": "^0.22.17" } @@ -820,16 +820,16 @@ } }, "node_modules/@jest/console": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.0.tgz", - "integrity": "sha512-tscn3dlJFGay47kb4qVruQg/XWlmvU0xp3EJOjzzY+sBaI+YgwKcvAmTcyYU7xEiLLIY5HCdWRooAL8dqkFlDA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.1.tgz", + "integrity": "sha512-0RiUocPVFEm3WRMOStIHbRWllG6iW6E3/gUPnf4lkrVFyXIIDeCe+vlKeYyFOMhB2EPE6FLFCNADSOOQMaqvyA==", "dev": true, "dependencies": { - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1", "slash": "^3.0.0" }, "engines": { @@ -837,16 +837,16 @@ } }, "node_modules/@jest/core": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.0.tgz", - "integrity": "sha512-/2PTt0ywhjZ4NwNO4bUqD9IVJfmFVhVKGlhvSpmEfUCuxYf/3NHcKmRFI+I71lYzbTT3wMuYpETDCTHo81gC/g==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.1.tgz", + "integrity": "sha512-3pYsBoZZ42tXMdlcFeCc/0j9kOlK7MYuXs2B1QbvDgMoW1K9NJ4G/VYvIbMb26iqlkTfPHo7SC2JgjDOk/mxXw==", "dev": true, "dependencies": { - "@jest/console": "^28.1.0", - "@jest/reporters": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/console": "^28.1.1", + "@jest/reporters": "^28.1.1", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.1", + "@jest/types": "^28.1.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", @@ -854,20 +854,20 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.9", "jest-changed-files": "^28.0.2", - "jest-config": "^28.1.0", - "jest-haste-map": "^28.1.0", - "jest-message-util": "^28.1.0", + "jest-config": "^28.1.1", + "jest-haste-map": "^28.1.1", + "jest-message-util": "^28.1.1", "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.0", - "jest-resolve-dependencies": "^28.1.0", - "jest-runner": "^28.1.0", - "jest-runtime": "^28.1.0", - "jest-snapshot": "^28.1.0", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", - "jest-watcher": "^28.1.0", + "jest-resolve": "^28.1.1", + "jest-resolve-dependencies": "^28.1.1", + "jest-runner": "^28.1.1", + "jest-runtime": "^28.1.1", + "jest-snapshot": "^28.1.1", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", + "jest-watcher": "^28.1.1", "micromatch": "^4.0.4", - "pretty-format": "^28.1.0", + "pretty-format": "^28.1.1", "rimraf": "^3.0.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" @@ -903,9 +903,9 @@ "dev": true }, "node_modules/@jest/core/node_modules/pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "dependencies": { "@jest/schemas": "^28.0.2", @@ -924,37 +924,37 @@ "dev": true }, "node_modules/@jest/environment": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.0.tgz", - "integrity": "sha512-S44WGSxkRngzHslhV6RoAExekfF7Qhwa6R5+IYFa81mpcj0YgdBnRSmvHe3SNwOt64yXaE5GG8Y2xM28ii5ssA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.1.tgz", + "integrity": "sha512-9auVQ2GzQ7nrU+lAr8KyY838YahElTX9HVjbQPPS2XjlxQ+na18G113OoBhyBGBtD6ZnO/SrUy5WR8EzOj1/Uw==", "dev": true, "dependencies": { - "@jest/fake-timers": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/fake-timers": "^28.1.1", + "@jest/types": "^28.1.1", "@types/node": "*", - "jest-mock": "^28.1.0" + "jest-mock": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/@jest/expect": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.0.tgz", - "integrity": "sha512-be9ETznPLaHOmeJqzYNIXv1ADEzENuQonIoobzThOYPuK/6GhrWNIJDVTgBLCrz3Am73PyEU2urQClZp0hLTtA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.1.tgz", + "integrity": "sha512-/+tQprrFoT6lfkMj4mW/mUIfAmmk/+iQPmg7mLDIFOf2lyf7EBHaS+x3RbeR0VZVMe55IvX7QRoT/2aK3AuUXg==", "dev": true, "dependencies": { - "expect": "^28.1.0", - "jest-snapshot": "^28.1.0" + "expect": "^28.1.1", + "jest-snapshot": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.0.tgz", - "integrity": "sha512-5BrG48dpC0sB80wpeIX5FU6kolDJI4K0n5BM9a5V38MGx0pyRvUBSS0u2aNTdDzmOrCjhOg8pGs6a20ivYkdmw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.1.tgz", + "integrity": "sha512-n/ghlvdhCdMI/hTcnn4qV57kQuV9OTsZzH1TTCVARANKhl6hXJqLKUkwX69ftMGpsbpt96SsDD8n8LD2d9+FRw==", "dev": true, "dependencies": { "jest-get-type": "^28.0.2" @@ -973,47 +973,47 @@ } }, "node_modules/@jest/fake-timers": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.0.tgz", - "integrity": "sha512-Xqsf/6VLeAAq78+GNPzI7FZQRf5cCHj1qgQxCjws9n8rKw8r1UYoeaALwBvyuzOkpU3c1I6emeMySPa96rxtIg==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.1.tgz", + "integrity": "sha512-BY/3+TyLs5+q87rGWrGUY5f8e8uC3LsVHS9Diz8+FV3ARXL4sNnkLlIB8dvDvRrp+LUCGM+DLqlsYubizGUjIA==", "dev": true, "dependencies": { - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "@sinonjs/fake-timers": "^9.1.1", "@types/node": "*", - "jest-message-util": "^28.1.0", - "jest-mock": "^28.1.0", - "jest-util": "^28.1.0" + "jest-message-util": "^28.1.1", + "jest-mock": "^28.1.1", + "jest-util": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/@jest/globals": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.0.tgz", - "integrity": "sha512-3m7sTg52OTQR6dPhsEQSxAvU+LOBbMivZBwOvKEZ+Rb+GyxVnXi9HKgOTYkx/S99T8yvh17U4tNNJPIEQmtwYw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.1.tgz", + "integrity": "sha512-dEgl/6v7ToB4vXItdvcltJBgny0xBE6xy6IYQrPJAJggdEinGxCDMivNv7sFzPcTITGquXD6UJwYxfJ/5ZwDSg==", "dev": true, "dependencies": { - "@jest/environment": "^28.1.0", - "@jest/expect": "^28.1.0", - "@jest/types": "^28.1.0" + "@jest/environment": "^28.1.1", + "@jest/expect": "^28.1.1", + "@jest/types": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/@jest/reporters": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.0.tgz", - "integrity": "sha512-qxbFfqap/5QlSpIizH9c/bFCDKsQlM4uAKSOvZrP+nIdrjqre3FmKzpTtYyhsaVcOSNK7TTt2kjm+4BJIjysFA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.1.tgz", + "integrity": "sha512-597Zj4D4d88sZrzM4atEGLuO7SdA/YrOv9SRXHXRNC+/FwPCWxZhBAEzhXoiJzfRwn8zes/EjS8Lo6DouGN5Gg==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/console": "^28.1.1", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.1", + "@jest/types": "^28.1.1", "@jridgewell/trace-mapping": "^0.3.7", "@types/node": "*", "chalk": "^4.0.0", @@ -1026,8 +1026,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-util": "^28.1.0", - "jest-worker": "^28.1.0", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1", + "jest-worker": "^28.1.1", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -1073,13 +1074,13 @@ } }, "node_modules/@jest/test-result": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.0.tgz", - "integrity": "sha512-sBBFIyoPzrZho3N+80P35A5oAkSKlGfsEFfXFWuPGBsW40UAjCkGakZhn4UQK4iQlW2vgCDMRDOob9FGKV8YoQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.1.tgz", + "integrity": "sha512-hPmkugBktqL6rRzwWAtp1JtYT4VHwv8OQ+9lE5Gymj6dHzubI/oJHMUpPOt8NrdVWSrz9S7bHjJUmv2ggFoUNQ==", "dev": true, "dependencies": { - "@jest/console": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/console": "^28.1.1", + "@jest/types": "^28.1.1", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -1088,14 +1089,14 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.0.tgz", - "integrity": "sha512-tZCEiVWlWNTs/2iK9yi6o3AlMfbbYgV4uuZInSVdzZ7ftpHZhCMuhvk2HLYhCZzLgPFQ9MnM1YaxMnh3TILFiQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.1.tgz", + "integrity": "sha512-nuL+dNSVMcWB7OOtgb0EGH5AjO4UBCt68SLP08rwmC+iRhyuJWS9MtZ/MpipxFwKAlHFftbMsydXqWre8B0+XA==", "dev": true, "dependencies": { - "@jest/test-result": "^28.1.0", + "@jest/test-result": "^28.1.1", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", + "jest-haste-map": "^28.1.1", "slash": "^3.0.0" }, "engines": { @@ -1103,22 +1104,22 @@ } }, "node_modules/@jest/transform": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.0.tgz", - "integrity": "sha512-omy2xe5WxlAfqmsTjTPxw+iXRTRnf+NtX0ToG+4S0tABeb4KsKmPUHq5UBuwunHg3tJRwgEQhEp0M/8oiatLEA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.1.tgz", + "integrity": "sha512-PkfaTUuvjUarl1EDr5ZQcCA++oXkFCP9QFUkG0yVKVmNObjhrqDy0kbMpMebfHWm3CCDHjYNem9eUSH8suVNHQ==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "@jridgewell/trace-mapping": "^0.3.7", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", + "jest-haste-map": "^28.1.1", "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.0", + "jest-util": "^28.1.1", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", @@ -1142,9 +1143,9 @@ } }, "node_modules/@jest/types": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.1.tgz", + "integrity": "sha512-vRXVqSg1VhDnB8bWcmvLzmg0Bt9CRKVgHPXqYwvWMX3TvAjeO+nRuK6+VdTKCtWOvYlmkF/HqNAL/z+N3B53Kw==", "dev": true, "dependencies": { "@jest/schemas": "^28.0.2", @@ -1380,9 +1381,9 @@ } }, "node_modules/@rollup/plugin-typescript": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.2.tgz", - "integrity": "sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==", + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.3.tgz", + "integrity": "sha512-55L9SyiYu3r/JtqdjhwcwaECXP7JeJ9h1Sg1VWRJKIutla2MdZQodTgcCNybXLMCnqpNLEhS2vGENww98L1npg==", "dev": true, "dependencies": { "@rollup/pluginutils": "^3.1.0", @@ -1395,6 +1396,11 @@ "rollup": "^2.14.0", "tslib": "*", "typescript": ">=3.7.0" + }, + "peerDependenciesMeta": { + "tslib": { + "optional": true + } } }, "node_modules/@rollup/pluginutils": { @@ -1638,14 +1644,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.1.tgz", - "integrity": "sha512-6dM5NKT57ZduNnJfpY81Phe9nc9wolnMCnknb1im6brWi1RYv84nbMS3olJa27B6+irUVV1X/Wb+Am0FjJdGFw==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.28.0.tgz", + "integrity": "sha512-DXVU6Cg29H2M6EybqSg2A+x8DgO9TCUBRp4QEXQHJceLS7ogVDP0g3Lkg/SZCqcvkAP/RruuQqK0gdlkgmhSUA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.27.1", - "@typescript-eslint/type-utils": "5.27.1", - "@typescript-eslint/utils": "5.27.1", + "@typescript-eslint/scope-manager": "5.28.0", + "@typescript-eslint/type-utils": "5.28.0", + "@typescript-eslint/utils": "5.28.0", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -1671,14 +1677,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.27.1.tgz", - "integrity": "sha512-7Va2ZOkHi5NP+AZwb5ReLgNF6nWLGTeUJfxdkVUAPPSaAdbWNnFZzLZ4EGGmmiCTg+AwlbE1KyUYTBglosSLHQ==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.28.0.tgz", + "integrity": "sha512-ekqoNRNK1lAcKhZESN/PdpVsWbP9jtiNqzFWkp/yAUdZvJalw2heCYuqRmM5eUJSIYEkgq5sGOjq+ZqsLMjtRA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.27.1", - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/typescript-estree": "5.27.1", + "@typescript-eslint/scope-manager": "5.28.0", + "@typescript-eslint/types": "5.28.0", + "@typescript-eslint/typescript-estree": "5.28.0", "debug": "^4.3.4" }, "engines": { @@ -1698,13 +1704,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.27.1.tgz", - "integrity": "sha512-fQEOSa/QroWE6fAEg+bJxtRZJTH8NTskggybogHt4H9Da8zd4cJji76gA5SBlR0MgtwF7rebxTbDKB49YUCpAg==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.28.0.tgz", + "integrity": "sha512-LeBLTqF/he1Z+boRhSqnso6YrzcKMTQ8bO/YKEe+6+O/JGof9M0g3IJlIsqfrK/6K03MlFIlycbf1uQR1IjE+w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/visitor-keys": "5.27.1" + "@typescript-eslint/types": "5.28.0", + "@typescript-eslint/visitor-keys": "5.28.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1715,12 +1721,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.27.1.tgz", - "integrity": "sha512-+UC1vVUWaDHRnC2cQrCJ4QtVjpjjCgjNFpg8b03nERmkHv9JV9X5M19D7UFMd+/G7T/sgFwX2pGmWK38rqyvXw==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.28.0.tgz", + "integrity": "sha512-SyKjKh4CXPglueyC6ceAFytjYWMoPHMswPQae236zqe1YbhvCVQyIawesYywGiu98L9DwrxsBN69vGIVxJ4mQQ==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.27.1", + "@typescript-eslint/utils": "5.28.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1741,9 +1747,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.27.1.tgz", - "integrity": "sha512-LgogNVkBhCTZU/m8XgEYIWICD6m4dmEDbKXESCbqOXfKZxRKeqpiJXQIErv66sdopRKZPo5l32ymNqibYEH/xg==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.28.0.tgz", + "integrity": "sha512-2OOm8ZTOQxqkPbf+DAo8oc16sDlVR5owgJfKheBkxBKg1vAfw2JsSofH9+16VPlN9PWtv8Wzhklkqw3k/zCVxA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1754,13 +1760,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.1.tgz", - "integrity": "sha512-DnZvvq3TAJ5ke+hk0LklvxwYsnXpRdqUY5gaVS0D4raKtbznPz71UJGnPTHEFo0GDxqLOLdMkkmVZjSpET1hFw==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.28.0.tgz", + "integrity": "sha512-9GX+GfpV+F4hdTtYc6OV9ZkyYilGXPmQpm6AThInpBmKJEyRSIjORJd1G9+bknb7OTFYL+Vd4FBJAO6T78OVqA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/visitor-keys": "5.27.1", + "@typescript-eslint/types": "5.28.0", + "@typescript-eslint/visitor-keys": "5.28.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1781,15 +1787,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.27.1.tgz", - "integrity": "sha512-mZ9WEn1ZLDaVrhRaYgzbkXBkTPghPFsup8zDbbsYTxC5OmqrFE7skkKS/sraVsLP3TcT3Ki5CSyEFBRkLH/H/w==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.28.0.tgz", + "integrity": "sha512-E60N5L0fjv7iPJV3UGc4EC+A3Lcj4jle9zzR0gW7vXhflO7/J29kwiTGITA2RlrmPokKiZbBy2DgaclCaEUs6g==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.27.1", - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/typescript-estree": "5.27.1", + "@typescript-eslint/scope-manager": "5.28.0", + "@typescript-eslint/types": "5.28.0", + "@typescript-eslint/typescript-estree": "5.28.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1805,12 +1811,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.1.tgz", - "integrity": "sha512-xYs6ffo01nhdJgPieyk7HAOpjhTsx7r/oB9LWEhwAXgwn33tkr+W8DI2ChboqhZlC4q3TC6geDYPoiX8ROqyOQ==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.28.0.tgz", + "integrity": "sha512-BtfP1vCor8cWacovzzPFOoeW4kBQxzmhxGoOpt0v1SFvG+nJ0cWaVdJk7cky1ArTcFHHKNIxyo2LLr3oNkSuXA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.27.1", + "@typescript-eslint/types": "5.28.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -2099,15 +2105,15 @@ "dev": true }, "node_modules/babel-jest": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.0.tgz", - "integrity": "sha512-zNKk0yhDZ6QUwfxh9k07GII6siNGMJWVUU49gmFj5gfdqDKLqa2RArXOF2CODp4Dr7dLxN2cvAV+667dGJ4b4w==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.1.tgz", + "integrity": "sha512-MEt0263viUdAkTq5D7upHPNxvt4n9uLUGa6pPz3WviNBMtOmStb1lIXS3QobnoqM+qnH+vr4EKlvhe8QcmxIYw==", "dev": true, "dependencies": { - "@jest/transform": "^28.1.0", + "@jest/transform": "^28.1.1", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^28.0.2", + "babel-preset-jest": "^28.1.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -2136,9 +2142,9 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.0.2.tgz", - "integrity": "sha512-Kizhn/ZL+68ZQHxSnHyuvJv8IchXD62KQxV77TBDV/xoBFBOfgRAk97GNs6hXdTTCiVES9nB2I6+7MXXrk5llQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.1.tgz", + "integrity": "sha512-NovGCy5Hn25uMJSAU8FaHqzs13cFoOI4lhIujiepssjCKRsAo3TA734RDWSGxuFTsUJXerYOqQQodlxgmtqbzw==", "dev": true, "dependencies": { "@babel/template": "^7.3.3", @@ -2174,12 +2180,12 @@ } }, "node_modules/babel-preset-jest": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.0.2.tgz", - "integrity": "sha512-sYzXIdgIXXroJTFeB3S6sNDWtlJ2dllCdTEsnZ65ACrMojj3hVNFRmnJ1HZtomGi+Be7aqpY/HJ92fr8OhKVkQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.1.tgz", + "integrity": "sha512-FCq9Oud0ReTeWtcneYf/48981aTfXYuB9gbU4rBNNJVBSQ6ssv7E6v/qvbBxtOWwZFXjLZwpg+W3q7J6vhH25g==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^28.0.2", + "babel-plugin-jest-hoist": "^28.1.1", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { @@ -3575,16 +3581,16 @@ } }, "node_modules/expect": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.0.tgz", - "integrity": "sha512-qFXKl8Pmxk8TBGfaFKRtcQjfXEnKAs+dmlxdwvukJZorwrAabT7M3h8oLOG01I2utEhkmUTi17CHaPBovZsKdw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.1.tgz", + "integrity": "sha512-/AANEwGL0tWBwzLNOvO0yUdy2D52jVdNXppOqswC49sxMN2cPWsGCQdzuIf9tj6hHoBQzNvx75JUYuQAckPo3w==", "dev": true, "dependencies": { - "@jest/expect-utils": "^28.1.0", + "@jest/expect-utils": "^28.1.1", "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0" + "jest-matcher-utils": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" @@ -3603,24 +3609,24 @@ } }, "node_modules/expect/node_modules/diff-sequences": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", - "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", "dev": true, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/expect/node_modules/jest-diff": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", - "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", + "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^28.0.2", + "diff-sequences": "^28.1.1", "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" @@ -3636,24 +3642,24 @@ } }, "node_modules/expect/node_modules/jest-matcher-utils": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", - "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", + "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^28.1.0", + "jest-diff": "^28.1.1", "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/expect/node_modules/pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "dependencies": { "@jest/schemas": "^28.0.2", @@ -4634,14 +4640,15 @@ } }, "node_modules/jest": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.0.tgz", - "integrity": "sha512-TZR+tHxopPhzw3c3560IJXZWLNHgpcz1Zh0w5A65vynLGNcg/5pZ+VildAd7+XGOu6jd58XMY/HNn0IkZIXVXg==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.1.tgz", + "integrity": "sha512-qw9YHBnjt6TCbIDMPMpJZqf9E12rh6869iZaN08/vpOGgHJSAaLLUn6H8W3IAEuy34Ls3rct064mZLETkxJ2XA==", "dev": true, "dependencies": { - "@jest/core": "^28.1.0", + "@jest/core": "^28.1.1", + "@jest/types": "^28.1.1", "import-local": "^3.0.2", - "jest-cli": "^28.1.0" + "jest-cli": "^28.1.1" }, "bin": { "jest": "bin/jest.js" @@ -4775,27 +4782,27 @@ } }, "node_modules/jest-circus": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.0.tgz", - "integrity": "sha512-rNYfqfLC0L0zQKRKsg4n4J+W1A2fbyGH7Ss/kDIocp9KXD9iaL111glsLu7+Z7FHuZxwzInMDXq+N1ZIBkI/TQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.1.tgz", + "integrity": "sha512-75+BBVTsL4+p2w198DQpCeyh1RdaS2lhEG87HkaFX/UG0gJExVq2skG2pT7XZEGBubNj2CytcWSPan4QEPNosw==", "dev": true, "dependencies": { - "@jest/environment": "^28.1.0", - "@jest/expect": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/environment": "^28.1.1", + "@jest/expect": "^28.1.1", + "@jest/test-result": "^28.1.1", + "@jest/types": "^28.1.1", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^28.1.0", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-runtime": "^28.1.0", - "jest-snapshot": "^28.1.0", - "jest-util": "^28.1.0", - "pretty-format": "^28.1.0", + "jest-each": "^28.1.1", + "jest-matcher-utils": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-runtime": "^28.1.1", + "jest-snapshot": "^28.1.1", + "jest-util": "^28.1.1", + "pretty-format": "^28.1.1", "slash": "^3.0.0", "stack-utils": "^2.0.3", "throat": "^6.0.1" @@ -4817,24 +4824,24 @@ } }, "node_modules/jest-circus/node_modules/diff-sequences": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", - "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", "dev": true, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-circus/node_modules/jest-diff": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", - "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", + "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^28.0.2", + "diff-sequences": "^28.1.1", "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" @@ -4850,24 +4857,24 @@ } }, "node_modules/jest-circus/node_modules/jest-matcher-utils": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", - "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", + "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^28.1.0", + "jest-diff": "^28.1.1", "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-circus/node_modules/pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "dependencies": { "@jest/schemas": "^28.0.2", @@ -4886,21 +4893,21 @@ "dev": true }, "node_modules/jest-cli": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.0.tgz", - "integrity": "sha512-fDJRt6WPRriHrBsvvgb93OxgajHHsJbk4jZxiPqmZbMDRcHskfJBBfTyjFko0jjfprP544hOktdSi9HVgl4VUQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.1.tgz", + "integrity": "sha512-+sUfVbJqb1OjBZ0OdBbI6OWfYM1i7bSfzYy6gze1F1w3OKWq8ZTEKkZ8a7ZQPq6G/G1qMh/uKqpdWhgl11NFQQ==", "dev": true, "dependencies": { - "@jest/core": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/core": "^28.1.1", + "@jest/test-result": "^28.1.1", + "@jest/types": "^28.1.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^28.1.0", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", + "jest-config": "^28.1.1", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", "prompts": "^2.0.1", "yargs": "^17.3.1" }, @@ -4920,31 +4927,31 @@ } }, "node_modules/jest-config": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.0.tgz", - "integrity": "sha512-aOV80E9LeWrmflp7hfZNn/zGA4QKv/xsn2w8QCBP0t0+YqObuCWTSgNbHJ0j9YsTuCO08ZR/wsvlxqqHX20iUA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.1.tgz", + "integrity": "sha512-tASynMhS+jVV85zKvjfbJ8nUyJS/jUSYZ5KQxLUN2ZCvcQc/OmhQl2j6VEL3ezQkNofxn5pQ3SPYWPHb0unTZA==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^28.1.0", - "@jest/types": "^28.1.0", - "babel-jest": "^28.1.0", + "@jest/test-sequencer": "^28.1.1", + "@jest/types": "^28.1.1", + "babel-jest": "^28.1.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^28.1.0", - "jest-environment-node": "^28.1.0", + "jest-circus": "^28.1.1", + "jest-environment-node": "^28.1.1", "jest-get-type": "^28.0.2", "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.0", - "jest-runner": "^28.1.0", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", + "jest-resolve": "^28.1.1", + "jest-runner": "^28.1.1", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^28.1.0", + "pretty-format": "^28.1.1", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -4992,9 +4999,9 @@ } }, "node_modules/jest-config/node_modules/pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "dependencies": { "@jest/schemas": "^28.0.2", @@ -5040,9 +5047,9 @@ } }, "node_modules/jest-docblock": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.0.2.tgz", - "integrity": "sha512-FH10WWw5NxLoeSdQlJwu+MTiv60aXV/t8KEwIRGEv74WARE1cXIqh1vGdy2CraHuWOOrnzTWj/azQKqW4fO7xg==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", + "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", "dev": true, "dependencies": { "detect-newline": "^3.0.0" @@ -5052,16 +5059,16 @@ } }, "node_modules/jest-each": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.0.tgz", - "integrity": "sha512-a/XX02xF5NTspceMpHujmOexvJ4GftpYXqr6HhhmKmExtMXsyIN/fvanQlt/BcgFoRKN4OCXxLQKth9/n6OPFg==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.1.tgz", + "integrity": "sha512-A042rqh17ZvEhRceDMi784ppoXR7MWGDEKTXEZXb4svt0eShMZvijGxzKsx+yIjeE8QYmHPrnHiTSQVhN4nqaw==", "dev": true, "dependencies": { - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "chalk": "^4.0.0", "jest-get-type": "^28.0.2", - "jest-util": "^28.1.0", - "pretty-format": "^28.1.0" + "jest-util": "^28.1.1", + "pretty-format": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" @@ -5089,9 +5096,9 @@ } }, "node_modules/jest-each/node_modules/pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "dependencies": { "@jest/schemas": "^28.0.2", @@ -5110,18 +5117,18 @@ "dev": true }, "node_modules/jest-environment-jsdom": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.0.tgz", - "integrity": "sha512-8n6P4xiDjNVqTWv6W6vJPuQdLx+ZiA3dbYg7YJ+DPzR+9B61K6pMVJrSs2IxfGRG4J7pyAUA5shQ9G0KEun78w==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.1.tgz", + "integrity": "sha512-41ZvgSoPNcKG5q3LuuOcAczdBxRq9DbZkPe24okN6ZCmiZdAfFtPg3z+lOtsT1fM6OAERApKT+3m0MRDQH2zIA==", "dev": true, "dependencies": { - "@jest/environment": "^28.1.0", - "@jest/fake-timers": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/environment": "^28.1.1", + "@jest/fake-timers": "^28.1.1", + "@jest/types": "^28.1.1", "@types/jsdom": "^16.2.4", "@types/node": "*", - "jest-mock": "^28.1.0", - "jest-util": "^28.1.0", + "jest-mock": "^28.1.1", + "jest-util": "^28.1.1", "jsdom": "^19.0.0" }, "engines": { @@ -5129,17 +5136,17 @@ } }, "node_modules/jest-environment-node": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.0.tgz", - "integrity": "sha512-gBLZNiyrPw9CSMlTXF1yJhaBgWDPVvH0Pq6bOEwGMXaYNzhzhw2kA/OijNF8egbCgDS0/veRv97249x2CX+udQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.1.tgz", + "integrity": "sha512-2aV/eeY/WNgUUJrrkDJ3cFEigjC5fqT1+fCclrY6paqJ5zVPoM//sHmfgUUp7WLYxIdbPwMiVIzejpN56MxnNA==", "dev": true, "dependencies": { - "@jest/environment": "^28.1.0", - "@jest/fake-timers": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/environment": "^28.1.1", + "@jest/fake-timers": "^28.1.1", + "@jest/types": "^28.1.1", "@types/node": "*", - "jest-mock": "^28.1.0", - "jest-util": "^28.1.0" + "jest-mock": "^28.1.1", + "jest-util": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" @@ -5155,22 +5162,22 @@ } }, "node_modules/jest-haste-map": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.0.tgz", - "integrity": "sha512-xyZ9sXV8PtKi6NCrJlmq53PyNVHzxmcfXNVvIRHpHmh1j/HChC4pwKgyjj7Z9us19JMw8PpQTJsFWOsIfT93Dw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.1.tgz", + "integrity": "sha512-ZrRSE2o3Ezh7sb1KmeLEZRZ4mgufbrMwolcFHNRSjKZhpLa8TdooXOOFlSwoUzlbVs1t0l7upVRW2K7RWGHzbQ==", "dev": true, "dependencies": { - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.0", - "jest-worker": "^28.1.0", + "jest-util": "^28.1.1", + "jest-worker": "^28.1.1", "micromatch": "^4.0.4", - "walker": "^1.0.7" + "walker": "^1.0.8" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" @@ -5180,13 +5187,13 @@ } }, "node_modules/jest-leak-detector": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.0.tgz", - "integrity": "sha512-uIJDQbxwEL2AMMs2xjhZl2hw8s77c3wrPaQ9v6tXJLGaaQ+4QrNJH5vuw7hA7w/uGT/iJ42a83opAqxGHeyRIA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.1.tgz", + "integrity": "sha512-4jvs8V8kLbAaotE+wFR7vfUGf603cwYtFf1/PYEsyX2BAjSzj8hQSVTP6OWzseTl0xL6dyHuKs2JAks7Pfubmw==", "dev": true, "dependencies": { "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" @@ -5214,9 +5221,9 @@ } }, "node_modules/jest-leak-detector/node_modules/pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "dependencies": { "@jest/schemas": "^28.0.2", @@ -5250,18 +5257,18 @@ } }, "node_modules/jest-message-util": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.0.tgz", - "integrity": "sha512-RpA8mpaJ/B2HphDMiDlrAZdDytkmwFqgjDZovM21F35lHGeUeCvYmm6W+sbQ0ydaLpg5bFAUuWG1cjqOl8vqrw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.1.tgz", + "integrity": "sha512-xoDOOT66fLfmTRiqkoLIU7v42mal/SqwDKvfmfiWAdJMSJiU+ozgluO7KbvoAgiwIrrGZsV7viETjc8GNrA/IQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^28.1.0", + "pretty-format": "^28.1.1", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -5282,9 +5289,9 @@ } }, "node_modules/jest-message-util/node_modules/pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "dependencies": { "@jest/schemas": "^28.0.2", @@ -5303,12 +5310,12 @@ "dev": true }, "node_modules/jest-mock": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.0.tgz", - "integrity": "sha512-H7BrhggNn77WhdL7O1apG0Q/iwl0Bdd5E1ydhCJzL3oBLh/UYxAwR3EJLsBZ9XA3ZU4PA3UNw4tQjduBTCTmLw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.1.tgz", + "integrity": "sha512-bDCb0FjfsmKweAvE09dZT59IMkzgN0fYBH6t5S45NoJfd2DHkS3ySG2K+hucortryhO3fVuXdlxWcbtIuV/Skw==", "dev": true, "dependencies": { - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "@types/node": "*" }, "engines": { @@ -5342,17 +5349,17 @@ } }, "node_modules/jest-resolve": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.0.tgz", - "integrity": "sha512-vvfN7+tPNnnhDvISuzD1P+CRVP8cK0FHXRwPAcdDaQv4zgvwvag2n55/h5VjYcM5UJG7L4TwE5tZlzcI0X2Lhw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.1.tgz", + "integrity": "sha512-/d1UbyUkf9nvsgdBildLe6LAD4DalgkgZcKd0nZ8XUGPyA/7fsnaQIlKVnDiuUXv/IeZhPEDrRJubVSulxrShA==", "dev": true, "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", + "jest-haste-map": "^28.1.1", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" @@ -5362,43 +5369,43 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.0.tgz", - "integrity": "sha512-Ue1VYoSZquPwEvng7Uefw8RmZR+me/1kr30H2jMINjGeHgeO/JgrR6wxj2ofkJ7KSAA11W3cOrhNCbj5Dqqd9g==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.1.tgz", + "integrity": "sha512-p8Y150xYJth4EXhOuB8FzmS9r8IGLEioiaetgdNGb9VHka4fl0zqWlVe4v7mSkYOuEUg2uB61iE+zySDgrOmgQ==", "dev": true, "dependencies": { "jest-regex-util": "^28.0.2", - "jest-snapshot": "^28.1.0" + "jest-snapshot": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-runner": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.0.tgz", - "integrity": "sha512-FBpmuh1HB2dsLklAlRdOxNTTHKFR6G1Qmd80pVDvwbZXTriqjWqjei5DKFC1UlM732KjYcE6yuCdiF0WUCOS2w==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.1.tgz", + "integrity": "sha512-W5oFUiDBgTsCloTAj6q95wEvYDB0pxIhY6bc5F26OucnwBN+K58xGTGbliSMI4ChQal5eANDF+xvELaYkJxTmA==", "dev": true, "dependencies": { - "@jest/console": "^28.1.0", - "@jest/environment": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/console": "^28.1.1", + "@jest/environment": "^28.1.1", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.1", + "@jest/types": "^28.1.1", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.10.2", "graceful-fs": "^4.2.9", - "jest-docblock": "^28.0.2", - "jest-environment-node": "^28.1.0", - "jest-haste-map": "^28.1.0", - "jest-leak-detector": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-resolve": "^28.1.0", - "jest-runtime": "^28.1.0", - "jest-util": "^28.1.0", - "jest-watcher": "^28.1.0", - "jest-worker": "^28.1.0", + "jest-docblock": "^28.1.1", + "jest-environment-node": "^28.1.1", + "jest-haste-map": "^28.1.1", + "jest-leak-detector": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-resolve": "^28.1.1", + "jest-runtime": "^28.1.1", + "jest-util": "^28.1.1", + "jest-watcher": "^28.1.1", + "jest-worker": "^28.1.1", "source-map-support": "0.5.13", "throat": "^6.0.1" }, @@ -5417,31 +5424,31 @@ } }, "node_modules/jest-runtime": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.0.tgz", - "integrity": "sha512-wNYDiwhdH/TV3agaIyVF0lsJ33MhyujOe+lNTUiolqKt8pchy1Hq4+tDMGbtD5P/oNLA3zYrpx73T9dMTOCAcg==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.1.tgz", + "integrity": "sha512-J89qEJWW0leOsqyi0D9zHpFEYHwwafFdS9xgvhFHtIdRghbadodI0eA+DrthK/1PebBv3Px8mFSMGKrtaVnleg==", "dev": true, "dependencies": { - "@jest/environment": "^28.1.0", - "@jest/fake-timers": "^28.1.0", - "@jest/globals": "^28.1.0", + "@jest/environment": "^28.1.1", + "@jest/fake-timers": "^28.1.1", + "@jest/globals": "^28.1.1", "@jest/source-map": "^28.0.2", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.1", + "@jest/types": "^28.1.1", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "execa": "^5.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-mock": "^28.1.0", + "jest-haste-map": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-mock": "^28.1.1", "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.0", - "jest-snapshot": "^28.1.0", - "jest-util": "^28.1.0", + "jest-resolve": "^28.1.1", + "jest-snapshot": "^28.1.1", + "jest-util": "^28.1.1", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -5553,9 +5560,9 @@ } }, "node_modules/jest-snapshot": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.0.tgz", - "integrity": "sha512-ex49M2ZrZsUyQLpLGxQtDbahvgBjlLPgklkqGM0hq/F7W/f8DyqZxVHjdy19QKBm4O93eDp+H5S23EiTbbUmHw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.1.tgz", + "integrity": "sha512-1KjqHJ98adRcbIdMizjF5DipwZFbvxym/kFO4g4fVZCZRxH/dqV8TiBFCa6rqic3p0karsy8RWS1y4E07b7P0A==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", @@ -5563,23 +5570,23 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/expect-utils": "^28.1.1", + "@jest/transform": "^28.1.1", + "@jest/types": "^28.1.1", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^28.1.0", + "expect": "^28.1.1", "graceful-fs": "^4.2.9", - "jest-diff": "^28.1.0", + "jest-diff": "^28.1.1", "jest-get-type": "^28.0.2", - "jest-haste-map": "^28.1.0", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0", + "jest-haste-map": "^28.1.1", + "jest-matcher-utils": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1", "natural-compare": "^1.4.0", - "pretty-format": "^28.1.0", + "pretty-format": "^28.1.1", "semver": "^7.3.5" }, "engines": { @@ -5599,24 +5606,24 @@ } }, "node_modules/jest-snapshot/node_modules/diff-sequences": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", - "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", "dev": true, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-snapshot/node_modules/jest-diff": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", - "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", + "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^28.0.2", + "diff-sequences": "^28.1.1", "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" @@ -5632,24 +5639,24 @@ } }, "node_modules/jest-snapshot/node_modules/jest-matcher-utils": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", - "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", + "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^28.1.0", + "jest-diff": "^28.1.1", "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-snapshot/node_modules/pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "dependencies": { "@jest/schemas": "^28.0.2", @@ -5668,12 +5675,12 @@ "dev": true }, "node_modules/jest-util": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", - "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.1.tgz", + "integrity": "sha512-FktOu7ca1DZSyhPAxgxB6hfh2+9zMoJ7aEQA759Z6p45NuO8mWcqujH+UdHlCm/V6JTWwDztM2ITCzU1ijJAfw==", "dev": true, "dependencies": { - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -5691,17 +5698,17 @@ "dev": true }, "node_modules/jest-validate": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.0.tgz", - "integrity": "sha512-Lly7CJYih3vQBfjLeANGgBSBJ7pEa18cxpQfQEq2go2xyEzehnHfQTjoUia8xUv4x4J80XKFIDwJJThXtRFQXQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.1.tgz", + "integrity": "sha512-Kpf6gcClqFCIZ4ti5++XemYJWUPCFUW+N2gknn+KgnDf549iLul3cBuKVe1YcWRlaF8tZV8eJCap0eECOEE3Ug==", "dev": true, "dependencies": { - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "camelcase": "^6.2.0", "chalk": "^4.0.0", "jest-get-type": "^28.0.2", "leven": "^3.1.0", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" @@ -5729,9 +5736,9 @@ } }, "node_modules/jest-validate/node_modules/pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "dependencies": { "@jest/schemas": "^28.0.2", @@ -5750,18 +5757,18 @@ "dev": true }, "node_modules/jest-watcher": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.0.tgz", - "integrity": "sha512-tNHMtfLE8Njcr2IRS+5rXYA4BhU90gAOwI9frTGOqd+jX0P/Au/JfRSNqsf5nUTcWdbVYuLxS1KjnzILSoR5hA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.1.tgz", + "integrity": "sha512-RQIpeZ8EIJMxbQrXpJQYIIlubBnB9imEHsxxE41f54ZwcqWLysL/A0ZcdMirf+XsMn3xfphVQVV4EW0/p7i7Ug==", "dev": true, "dependencies": { - "@jest/test-result": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/test-result": "^28.1.1", + "@jest/types": "^28.1.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.10.2", - "jest-util": "^28.1.0", + "jest-util": "^28.1.1", "string-length": "^4.0.1" }, "engines": { @@ -5769,9 +5776,9 @@ } }, "node_modules/jest-worker": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.0.tgz", - "integrity": "sha512-ZHwM6mNwaWBR52Snff8ZvsCTqQsvhCxP/bT1I6T6DAnb6ygkshsyLQIMxFwHpYxht0HOoqt23JlC01viI7T03A==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.1.tgz", + "integrity": "sha512-Au7slXB08C6h+xbJPp7VIb6U0XX5Kc9uel/WFc6/rcTzGiaVCBRngBExSYuXSLFPULPSYU3cJ3ybS988lNFQhQ==", "dev": true, "dependencies": { "@types/node": "*", @@ -6555,9 +6562,9 @@ } }, "node_modules/npm-check-updates": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.1.1.tgz", - "integrity": "sha512-f4gLbUJJh5qvkNvrSG3b05y3ZvyZ4Sl3Uk95DSyCjIWwpwmAwzU9dMCA/Gg2AmIKqkH4ml6X9kxcZsu+tAd94g==", + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.1.5.tgz", + "integrity": "sha512-vAVYlrrxJIPH/R5mxMzrNwP33hYflvk7oQqPjPOySCavCFwhXKmfK5sn/rogyebg7cLnECiDxsczGqvTOEBRAA==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -7530,7 +7537,7 @@ "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, "engines": { "node": ">=0.10.0" @@ -7645,9 +7652,9 @@ } }, "node_modules/rollup": { - "version": "2.75.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.5.tgz", - "integrity": "sha512-JzNlJZDison3o2mOxVmb44Oz7t74EfSd1SQrplQk0wSaXV7uLQXtVdHbxlcT3w+8tZ1TL4r/eLfc7nAbz38BBA==", + "version": "2.75.6", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.6.tgz", + "integrity": "sha512-OEf0TgpC9vU6WGROJIk1JA3LR5vk/yvqlzxqdrE2CzzXnqKXNzbAwlWUXis8RS3ZPe7LAq+YUxsRa0l3r27MLA==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -8471,9 +8478,9 @@ } }, "node_modules/ts-jest": { - "version": "28.0.4", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.4.tgz", - "integrity": "sha512-S6uRDDdCJBvnZqyGjB4VCnwbQrbgdL8WPeP4jevVSpYsBaeGRQAIS08o3Svav2Ex+oXwLgJ/m7F24TNq62kA1A==", + "version": "28.0.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.5.tgz", + "integrity": "sha512-Sx9FyP9pCY7pUzQpy4FgRZf2bhHY3za576HMKJFs+OnQ9jS96Du5vNsDKkyedQkik+sEabbKAnCliv9BEsHZgQ==", "dev": true, "dependencies": { "bs-logger": "0.x", @@ -8483,7 +8490,7 @@ "lodash.memoize": "4.x", "make-error": "1.x", "semver": "7.x", - "yargs-parser": "^20.x" + "yargs-parser": "^21.0.1" }, "bin": { "ts-jest": "cli.js" @@ -8514,6 +8521,7 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", "dev": true, + "optional": true, "peer": true }, "node_modules/tsutils": { @@ -9050,15 +9058,6 @@ } }, "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs/node_modules/yargs-parser": { "version": "21.0.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", @@ -9089,14 +9088,14 @@ "devDependencies": { "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.27.1", - "@typescript-eslint/parser": "^5.27.1", + "@rollup/plugin-typescript": "^8.3.3", + "@typescript-eslint/eslint-plugin": "^5.28.0", + "@typescript-eslint/parser": "^5.28.0", "eslint": "^8.17.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", - "rollup": "^2.75.5", + "rollup": "^2.75.6", "typescript": "^4.7.3" } }, @@ -9114,19 +9113,19 @@ "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", + "@rollup/plugin-typescript": "^8.3.3", "@types/jest": "^28.1.1", - "@typescript-eslint/eslint-plugin": "5.27.1", - "@typescript-eslint/parser": "5.27.1", + "@typescript-eslint/eslint-plugin": "5.28.0", + "@typescript-eslint/parser": "5.28.0", "eslint": "8.17.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", - "jest": "^28.1.0", - "jest-environment-jsdom": "^28.1.0", + "jest": "^28.1.1", + "jest-environment-jsdom": "^28.1.1", "prettier": "^2.6.2", - "rollup": "^2.75.5", + "rollup": "^2.75.6", "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^28.0.4", + "ts-jest": "^28.0.5", "typescript": "^4.7.3" } }, @@ -9763,30 +9762,30 @@ "dev": true }, "@jest/console": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.0.tgz", - "integrity": "sha512-tscn3dlJFGay47kb4qVruQg/XWlmvU0xp3EJOjzzY+sBaI+YgwKcvAmTcyYU7xEiLLIY5HCdWRooAL8dqkFlDA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-28.1.1.tgz", + "integrity": "sha512-0RiUocPVFEm3WRMOStIHbRWllG6iW6E3/gUPnf4lkrVFyXIIDeCe+vlKeYyFOMhB2EPE6FLFCNADSOOQMaqvyA==", "dev": true, "requires": { - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1", "slash": "^3.0.0" } }, "@jest/core": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.0.tgz", - "integrity": "sha512-/2PTt0ywhjZ4NwNO4bUqD9IVJfmFVhVKGlhvSpmEfUCuxYf/3NHcKmRFI+I71lYzbTT3wMuYpETDCTHo81gC/g==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-28.1.1.tgz", + "integrity": "sha512-3pYsBoZZ42tXMdlcFeCc/0j9kOlK7MYuXs2B1QbvDgMoW1K9NJ4G/VYvIbMb26iqlkTfPHo7SC2JgjDOk/mxXw==", "dev": true, "requires": { - "@jest/console": "^28.1.0", - "@jest/reporters": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/console": "^28.1.1", + "@jest/reporters": "^28.1.1", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.1", + "@jest/types": "^28.1.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", @@ -9794,20 +9793,20 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.9", "jest-changed-files": "^28.0.2", - "jest-config": "^28.1.0", - "jest-haste-map": "^28.1.0", - "jest-message-util": "^28.1.0", + "jest-config": "^28.1.1", + "jest-haste-map": "^28.1.1", + "jest-message-util": "^28.1.1", "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.0", - "jest-resolve-dependencies": "^28.1.0", - "jest-runner": "^28.1.0", - "jest-runtime": "^28.1.0", - "jest-snapshot": "^28.1.0", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", - "jest-watcher": "^28.1.0", + "jest-resolve": "^28.1.1", + "jest-resolve-dependencies": "^28.1.1", + "jest-runner": "^28.1.1", + "jest-runtime": "^28.1.1", + "jest-snapshot": "^28.1.1", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", + "jest-watcher": "^28.1.1", "micromatch": "^4.0.4", - "pretty-format": "^28.1.0", + "pretty-format": "^28.1.1", "rimraf": "^3.0.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" @@ -9826,9 +9825,9 @@ "dev": true }, "pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "requires": { "@jest/schemas": "^28.0.2", @@ -9846,31 +9845,31 @@ } }, "@jest/environment": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.0.tgz", - "integrity": "sha512-S44WGSxkRngzHslhV6RoAExekfF7Qhwa6R5+IYFa81mpcj0YgdBnRSmvHe3SNwOt64yXaE5GG8Y2xM28ii5ssA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.1.tgz", + "integrity": "sha512-9auVQ2GzQ7nrU+lAr8KyY838YahElTX9HVjbQPPS2XjlxQ+na18G113OoBhyBGBtD6ZnO/SrUy5WR8EzOj1/Uw==", "dev": true, "requires": { - "@jest/fake-timers": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/fake-timers": "^28.1.1", + "@jest/types": "^28.1.1", "@types/node": "*", - "jest-mock": "^28.1.0" + "jest-mock": "^28.1.1" } }, "@jest/expect": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.0.tgz", - "integrity": "sha512-be9ETznPLaHOmeJqzYNIXv1ADEzENuQonIoobzThOYPuK/6GhrWNIJDVTgBLCrz3Am73PyEU2urQClZp0hLTtA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-28.1.1.tgz", + "integrity": "sha512-/+tQprrFoT6lfkMj4mW/mUIfAmmk/+iQPmg7mLDIFOf2lyf7EBHaS+x3RbeR0VZVMe55IvX7QRoT/2aK3AuUXg==", "dev": true, "requires": { - "expect": "^28.1.0", - "jest-snapshot": "^28.1.0" + "expect": "^28.1.1", + "jest-snapshot": "^28.1.1" } }, "@jest/expect-utils": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.0.tgz", - "integrity": "sha512-5BrG48dpC0sB80wpeIX5FU6kolDJI4K0n5BM9a5V38MGx0pyRvUBSS0u2aNTdDzmOrCjhOg8pGs6a20ivYkdmw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.1.tgz", + "integrity": "sha512-n/ghlvdhCdMI/hTcnn4qV57kQuV9OTsZzH1TTCVARANKhl6hXJqLKUkwX69ftMGpsbpt96SsDD8n8LD2d9+FRw==", "dev": true, "requires": { "jest-get-type": "^28.0.2" @@ -9885,41 +9884,41 @@ } }, "@jest/fake-timers": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.0.tgz", - "integrity": "sha512-Xqsf/6VLeAAq78+GNPzI7FZQRf5cCHj1qgQxCjws9n8rKw8r1UYoeaALwBvyuzOkpU3c1I6emeMySPa96rxtIg==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.1.tgz", + "integrity": "sha512-BY/3+TyLs5+q87rGWrGUY5f8e8uC3LsVHS9Diz8+FV3ARXL4sNnkLlIB8dvDvRrp+LUCGM+DLqlsYubizGUjIA==", "dev": true, "requires": { - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "@sinonjs/fake-timers": "^9.1.1", "@types/node": "*", - "jest-message-util": "^28.1.0", - "jest-mock": "^28.1.0", - "jest-util": "^28.1.0" + "jest-message-util": "^28.1.1", + "jest-mock": "^28.1.1", + "jest-util": "^28.1.1" } }, "@jest/globals": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.0.tgz", - "integrity": "sha512-3m7sTg52OTQR6dPhsEQSxAvU+LOBbMivZBwOvKEZ+Rb+GyxVnXi9HKgOTYkx/S99T8yvh17U4tNNJPIEQmtwYw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-28.1.1.tgz", + "integrity": "sha512-dEgl/6v7ToB4vXItdvcltJBgny0xBE6xy6IYQrPJAJggdEinGxCDMivNv7sFzPcTITGquXD6UJwYxfJ/5ZwDSg==", "dev": true, "requires": { - "@jest/environment": "^28.1.0", - "@jest/expect": "^28.1.0", - "@jest/types": "^28.1.0" + "@jest/environment": "^28.1.1", + "@jest/expect": "^28.1.1", + "@jest/types": "^28.1.1" } }, "@jest/reporters": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.0.tgz", - "integrity": "sha512-qxbFfqap/5QlSpIizH9c/bFCDKsQlM4uAKSOvZrP+nIdrjqre3FmKzpTtYyhsaVcOSNK7TTt2kjm+4BJIjysFA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-28.1.1.tgz", + "integrity": "sha512-597Zj4D4d88sZrzM4atEGLuO7SdA/YrOv9SRXHXRNC+/FwPCWxZhBAEzhXoiJzfRwn8zes/EjS8Lo6DouGN5Gg==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/console": "^28.1.1", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.1", + "@jest/types": "^28.1.1", "@jridgewell/trace-mapping": "^0.3.7", "@types/node": "*", "chalk": "^4.0.0", @@ -9932,8 +9931,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-util": "^28.1.0", - "jest-worker": "^28.1.0", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1", + "jest-worker": "^28.1.1", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -9962,46 +9962,46 @@ } }, "@jest/test-result": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.0.tgz", - "integrity": "sha512-sBBFIyoPzrZho3N+80P35A5oAkSKlGfsEFfXFWuPGBsW40UAjCkGakZhn4UQK4iQlW2vgCDMRDOob9FGKV8YoQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-28.1.1.tgz", + "integrity": "sha512-hPmkugBktqL6rRzwWAtp1JtYT4VHwv8OQ+9lE5Gymj6dHzubI/oJHMUpPOt8NrdVWSrz9S7bHjJUmv2ggFoUNQ==", "dev": true, "requires": { - "@jest/console": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/console": "^28.1.1", + "@jest/types": "^28.1.1", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.0.tgz", - "integrity": "sha512-tZCEiVWlWNTs/2iK9yi6o3AlMfbbYgV4uuZInSVdzZ7ftpHZhCMuhvk2HLYhCZzLgPFQ9MnM1YaxMnh3TILFiQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-28.1.1.tgz", + "integrity": "sha512-nuL+dNSVMcWB7OOtgb0EGH5AjO4UBCt68SLP08rwmC+iRhyuJWS9MtZ/MpipxFwKAlHFftbMsydXqWre8B0+XA==", "dev": true, "requires": { - "@jest/test-result": "^28.1.0", + "@jest/test-result": "^28.1.1", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", + "jest-haste-map": "^28.1.1", "slash": "^3.0.0" } }, "@jest/transform": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.0.tgz", - "integrity": "sha512-omy2xe5WxlAfqmsTjTPxw+iXRTRnf+NtX0ToG+4S0tABeb4KsKmPUHq5UBuwunHg3tJRwgEQhEp0M/8oiatLEA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-28.1.1.tgz", + "integrity": "sha512-PkfaTUuvjUarl1EDr5ZQcCA++oXkFCP9QFUkG0yVKVmNObjhrqDy0kbMpMebfHWm3CCDHjYNem9eUSH8suVNHQ==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "@jridgewell/trace-mapping": "^0.3.7", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", + "jest-haste-map": "^28.1.1", "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.0", + "jest-util": "^28.1.1", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", @@ -10021,9 +10021,9 @@ } }, "@jest/types": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.0.tgz", - "integrity": "sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-28.1.1.tgz", + "integrity": "sha512-vRXVqSg1VhDnB8bWcmvLzmg0Bt9CRKVgHPXqYwvWMX3TvAjeO+nRuK6+VdTKCtWOvYlmkF/HqNAL/z+N3B53Kw==", "dev": true, "requires": { "@jest/schemas": "^28.0.2", @@ -10204,9 +10204,9 @@ } }, "@rollup/plugin-typescript": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.2.tgz", - "integrity": "sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==", + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.3.3.tgz", + "integrity": "sha512-55L9SyiYu3r/JtqdjhwcwaECXP7JeJ9h1Sg1VWRJKIutla2MdZQodTgcCNybXLMCnqpNLEhS2vGENww98L1npg==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -10267,15 +10267,15 @@ "requires": { "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", + "@rollup/plugin-typescript": "^8.3.3", "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^5.27.1", - "@typescript-eslint/parser": "^5.27.1", + "@typescript-eslint/eslint-plugin": "^5.28.0", + "@typescript-eslint/parser": "^5.28.0", "eslint": "^8.17.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", - "rollup": "^2.75.5", + "rollup": "^2.75.6", "typescript": "^4.7.3" } }, @@ -10288,21 +10288,21 @@ "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", + "@rollup/plugin-typescript": "^8.3.3", "@sora/e2ee": "^2021.1.0", "@types/jest": "^28.1.1", - "@typescript-eslint/eslint-plugin": "5.27.1", - "@typescript-eslint/parser": "5.27.1", + "@typescript-eslint/eslint-plugin": "5.28.0", + "@typescript-eslint/parser": "5.28.0", "eslint": "8.17.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "fflate": "^0.7.3", - "jest": "^28.1.0", - "jest-environment-jsdom": "^28.1.0", + "jest": "^28.1.1", + "jest-environment-jsdom": "^28.1.1", "prettier": "^2.6.2", - "rollup": "^2.75.5", + "rollup": "^2.75.6", "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^28.0.4", + "ts-jest": "^28.0.5", "typescript": "^4.7.3" }, "dependencies": { @@ -10485,14 +10485,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.1.tgz", - "integrity": "sha512-6dM5NKT57ZduNnJfpY81Phe9nc9wolnMCnknb1im6brWi1RYv84nbMS3olJa27B6+irUVV1X/Wb+Am0FjJdGFw==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.28.0.tgz", + "integrity": "sha512-DXVU6Cg29H2M6EybqSg2A+x8DgO9TCUBRp4QEXQHJceLS7ogVDP0g3Lkg/SZCqcvkAP/RruuQqK0gdlkgmhSUA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.27.1", - "@typescript-eslint/type-utils": "5.27.1", - "@typescript-eslint/utils": "5.27.1", + "@typescript-eslint/scope-manager": "5.28.0", + "@typescript-eslint/type-utils": "5.28.0", + "@typescript-eslint/utils": "5.28.0", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -10502,52 +10502,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.27.1.tgz", - "integrity": "sha512-7Va2ZOkHi5NP+AZwb5ReLgNF6nWLGTeUJfxdkVUAPPSaAdbWNnFZzLZ4EGGmmiCTg+AwlbE1KyUYTBglosSLHQ==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.28.0.tgz", + "integrity": "sha512-ekqoNRNK1lAcKhZESN/PdpVsWbP9jtiNqzFWkp/yAUdZvJalw2heCYuqRmM5eUJSIYEkgq5sGOjq+ZqsLMjtRA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.27.1", - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/typescript-estree": "5.27.1", + "@typescript-eslint/scope-manager": "5.28.0", + "@typescript-eslint/types": "5.28.0", + "@typescript-eslint/typescript-estree": "5.28.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.27.1.tgz", - "integrity": "sha512-fQEOSa/QroWE6fAEg+bJxtRZJTH8NTskggybogHt4H9Da8zd4cJji76gA5SBlR0MgtwF7rebxTbDKB49YUCpAg==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.28.0.tgz", + "integrity": "sha512-LeBLTqF/he1Z+boRhSqnso6YrzcKMTQ8bO/YKEe+6+O/JGof9M0g3IJlIsqfrK/6K03MlFIlycbf1uQR1IjE+w==", "dev": true, "requires": { - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/visitor-keys": "5.27.1" + "@typescript-eslint/types": "5.28.0", + "@typescript-eslint/visitor-keys": "5.28.0" } }, "@typescript-eslint/type-utils": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.27.1.tgz", - "integrity": "sha512-+UC1vVUWaDHRnC2cQrCJ4QtVjpjjCgjNFpg8b03nERmkHv9JV9X5M19D7UFMd+/G7T/sgFwX2pGmWK38rqyvXw==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.28.0.tgz", + "integrity": "sha512-SyKjKh4CXPglueyC6ceAFytjYWMoPHMswPQae236zqe1YbhvCVQyIawesYywGiu98L9DwrxsBN69vGIVxJ4mQQ==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.27.1", + "@typescript-eslint/utils": "5.28.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.27.1.tgz", - "integrity": "sha512-LgogNVkBhCTZU/m8XgEYIWICD6m4dmEDbKXESCbqOXfKZxRKeqpiJXQIErv66sdopRKZPo5l32ymNqibYEH/xg==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.28.0.tgz", + "integrity": "sha512-2OOm8ZTOQxqkPbf+DAo8oc16sDlVR5owgJfKheBkxBKg1vAfw2JsSofH9+16VPlN9PWtv8Wzhklkqw3k/zCVxA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.1.tgz", - "integrity": "sha512-DnZvvq3TAJ5ke+hk0LklvxwYsnXpRdqUY5gaVS0D4raKtbznPz71UJGnPTHEFo0GDxqLOLdMkkmVZjSpET1hFw==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.28.0.tgz", + "integrity": "sha512-9GX+GfpV+F4hdTtYc6OV9ZkyYilGXPmQpm6AThInpBmKJEyRSIjORJd1G9+bknb7OTFYL+Vd4FBJAO6T78OVqA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/visitor-keys": "5.27.1", + "@typescript-eslint/types": "5.28.0", + "@typescript-eslint/visitor-keys": "5.28.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -10556,26 +10556,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.27.1.tgz", - "integrity": "sha512-mZ9WEn1ZLDaVrhRaYgzbkXBkTPghPFsup8zDbbsYTxC5OmqrFE7skkKS/sraVsLP3TcT3Ki5CSyEFBRkLH/H/w==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.28.0.tgz", + "integrity": "sha512-E60N5L0fjv7iPJV3UGc4EC+A3Lcj4jle9zzR0gW7vXhflO7/J29kwiTGITA2RlrmPokKiZbBy2DgaclCaEUs6g==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.27.1", - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/typescript-estree": "5.27.1", + "@typescript-eslint/scope-manager": "5.28.0", + "@typescript-eslint/types": "5.28.0", + "@typescript-eslint/typescript-estree": "5.28.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.27.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.1.tgz", - "integrity": "sha512-xYs6ffo01nhdJgPieyk7HAOpjhTsx7r/oB9LWEhwAXgwn33tkr+W8DI2ChboqhZlC4q3TC6geDYPoiX8ROqyOQ==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.28.0.tgz", + "integrity": "sha512-BtfP1vCor8cWacovzzPFOoeW4kBQxzmhxGoOpt0v1SFvG+nJ0cWaVdJk7cky1ArTcFHHKNIxyo2LLr3oNkSuXA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.27.1", + "@typescript-eslint/types": "5.28.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -10784,15 +10784,15 @@ "dev": true }, "babel-jest": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.0.tgz", - "integrity": "sha512-zNKk0yhDZ6QUwfxh9k07GII6siNGMJWVUU49gmFj5gfdqDKLqa2RArXOF2CODp4Dr7dLxN2cvAV+667dGJ4b4w==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.1.tgz", + "integrity": "sha512-MEt0263viUdAkTq5D7upHPNxvt4n9uLUGa6pPz3WviNBMtOmStb1lIXS3QobnoqM+qnH+vr4EKlvhe8QcmxIYw==", "dev": true, "requires": { - "@jest/transform": "^28.1.0", + "@jest/transform": "^28.1.1", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^28.0.2", + "babel-preset-jest": "^28.1.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -10812,9 +10812,9 @@ } }, "babel-plugin-jest-hoist": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.0.2.tgz", - "integrity": "sha512-Kizhn/ZL+68ZQHxSnHyuvJv8IchXD62KQxV77TBDV/xoBFBOfgRAk97GNs6hXdTTCiVES9nB2I6+7MXXrk5llQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.1.tgz", + "integrity": "sha512-NovGCy5Hn25uMJSAU8FaHqzs13cFoOI4lhIujiepssjCKRsAo3TA734RDWSGxuFTsUJXerYOqQQodlxgmtqbzw==", "dev": true, "requires": { "@babel/template": "^7.3.3", @@ -10844,12 +10844,12 @@ } }, "babel-preset-jest": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.0.2.tgz", - "integrity": "sha512-sYzXIdgIXXroJTFeB3S6sNDWtlJ2dllCdTEsnZ65ACrMojj3hVNFRmnJ1HZtomGi+Be7aqpY/HJ92fr8OhKVkQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-28.1.1.tgz", + "integrity": "sha512-FCq9Oud0ReTeWtcneYf/48981aTfXYuB9gbU4rBNNJVBSQ6ssv7E6v/qvbBxtOWwZFXjLZwpg+W3q7J6vhH25g==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^28.0.2", + "babel-plugin-jest-hoist": "^28.1.1", "babel-preset-current-node-syntax": "^1.0.0" } }, @@ -11905,16 +11905,16 @@ "dev": true }, "expect": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.0.tgz", - "integrity": "sha512-qFXKl8Pmxk8TBGfaFKRtcQjfXEnKAs+dmlxdwvukJZorwrAabT7M3h8oLOG01I2utEhkmUTi17CHaPBovZsKdw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-28.1.1.tgz", + "integrity": "sha512-/AANEwGL0tWBwzLNOvO0yUdy2D52jVdNXppOqswC49sxMN2cPWsGCQdzuIf9tj6hHoBQzNvx75JUYuQAckPo3w==", "dev": true, "requires": { - "@jest/expect-utils": "^28.1.0", + "@jest/expect-utils": "^28.1.1", "jest-get-type": "^28.0.2", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0" + "jest-matcher-utils": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1" }, "dependencies": { "ansi-styles": { @@ -11924,21 +11924,21 @@ "dev": true }, "diff-sequences": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", - "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", "dev": true }, "jest-diff": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", - "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", + "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^28.0.2", + "diff-sequences": "^28.1.1", "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" } }, "jest-get-type": { @@ -11948,21 +11948,21 @@ "dev": true }, "jest-matcher-utils": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", - "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", + "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^28.1.0", + "jest-diff": "^28.1.1", "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" } }, "pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "requires": { "@jest/schemas": "^28.0.2", @@ -12724,14 +12724,15 @@ } }, "jest": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.0.tgz", - "integrity": "sha512-TZR+tHxopPhzw3c3560IJXZWLNHgpcz1Zh0w5A65vynLGNcg/5pZ+VildAd7+XGOu6jd58XMY/HNn0IkZIXVXg==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-28.1.1.tgz", + "integrity": "sha512-qw9YHBnjt6TCbIDMPMpJZqf9E12rh6869iZaN08/vpOGgHJSAaLLUn6H8W3IAEuy34Ls3rct064mZLETkxJ2XA==", "dev": true, "requires": { - "@jest/core": "^28.1.0", + "@jest/core": "^28.1.1", + "@jest/types": "^28.1.1", "import-local": "^3.0.2", - "jest-cli": "^28.1.0" + "jest-cli": "^28.1.1" } }, "jest-changed-files": { @@ -12817,27 +12818,27 @@ } }, "jest-circus": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.0.tgz", - "integrity": "sha512-rNYfqfLC0L0zQKRKsg4n4J+W1A2fbyGH7Ss/kDIocp9KXD9iaL111glsLu7+Z7FHuZxwzInMDXq+N1ZIBkI/TQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-28.1.1.tgz", + "integrity": "sha512-75+BBVTsL4+p2w198DQpCeyh1RdaS2lhEG87HkaFX/UG0gJExVq2skG2pT7XZEGBubNj2CytcWSPan4QEPNosw==", "dev": true, "requires": { - "@jest/environment": "^28.1.0", - "@jest/expect": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/environment": "^28.1.1", + "@jest/expect": "^28.1.1", + "@jest/test-result": "^28.1.1", + "@jest/types": "^28.1.1", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^28.1.0", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-runtime": "^28.1.0", - "jest-snapshot": "^28.1.0", - "jest-util": "^28.1.0", - "pretty-format": "^28.1.0", + "jest-each": "^28.1.1", + "jest-matcher-utils": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-runtime": "^28.1.1", + "jest-snapshot": "^28.1.1", + "jest-util": "^28.1.1", + "pretty-format": "^28.1.1", "slash": "^3.0.0", "stack-utils": "^2.0.3", "throat": "^6.0.1" @@ -12850,21 +12851,21 @@ "dev": true }, "diff-sequences": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", - "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", "dev": true }, "jest-diff": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", - "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", + "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^28.0.2", + "diff-sequences": "^28.1.1", "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" } }, "jest-get-type": { @@ -12874,21 +12875,21 @@ "dev": true }, "jest-matcher-utils": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", - "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", + "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^28.1.0", + "jest-diff": "^28.1.1", "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" } }, "pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "requires": { "@jest/schemas": "^28.0.2", @@ -12906,51 +12907,51 @@ } }, "jest-cli": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.0.tgz", - "integrity": "sha512-fDJRt6WPRriHrBsvvgb93OxgajHHsJbk4jZxiPqmZbMDRcHskfJBBfTyjFko0jjfprP544hOktdSi9HVgl4VUQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.1.tgz", + "integrity": "sha512-+sUfVbJqb1OjBZ0OdBbI6OWfYM1i7bSfzYy6gze1F1w3OKWq8ZTEKkZ8a7ZQPq6G/G1qMh/uKqpdWhgl11NFQQ==", "dev": true, "requires": { - "@jest/core": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/core": "^28.1.1", + "@jest/test-result": "^28.1.1", + "@jest/types": "^28.1.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^28.1.0", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", + "jest-config": "^28.1.1", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", "prompts": "^2.0.1", "yargs": "^17.3.1" } }, "jest-config": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.0.tgz", - "integrity": "sha512-aOV80E9LeWrmflp7hfZNn/zGA4QKv/xsn2w8QCBP0t0+YqObuCWTSgNbHJ0j9YsTuCO08ZR/wsvlxqqHX20iUA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-28.1.1.tgz", + "integrity": "sha512-tASynMhS+jVV85zKvjfbJ8nUyJS/jUSYZ5KQxLUN2ZCvcQc/OmhQl2j6VEL3ezQkNofxn5pQ3SPYWPHb0unTZA==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^28.1.0", - "@jest/types": "^28.1.0", - "babel-jest": "^28.1.0", + "@jest/test-sequencer": "^28.1.1", + "@jest/types": "^28.1.1", + "babel-jest": "^28.1.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^28.1.0", - "jest-environment-node": "^28.1.0", + "jest-circus": "^28.1.1", + "jest-environment-node": "^28.1.1", "jest-get-type": "^28.0.2", "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.0", - "jest-runner": "^28.1.0", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", + "jest-resolve": "^28.1.1", + "jest-runner": "^28.1.1", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^28.1.0", + "pretty-format": "^28.1.1", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -12974,9 +12975,9 @@ "dev": true }, "pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "requires": { "@jest/schemas": "^28.0.2", @@ -13012,25 +13013,25 @@ } }, "jest-docblock": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.0.2.tgz", - "integrity": "sha512-FH10WWw5NxLoeSdQlJwu+MTiv60aXV/t8KEwIRGEv74WARE1cXIqh1vGdy2CraHuWOOrnzTWj/azQKqW4fO7xg==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-28.1.1.tgz", + "integrity": "sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==", "dev": true, "requires": { "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.0.tgz", - "integrity": "sha512-a/XX02xF5NTspceMpHujmOexvJ4GftpYXqr6HhhmKmExtMXsyIN/fvanQlt/BcgFoRKN4OCXxLQKth9/n6OPFg==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-28.1.1.tgz", + "integrity": "sha512-A042rqh17ZvEhRceDMi784ppoXR7MWGDEKTXEZXb4svt0eShMZvijGxzKsx+yIjeE8QYmHPrnHiTSQVhN4nqaw==", "dev": true, "requires": { - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "chalk": "^4.0.0", "jest-get-type": "^28.0.2", - "jest-util": "^28.1.0", - "pretty-format": "^28.1.0" + "jest-util": "^28.1.1", + "pretty-format": "^28.1.1" }, "dependencies": { "ansi-styles": { @@ -13046,9 +13047,9 @@ "dev": true }, "pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "requires": { "@jest/schemas": "^28.0.2", @@ -13066,33 +13067,33 @@ } }, "jest-environment-jsdom": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.0.tgz", - "integrity": "sha512-8n6P4xiDjNVqTWv6W6vJPuQdLx+ZiA3dbYg7YJ+DPzR+9B61K6pMVJrSs2IxfGRG4J7pyAUA5shQ9G0KEun78w==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.1.tgz", + "integrity": "sha512-41ZvgSoPNcKG5q3LuuOcAczdBxRq9DbZkPe24okN6ZCmiZdAfFtPg3z+lOtsT1fM6OAERApKT+3m0MRDQH2zIA==", "dev": true, "requires": { - "@jest/environment": "^28.1.0", - "@jest/fake-timers": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/environment": "^28.1.1", + "@jest/fake-timers": "^28.1.1", + "@jest/types": "^28.1.1", "@types/jsdom": "^16.2.4", "@types/node": "*", - "jest-mock": "^28.1.0", - "jest-util": "^28.1.0", + "jest-mock": "^28.1.1", + "jest-util": "^28.1.1", "jsdom": "^19.0.0" } }, "jest-environment-node": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.0.tgz", - "integrity": "sha512-gBLZNiyrPw9CSMlTXF1yJhaBgWDPVvH0Pq6bOEwGMXaYNzhzhw2kA/OijNF8egbCgDS0/veRv97249x2CX+udQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-28.1.1.tgz", + "integrity": "sha512-2aV/eeY/WNgUUJrrkDJ3cFEigjC5fqT1+fCclrY6paqJ5zVPoM//sHmfgUUp7WLYxIdbPwMiVIzejpN56MxnNA==", "dev": true, "requires": { - "@jest/environment": "^28.1.0", - "@jest/fake-timers": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/environment": "^28.1.1", + "@jest/fake-timers": "^28.1.1", + "@jest/types": "^28.1.1", "@types/node": "*", - "jest-mock": "^28.1.0", - "jest-util": "^28.1.0" + "jest-mock": "^28.1.1", + "jest-util": "^28.1.1" } }, "jest-get-type": { @@ -13102,12 +13103,12 @@ "dev": true }, "jest-haste-map": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.0.tgz", - "integrity": "sha512-xyZ9sXV8PtKi6NCrJlmq53PyNVHzxmcfXNVvIRHpHmh1j/HChC4pwKgyjj7Z9us19JMw8PpQTJsFWOsIfT93Dw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-28.1.1.tgz", + "integrity": "sha512-ZrRSE2o3Ezh7sb1KmeLEZRZ4mgufbrMwolcFHNRSjKZhpLa8TdooXOOFlSwoUzlbVs1t0l7upVRW2K7RWGHzbQ==", "dev": true, "requires": { - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", @@ -13115,20 +13116,20 @@ "fsevents": "^2.3.2", "graceful-fs": "^4.2.9", "jest-regex-util": "^28.0.2", - "jest-util": "^28.1.0", - "jest-worker": "^28.1.0", + "jest-util": "^28.1.1", + "jest-worker": "^28.1.1", "micromatch": "^4.0.4", - "walker": "^1.0.7" + "walker": "^1.0.8" } }, "jest-leak-detector": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.0.tgz", - "integrity": "sha512-uIJDQbxwEL2AMMs2xjhZl2hw8s77c3wrPaQ9v6tXJLGaaQ+4QrNJH5vuw7hA7w/uGT/iJ42a83opAqxGHeyRIA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-28.1.1.tgz", + "integrity": "sha512-4jvs8V8kLbAaotE+wFR7vfUGf603cwYtFf1/PYEsyX2BAjSzj8hQSVTP6OWzseTl0xL6dyHuKs2JAks7Pfubmw==", "dev": true, "requires": { "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" }, "dependencies": { "ansi-styles": { @@ -13144,9 +13145,9 @@ "dev": true }, "pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "requires": { "@jest/schemas": "^28.0.2", @@ -13176,18 +13177,18 @@ } }, "jest-message-util": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.0.tgz", - "integrity": "sha512-RpA8mpaJ/B2HphDMiDlrAZdDytkmwFqgjDZovM21F35lHGeUeCvYmm6W+sbQ0ydaLpg5bFAUuWG1cjqOl8vqrw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.1.tgz", + "integrity": "sha512-xoDOOT66fLfmTRiqkoLIU7v42mal/SqwDKvfmfiWAdJMSJiU+ozgluO7KbvoAgiwIrrGZsV7viETjc8GNrA/IQ==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^28.1.0", + "pretty-format": "^28.1.1", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -13199,9 +13200,9 @@ "dev": true }, "pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "requires": { "@jest/schemas": "^28.0.2", @@ -13219,12 +13220,12 @@ } }, "jest-mock": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.0.tgz", - "integrity": "sha512-H7BrhggNn77WhdL7O1apG0Q/iwl0Bdd5E1ydhCJzL3oBLh/UYxAwR3EJLsBZ9XA3ZU4PA3UNw4tQjduBTCTmLw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.1.tgz", + "integrity": "sha512-bDCb0FjfsmKweAvE09dZT59IMkzgN0fYBH6t5S45NoJfd2DHkS3ySG2K+hucortryhO3fVuXdlxWcbtIuV/Skw==", "dev": true, "requires": { - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "@types/node": "*" } }, @@ -13242,57 +13243,57 @@ "dev": true }, "jest-resolve": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.0.tgz", - "integrity": "sha512-vvfN7+tPNnnhDvISuzD1P+CRVP8cK0FHXRwPAcdDaQv4zgvwvag2n55/h5VjYcM5UJG7L4TwE5tZlzcI0X2Lhw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.1.tgz", + "integrity": "sha512-/d1UbyUkf9nvsgdBildLe6LAD4DalgkgZcKd0nZ8XUGPyA/7fsnaQIlKVnDiuUXv/IeZhPEDrRJubVSulxrShA==", "dev": true, "requires": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", + "jest-haste-map": "^28.1.1", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^28.1.0", - "jest-validate": "^28.1.0", + "jest-util": "^28.1.1", + "jest-validate": "^28.1.1", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" } }, "jest-resolve-dependencies": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.0.tgz", - "integrity": "sha512-Ue1VYoSZquPwEvng7Uefw8RmZR+me/1kr30H2jMINjGeHgeO/JgrR6wxj2ofkJ7KSAA11W3cOrhNCbj5Dqqd9g==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.1.tgz", + "integrity": "sha512-p8Y150xYJth4EXhOuB8FzmS9r8IGLEioiaetgdNGb9VHka4fl0zqWlVe4v7mSkYOuEUg2uB61iE+zySDgrOmgQ==", "dev": true, "requires": { "jest-regex-util": "^28.0.2", - "jest-snapshot": "^28.1.0" + "jest-snapshot": "^28.1.1" } }, "jest-runner": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.0.tgz", - "integrity": "sha512-FBpmuh1HB2dsLklAlRdOxNTTHKFR6G1Qmd80pVDvwbZXTriqjWqjei5DKFC1UlM732KjYcE6yuCdiF0WUCOS2w==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-28.1.1.tgz", + "integrity": "sha512-W5oFUiDBgTsCloTAj6q95wEvYDB0pxIhY6bc5F26OucnwBN+K58xGTGbliSMI4ChQal5eANDF+xvELaYkJxTmA==", "dev": true, "requires": { - "@jest/console": "^28.1.0", - "@jest/environment": "^28.1.0", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/console": "^28.1.1", + "@jest/environment": "^28.1.1", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.1", + "@jest/types": "^28.1.1", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.10.2", "graceful-fs": "^4.2.9", - "jest-docblock": "^28.0.2", - "jest-environment-node": "^28.1.0", - "jest-haste-map": "^28.1.0", - "jest-leak-detector": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-resolve": "^28.1.0", - "jest-runtime": "^28.1.0", - "jest-util": "^28.1.0", - "jest-watcher": "^28.1.0", - "jest-worker": "^28.1.0", + "jest-docblock": "^28.1.1", + "jest-environment-node": "^28.1.1", + "jest-haste-map": "^28.1.1", + "jest-leak-detector": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-resolve": "^28.1.1", + "jest-runtime": "^28.1.1", + "jest-util": "^28.1.1", + "jest-watcher": "^28.1.1", + "jest-worker": "^28.1.1", "source-map-support": "0.5.13", "throat": "^6.0.1" }, @@ -13310,31 +13311,31 @@ } }, "jest-runtime": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.0.tgz", - "integrity": "sha512-wNYDiwhdH/TV3agaIyVF0lsJ33MhyujOe+lNTUiolqKt8pchy1Hq4+tDMGbtD5P/oNLA3zYrpx73T9dMTOCAcg==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-28.1.1.tgz", + "integrity": "sha512-J89qEJWW0leOsqyi0D9zHpFEYHwwafFdS9xgvhFHtIdRghbadodI0eA+DrthK/1PebBv3Px8mFSMGKrtaVnleg==", "dev": true, "requires": { - "@jest/environment": "^28.1.0", - "@jest/fake-timers": "^28.1.0", - "@jest/globals": "^28.1.0", + "@jest/environment": "^28.1.1", + "@jest/fake-timers": "^28.1.1", + "@jest/globals": "^28.1.1", "@jest/source-map": "^28.0.2", - "@jest/test-result": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/test-result": "^28.1.1", + "@jest/transform": "^28.1.1", + "@jest/types": "^28.1.1", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "execa": "^5.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-mock": "^28.1.0", + "jest-haste-map": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-mock": "^28.1.1", "jest-regex-util": "^28.0.2", - "jest-resolve": "^28.1.0", - "jest-snapshot": "^28.1.0", - "jest-util": "^28.1.0", + "jest-resolve": "^28.1.1", + "jest-snapshot": "^28.1.1", + "jest-util": "^28.1.1", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -13412,9 +13413,9 @@ } }, "jest-snapshot": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.0.tgz", - "integrity": "sha512-ex49M2ZrZsUyQLpLGxQtDbahvgBjlLPgklkqGM0hq/F7W/f8DyqZxVHjdy19QKBm4O93eDp+H5S23EiTbbUmHw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-28.1.1.tgz", + "integrity": "sha512-1KjqHJ98adRcbIdMizjF5DipwZFbvxym/kFO4g4fVZCZRxH/dqV8TiBFCa6rqic3p0karsy8RWS1y4E07b7P0A==", "dev": true, "requires": { "@babel/core": "^7.11.6", @@ -13422,23 +13423,23 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^28.1.0", - "@jest/transform": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/expect-utils": "^28.1.1", + "@jest/transform": "^28.1.1", + "@jest/types": "^28.1.1", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^28.1.0", + "expect": "^28.1.1", "graceful-fs": "^4.2.9", - "jest-diff": "^28.1.0", + "jest-diff": "^28.1.1", "jest-get-type": "^28.0.2", - "jest-haste-map": "^28.1.0", - "jest-matcher-utils": "^28.1.0", - "jest-message-util": "^28.1.0", - "jest-util": "^28.1.0", + "jest-haste-map": "^28.1.1", + "jest-matcher-utils": "^28.1.1", + "jest-message-util": "^28.1.1", + "jest-util": "^28.1.1", "natural-compare": "^1.4.0", - "pretty-format": "^28.1.0", + "pretty-format": "^28.1.1", "semver": "^7.3.5" }, "dependencies": { @@ -13449,21 +13450,21 @@ "dev": true }, "diff-sequences": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.0.2.tgz", - "integrity": "sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", "dev": true }, "jest-diff": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.0.tgz", - "integrity": "sha512-8eFd3U3OkIKRtlasXfiAQfbovgFgRDb0Ngcs2E+FMeBZ4rUezqIaGjuyggJBp+llosQXNEWofk/Sz4Hr5gMUhA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", + "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^28.0.2", + "diff-sequences": "^28.1.1", "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" } }, "jest-get-type": { @@ -13473,21 +13474,21 @@ "dev": true }, "jest-matcher-utils": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.0.tgz", - "integrity": "sha512-onnax0n2uTLRQFKAjC7TuaxibrPSvZgKTcSCnNUz/tOjJ9UhxNm7ZmPpoQavmTDUjXvUQ8KesWk2/VdrxIFzTQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", + "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^28.1.0", + "jest-diff": "^28.1.1", "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" } }, "pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "requires": { "@jest/schemas": "^28.0.2", @@ -13505,12 +13506,12 @@ } }, "jest-util": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.0.tgz", - "integrity": "sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.1.tgz", + "integrity": "sha512-FktOu7ca1DZSyhPAxgxB6hfh2+9zMoJ7aEQA759Z6p45NuO8mWcqujH+UdHlCm/V6JTWwDztM2ITCzU1ijJAfw==", "dev": true, "requires": { - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -13527,17 +13528,17 @@ } }, "jest-validate": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.0.tgz", - "integrity": "sha512-Lly7CJYih3vQBfjLeANGgBSBJ7pEa18cxpQfQEq2go2xyEzehnHfQTjoUia8xUv4x4J80XKFIDwJJThXtRFQXQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-28.1.1.tgz", + "integrity": "sha512-Kpf6gcClqFCIZ4ti5++XemYJWUPCFUW+N2gknn+KgnDf549iLul3cBuKVe1YcWRlaF8tZV8eJCap0eECOEE3Ug==", "dev": true, "requires": { - "@jest/types": "^28.1.0", + "@jest/types": "^28.1.1", "camelcase": "^6.2.0", "chalk": "^4.0.0", "jest-get-type": "^28.0.2", "leven": "^3.1.0", - "pretty-format": "^28.1.0" + "pretty-format": "^28.1.1" }, "dependencies": { "ansi-styles": { @@ -13553,9 +13554,9 @@ "dev": true }, "pretty-format": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.0.tgz", - "integrity": "sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "requires": { "@jest/schemas": "^28.0.2", @@ -13573,25 +13574,25 @@ } }, "jest-watcher": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.0.tgz", - "integrity": "sha512-tNHMtfLE8Njcr2IRS+5rXYA4BhU90gAOwI9frTGOqd+jX0P/Au/JfRSNqsf5nUTcWdbVYuLxS1KjnzILSoR5hA==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.1.tgz", + "integrity": "sha512-RQIpeZ8EIJMxbQrXpJQYIIlubBnB9imEHsxxE41f54ZwcqWLysL/A0ZcdMirf+XsMn3xfphVQVV4EW0/p7i7Ug==", "dev": true, "requires": { - "@jest/test-result": "^28.1.0", - "@jest/types": "^28.1.0", + "@jest/test-result": "^28.1.1", + "@jest/types": "^28.1.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.10.2", - "jest-util": "^28.1.0", + "jest-util": "^28.1.1", "string-length": "^4.0.1" } }, "jest-worker": { - "version": "28.1.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.0.tgz", - "integrity": "sha512-ZHwM6mNwaWBR52Snff8ZvsCTqQsvhCxP/bT1I6T6DAnb6ygkshsyLQIMxFwHpYxht0HOoqt23JlC01viI7T03A==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.1.tgz", + "integrity": "sha512-Au7slXB08C6h+xbJPp7VIb6U0XX5Kc9uel/WFc6/rcTzGiaVCBRngBExSYuXSLFPULPSYU3cJ3ybS988lNFQhQ==", "dev": true, "requires": { "@types/node": "*", @@ -14212,9 +14213,9 @@ } }, "npm-check-updates": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.1.1.tgz", - "integrity": "sha512-f4gLbUJJh5qvkNvrSG3b05y3ZvyZ4Sl3Uk95DSyCjIWwpwmAwzU9dMCA/Gg2AmIKqkH4ml6X9kxcZsu+tAd94g==", + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.1.5.tgz", + "integrity": "sha512-vAVYlrrxJIPH/R5mxMzrNwP33hYflvk7oQqPjPOySCavCFwhXKmfK5sn/rogyebg7cLnECiDxsczGqvTOEBRAA==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -14948,7 +14949,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, "require-from-string": { @@ -15028,9 +15029,9 @@ } }, "rollup": { - "version": "2.75.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.5.tgz", - "integrity": "sha512-JzNlJZDison3o2mOxVmb44Oz7t74EfSd1SQrplQk0wSaXV7uLQXtVdHbxlcT3w+8tZ1TL4r/eLfc7nAbz38BBA==", + "version": "2.75.6", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.6.tgz", + "integrity": "sha512-OEf0TgpC9vU6WGROJIk1JA3LR5vk/yvqlzxqdrE2CzzXnqKXNzbAwlWUXis8RS3ZPe7LAq+YUxsRa0l3r27MLA==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -15682,9 +15683,9 @@ } }, "ts-jest": { - "version": "28.0.4", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.4.tgz", - "integrity": "sha512-S6uRDDdCJBvnZqyGjB4VCnwbQrbgdL8WPeP4jevVSpYsBaeGRQAIS08o3Svav2Ex+oXwLgJ/m7F24TNq62kA1A==", + "version": "28.0.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-28.0.5.tgz", + "integrity": "sha512-Sx9FyP9pCY7pUzQpy4FgRZf2bhHY3za576HMKJFs+OnQ9jS96Du5vNsDKkyedQkik+sEabbKAnCliv9BEsHZgQ==", "dev": true, "requires": { "bs-logger": "0.x", @@ -15694,7 +15695,7 @@ "lodash.memoize": "4.x", "make-error": "1.x", "semver": "7.x", - "yargs-parser": "^20.x" + "yargs-parser": "^21.0.1" } }, "tslib": { @@ -15702,6 +15703,7 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", "dev": true, + "optional": true, "peer": true }, "tsutils": { @@ -16112,20 +16114,12 @@ "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.0.0" - }, - "dependencies": { - "yargs-parser": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", - "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", - "dev": true - } } }, "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==", "dev": true }, "yocto-queue": { diff --git a/package.json b/package.json index 9aa550aa..22fd1a63 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "dist" ], "devDependencies": { - "npm-check-updates": "^13.1.1", + "npm-check-updates": "^13.1.5", "serve": "^13.0.2", "typedoc": "^0.22.17" }, diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index 34dcd0bf..fee12134 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -18,14 +18,14 @@ "devDependencies": { "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", - "@typescript-eslint/eslint-plugin": "^5.27.1", - "@typescript-eslint/parser": "^5.27.1", + "@rollup/plugin-typescript": "^8.3.3", + "@typescript-eslint/eslint-plugin": "^5.28.0", + "@typescript-eslint/parser": "^5.28.0", "eslint": "^8.17.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", "prettier": "^2.6.2", - "rollup": "^2.75.5", + "rollup": "^2.75.6", "typescript": "^4.7.3" }, "dependencies": { diff --git a/packages/sdk/package.json b/packages/sdk/package.json index fbd0effc..df53d6c5 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -11,19 +11,19 @@ "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", - "@rollup/plugin-typescript": "^8.3.2", + "@rollup/plugin-typescript": "^8.3.3", "@types/jest": "^28.1.1", - "@typescript-eslint/eslint-plugin": "5.27.1", - "@typescript-eslint/parser": "5.27.1", + "@typescript-eslint/eslint-plugin": "5.28.0", + "@typescript-eslint/parser": "5.28.0", "eslint": "8.17.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", - "jest": "^28.1.0", - "jest-environment-jsdom": "^28.1.0", + "jest": "^28.1.1", + "jest-environment-jsdom": "^28.1.1", "prettier": "^2.6.2", - "rollup": "^2.75.5", + "rollup": "^2.75.6", "rollup-plugin-terser": "^7.0.2", - "ts-jest": "^28.0.4", + "ts-jest": "^28.0.5", "typescript": "^4.7.3" }, "dependencies": { From e44f1d73fffce71b677ef55b63ca2ce73493e35c Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Tue, 21 Jun 2022 10:04:05 +0900 Subject: [PATCH 82/86] =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 1290 ++++++------------------------------ package.json | 2 +- packages/e2ee/package.json | 12 +- packages/sdk/package.json | 14 +- 4 files changed, 231 insertions(+), 1087 deletions(-) diff --git a/package-lock.json b/package-lock.json index 393b7002..e05b9585 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "packages/sdk" ], "devDependencies": { - "npm-check-updates": "^13.1.5", + "npm-check-updates": "^14.0.1", "serve": "^13.0.2", "typedoc": "^0.22.17" } @@ -884,45 +884,12 @@ } } }, - "node_modules/@jest/core/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/@jest/core/node_modules/ci-info": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", "dev": true }, - "node_modules/@jest/core/node_modules/pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/@jest/core/node_modules/react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - }, "node_modules/@jest/environment": { "version": "28.1.1", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-28.1.1.tgz", @@ -963,15 +930,6 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/@jest/expect-utils/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, "node_modules/@jest/fake-timers": { "version": "28.1.1", "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-28.1.1.tgz", @@ -1572,6 +1530,16 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/jest": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.2.tgz", + "integrity": "sha512-5dNM7mMuIrCtNJsFfvUO/5xCrG8swuT2c7ND+sl3XwlwxJf3k7e7o+PRvcFN/iIm8XhCqHqxLOj9yutDDOJoRg==", + "dev": true, + "dependencies": { + "jest-matcher-utils": "^28.0.0", + "pretty-format": "^28.0.0" + } + }, "node_modules/@types/jsdom": { "version": "16.2.14", "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-16.2.14.tgz", @@ -1644,14 +1612,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.28.0.tgz", - "integrity": "sha512-DXVU6Cg29H2M6EybqSg2A+x8DgO9TCUBRp4QEXQHJceLS7ogVDP0g3Lkg/SZCqcvkAP/RruuQqK0gdlkgmhSUA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.29.0.tgz", + "integrity": "sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.28.0", - "@typescript-eslint/type-utils": "5.28.0", - "@typescript-eslint/utils": "5.28.0", + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/type-utils": "5.29.0", + "@typescript-eslint/utils": "5.29.0", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -1677,14 +1645,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.28.0.tgz", - "integrity": "sha512-ekqoNRNK1lAcKhZESN/PdpVsWbP9jtiNqzFWkp/yAUdZvJalw2heCYuqRmM5eUJSIYEkgq5sGOjq+ZqsLMjtRA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.29.0.tgz", + "integrity": "sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.28.0", - "@typescript-eslint/types": "5.28.0", - "@typescript-eslint/typescript-estree": "5.28.0", + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/typescript-estree": "5.29.0", "debug": "^4.3.4" }, "engines": { @@ -1704,13 +1672,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.28.0.tgz", - "integrity": "sha512-LeBLTqF/he1Z+boRhSqnso6YrzcKMTQ8bO/YKEe+6+O/JGof9M0g3IJlIsqfrK/6K03MlFIlycbf1uQR1IjE+w==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.29.0.tgz", + "integrity": "sha512-etbXUT0FygFi2ihcxDZjz21LtC+Eps9V2xVx09zFoN44RRHPrkMflidGMI+2dUs821zR1tDS6Oc9IXxIjOUZwA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.28.0", - "@typescript-eslint/visitor-keys": "5.28.0" + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/visitor-keys": "5.29.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1721,12 +1689,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.28.0.tgz", - "integrity": "sha512-SyKjKh4CXPglueyC6ceAFytjYWMoPHMswPQae236zqe1YbhvCVQyIawesYywGiu98L9DwrxsBN69vGIVxJ4mQQ==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.29.0.tgz", + "integrity": "sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.28.0", + "@typescript-eslint/utils": "5.29.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1747,9 +1715,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.28.0.tgz", - "integrity": "sha512-2OOm8ZTOQxqkPbf+DAo8oc16sDlVR5owgJfKheBkxBKg1vAfw2JsSofH9+16VPlN9PWtv8Wzhklkqw3k/zCVxA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.29.0.tgz", + "integrity": "sha512-X99VbqvAXOMdVyfFmksMy3u8p8yoRGITgU1joBJPzeYa0rhdf5ok9S56/itRoUSh99fiDoMtarSIJXo7H/SnOg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1760,13 +1728,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.28.0.tgz", - "integrity": "sha512-9GX+GfpV+F4hdTtYc6OV9ZkyYilGXPmQpm6AThInpBmKJEyRSIjORJd1G9+bknb7OTFYL+Vd4FBJAO6T78OVqA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.29.0.tgz", + "integrity": "sha512-mQvSUJ/JjGBdvo+1LwC+GY2XmSYjK1nAaVw2emp/E61wEVYEyibRHCqm1I1vEKbXCpUKuW4G7u9ZCaZhJbLoNQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.28.0", - "@typescript-eslint/visitor-keys": "5.28.0", + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/visitor-keys": "5.29.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1787,15 +1755,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.28.0.tgz", - "integrity": "sha512-E60N5L0fjv7iPJV3UGc4EC+A3Lcj4jle9zzR0gW7vXhflO7/J29kwiTGITA2RlrmPokKiZbBy2DgaclCaEUs6g==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.29.0.tgz", + "integrity": "sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.28.0", - "@typescript-eslint/types": "5.28.0", - "@typescript-eslint/typescript-estree": "5.28.0", + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/typescript-estree": "5.29.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -1811,12 +1779,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.28.0.tgz", - "integrity": "sha512-BtfP1vCor8cWacovzzPFOoeW4kBQxzmhxGoOpt0v1SFvG+nJ0cWaVdJk7cky1ArTcFHHKNIxyo2LLr3oNkSuXA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.29.0.tgz", + "integrity": "sha512-Hpb/mCWsjILvikMQoZIE3voc9wtQcS0A9FUw3h8bhr9UxBdtI/tw1ZDZUOXHXLOVMedKCH5NxyzATwnU78bWCQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.28.0", + "@typescript-eslint/types": "5.29.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -2964,12 +2932,12 @@ } }, "node_modules/diff-sequences": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", - "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", "dev": true, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/dir-glob": { @@ -3203,9 +3171,9 @@ } }, "node_modules/eslint": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.17.0.tgz", - "integrity": "sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", + "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.0", @@ -3596,87 +3564,6 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/expect/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/expect/node_modules/diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/expect/node_modules/jest-diff": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", - "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/expect/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/expect/node_modules/jest-matcher-utils": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", - "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/expect/node_modules/pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/expect/node_modules/react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4811,87 +4698,6 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-circus/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-circus/node_modules/diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-circus/node_modules/jest-diff": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", - "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-circus/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-circus/node_modules/jest-matcher-utils": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", - "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-circus/node_modules/pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-circus/node_modules/react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - }, "node_modules/jest-cli": { "version": "28.1.1", "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-28.1.1.tgz", @@ -4971,54 +4777,12 @@ } } }, - "node_modules/jest-config/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-config/node_modules/ci-info": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", "dev": true }, - "node_modules/jest-config/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-config/node_modules/pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-config/node_modules/react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - }, "node_modules/jest-config/node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -5032,18 +4796,18 @@ } }, "node_modules/jest-diff": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", - "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", + "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "diff-sequences": "^28.1.1", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-docblock": { @@ -5074,48 +4838,6 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-each/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-each/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-each/node_modules/pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-each/node_modules/react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - }, "node_modules/jest-environment-jsdom": { "version": "28.1.1", "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-28.1.1.tgz", @@ -5153,12 +4875,12 @@ } }, "node_modules/jest-get-type": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", - "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", "dev": true, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-haste-map": { @@ -5199,61 +4921,19 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-leak-detector/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-leak-detector/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-leak-detector/node_modules/pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-leak-detector/node_modules/react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - }, "node_modules/jest-matcher-utils": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", - "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", + "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "jest-diff": "^28.1.1", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/jest-message-util": { @@ -5276,39 +4956,6 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-message-util/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-message-util/node_modules/pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-message-util/node_modules/react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - }, "node_modules/jest-mock": { "version": "28.1.1", "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-28.1.1.tgz", @@ -5585,95 +5232,14 @@ "jest-matcher-utils": "^28.1.1", "jest-message-util": "^28.1.1", "jest-util": "^28.1.1", - "natural-compare": "^1.4.0", - "pretty-format": "^28.1.1", - "semver": "^7.3.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-snapshot/node_modules/diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/jest-diff": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", - "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/jest-matcher-utils": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", - "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "natural-compare": "^1.4.0", + "pretty-format": "^28.1.1", + "semver": "^7.3.5" }, "engines": { "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-snapshot/node_modules/react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - }, "node_modules/jest-util": { "version": "28.1.1", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-28.1.1.tgz", @@ -5714,48 +5280,6 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, - "node_modules/jest-validate/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-validate/node_modules/jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-validate/node_modules/pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" - } - }, - "node_modules/jest-validate/node_modules/react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - }, "node_modules/jest-watcher": { "version": "28.1.1", "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-28.1.1.tgz", @@ -6562,9 +6086,9 @@ } }, "node_modules/npm-check-updates": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.1.5.tgz", - "integrity": "sha512-vAVYlrrxJIPH/R5mxMzrNwP33hYflvk7oQqPjPOySCavCFwhXKmfK5sn/rogyebg7cLnECiDxsczGqvTOEBRAA==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-14.0.1.tgz", + "integrity": "sha512-CjHKxcJur/OiVc2GKBagUrzDsXL8JJC71rNVv2mC7eNA6w/ebe3POx9x46ay4p3woSxJOa7hYWNn1UwL7jgHug==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -6582,7 +6106,7 @@ "lodash": "^4.17.21", "minimatch": "^5.1.0", "p-map": "^4.0.0", - "pacote": "^13.5.0", + "pacote": "^13.6.0", "parse-github-url": "^1.0.2", "progress": "^2.0.3", "prompts": "^2.4.2", @@ -7223,9 +6747,9 @@ } }, "node_modules/prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -7250,17 +6774,18 @@ } }, "node_modules/pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "dependencies": { + "@jest/schemas": "^28.0.2", "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "react-is": "^18.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, "node_modules/pretty-format/node_modules/ansi-styles": { @@ -7425,9 +6950,9 @@ } }, "node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, "node_modules/read-package-json": { @@ -7652,9 +7177,9 @@ } }, "node_modules/rollup": { - "version": "2.75.6", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.6.tgz", - "integrity": "sha512-OEf0TgpC9vU6WGROJIk1JA3LR5vk/yvqlzxqdrE2CzzXnqKXNzbAwlWUXis8RS3ZPe7LAq+YUxsRa0l3r27MLA==", + "version": "2.75.7", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.7.tgz", + "integrity": "sha512-VSE1iy0eaAYNCxEXaleThdFXqZJ42qDBatAwrfnPlENEZ8erQ+0LYX4JXOLPceWfZpV1VtZwZ3dFCuOZiSyFtQ==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -8629,9 +8154,9 @@ } }, "node_modules/typescript": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.3.tgz", - "integrity": "sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA==", + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -9089,14 +8614,14 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.3", - "@typescript-eslint/eslint-plugin": "^5.28.0", - "@typescript-eslint/parser": "^5.28.0", - "eslint": "^8.17.0", + "@typescript-eslint/eslint-plugin": "^5.29.0", + "@typescript-eslint/parser": "^5.29.0", + "eslint": "^8.18.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.6.2", - "rollup": "^2.75.6", - "typescript": "^4.7.3" + "prettier": "^2.7.1", + "rollup": "^2.75.7", + "typescript": "^4.7.4" } }, "packages/go-wasm": { @@ -9114,29 +8639,19 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.3", - "@types/jest": "^28.1.1", - "@typescript-eslint/eslint-plugin": "5.28.0", - "@typescript-eslint/parser": "5.28.0", - "eslint": "8.17.0", + "@types/jest": "^28.1.2", + "@typescript-eslint/eslint-plugin": "5.29.0", + "@typescript-eslint/parser": "5.29.0", + "eslint": "8.18.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^28.1.1", "jest-environment-jsdom": "^28.1.1", - "prettier": "^2.6.2", - "rollup": "^2.75.6", + "prettier": "^2.7.1", + "rollup": "^2.75.7", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^28.0.5", - "typescript": "^4.7.3" - } - }, - "packages/sdk/node_modules/@types/jest": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.1.tgz", - "integrity": "sha512-C2p7yqleUKtCkVjlOur9BWVA4HgUQmEj/HWCt5WzZ5mLXrWnyIfl0wGuArc+kBXsy0ZZfLp+7dywB4HtSVYGVA==", - "dev": true, - "dependencies": { - "jest-matcher-utils": "^27.0.0", - "pretty-format": "^27.0.0" + "typescript": "^4.7.4" } } }, @@ -9812,35 +9327,11 @@ "strip-ansi": "^6.0.0" }, "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, "ci-info": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", "dev": true - }, - "pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true } } }, @@ -9873,14 +9364,6 @@ "dev": true, "requires": { "jest-get-type": "^28.0.2" - }, - "dependencies": { - "jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true - } } }, "@jest/fake-timers": { @@ -10269,14 +9752,14 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.3", "@sora/go-wasm": "^2021.1.0", - "@typescript-eslint/eslint-plugin": "^5.28.0", - "@typescript-eslint/parser": "^5.28.0", - "eslint": "^8.17.0", + "@typescript-eslint/eslint-plugin": "^5.29.0", + "@typescript-eslint/parser": "^5.29.0", + "eslint": "^8.18.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.6.2", - "rollup": "^2.75.6", - "typescript": "^4.7.3" + "prettier": "^2.7.1", + "rollup": "^2.75.7", + "typescript": "^4.7.4" } }, "@sora/go-wasm": { @@ -10290,32 +9773,20 @@ "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.3", "@sora/e2ee": "^2021.1.0", - "@types/jest": "^28.1.1", - "@typescript-eslint/eslint-plugin": "5.28.0", - "@typescript-eslint/parser": "5.28.0", - "eslint": "8.17.0", + "@types/jest": "^28.1.2", + "@typescript-eslint/eslint-plugin": "5.29.0", + "@typescript-eslint/parser": "5.29.0", + "eslint": "8.18.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "fflate": "^0.7.3", "jest": "^28.1.1", "jest-environment-jsdom": "^28.1.1", - "prettier": "^2.6.2", - "rollup": "^2.75.6", + "prettier": "^2.7.1", + "rollup": "^2.75.7", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^28.0.5", - "typescript": "^4.7.3" - }, - "dependencies": { - "@types/jest": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.1.tgz", - "integrity": "sha512-C2p7yqleUKtCkVjlOur9BWVA4HgUQmEj/HWCt5WzZ5mLXrWnyIfl0wGuArc+kBXsy0ZZfLp+7dywB4HtSVYGVA==", - "dev": true, - "requires": { - "jest-matcher-utils": "^27.0.0", - "pretty-format": "^27.0.0" - } - } + "typescript": "^4.7.4" } }, "@szmarczak/http-timer": { @@ -10413,6 +9884,16 @@ "@types/istanbul-lib-report": "*" } }, + "@types/jest": { + "version": "28.1.2", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-28.1.2.tgz", + "integrity": "sha512-5dNM7mMuIrCtNJsFfvUO/5xCrG8swuT2c7ND+sl3XwlwxJf3k7e7o+PRvcFN/iIm8XhCqHqxLOj9yutDDOJoRg==", + "dev": true, + "requires": { + "jest-matcher-utils": "^28.0.0", + "pretty-format": "^28.0.0" + } + }, "@types/jsdom": { "version": "16.2.14", "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-16.2.14.tgz", @@ -10485,14 +9966,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.28.0.tgz", - "integrity": "sha512-DXVU6Cg29H2M6EybqSg2A+x8DgO9TCUBRp4QEXQHJceLS7ogVDP0g3Lkg/SZCqcvkAP/RruuQqK0gdlkgmhSUA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.29.0.tgz", + "integrity": "sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.28.0", - "@typescript-eslint/type-utils": "5.28.0", - "@typescript-eslint/utils": "5.28.0", + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/type-utils": "5.29.0", + "@typescript-eslint/utils": "5.29.0", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -10502,52 +9983,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.28.0.tgz", - "integrity": "sha512-ekqoNRNK1lAcKhZESN/PdpVsWbP9jtiNqzFWkp/yAUdZvJalw2heCYuqRmM5eUJSIYEkgq5sGOjq+ZqsLMjtRA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.29.0.tgz", + "integrity": "sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.28.0", - "@typescript-eslint/types": "5.28.0", - "@typescript-eslint/typescript-estree": "5.28.0", + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/typescript-estree": "5.29.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.28.0.tgz", - "integrity": "sha512-LeBLTqF/he1Z+boRhSqnso6YrzcKMTQ8bO/YKEe+6+O/JGof9M0g3IJlIsqfrK/6K03MlFIlycbf1uQR1IjE+w==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.29.0.tgz", + "integrity": "sha512-etbXUT0FygFi2ihcxDZjz21LtC+Eps9V2xVx09zFoN44RRHPrkMflidGMI+2dUs821zR1tDS6Oc9IXxIjOUZwA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.28.0", - "@typescript-eslint/visitor-keys": "5.28.0" + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/visitor-keys": "5.29.0" } }, "@typescript-eslint/type-utils": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.28.0.tgz", - "integrity": "sha512-SyKjKh4CXPglueyC6ceAFytjYWMoPHMswPQae236zqe1YbhvCVQyIawesYywGiu98L9DwrxsBN69vGIVxJ4mQQ==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.29.0.tgz", + "integrity": "sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.28.0", + "@typescript-eslint/utils": "5.29.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.28.0.tgz", - "integrity": "sha512-2OOm8ZTOQxqkPbf+DAo8oc16sDlVR5owgJfKheBkxBKg1vAfw2JsSofH9+16VPlN9PWtv8Wzhklkqw3k/zCVxA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.29.0.tgz", + "integrity": "sha512-X99VbqvAXOMdVyfFmksMy3u8p8yoRGITgU1joBJPzeYa0rhdf5ok9S56/itRoUSh99fiDoMtarSIJXo7H/SnOg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.28.0.tgz", - "integrity": "sha512-9GX+GfpV+F4hdTtYc6OV9ZkyYilGXPmQpm6AThInpBmKJEyRSIjORJd1G9+bknb7OTFYL+Vd4FBJAO6T78OVqA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.29.0.tgz", + "integrity": "sha512-mQvSUJ/JjGBdvo+1LwC+GY2XmSYjK1nAaVw2emp/E61wEVYEyibRHCqm1I1vEKbXCpUKuW4G7u9ZCaZhJbLoNQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.28.0", - "@typescript-eslint/visitor-keys": "5.28.0", + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/visitor-keys": "5.29.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -10556,26 +10037,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.28.0.tgz", - "integrity": "sha512-E60N5L0fjv7iPJV3UGc4EC+A3Lcj4jle9zzR0gW7vXhflO7/J29kwiTGITA2RlrmPokKiZbBy2DgaclCaEUs6g==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.29.0.tgz", + "integrity": "sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.28.0", - "@typescript-eslint/types": "5.28.0", - "@typescript-eslint/typescript-estree": "5.28.0", + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/typescript-estree": "5.29.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.28.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.28.0.tgz", - "integrity": "sha512-BtfP1vCor8cWacovzzPFOoeW4kBQxzmhxGoOpt0v1SFvG+nJ0cWaVdJk7cky1ArTcFHHKNIxyo2LLr3oNkSuXA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.29.0.tgz", + "integrity": "sha512-Hpb/mCWsjILvikMQoZIE3voc9wtQcS0A9FUw3h8bhr9UxBdtI/tw1ZDZUOXHXLOVMedKCH5NxyzATwnU78bWCQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.28.0", + "@typescript-eslint/types": "5.29.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -11449,9 +10930,9 @@ "dev": true }, "diff-sequences": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", - "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", + "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", "dev": true }, "dir-glob": { @@ -11633,9 +11114,9 @@ } }, "eslint": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.17.0.tgz", - "integrity": "sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", + "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0", @@ -11915,68 +11396,6 @@ "jest-matcher-utils": "^28.1.1", "jest-message-util": "^28.1.1", "jest-util": "^28.1.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, - "diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", - "dev": true - }, - "jest-diff": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", - "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - } - }, - "jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true - }, - "jest-matcher-utils": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", - "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - } - }, - "pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - } } }, "fast-deep-equal": { @@ -12842,68 +12261,6 @@ "slash": "^3.0.0", "stack-utils": "^2.0.3", "throat": "^6.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, - "diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", - "dev": true - }, - "jest-diff": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", - "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - } - }, - "jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true - }, - "jest-matcher-utils": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", - "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - } - }, - "pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - } } }, "jest-cli": { @@ -12956,42 +12313,12 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, "ci-info": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", "dev": true }, - "jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true - }, - "pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -13001,15 +12328,15 @@ } }, "jest-diff": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", - "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", + "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "diff-sequences": "^28.1.1", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.1" } }, "jest-docblock": { @@ -13032,38 +12359,6 @@ "jest-get-type": "^28.0.2", "jest-util": "^28.1.1", "pretty-format": "^28.1.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, - "jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true - }, - "pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - } } }, "jest-environment-jsdom": { @@ -13097,9 +12392,9 @@ } }, "jest-get-type": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", - "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", + "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", "dev": true }, "jest-haste-map": { @@ -13130,50 +12425,18 @@ "requires": { "jest-get-type": "^28.0.2", "pretty-format": "^28.1.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, - "jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true - }, - "pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - } } }, "jest-matcher-utils": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", - "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", + "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "jest-diff": "^28.1.1", + "jest-get-type": "^28.0.2", + "pretty-format": "^28.1.1" } }, "jest-message-util": { @@ -13191,32 +12454,6 @@ "pretty-format": "^28.1.1", "slash": "^3.0.0", "stack-utils": "^2.0.3" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, - "pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - } } }, "jest-mock": { @@ -13441,68 +12678,6 @@ "natural-compare": "^1.4.0", "pretty-format": "^28.1.1", "semver": "^7.3.5" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, - "diff-sequences": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", - "integrity": "sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==", - "dev": true - }, - "jest-diff": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.1.tgz", - "integrity": "sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - } - }, - "jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true - }, - "jest-matcher-utils": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz", - "integrity": "sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^28.1.1", - "jest-get-type": "^28.0.2", - "pretty-format": "^28.1.1" - } - }, - "pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - } } }, "jest-util": { @@ -13539,38 +12714,6 @@ "jest-get-type": "^28.0.2", "leven": "^3.1.0", "pretty-format": "^28.1.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, - "jest-get-type": { - "version": "28.0.2", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz", - "integrity": "sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==", - "dev": true - }, - "pretty-format": { - "version": "28.1.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", - "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", - "dev": true, - "requires": { - "@jest/schemas": "^28.0.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - } - }, - "react-is": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.1.0.tgz", - "integrity": "sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg==", - "dev": true - } } }, "jest-watcher": { @@ -14213,9 +13356,9 @@ } }, "npm-check-updates": { - "version": "13.1.5", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-13.1.5.tgz", - "integrity": "sha512-vAVYlrrxJIPH/R5mxMzrNwP33hYflvk7oQqPjPOySCavCFwhXKmfK5sn/rogyebg7cLnECiDxsczGqvTOEBRAA==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-14.0.1.tgz", + "integrity": "sha512-CjHKxcJur/OiVc2GKBagUrzDsXL8JJC71rNVv2mC7eNA6w/ebe3POx9x46ay4p3woSxJOa7hYWNn1UwL7jgHug==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -14233,7 +13376,7 @@ "lodash": "^4.17.21", "minimatch": "^5.1.0", "p-map": "^4.0.0", - "pacote": "^13.5.0", + "pacote": "^13.6.0", "parse-github-url": "^1.0.2", "progress": "^2.0.3", "prompts": "^2.4.2", @@ -14714,9 +13857,9 @@ "dev": true }, "prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "dev": true }, "prettier-linter-helpers": { @@ -14729,14 +13872,15 @@ } }, "pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "version": "28.1.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.1.tgz", + "integrity": "sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw==", "dev": true, "requires": { + "@jest/schemas": "^28.0.2", "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "react-is": "^18.0.0" }, "dependencies": { "ansi-styles": { @@ -14862,9 +14006,9 @@ } }, "react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, "read-package-json": { @@ -15029,9 +14173,9 @@ } }, "rollup": { - "version": "2.75.6", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.6.tgz", - "integrity": "sha512-OEf0TgpC9vU6WGROJIk1JA3LR5vk/yvqlzxqdrE2CzzXnqKXNzbAwlWUXis8RS3ZPe7LAq+YUxsRa0l3r27MLA==", + "version": "2.75.7", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.7.tgz", + "integrity": "sha512-VSE1iy0eaAYNCxEXaleThdFXqZJ42qDBatAwrfnPlENEZ8erQ+0LYX4JXOLPceWfZpV1VtZwZ3dFCuOZiSyFtQ==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -15782,9 +14926,9 @@ } }, "typescript": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.3.tgz", - "integrity": "sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA==", + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", "dev": true }, "unique-filename": { diff --git a/package.json b/package.json index 22fd1a63..a87c1ee6 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "dist" ], "devDependencies": { - "npm-check-updates": "^13.1.5", + "npm-check-updates": "^14.0.1", "serve": "^13.0.2", "typedoc": "^0.22.17" }, diff --git a/packages/e2ee/package.json b/packages/e2ee/package.json index fee12134..34a91439 100644 --- a/packages/e2ee/package.json +++ b/packages/e2ee/package.json @@ -19,14 +19,14 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.3", - "@typescript-eslint/eslint-plugin": "^5.28.0", - "@typescript-eslint/parser": "^5.28.0", - "eslint": "^8.17.0", + "@typescript-eslint/eslint-plugin": "^5.29.0", + "@typescript-eslint/parser": "^5.29.0", + "eslint": "^8.18.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", - "prettier": "^2.6.2", - "rollup": "^2.75.6", - "typescript": "^4.7.3" + "prettier": "^2.7.1", + "rollup": "^2.75.7", + "typescript": "^4.7.4" }, "dependencies": { "@sora/go-wasm": "^2021.1.0" diff --git a/packages/sdk/package.json b/packages/sdk/package.json index df53d6c5..696c4d4a 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -12,19 +12,19 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-typescript": "^8.3.3", - "@types/jest": "^28.1.1", - "@typescript-eslint/eslint-plugin": "5.28.0", - "@typescript-eslint/parser": "5.28.0", - "eslint": "8.17.0", + "@types/jest": "^28.1.2", + "@typescript-eslint/eslint-plugin": "5.29.0", + "@typescript-eslint/parser": "5.29.0", + "eslint": "8.18.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-prettier": "4.0.0", "jest": "^28.1.1", "jest-environment-jsdom": "^28.1.1", - "prettier": "^2.6.2", - "rollup": "^2.75.6", + "prettier": "^2.7.1", + "rollup": "^2.75.7", "rollup-plugin-terser": "^7.0.2", "ts-jest": "^28.0.5", - "typescript": "^4.7.3" + "typescript": "^4.7.4" }, "dependencies": { "@sora/e2ee": "^2021.1.0", From efd71e0c440e300e124ecc94e5edd5e4c6dabb15 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Wed, 22 Jun 2022 15:28:19 +0900 Subject: [PATCH 83/86] =?UTF-8?q?CHANGES=20=E3=82=92=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index b10dbf53..50d596aa 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,7 +9,7 @@ - FIX - バグ修正 -## develop +## 2022.1.0 - [CHANGE] 切断処理時に MediaStream の停止処理をしないように変更する - @yuitowest - [CHANGE] ConnectionOptions からシグナリング type: connect メッセージを生成する仕組みを変更する From 630101e9e29969a7c5d113ad9706dd6fe1209e2b Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Wed, 22 Jun 2022 15:29:23 +0900 Subject: [PATCH 84/86] =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e05b9585..b240a491 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sora-js-sdk", - "version": "2022.1.0-canary.6", + "version": "2022.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "sora-js-sdk", - "version": "2022.1.0-canary.6", + "version": "2022.1.0", "license": "Apache-2.0", "workspaces": [ "packages/go-wasm", diff --git a/package.json b/package.json index a87c1ee6..7ca348b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sora-js-sdk", - "version": "2022.1.0-canary.6", + "version": "2022.1.0", "description": "WebRTC SFU Sora JavaScript SDK", "main": "dist/sora.min.js", "module": "dist/sora.mjs", From e1804948f67bb4e80742ae951afdc60d7ea2ccd2 Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Wed, 22 Jun 2022 15:31:15 +0900 Subject: [PATCH 85/86] =?UTF-8?q?README=20=E3=82=92=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5b527c96..92de83dd 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Please read https://github.com/shiguredo/oss before use. ## システム条件 -- WebRTC SFU Sora 2021.2 以降 +- WebRTC SFU Sora 2022.1 以降 - TypeScript 3.8 以降 ## サンプル From 0ade5a2bc06c5a9e352cb38a81b84adcdf504a9d Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Wed, 22 Jun 2022 15:33:21 +0900 Subject: [PATCH 86/86] =?UTF-8?q?=E6=88=90=E6=9E=9C=E7=89=A9=E3=82=92?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/sora.js | 6 +++--- dist/sora.min.js | 2 +- dist/sora.min.js.map | 2 +- dist/sora.mjs | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/sora.js b/dist/sora.js index 8fb82bde..dd9de941 100644 --- a/dist/sora.js +++ b/dist/sora.js @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2022.1.0-canary.6 + * @version: 2022.1.0 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -1633,7 +1633,7 @@ } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2022.1.0-canary.6", + sora_client: "Sora JavaScript SDK 2022.1.0", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -4391,7 +4391,7 @@ * @public */ version: function () { - return "2022.1.0-canary.6"; + return "2022.1.0"; }, /** * WebRTC のユーティリティ関数群 diff --git a/dist/sora.min.js b/dist/sora.min.js index 31c90e5c..9a21878b 100644 --- a/dist/sora.min.js +++ b/dist/sora.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sora=t()}(this,(function(){"use strict";class e{constructor(){if(!!!RTCRtpSender.prototype.createEncodedStreams)throw new Error("E2EE is not supported in this browser.");this.worker=null,this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2lsZW5jZUZyYW1lKGVuY29kZWRGcmFtZSkgewogICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkLCByZWNlaXZlTWVzc2FnZSDlj5fkv6HliY3jga7loLTlkIgKICAgIGlmIChlbmNvZGVkRnJhbWUudHlwZSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgLy8g6Z+z5aOw44Gv5pqX5Y+35YyW44Gv44GE44KL44Go6IGe44GR44Gf44KC44Gu44GY44KD44Gq44GE44Gu44Gn572u44GN5o+b44GI44KLCiAgICAgICAgY29uc3QgbmV3RGF0YSA9IG5ldyBBcnJheUJ1ZmZlcigzKTsKICAgICAgICBjb25zdCBuZXdVaW50OCA9IG5ldyBVaW50OEFycmF5KG5ld0RhdGEpOwogICAgICAgIC8vIE9wdXMg44K144Kk44Os44Oz44K544OV44Os44O844OgCiAgICAgICAgbmV3VWludDguc2V0KFsweGQ4LCAweGZmLCAweGZlXSk7CiAgICAgICAgZW5jb2RlZEZyYW1lLmRhdGEgPSBuZXdEYXRhOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgLy8g5pig5YOP44GM5q2j5bi444GY44KD44Gq44GE44Gf44KBIFBMSSDjgrnjg4jjg7zjg6DjgYznmbrnlJ/jgZfjgabjgZfjgb7jgYYKICAgICAgICAvLyDjgZ3jga7jgZ/jgoEgMzIweDI0MCDjga7nnJ/jgaPpu5LjgarnlLvpnaLjgavnva7jgY3mj5vjgYjjgosKICAgICAgICBjb25zdCBuZXdEYXRhID0gbmV3IEFycmF5QnVmZmVyKDYwKTsKICAgICAgICBjb25zdCBuZXdVaW50OCA9IG5ldyBVaW50OEFycmF5KG5ld0RhdGEpOwogICAgICAgIC8vIHByZXR0aWVyLWlnbm9yZQogICAgICAgIG5ld1VpbnQ4LnNldChbMHhiMCwgMHgwNSwgMHgwMCwgMHg5ZCwgMHgwMSwgMHgyYSwgMHhhMCwgMHgwMCwgMHg1YSwgMHgwMCwKICAgICAgICAgICAgMHgzOSwgMHgwMywgMHgwM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29uc3Qgc2ZyYW1lSGVhZGVyID0gbmV3IFVpbnQ4QXJyYXkoc2ZyYW1lSGVhZGVyQnVmZmVyKTsKICAgICAgICBjb25zdCBjb25uZWN0aW9uSWQgPSB0ZXh0RGVjb2Rlci5kZWNvZGUoY29ubmVjdGlvbklkQnVmZmVyKTsKICAgICAgICBjb25zdCBbcywgY291bnQsIGtleUlkXSA9IHBhcnNlU0ZyYW1lSGVhZGVyKHNmcmFtZUhlYWRlckJ1ZmZlcik7CiAgICAgICAgLy8g5LuK5Zue44GvIHMgZmxhZyDjga8gMCDjga7jgb8KICAgICAgICBpZiAocyAhPT0gMCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlVORVhQRUNURUQtUy1GTEFHIik7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGRlcml2ZUtleSA9IGdldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICBpZiAoIWRlcml2ZUtleSkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGl2ID0gZ2VuZXJhdGVJVihjb3VudCwgY29ubmVjdGlvbklkLCBrZXlJZCk7CiAgICAgICAgaWYgKCFpdikgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGZyYW1lQWRkID0gZW5jb2RlRnJhbWVBZGQoZnJhbWVNZXRhZGF0YSwgc2ZyYW1lSGVhZGVyLCBjb25uZWN0aW9uSWQpOwogICAgICAgIGNyeXB0by5zdWJ0bGUKICAgICAgICAgICAgLmRlY3J5cHQoewogICAgICAgICAgICBuYW1lOiAiQUVTLUdDTSIsCiAgICAgICAgICAgIGl2OiBpdiwKICAgICAgICAgICAgYWRkaXRpb25hbERhdGE6IGZyYW1lQWRkLAogICAgICAgIH0sIGRlcml2ZUtleSwgbmV3IFVpbnQ4QXJyYXkoZW5jcnlwdGVkRnJhbWVCdWZmZXIpKQogICAgICAgICAgICAudGhlbigocGxh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FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZU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ibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=");this.worker=new Worker(URL.createObjectURL(new Blob([e],{type:"application/javascript"}))),this.worker.onmessage=e=>{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var p=new t(32);for(m=0;m<32;++m)p[m]=5;var Z=A(b,9,0),w=A(b,9,1),S=A(p,5,0),V=A(p,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(2==e.BYTES_PER_ELEMENT?n:4==e.BYTES_PER_ELEMENT?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},X=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},E=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=O(s[C-1],m,0);if(u>i){a=0;var A=0,b=u-i,p=1<i))break;A+=p-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},O=function(e,t,n){return-1==e.s?Math.max(O(e.l,t,n+1),O(e.r,t,n+1)):t[e.s]=n},B=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},N=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!D[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=N(g,b)+N(r,p)+c,z=N(g,u)+N(r,f)+c+14+3*U+N(K,D)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(C,C+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=Z,j=b,Q=S,H=p;for(L=0;L255){te=l[L]>>>18&31;X(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];X(t,I,Q[ne]),I+=H[ne],ne>3&&(X(t,I,l[L]>>>5&8191),I+=a[ne])}else X(t,I,M[l[L]]),I+=j[l[L]];return X(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),J=new t(0),D=function(e,o,l,g,r){return function(e,o,l,g,r,d){var C=e.length,I=new t(g+C+5*(1+Math.ceil(C/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||C<8)for(var A=0;A<=C;A+=65535){var b=A+65535;b>=C&&(m[u>>3]=d),u=Y(m,u+1,e.subarray(A,b))}else{for(var p=L[o-1],Z=p>>>13,w=8191&p,S=(1<7e3||B>24576)&&j>423){u=K(e,m,0,v,T,X,O,B,D,A-D,u),B=E=O=0,D=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)X[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(Z,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[B++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];O+=s[ae]+a[oe],++T[257+ae],++X[oe],N=A+H,++E}else v[B++]=e[A],++T[e[A]]}}u=K(e,m,d,v,T,X,O,B,D,A-D,u),!d&&7&u&&(u=Y(m,u+1,J))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=D(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var d=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,p=i.m,Z=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,X=F+T;if(X>l){c&&v(0);break}g&&d(m+T),n.set(e.subarray(F,X),m),i.b=m+=T,i.p=I=8*X,i.f=h;continue}if(1==R)u=w,b=V,p=9,Z=5;else if(2==R){var E=y(e,I,31)+257,O=y(e,I+10,15)+4,B=E+y(e,I+5,31)+1;I+=14;for(var N=new t(B),Y=new t(19),K=0;K>>4)<16)N[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=N[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)N[K++]=M}}var Q=N.subarray(0,E),H=N.subarray(E);p=f(Q),Z=f(H),u=A(Q,p,1),b=A(H,Z,1)}else v(1);if(I>S){c&&v(0);break}}g&&d(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=C[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&d(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(J,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0-canary.6",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if("sendrecv"===t&&!0!==s.multistream)throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'");!0===a&&(o.redirect=!0),"boolean"==typeof s.multistream&&(o.multistream=s.multistream),"boolean"==typeof s.simulcast&&(o.simulcast=s.simulcast);void 0!==s.simulcastRid&&0<=["r0","r1","r2"].indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid),"boolean"==typeof s.spotlight&&(o.spotlight=s.spotlight),"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber);const l=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=l.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=l.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid),void 0!==i&&(o.metadata=i),void 0!==s.signalingNotifyMetadata&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),void 0!==s.clientId&&(o.client_id=s.clientId),void 0!==s.bundleId&&(o.bundle_id=s.bundleId),"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const g=["audioCodecType","audioBitRate"],r=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],c=["videoCodecType","videoBitRate"],d=Object.assign({},s);Object.keys(d).forEach((e=>{"audio"===e&&"boolean"==typeof d[e]||"video"===e&&"boolean"==typeof d[e]||0<=g.indexOf(e)&&null!==d[e]||0<=r.indexOf(e)&&null!==d[e]||0<=c.indexOf(e)&&null!==d[e]||delete d[e]})),void 0!==d.audio&&(o.audio=d.audio);const C=Object.keys(d).some((e=>0<=g.indexOf(e)));o.audio&&C&&(o.audio={},"audioCodecType"in d&&(o.audio.codec_type=d.audioCodecType),"audioBitRate"in d&&(o.audio.bit_rate=d.audioBitRate));const h=Object.keys(d).some((e=>0<=r.indexOf(e)));o.audio&&h&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in d&&(o.audio.opus_params.channels=d.audioOpusParamsChannels),"audioOpusParamsClockRate"in d&&(o.audio.opus_params.clock_rate=d.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in d&&(o.audio.opus_params.maxplaybackrate=d.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in d&&(o.audio.opus_params.stereo=d.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in d&&(o.audio.opus_params.sprop_stereo=d.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in d&&(o.audio.opus_params.minptime=d.audioOpusParamsMinptime),"audioOpusParamsPtime"in d&&(o.audio.opus_params.ptime=d.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in d&&(o.audio.opus_params.useinbandfec=d.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in d&&(o.audio.opus_params.usedtx=d.audioOpusParamsUsedtx)),void 0!==d.video&&(o.video=d.video);const I=Object.keys(d).some((e=>0<=c.indexOf(e)));if(o.video&&I&&(o.video={},"videoCodecType"in d&&(o.video.codec_type=d.videoCodecType),"videoBitRate"in d&&(o.video.bit_rate=d.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if("boolean"==typeof s.e2ee&&(o.e2ee=s.e2ee),!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8")}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.connectedSignalingUrl="",this.contactSignalingUrl=""}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}signalingTerminate(){for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.contactSignalingUrl="",this.connectedSignalingUrl="",this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),this.signalingTerminate(),s(t)},e.onmessage=async t=>{if(t.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",t.data),void this.signalingOnMessageE2EE(t.data);if("string"!=typeof t.data)throw new Error("Received invalid signaling data");const n=JSON.parse(t.data);if("offer"==n.type)this.writeWebSocketSignalingLog("onmessage-offer",n),this.signalingOnMessageTypeOffer(n),this.connectedSignalingUrl=e.url,i(n);else if("update"==n.type)this.writeWebSocketSignalingLog("onmessage-update",n),await this.signalingOnMessageTypeUpdate(n);else if("re-offer"==n.type)this.writeWebSocketSignalingLog("onmessage-re-offer",n),await this.signalingOnMessageTypeReOffer(n);else if("ping"==n.type)await this.signalingOnMessageTypePing(n);else if("push"==n.type)this.callbacks.push(n,"websocket");else if("notify"==n.type)"connection.created"===n.event_type?this.writeWebSocketTimelineLog("notify-connection.created",n):"connection.destroyed"===n.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",n),this.signalingOnMessageTypeNotify(n,"websocket");else if("switched"==n.type)this.writeWebSocketSignalingLog("onmessage-switched",n),this.signalingOnMessageTypeSwitched(n);else if("redirect"==n.type){this.writeWebSocketSignalingLog("onmessage-redirect",n);try{const e=await this.signalingOnMessageTypeRedirect(n);i(e)}catch(e){s(e)}}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e,t||(this.contactSignalingUrl=e.url,this.writeWebSocketSignalingLog("contact-signaling-url",this.contactSignalingUrl)))})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),this.signalingTerminate(),t(n)},this.ws.onerror=e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=e.target;let s;"string"==typeof e.data?s=(new TextEncoder).encode(e.data):e.data instanceof ArrayBuffer?s=e.data:console.warn("Received onmessage event data is not of type String or ArrayBuffer."),void 0!==s&&(!0===n.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(i.label,s)))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");if("open"!==n.readyState)throw new Error("Messaging DataChannel is not open");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const{operation:t}=e.data;"disconnect"===t&&"function"==typeof this.onWorkerDisconnect&&this.onWorkerDisconnect()}}clearWorker(){this.worker&&this.worker.postMessage({type:"clear"})}terminateWorker(){this.worker&&this.worker.terminate()}async init(){const{preKeyBundle:e}=await window.e2ee.init();return e}setupSenderTransform(e){if(!e.track)return;const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"encrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}setupReceiverTransform(e){const t=e.createEncodedStreams(),n=t.readableStream||t.readable,i=t.writableStream||t.writable;if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");const s={type:"decrypt",readableStream:n,writableStream:i};this.worker.postMessage(s,[n,i])}postRemoteSecretKeyMaterials(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"remoteSecretKeyMaterials",remoteSecretKeyMaterials:e.remoteSecretKeyMaterials})}postRemoveRemoteDeriveKey(e){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"removeRemoteDeriveKey",connectionId:e})}postSelfSecretKeyMaterial(e,t,n,i=0){if(!this.worker)throw new Error("Worker is null. Call startWorker in advance.");this.worker.postMessage({type:"selfSecretKeyMaterial",selfConnectionId:e,selfKeyId:t,selfSecretKeyMaterial:n,waitingTime:i})}startSession(e,t){const[n,i]=window.e2ee.startSession(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(i)throw i;return n}stopSession(e){const[t,n]=window.e2ee.stopSession(e);if(n)throw n;return t}receiveMessage(e){const[t,n]=window.e2ee.receiveMessage(e);if(n)throw n;return t}start(e){const[t,n]=window.e2ee.start(e);if(n)throw n;return t}addPreKeyBundle(e,t){const n=window.e2ee.addPreKeyBundle(e,t.identityKey,t.signedPreKey,t.preKeySignature);if(n)throw n}selfFingerprint(){return window.e2ee.selfFingerprint()}remoteFingerprints(){return window.e2ee.remoteFingerprints()}static async loadWasm(e){if(void 0===!window.e2ee)return void console.warn("E2ee wasm is already loaded. Will not be reload.");if((()=>{if("undefined"!=typeof global);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}if(global.require||"undefined"==typeof require||(global.require=require),!global.fs&&global.require){const e=require("fs");0!==Object.keys(e)&&(global.fs=e)}const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!global.fs){let t="";global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync(e,i){t+=n.decode(i);const s=t.lastIndexOf("\n");return-1!=s&&(console.log(t.substr(0,s)),t=t.substr(s+1)),i.length},write(t,n,i,s,a,o){0===i&&s===n.length&&null===a?o(null,this.writeSync(t,n)):o(e())},chmod(t,n,i){i(e())},chown(t,n,i,s){s(e())},close(t,n){n(e())},fchmod(t,n,i){i(e())},fchown(t,n,i,s){s(e())},fstat(t,n){n(e())},fsync(e,t){t(null)},ftruncate(t,n,i){i(e())},lchown(t,n,i,s){s(e())},link(t,n,i){i(e())},lstat(t,n){n(e())},mkdir(t,n,i){i(e())},open(t,n,i,s){s(e())},read(t,n,i,s,a,o){o(e())},readdir(t,n){n(e())},readlink(t,n){n(e())},rename(t,n,i){i(e())},rmdir(t,n){n(e())},stat(t,n){n(e())},symlink(t,n,i){i(e())},truncate(t,n,i){i(e())},unlink(t,n){n(e())},utimes(t,n,i,s){s(e())}}}if(global.process||(global.process={getuid:()=>-1,getgid:()=>-1,geteuid:()=>-1,getegid:()=>-1,getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),!global.crypto){const e=require("crypto");global.crypto={getRandomValues(t){e.randomFillSync(t)}}}global.performance||(global.performance={now(){const[e,t]=process.hrtime();return 1e3*e+t/1e6}}),global.TextEncoder||(global.TextEncoder=require("util").TextEncoder),global.TextDecoder||(global.TextDecoder=require("util").TextDecoder);const t=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");if(global.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,t)=>{this.mem.setUint32(e+0,t,!0),this.mem.setUint32(e+4,Math.floor(t/4294967296),!0)},i=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),s=e=>{const t=this.mem.getFloat64(e,!0);if(0===t)return;if(!isNaN(t))return t;const n=this.mem.getUint32(e,!0);return this._values[n]},a=(e,t)=>{const n=2146959360;if("number"==typeof t&&0!==t)return isNaN(t)?(this.mem.setUint32(e+4,n,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,t,!0);if(void 0===t)return void this.mem.setFloat64(e,0,!0);let i=this._ids.get(t);void 0===i&&(i=this._idPool.pop(),void 0===i&&(i=this._values.length),this._values[i]=t,this._goRefCounts[i]=0,this._ids.set(t,i)),this._goRefCounts[i]++;let s=0;switch(typeof t){case"object":null!==t&&(s=1);break;case"string":s=2;break;case"symbol":s=3;break;case"function":s=4}this.mem.setUint32(e+4,n|s,!0),this.mem.setUint32(e,i,!0)},o=e=>{const t=i(e+0),n=i(e+8);return new Uint8Array(this._inst.exports.mem.buffer,t,n)},l=e=>{const t=i(e+0),n=i(e+8),a=new Array(n);for(let e=0;e{const t=i(e+0),s=i(e+8);return n.decode(new DataView(this._inst.exports.mem.buffer,t,s))},r=Date.now()-performance.now();this.importObject={go:{"runtime.wasmExit":e=>{const t=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(t)},"runtime.wasmWrite":e=>{const t=i(e+8),n=i(e+16),s=this.mem.getInt32(e+24,!0);fs.writeSync(t,new Uint8Array(this._inst.exports.mem.buffer,n,s))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":t=>{e(t+8,1e6*(r+performance.now()))},"runtime.walltime1":t=>{const n=(new Date).getTime();e(t+8,n/1e3),this.mem.setInt32(t+16,n%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{const t=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(t,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(t);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),i(e+8)+1)),this.mem.setInt32(e+16,t,!0)},"runtime.clearTimeoutEvent":e=>{const t=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(t)),this._scheduledTimeouts.delete(t)},"runtime.getRandomData":e=>{crypto.getRandomValues(o(e+8))},"syscall/js.finalizeRef":e=>{const t=this.mem.getUint32(e+8,!0);if(this._goRefCounts[t]--,0===this._goRefCounts[t]){const e=this._values[t];this._values[t]=null,this._ids.delete(e),this._idPool.push(t)}},"syscall/js.stringVal":e=>{a(e+24,g(e+8))},"syscall/js.valueGet":e=>{const t=Reflect.get(s(e+8),g(e+16));e=this._inst.exports.getsp(),a(e+32,t)},"syscall/js.valueSet":e=>{Reflect.set(s(e+8),g(e+16),s(e+32))},"syscall/js.valueDelete":e=>{Reflect.deleteProperty(s(e+8),g(e+16))},"syscall/js.valueIndex":e=>{a(e+24,Reflect.get(s(e+8),i(e+16)))},"syscall/js.valueSetIndex":e=>{Reflect.set(s(e+8),i(e+16),s(e+24))},"syscall/js.valueCall":e=>{try{const t=s(e+8),n=Reflect.get(t,g(e+16)),i=l(e+32),o=Reflect.apply(n,t,i);e=this._inst.exports.getsp(),a(e+56,o),this.mem.setUint8(e+64,1)}catch(t){a(e+56,t),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.apply(t,void 0,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{try{const t=s(e+8),n=l(e+16),i=Reflect.construct(t,n);e=this._inst.exports.getsp(),a(e+40,i),this.mem.setUint8(e+48,1)}catch(t){a(e+40,t),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":t=>{e(t+16,parseInt(s(t+8).length))},"syscall/js.valuePrepareString":n=>{const i=t.encode(String(s(n+8)));a(n+16,i),e(n+24,i.length)},"syscall/js.valueLoadString":e=>{const t=s(e+8);o(e+16).set(t)},"syscall/js.valueInstanceOf":e=>{this.mem.setUint8(e+24,s(e+8)instanceof s(e+16)?1:0)},"syscall/js.copyBytesToGo":t=>{const n=o(t+8),i=s(t+32);if(!(i instanceof Uint8Array||i instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},"syscall/js.copyBytesToJS":t=>{const n=s(t+8),i=o(t+16);if(!(n instanceof Uint8Array||n instanceof Uint8ClampedArray))return void this.mem.setUint8(t+48,0);const a=i.subarray(0,n.length);n.set(a),e(t+40,a.length),this.mem.setUint8(t+48,1)},debug:e=>{console.log(e)}}}}async run(e){this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,global,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[global,5],[this,6]]),this._idPool=[],this.exited=!1;let n=4096;const i=e=>{const i=n,s=t.encode(e+"\0");return new Uint8Array(this.mem.buffer,n,s.length).set(s),n+=s.length,n%8!=0&&(n+=8-n%8),i},s=this.argv.length,a=[];this.argv.forEach((e=>{a.push(i(e))})),a.push(0),Object.keys(this.env).sort().forEach((e=>{a.push(i(`${e}=${this.env[e]}`))})),a.push(0);const o=n;a.forEach((e=>{this.mem.setUint32(n,e,!0),this.mem.setUint32(n+4,0,!0),n+=8})),this._inst.exports.run(s,o),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const t=this;return function(){const n={id:e,this:this,args:arguments};return t._pendingEvent=n,t._resume(),n.result}}},global.require&&global.require.main===module&&global.process&&global.process.versions&&!global.process.versions.electron){process.argv.length<3&&(console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"),process.exit(1));const e=new Go;e.argv=process.argv.slice(2),e.env=Object.assign({TMPDIR:require("os").tmpdir()},process.env),e.exit=process.exit,WebAssembly.instantiate(fs.readFileSync(process.argv[2]),e.importObject).then((t=>(process.on("exit",(t=>{0!==t||e.exited||(e._pendingEvent={id:0},e._resume())})),e.run(t.instance)))).catch((e=>{console.error(e),process.exit(1)}))}})(),!window.Go)throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);const t=new Go,{instance:n}=await WebAssembly.instantiateStreaming(fetch(e),t.importObject);if(t.run(n),!window.e2ee)throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`)}static version(){return"2021.1.0"}static wasmVersion(){return window.e2ee.version()}}var t=Uint8Array,n=Uint16Array,i=Uint32Array,s=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var s=new n(31),a=0;a<31;++a)s[a]=t+=1<>>1|(21845&m)<<1;u=(61680&(u=(52428&u)>>>2|(13107&u)<<2))>>>4|(3855&u)<<4,I[m]=((65280&u)>>>8|(255&u)<<8)>>>1}var A=function(e,t,i){for(var s=e.length,a=0,o=new n(t);a>>r]=c}else for(l=new n(s),a=0;a>>15-e[a]);return l},b=new t(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var p=new t(32);for(m=0;m<32;++m)p[m]=5;var Z=A(b,9,0),w=A(b,9,1),S=A(p,5,0),V=A(p,5,1),f=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},y=function(e,t,n){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(7&t)&n},W=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},G=function(e){return(e+7)/8|0},k=function(e,s,a){(null==s||s<0)&&(s=0),(null==a||a>e.length)&&(a=e.length);var o=new(2==e.BYTES_PER_ELEMENT?n:4==e.BYTES_PER_ELEMENT?i:t)(a-s);return o.set(e.subarray(s,a)),o},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],v=function(e,t,n){var i=new Error(t||R[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,v),!n)throw i;return i},T=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},X=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},E=function(e,i){for(var s=[],a=0;aI&&(I=l[a].s);var m=new n(I+1),u=O(s[C-1],m,0);if(u>i){a=0;var A=0,b=u-i,p=1<i))break;A+=p-(1<>>=b;A>0;){var w=l[a].s;m[w]=0&&A;--a){var S=l[a].s;m[S]==i&&(--m[S],++A)}u=i}return[new t(m),u]},O=function(e,t,n){return-1==e.s?Math.max(O(e.l,t,n+1),O(e.r,t,n+1)):t[e.s]=n},B=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new n(++t),s=0,a=e[0],o=1,l=function(e){i[s++]=e},g=1;g<=t;++g)if(e[g]==a&&g!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(a),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(a);o=1,a=e[g]}return[i.subarray(0,s),t]},N=function(e,t){for(var n=0,i=0;i>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var a=0;a4&&!D[o[U-1]];--U);var M,j,Q,H,x=h+5<<3,P=N(g,b)+N(r,p)+c,z=N(g,u)+N(r,f)+c+14+3*U+N(K,D)+(2*K[16]+3*K[17]+7*K[18]);if(x<=P&&x<=z)return Y(t,I,e.subarray(C,C+h));if(T(t,I,1+(z15&&(T(t,I,ee[L]>>>5&127),I+=ee[L]>>>12)}}}else M=Z,j=b,Q=S,H=p;for(L=0;L255){te=l[L]>>>18&31;X(t,I,M[te+257]),I+=j[te+257],te>7&&(T(t,I,l[L]>>>23&31),I+=s[te]);var ne=31&l[L];X(t,I,Q[ne]),I+=H[ne],ne>3&&(X(t,I,l[L]>>>5&8191),I+=a[ne])}else X(t,I,M[l[L]]),I+=j[l[L]];return X(t,I,M[256]),I+j[256]},L=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),J=new t(0),D=function(e,o,l,g,r){return function(e,o,l,g,r,d){var C=e.length,I=new t(g+C+5*(1+Math.ceil(C/7e3))+r),m=I.subarray(g,I.length-r),u=0;if(!o||C<8)for(var A=0;A<=C;A+=65535){var b=A+65535;b>=C&&(m[u>>3]=d),u=Y(m,u+1,e.subarray(A,b))}else{for(var p=L[o-1],Z=p>>>13,w=8191&p,S=(1<7e3||B>24576)&&j>423){u=K(e,m,0,v,T,X,O,B,D,A-D,u),B=E=O=0,D=A;for(var Q=0;Q<286;++Q)T[Q]=0;for(Q=0;Q<30;++Q)X[Q]=0}var H=2,x=0,P=w,z=U-M&32767;if(j>2&&F==R(A-z))for(var _=Math.min(Z,j)-1,q=Math.min(32767,A),$=Math.min(258,j);z<=q&&--P&&U!=M;){if(e[A+H]==e[A+H-z]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-z];++ee);if(ee>H){if(H=ee,x=z,ee>_)break;var te=Math.min(z,ee-2),ne=0;for(Q=0;Qne&&(ne=se,M=ie)}}}z+=(U=M)-(M=V[U])+32768&32767}if(x){v[B++]=268435456|c[H]<<18|h[x];var ae=31&c[H],oe=31&h[x];O+=s[ae]+a[oe],++T[257+ae],++X[oe],N=A+H,++E}else v[B++]=e[A],++T[e[A]]}}u=K(e,m,d,v,T,X,O,B,D,A-D,u),!d&&7&u&&(u=Y(m,u+1,J))}return k(I,0,g+G(u)+r)}(e,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+o.mem,l,g,!r)};function F(e,t){t||(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var i=e,s=t,a=0|n.length,o=0;o!=a;){for(var l=Math.min(o+2655,a);o>16),s=(65535&s)+15*(s>>16)}e=i,t=s},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}();n.p(e);var i=D(e,t,2,4);return function(e,t){var n=t.level,i=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=i<<6|(i?32-2*i:1)}(i,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(i,i.length-4,n.d()),i}function U(e,n){return function(e,n,i){var l=e.length;if(!l||i&&i.f&&!i.l)return n||new t(0);var g=!n||i,c=!i||i.i;i||(i={}),n||(n=new t(3*l));var d=function(e){var i=n.length;if(e>i){var s=new t(Math.max(2*i,e));s.set(n),n=s}},h=i.f||0,I=i.p||0,m=i.b||0,u=i.l,b=i.d,p=i.m,Z=i.n,S=8*l;do{if(!u){h=y(e,I,1);var R=y(e,I+1,3);if(I+=3,!R){var T=e[(F=G(I)+4)-4]|e[F-3]<<8,X=F+T;if(X>l){c&&v(0);break}g&&d(m+T),n.set(e.subarray(F,X),m),i.b=m+=T,i.p=I=8*X,i.f=h;continue}if(1==R)u=w,b=V,p=9,Z=5;else if(2==R){var E=y(e,I,31)+257,O=y(e,I+10,15)+4,B=E+y(e,I+5,31)+1;I+=14;for(var N=new t(B),Y=new t(19),K=0;K>>4)<16)N[K++]=F;else{var M=0,j=0;for(16==F?(j=3+y(e,I,3),I+=2,M=N[K-1]):17==F?(j=3+y(e,I,7),I+=3):18==F&&(j=11+y(e,I,127),I+=7);j--;)N[K++]=M}}var Q=N.subarray(0,E),H=N.subarray(E);p=f(Q),Z=f(H),u=A(Q,p,1),b=A(H,Z,1)}else v(1);if(I>S){c&&v(0);break}}g&&d(m+131072);for(var x=(1<>>4;if((I+=15&M)>S){c&&v(0);break}if(M||v(2),_<256)n[m++]=_;else{if(256==_){z=I,u=null;break}var q=_-254;if(_>264){var $=s[K=_-257];q=y(e,I,(1<<$)-1)+r[K],I+=$}var ee=b[W(e,I)&P],te=ee>>>4;if(ee||v(3),I+=15&ee,H=C[te],te>3&&($=a[te],H+=W(e,I)&(1<<$)-1,I+=$),I>S){c&&v(0);break}g&&d(m+131072);for(var ne=m+q;m>>4>7||(i[0]<<8|i[1])%31)&&v(6,"invalid zlib data"),32&i[1]&&v(6,"invalid zlib data: preset dictionaries not supported"),e.subarray(2,-4)),n);var i}var M="undefined"!=typeof TextDecoder&&new TextDecoder;try{M.decode(J,{stream:!0}),1}catch(e){}function j(e){if("object"!=typeof e||null===e)throw new Error("Failed to parse options dataChannels. Options dataChannels element must be type 'object'");const t=e,n={};return"string"==typeof t.label&&(n.label=t.label),"string"==typeof t.direction&&(n.direction=t.direction),"boolean"==typeof t.ordered&&(n.ordered=t.ordered),"boolean"==typeof t.compress&&(n.compress=t.compress),"number"==typeof t.maxPacketLifeTime&&(n.max_packet_life_time=t.maxPacketLifeTime),"number"==typeof t.maxRetransmits&&(n.max_retransmits=t.maxRetransmits),"string"==typeof t.protocol&&(n.protocol=t.protocol),n}function Q(){return"safari"===function(){const e=window.navigator.userAgent.toLocaleLowerCase();return-1!==e.indexOf("edge")?"edge":-1!==e.indexOf("chrome")&&-1===e.indexOf("edge")?"chrome":-1!==e.indexOf("safari")&&-1===e.indexOf("chrome")?"safari":-1!==e.indexOf("opera")?"opera":-1!==e.indexOf("firefox")?"firefox":null}()}function H(e,t,n,i,s,a){if("sendrecv"!==t&&"sendonly"!==t&&"recvonly"!==t)throw new Error("Unknown role type");if(null==n)throw new Error("channelId can not be null or undefined");const o={type:"connect",sora_client:"Sora JavaScript SDK 2022.1.0",environment:window.navigator.userAgent,role:t,channel_id:n,sdp:e,audio:!0,video:!0};if("sendrecv"===t&&!0!==s.multistream)throw new Error("Failed to parse options. Options multistream must be true when connecting using 'sendrecv'");!0===a&&(o.redirect=!0),"boolean"==typeof s.multistream&&(o.multistream=s.multistream),"boolean"==typeof s.simulcast&&(o.simulcast=s.simulcast);void 0!==s.simulcastRid&&0<=["r0","r1","r2"].indexOf(s.simulcastRid)&&(o.simulcast_rid=s.simulcastRid),"boolean"==typeof s.spotlight&&(o.spotlight=s.spotlight),"spotlightNumber"in s&&(o.spotlight_number=s.spotlightNumber);const l=["none","r0","r1","r2"];void 0!==s.spotlightFocusRid&&0<=l.indexOf(s.spotlightFocusRid)&&(o.spotlight_focus_rid=s.spotlightFocusRid),void 0!==s.spotlightUnfocusRid&&0<=l.indexOf(s.spotlightUnfocusRid)&&(o.spotlight_unfocus_rid=s.spotlightUnfocusRid),void 0!==i&&(o.metadata=i),void 0!==s.signalingNotifyMetadata&&(o.signaling_notify_metadata=s.signalingNotifyMetadata),void 0!==s.clientId&&(o.client_id=s.clientId),void 0!==s.bundleId&&(o.bundle_id=s.bundleId),"boolean"==typeof s.dataChannelSignaling&&(o.data_channel_signaling=s.dataChannelSignaling),"boolean"==typeof s.ignoreDisconnectWebSocket&&(o.ignore_disconnect_websocket=s.ignoreDisconnectWebSocket);const g=["audioCodecType","audioBitRate"],r=["audioOpusParamsChannels","audioOpusParamsClockRate","audioOpusParamsMaxplaybackrate","audioOpusParamsStereo","audioOpusParamsSpropStereo","audioOpusParamsMinptime","audioOpusParamsPtime","audioOpusParamsUseinbandfec","audioOpusParamsUsedtx"],c=["videoCodecType","videoBitRate"],d=Object.assign({},s);Object.keys(d).forEach((e=>{"audio"===e&&"boolean"==typeof d[e]||"video"===e&&"boolean"==typeof d[e]||0<=g.indexOf(e)&&null!==d[e]||0<=r.indexOf(e)&&null!==d[e]||0<=c.indexOf(e)&&null!==d[e]||delete d[e]})),void 0!==d.audio&&(o.audio=d.audio);const C=Object.keys(d).some((e=>0<=g.indexOf(e)));o.audio&&C&&(o.audio={},"audioCodecType"in d&&(o.audio.codec_type=d.audioCodecType),"audioBitRate"in d&&(o.audio.bit_rate=d.audioBitRate));const h=Object.keys(d).some((e=>0<=r.indexOf(e)));o.audio&&h&&("object"!=typeof o.audio&&(o.audio={}),o.audio.opus_params={},"audioOpusParamsChannels"in d&&(o.audio.opus_params.channels=d.audioOpusParamsChannels),"audioOpusParamsClockRate"in d&&(o.audio.opus_params.clock_rate=d.audioOpusParamsClockRate),"audioOpusParamsMaxplaybackrate"in d&&(o.audio.opus_params.maxplaybackrate=d.audioOpusParamsMaxplaybackrate),"audioOpusParamsStereo"in d&&(o.audio.opus_params.stereo=d.audioOpusParamsStereo),"audioOpusParamsSpropStereo"in d&&(o.audio.opus_params.sprop_stereo=d.audioOpusParamsSpropStereo),"audioOpusParamsMinptime"in d&&(o.audio.opus_params.minptime=d.audioOpusParamsMinptime),"audioOpusParamsPtime"in d&&(o.audio.opus_params.ptime=d.audioOpusParamsPtime),"audioOpusParamsUseinbandfec"in d&&(o.audio.opus_params.useinbandfec=d.audioOpusParamsUseinbandfec),"audioOpusParamsUsedtx"in d&&(o.audio.opus_params.usedtx=d.audioOpusParamsUsedtx)),void 0!==d.video&&(o.video=d.video);const I=Object.keys(d).some((e=>0<=c.indexOf(e)));if(o.video&&I&&(o.video={},"videoCodecType"in d&&(o.video.codec_type=d.videoCodecType),"videoBitRate"in d&&(o.video.bit_rate=d.videoBitRate)),o.simulcast&&!function(){if(!window.RTCRtpSender)return!1;if(!RTCRtpSender.getCapabilities)return!1;const e=RTCRtpSender.getCapabilities("video");if(!e)return!1;const t=e.headerExtensions.map((e=>e.uri));return["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"].every((e=>t.includes(e)))}()&&"recvonly"!==t)throw new Error("Simulcast can not be used with this browser");if("boolean"==typeof s.e2ee&&(o.e2ee=s.e2ee),!0===s.e2ee){if(void 0===o.signaling_notify_metadata&&(o.signaling_notify_metadata={}),null===o.signaling_notify_metadata||"object"!=typeof o.signaling_notify_metadata)throw new Error("E2EE failed. Options signalingNotifyMetadata must be type 'object'");!0===o.video&&(o.video={}),o.video&&(o.video.codec_type="VP8")}return Array.isArray(s.dataChannels)&&0{},push:()=>{},addstream:()=>{},track:()=>{},removestream:()=>{},removetrack:()=>{},notify:()=>{},log:()=>{},timeout:()=>{},timeline:()=>{},signaling:()=>{},message:()=>{},datachannel:()=>{}},this.authMetadata=null,this.e2ee=null,this.connectionTimeoutTimerId=0,this.monitorSignalingWebSocketEventTimerId=0,this.monitorIceConnectionStateChangeTimerId=0,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.connectedSignalingUrl="",this.contactSignalingUrl=""}on(e,t){"addstream"===e?console.warn("@deprecated addstream callback will be removed in a future version. Use track callback."):"removestream"===e&&console.warn("@deprecated removestream callback will be removed in a future version. Use removetrack callback."),e in this.callbacks&&(this.callbacks[e]=t)}stopAudioTrack(e){for(const t of e.getAudioTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getAudioTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}stopVideoTrack(e){for(const t of e.getVideoTracks())t.enabled=!1;return new Promise((t=>{setTimeout((async()=>{for(const t of e.getVideoTracks())if(t.stop(),e.removeTrack(t),null!==this.pc){const e=this.pc.getSenders().find((e=>e.track&&e.track.id===t.id));e&&await e.replaceTrack(null)}t()}),100)}))}async replaceAudioTrack(e,t){await this.stopAudioTrack(e);const n=this.getAudioTransceiver();if(null===n)throw new Error("Unable to set an audio track. Audio track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}async replaceVideoTrack(e,t){await this.stopVideoTrack(e);const n=this.getVideoTransceiver();if(null===n)throw new Error("Unable to set video track. Video track sender is undefined");e.addTrack(t),await n.sender.replaceTrack(t)}signalingTerminate(){for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection()}abendPeerConnectionState(e){this.clearMonitorIceConnectionStateChange(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&t.close(),delete this.soraDataChannels[e]}this.ws&&(this.ws.close(),this.ws=null),this.pc&&this.pc.close(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection();const t=this.soraCloseEvent("abend",e);this.callbacks.disconnect(t),this.writeSoraTimelineLog("disconnect-abend",t)}async abend(e,t){this.clearMonitorIceConnectionStateChange(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)},t.onmessage=null,t.onerror=null)}if(this.soraDataChannels.signaling){const t={type:"disconnect",reason:e};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(t)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,t)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}if(await this.disconnectWebSocket(e),await this.disconnectPeerConnection(),this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),"WEBSOCKET-ONCLOSE"===e&&t&&(1e3===t.code||1005===t.code)){const e=this.soraCloseEvent("normal","DISCONNECT",t);return this.writeSoraTimelineLog("disconnect-normal",e),void this.callbacks.disconnect(e)}const n=this.soraCloseEvent("abend",e,t);this.writeSoraTimelineLog("disconnect-abend",n),this.callbacks.disconnect(this.soraCloseEvent("abend",e,t))}initializeConnection(){this.clientId=null,this.connectionId=null,this.remoteConnectionIds=[],this.stream=null,this.ws=null,this.pc=null,this.encodings=[],this.authMetadata=null,this.e2ee=null,this.soraDataChannels={},this.mids={audio:"",video:""},this.signalingSwitched=!1,this.signalingOfferMessageDataChannels={},this.contactSignalingUrl="",this.connectedSignalingUrl="",this.clearConnectionTimeout()}disconnectWebSocket(e){let t=0;return this.signalingSwitched?(this.ws&&(this.ws.close(),this.ws=null),Promise.resolve(null)):new Promise(((n,i)=>{if(!this.ws)return n(null);if(this.ws.onclose=e=>(this.ws&&(this.ws.close(),this.ws=null),clearTimeout(t),this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),n({code:e.code,reason:e.reason})),1!==this.ws.readyState)return this.ws.close(),this.ws=null,n(null);{const i={type:"disconnect",reason:e};this.ws.send(JSON.stringify(i)),this.writeWebSocketSignalingLog("send-disconnect",i),t=setTimeout((()=>{this.ws&&(this.ws.close(),this.ws=null),n({code:1006,reason:""})}),this.disconnectWaitTimeout)}}))}disconnectDataChannel(){const e=()=>{for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onerror=null,t.close()),delete this.soraDataChannels[e]}};return new Promise(((t,n)=>{if(!this.soraDataChannels.signaling)return e(),t({code:4999,reason:""});const i=setTimeout((()=>(e(),n())),this.disconnectWaitTimeout),s=[];for(const n of Object.keys(this.soraDataChannels)){const a=this.soraDataChannels[n];if(a){a.onerror=()=>(clearTimeout(i),e(),t({code:4999,reason:""}));const n=()=>new Promise(((e,t)=>{let n=0;const i=setInterval((()=>{n++,"closed"===a.readyState&&(clearInterval(i),e()),this.disconnectWaitTimeout<100*n&&(e(),clearInterval(i))}),100)}));s.push(n())}}Promise.all(s).then((()=>{0===Object.keys(this.soraDataChannels).length?t(null):t({code:4999,reason:""})})).finally((()=>{e(),clearTimeout(i)}));const a={type:"disconnect",reason:"NO-ERROR"};if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const e=F((new TextEncoder).encode(JSON.stringify(a)),{});if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(e),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}else if("open"===this.soraDataChannels.signaling.readyState)try{this.soraDataChannels.signaling.send(JSON.stringify(a)),this.writeDataChannelSignalingLog("send-disconnect",this.soraDataChannels.signaling,a)}catch(e){const t=e.message;this.writeDataChannelSignalingLog("failed-to-send-disconnect",this.soraDataChannels.signaling,t)}}))}disconnectPeerConnection(){return new Promise(((e,t)=>(this.pc&&"closed"!==this.pc.connectionState&&this.pc.close(),e())))}async disconnect(){this.clearMonitorIceConnectionStateChange(),this.pc&&(this.pc.ondatachannel=null,this.pc.oniceconnectionstatechange=null,this.pc.onicegatheringstatechange=null,this.pc.onconnectionstatechange=null),this.ws&&(this.ws.onclose=e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason})},this.ws.onmessage=null,this.ws.onerror=null);for(const e of Object.keys(this.soraDataChannels)){const t=this.soraDataChannels[e];t&&(t.onmessage=null,t.onclose=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label)})}let e=null;if(this.signalingSwitched){try{const t=await this.disconnectDataChannel();null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}catch(t){e=this.soraCloseEvent("abend","DISCONNECT-TIMEOUT")}await this.disconnectWebSocket("NO-ERROR"),await this.disconnectPeerConnection()}else{const t=await this.disconnectWebSocket("NO-ERROR");await this.disconnectPeerConnection(),null!==t&&(e=this.soraCloseEvent("normal","DISCONNECT",t))}this.e2ee&&this.e2ee.terminateWorker(),this.initializeConnection(),e&&("abend"===e.type?this.writeSoraTimelineLog("disconnect-abend",e):"normal"===e.type&&this.writeSoraTimelineLog("disconnect-normal",e),this.callbacks.disconnect(e))}setupE2EE(){!0===this.options.e2ee&&(this.e2ee=new e,this.e2ee.onWorkerDisconnect=async()=>{await this.abend("INTERNAL-ERROR",{reason:"CRASH-E2EE-WORKER"})},this.e2ee.startWorker())}startE2EE(){if(!0===this.options.e2ee&&this.e2ee){if(!this.connectionId){const e=new Error;throw e.message="E2EE failed. Self connectionId is null",e}this.e2ee.clearWorker();const e=this.e2ee.start(this.connectionId);this.e2ee.postSelfSecretKeyMaterial(this.connectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}async getSignalingWebSocket(e){if("string"==typeof e){const t=e;return new Promise(((e,n)=>{const i=new WebSocket(t);i.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),n(t)},i.onopen=t=>{e(i)}}))}if(Array.isArray(e)){let t=!1;const n=e=>new Promise(((n,i)=>{const s=new WebSocket(e),a=setTimeout((()=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"timeout",url:s.url}),s&&!t&&(s.onclose=null,s.onerror=null,s.onopen=null,s.close(),i())}),this.signalingCandidateTimeout);s.onclose=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"close",url:s.url,message:"WebSocket closed",code:e.code,reason:e.reason}),s&&s.close(),clearInterval(a),i()},s.onerror=e=>{this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"error",url:s.url,message:"Failed to connect WebSocket"}),s&&(s.onclose=null,s.close()),clearInterval(a),i()},s.onopen=e=>{s&&(clearInterval(a),t?(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!1}),s.onerror=null,s.onclose=null,s.onopen=null,s.close(),i()):(this.writeWebSocketSignalingLog("signaling-url-candidate",{type:"open",url:s.url,selected:!0}),s.onerror=null,s.onclose=null,s.onopen=null,t=!0,n(s)))}}));try{return await Promise.any(e.map((e=>n(e))))}catch(e){throw new z("Signaling failed. All signaling URL candidates failed to connect")}}throw new z("Signaling failed. Invalid format signaling URL candidates")}async signaling(e,t=!1){const n=await this.createOffer();return this.trace("CREATE OFFER",n),new Promise(((i,s)=>{this.writeWebSocketSignalingLog("new-websocket",e.url),e.binaryType="arraybuffer",e.onclose=e=>{const t=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);t.code=e.code,t.reason=e.reason,this.writeWebSocketTimelineLog("onclose",t),this.signalingTerminate(),s(t)},e.onmessage=async t=>{if(t.data instanceof ArrayBuffer)return this.writeWebSocketSignalingLog("onmessage-e2ee",t.data),void this.signalingOnMessageE2EE(t.data);if("string"!=typeof t.data)throw new Error("Received invalid signaling data");const n=JSON.parse(t.data);if("offer"==n.type)this.writeWebSocketSignalingLog("onmessage-offer",n),this.signalingOnMessageTypeOffer(n),this.connectedSignalingUrl=e.url,i(n);else if("update"==n.type)this.writeWebSocketSignalingLog("onmessage-update",n),await this.signalingOnMessageTypeUpdate(n);else if("re-offer"==n.type)this.writeWebSocketSignalingLog("onmessage-re-offer",n),await this.signalingOnMessageTypeReOffer(n);else if("ping"==n.type)await this.signalingOnMessageTypePing(n);else if("push"==n.type)this.callbacks.push(n,"websocket");else if("notify"==n.type)"connection.created"===n.event_type?this.writeWebSocketTimelineLog("notify-connection.created",n):"connection.destroyed"===n.event_type&&this.writeWebSocketTimelineLog("notify-connection.destroyed",n),this.signalingOnMessageTypeNotify(n,"websocket");else if("switched"==n.type)this.writeWebSocketSignalingLog("onmessage-switched",n),this.signalingOnMessageTypeSwitched(n);else if("redirect"==n.type){this.writeWebSocketSignalingLog("onmessage-redirect",n);try{const e=await this.signalingOnMessageTypeRedirect(n);i(e)}catch(e){s(e)}}},(async()=>{let i;try{i=H(n.sdp||"",this.role,this.channelId,this.metadata,this.options,t)}catch(e){return void s(e)}if(i.e2ee&&this.e2ee){const e=await this.e2ee.init();i.signaling_notify_metadata.pre_key_bundle=e}this.trace("SIGNALING CONNECT MESSAGE",i),e&&(e.send(JSON.stringify(i)),this.writeWebSocketSignalingLog(`send-${i.type}`,i),this.ws=e,t||(this.contactSignalingUrl=e.url,this.writeWebSocketSignalingLog("contact-signaling-url",this.contactSignalingUrl)))})()}))}async connectPeerConnection(e){let t=Object.assign({},e.config);if(this.e2ee&&(t=Object.assign({encodedInsertableStreams:!0},t)),void 0!==window.RTCPeerConnection.generateCertificate){const e=await window.RTCPeerConnection.generateCertificate({name:"ECDSA",namedCurve:"P-256"});t=Object.assign({certificates:[e]},t)}this.trace("PEER CONNECTION CONFIG",t),this.writePeerConnectionTimelineLog("new-peerconnection",t),this.pc=new window.RTCPeerConnection(t,this.constraints),this.pc.oniceconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState))},this.pc.onicegatheringstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onicegatheringstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.onconnectionstatechange=e=>{this.pc&&this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState})},this.pc.ondatachannel=e=>{this.onDataChannel(e)}}async setRemoteDescription(e){if(!this.pc)return;const t=new RTCSessionDescription({type:"offer",sdp:e.sdp});await this.pc.setRemoteDescription(t),this.writePeerConnectionTimelineLog("set-remote-description",t)}async createAnswer(e){if(!this.pc)return;for(const e of Object.values(this.mids)){const t=this.pc.getTransceivers().find((t=>t.mid===e));t&&"recvonly"===t.direction&&(t.direction="sendrecv")}if(this.options.simulcast&&("sendrecv"===this.role||"sendonly"===this.role)){const t=this.pc.getTransceivers().find((e=>{if(null!==e.mid&&null!==e.sender.track&&(null===e.currentDirection||"sendonly"===e.currentDirection))return""!==this.mids.video&&this.mids.video===e.mid||0<=e.mid.indexOf("video")?e:void 0}));if(t){await this.setSenderParameters(t,this.encodings),await this.setRemoteDescription(e),this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters()),await this.setSenderParameters(t,this.encodings);const n=await this.pc.createAnswer();return await this.pc.setLocalDescription(n),void this.trace("TRANSCEIVER SENDER GET_PARAMETERS",t.sender.getParameters())}}const t=await this.pc.createAnswer();this.writePeerConnectionTimelineLog("create-answer",t),await this.pc.setLocalDescription(t),this.writePeerConnectionTimelineLog("set-local-description",t)}sendAnswer(){if(this.pc&&this.ws&&this.pc.localDescription){this.trace("ANSWER SDP",this.pc.localDescription.sdp);const e={type:"answer",sdp:this.pc.localDescription.sdp};this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog("send-answer",e)}}onIceCandidate(){return new Promise(((e,t)=>{this.pc&&(this.pc.oniceconnectionstatechange=t=>{this.pc&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),"connected"===this.pc.iceConnectionState&&e())},this.pc.onicecandidate=t=>{if(this.writePeerConnectionTimelineLog("onicecandidate",t.candidate),this.pc&&this.trace("ONICECANDIDATE ICEGATHERINGSTATE",this.pc.iceGatheringState),null===t.candidate)e();else{const e=t.candidate.toJSON(),n=Object.assign(e,{type:"candidate"});this.trace("ONICECANDIDATE CANDIDATE MESSAGE",n),this.sendSignalingMessage(n)}})}))}waitChangeConnectionStateConnected(){return new Promise(((e,t)=>{if(this.pc&&void 0===this.pc.connectionState)return void e();const n=setInterval((()=>{if(this.pc)this.pc&&"connected"===this.pc.connectionState&&(clearInterval(n),e());else{const e=new Error;e.message="PeerConnection connectionState did not change to 'connected'",clearInterval(n),t(e)}}),10)}))}monitorSignalingWebSocketEvent(){return new Promise(((e,t)=>{this.monitorSignalingWebSocketEventTimerId=setInterval((()=>{this.ws&&(this.clearMonitorSignalingWebSocketEvent(),this.ws.onclose=e=>{const n=new z(`Signaling failed. CloseEventCode:${e.code} CloseEventReason:'${e.reason}'`);n.code=e.code,n.reason=e.reason,this.writeWebSocketTimelineLog("onclose",n),this.signalingTerminate(),t(n)},this.ws.onerror=e=>{const n=new z("Signaling failed. WebSocket onerror was called");this.writeWebSocketSignalingLog("onerror",n),this.signalingTerminate(),t(n)})}),100)}))}monitorWebSocketEvent(){this.ws&&(this.ws.onclose=async e=>{this.writeWebSocketTimelineLog("onclose",{code:e.code,reason:e.reason}),await this.abend("WEBSOCKET-ONCLOSE",{code:e.code,reason:e.reason})},this.ws.onerror=async e=>{this.writeWebSocketSignalingLog("onerror"),await this.abend("WEBSOCKET-ONERROR")})}monitorPeerConnectionState(){this.pc&&(this.pc.oniceconnectionstatechange=e=>{this.pc&&void 0===this.pc.connectionState&&(this.writePeerConnectionTimelineLog("oniceconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),this.trace("ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE",this.pc.iceConnectionState),clearTimeout(this.monitorIceConnectionStateChangeTimerId),"failed"===this.pc.iceConnectionState?this.abendPeerConnectionState("ICE-CONNECTION-STATE-FAILED"):"disconnected"===this.pc.iceConnectionState&&(this.monitorIceConnectionStateChangeTimerId=setTimeout((()=>{this.pc&&"disconnected"===this.pc.iceConnectionState&&this.abendPeerConnectionState("ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT")}),1e4)))},this.pc.onconnectionstatechange=e=>{this.pc&&(this.writePeerConnectionTimelineLog("onconnectionstatechange",{connectionState:this.pc.connectionState,iceConnectionState:this.pc.iceConnectionState,iceGatheringState:this.pc.iceGatheringState}),"failed"===this.pc.connectionState&&this.abendPeerConnectionState("CONNECTION-STATE-FAILED"))})}setConnectionTimeout(){return new Promise(((e,t)=>{0{if(!this.pc||this.pc&&void 0!==this.pc.connectionState&&"connected"!==this.pc.connectionState){const e=new Error;e.message="Signaling connection timeout",this.callbacks.timeout(),this.trace("DISCONNECT","Signaling connection timeout"),this.writePeerConnectionTimelineLog("signaling-connection-timeout",{connectionTimeout:this.connectionTimeout}),this.signalingTerminate(),t(e)}}),this.connectionTimeout))}))}clearConnectionTimeout(){clearTimeout(this.connectionTimeoutTimerId)}clearMonitorSignalingWebSocketEvent(){clearInterval(this.monitorSignalingWebSocketEventTimerId)}clearMonitorIceConnectionStateChange(){clearInterval(this.monitorIceConnectionStateChangeTimerId)}trace(e,t){this.callbacks.log(e,t),this.debug&&function(e,t,n){const i=e=>{if(e&&"object"==typeof e){let t=null;try{t=Object.keys(JSON.parse(JSON.stringify(e)))}catch(e){}t&&Array.isArray(t)?t.forEach((t=>{console.group(t),i(e[t]),console.groupEnd()})):console.info(e)}else console.info(e)};let s="";window.performance&&(s="["+(window.performance.now()/1e3).toFixed(3)+"]"),e&&(s=s+"["+e+"]"),void 0!==console.info&&void 0!==console.group?(console.group(s+" "+t),i(n),console.groupEnd()):console.log(s+" "+t+"\n",n)}(this.clientId,e,t)}writeWebSocketSignalingLog(e,t){this.callbacks.signaling(_(e,t,"websocket")),this.writeWebSocketTimelineLog(e,t)}writeDataChannelSignalingLog(e,t,n){this.callbacks.signaling(_(e,n,"datachannel")),this.writeDataChannelTimelineLog(e,t,n)}writeWebSocketTimelineLog(e,t){const n=q(e,t,"websocket");this.callbacks.timeline(n)}writeDataChannelTimelineLog(e,t,n){const i=q(e,n,"datachannel",t.id,t.label);this.callbacks.timeline(i)}writePeerConnectionTimelineLog(e,t){const n=q(e,t,"peerconnection");this.callbacks.timeline(n)}writeSoraTimelineLog(e,t){const n=q(e,t,"sora");this.callbacks.timeline(n)}async createOffer(){const e=new window.RTCPeerConnection({iceServers:[]});if(Q()){e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"});const t=await e.createOffer();return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}const t=await e.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});return e.close(),this.writePeerConnectionTimelineLog("create-offer",t),t}signalingOnMessageE2EE(e){if(this.e2ee){const t=new Uint8Array(e),n=this.e2ee.receiveMessage(t);this.e2ee.postRemoteSecretKeyMaterials(n),n.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)}))}}signalingOnMessageTypeOffer(e){if(this.clientId=e.client_id,this.connectionId=e.connection_id,void 0!==e.metadata&&(this.authMetadata=e.metadata),Array.isArray(e.encodings)&&(this.encodings=e.encodings),void 0!==e.mid&&void 0!==e.mid.audio&&(this.mids.audio=e.mid.audio),void 0!==e.mid&&void 0!==e.mid.video&&(this.mids.video=e.mid.video),e.data_channels)for(const t of e.data_channels)this.signalingOfferMessageDataChannels[t.label]=t;this.trace("SIGNALING OFFER MESSAGE",e),this.trace("OFFER SDP",e.sdp)}sendUpdateAnswer(){this.pc&&this.ws&&this.pc.localDescription&&(this.trace("ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"update",sdp:this.pc.localDescription.sdp}))}sendReAnswer(){this.pc&&this.pc.localDescription&&(this.trace("RE ANSWER SDP",this.pc.localDescription.sdp),this.sendSignalingMessage({type:"re-answer",sdp:this.pc.localDescription.sdp}))}async signalingOnMessageTypeUpdate(e){this.trace("SIGNALING UPDATE MESSGE",e),this.trace("UPDATE SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendUpdateAnswer()}async signalingOnMessageTypeReOffer(e){this.trace("SIGNALING RE OFFER MESSGE",e),this.trace("RE OFFER SDP",e.sdp),await this.setRemoteDescription(e),await this.createAnswer(e),this.sendReAnswer()}async signalingOnMessageTypePing(e){const t={type:"pong"};if(e.stats){const e=await this.getStats();t.stats=e}this.ws&&this.ws.send(JSON.stringify(t))}signalingOnMessageTypeNotify(e,t){if("connection.created"===e.event_type){const t=e.connection_id;if(this.connectionId!==t){const n=P(x(e));if(n&&this.e2ee&&t){const e=this.e2ee.startSession(t,n);this.e2ee.postRemoteSecretKeyMaterials(e),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial)}}const n=function(e){return e.data&&Array.isArray(e.data)?e.data:e.metadata_list&&Array.isArray(e.metadata_list)?e.metadata_list:[]}(e);n.forEach((e=>{const t=P(x(e)),n=e.connection_id;n&&this.e2ee&&t&&this.e2ee.addPreKeyBundle(n,t)}))}else if("connection.destroyed"===e.event_type){const t=P(x(e)),n=e.connection_id;if(t&&this.e2ee&&n){const e=this.e2ee.stopSession(n);this.e2ee.postSelfSecretKeyMaterial(e.selfConnectionId,e.selfKeyId,e.selfSecretKeyMaterial,5e3),e.messages.forEach((e=>{this.sendE2EEMessage(e.buffer)})),this.e2ee.postRemoveRemoteDeriveKey(n)}}this.callbacks.notify(e,t)}signalingOnMessageTypeSwitched(e){if(this.signalingSwitched=!0,this.ws){e.ignore_disconnect_websocket&&(this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.writeWebSocketSignalingLog("close"));for(const e of this.datachannels)this.callbacks.datachannel($(e))}}async signalingOnMessageTypeRedirect(e){this.ws&&(this.ws.onclose=null,this.ws.onerror=null,this.ws.close(),this.ws=null);const t=await this.getSignalingWebSocket(e.location);return await this.signaling(t,!0)}async setSenderParameters(e,t){const n=e.sender.getParameters();n.encodings=t,await e.sender.setParameters(n),this.trace("TRANSCEIVER SENDER SET_PARAMETERS",n),this.writePeerConnectionTimelineLog("transceiver-sender-set-parameters",n)}async getStats(){const e=[];if(!this.pc)return e;return(await this.pc.getStats()).forEach((t=>{e.push(t)})),e}onDataChannel(e){const t=e.channel;var n;t.bufferedAmountLowThreshold=65536,t.binaryType="arraybuffer",this.soraDataChannels[t.label]=t,this.writeDataChannelTimelineLog("ondatachannel",t,{binaryType:(n=t).binaryType,bufferedAmount:n.bufferedAmount,bufferedAmountLowThreshold:n.bufferedAmountLowThreshold,id:n.id,label:n.label,maxPacketLifeTime:n.maxPacketLifeTime,maxRetransmits:n.maxRetransmits,negotiated:n.negotiated,ordered:n.ordered,protocol:n.protocol,readyState:n.readyState,reliable:n.reliable}),e.channel.onbufferedamountlow=e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onbufferedamountlow",t)},e.channel.onopen=e=>{const t=e.currentTarget;this.trace("OPEN DATA CHANNEL",t.label),"signaling"===t.label&&this.ws?this.writeDataChannelSignalingLog("onopen",t):this.writeDataChannelTimelineLog("onopen",t)},e.channel.onclose=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onclose",t),this.trace("CLOSE DATA CHANNEL",t.label),await this.disconnect()},e.channel.onerror=async e=>{const t=e.currentTarget;this.writeDataChannelTimelineLog("onerror",t),this.trace("ERROR DATA CHANNEL",t.label),await this.abend("DATA-CHANNEL-ONERROR",{params:{label:t.label}})},"signaling"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);this.writeDataChannelSignalingLog(`onmessage-${a.type}`,t,a),"re-offer"===a.type&&await this.signalingOnMessageTypeReOffer(a)}:"notify"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=t.label,i=this.signalingOfferMessageDataChannels[n];if(!i)return void console.warn(`Received onmessage event for '${n}' DataChannel. But '${n}' DataChannel settings doesn't exist`);const s=ee(e.data,i.compress),a=JSON.parse(s);"connection.created"===a.event_type?this.writeDataChannelTimelineLog("notify-connection.created",t,a):"connection.destroyed"===a.event_type&&this.writeDataChannelTimelineLog("notify-connection.destroyed",t,a),this.signalingOnMessageTypeNotify(a,"datachannel")}:"push"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress),s=JSON.parse(i);this.callbacks.push(s,"datachannel")}:"e2ee"===e.channel.label?e.channel.onmessage=e=>{const t=e.currentTarget,n=e.data;this.signalingOnMessageE2EE(n),this.writeDataChannelSignalingLog("onmessage-e2ee",t,n)}:"stats"===e.channel.label?e.channel.onmessage=async e=>{const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=ee(e.data,n.compress);if("req-stats"===JSON.parse(i).type){const e=await this.getStats();this.sendStatsMessage(e)}}:/^#.*/.exec(e.channel.label)&&(e.channel.onmessage=e=>{if(null===e.currentTarget)return;const t=e.currentTarget.label,n=this.signalingOfferMessageDataChannels[t];if(!n)return void console.warn(`Received onmessage event for '${t}' DataChannel. But '${t}' DataChannel settings doesn't exist`);const i=e.target;let s;"string"==typeof e.data?s=(new TextEncoder).encode(e.data):e.data instanceof ArrayBuffer?s=e.data:console.warn("Received onmessage event data is not of type String or ArrayBuffer."),void 0!==s&&(!0===n.compress&&(s=U(new Uint8Array(s)).buffer),this.callbacks.message(function(e,t){const n=new Event("message");return n.label=e,n.data=t,n}(i.label,s)))})}sendSignalingMessage(e){if(this.soraDataChannels.signaling){if(this.signalingOfferMessageDataChannels.signaling&&!0===this.signalingOfferMessageDataChannels.signaling.compress){const t=F((new TextEncoder).encode(JSON.stringify(e)),{});this.soraDataChannels.signaling.send(t)}else this.soraDataChannels.signaling.send(JSON.stringify(e));this.writeDataChannelSignalingLog(`send-${e.type}`,this.soraDataChannels.signaling,e)}else null!==this.ws&&(this.ws.send(JSON.stringify(e)),this.writeWebSocketSignalingLog(`send-${e.type}`,e))}sendE2EEMessage(e){this.soraDataChannels.e2ee?(this.soraDataChannels.e2ee.send(e),this.writeDataChannelSignalingLog("send-e2ee",this.soraDataChannels.e2ee,e)):null!==this.ws&&(this.ws.send(e),this.writeWebSocketSignalingLog("send-e2ee",e))}sendStatsMessage(e){if(this.soraDataChannels.stats){const t={type:"stats",reports:e};if(this.signalingOfferMessageDataChannels.stats&&!0===this.signalingOfferMessageDataChannels.stats.compress){const e=F((new TextEncoder).encode(JSON.stringify(t)),{});this.soraDataChannels.stats.send(e)}else this.soraDataChannels.stats.send(JSON.stringify(t))}}getAudioTransceiver(){if(this.pc&&this.mids.audio){return this.pc.getTransceivers().find((e=>e.mid===this.mids.audio))||null}return null}getVideoTransceiver(){if(this.pc&&this.mids.video){return this.pc.getTransceivers().find((e=>e.mid===this.mids.video))||null}return null}soraCloseEvent(e,t,n){const i=class extends Event{constructor(e,t,n){super(e),n&&(n.code&&(this.code=n.code),n.reason&&(this.reason=n.reason),n.params&&(this.params=n.params)),this.title=t}};return new i(e,t,n)}sendMessage(e,t){const n=this.soraDataChannels[e];if(null===this.pc)return;if(void 0===n)throw new Error("Could not find DataChannel");if("open"!==n.readyState)throw new Error("Messaging DataChannel is not open");const i=this.signalingOfferMessageDataChannels[e];if(void 0!==i&&!0===i.compress){const e=F(t,{});n.send(e)}else n.send(t)}get e2eeSelfFingerprint(){if(this.options.e2ee&&this.e2ee)return this.e2ee.selfFingerprint()}get e2eeRemoteFingerprints(){if(this.options.e2ee&&this.e2ee)return this.e2ee.remoteFingerprints()}get audio(){return null!==this.getAudioTransceiver()}get video(){return null!==this.getVideoTransceiver()}get signalingUrl(){return this.signalingUrlCandidates}get datachannels(){if(!this.signalingSwitched)return[];const e=Object.keys(this.signalingOfferMessageDataChannels).filter((e=>/^#.*/.exec(e))),t=[];for(const n of e){const e=this.soraDataChannels[n];if(!e)continue;const i=this.signalingOfferMessageDataChannels[n];if(!i)continue;const s={label:e.label,ordered:e.ordered,protocol:e.protocol,compress:i.compress,direction:i.direction};"number"==typeof e.maxPacketLifeTime&&(s.maxPacketLifeTime=e.maxPacketLifeTime),"number"==typeof e.maxRetransmits&&(s.maxRetransmits=e.maxRetransmits),t.push(s)}return t}}class ne extends te{async connect(e){return this.options.multistream?await Promise.race([this.multiStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]):await Promise.race([this.singleStream(e).finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}async singleStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),await this.setRemoteDescription(n),e.getTracks().forEach((t=>{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}async multiStream(e){await this.disconnect(),this.setupE2EE();const t=await this.getSignalingWebSocket(this.signalingUrlCandidates),n=await this.signaling(t);return this.startE2EE(),await this.connectPeerConnection(n),this.pc&&(this.pc.ontrack=e=>{const t=e.streams[0];if(!t)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),"default"!==t.id&&t.id!==this.connectionId&&(this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=this.remoteConnectionIds.indexOf(e.target.id);-1{this.pc&&this.pc.addTrack(t,e)})),this.stream=e,await this.createAnswer(n),this.sendAnswer(),this.pc&&this.e2ee&&this.pc.getSenders().forEach((e=>{this.e2ee&&this.e2ee.setupSenderTransform(e)})),await this.onIceCandidate(),await this.waitChangeConnectionStateConnected(),e}}class ie extends te{async connect(){if(this.options.multistream)return await Promise.race([this.multiStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]),this.monitorWebSocketEvent(),void this.monitorPeerConnectionState();{const e=await Promise.race([this.singleStream().finally((()=>{this.clearConnectionTimeout(),this.clearMonitorSignalingWebSocketEvent()})),this.setConnectionTimeout(),this.monitorSignalingWebSocketEvent()]);return this.monitorWebSocketEvent(),this.monitorPeerConnectionState(),e}}async singleStream(){await this.disconnect(),this.setupE2EE();const e=await this.getSignalingWebSocket(this.signalingUrlCandidates),t=await this.signaling(e);return this.startE2EE(),await this.connectPeerConnection(t),this.pc&&(this.pc.ontrack=e=>{this.stream=e.streams[0];const t=this.stream.id;if("default"===t)return;const n={"stream.id":t,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),this.stream.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1{const t=e.streams[0];if("default"===t.id)return;if(t.id===this.connectionId)return;const n={"stream.id":t.id,id:e.track.id,label:e.track.label,enabled:e.track.enabled,kind:e.track.kind,muted:e.track.muted,readyState:e.track.readyState};this.writePeerConnectionTimelineLog("ontrack",n),this.e2ee&&this.e2ee.setupReceiverTransform(e.receiver),this.callbacks.track(e),t.onremovetrack=e=>{if(this.callbacks.removetrack(e),e.target){const t=e.target.id,n=this.remoteConnectionIds.indexOf(t);-1 {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") ; else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t};\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t};\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t};\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});\n\t\t}\n\t})();\n}\n\nconst WORKER_SCRIPT = \"InVzZSBzdHJpY3QiOwovKi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koc2ZyYW1lSGVhZGVyQnVmZmVyKTsKICAgICAgICBjb25zdCBjb25uZWN0aW9uSWQgPSB0ZXh0RGVjb2Rlci5kZWNvZGUoY29ubmVjdGlvbklkQnVmZmVyKTsKICAgICAgICBjb25zdCBbcywgY291bnQsIGtleUlkXSA9IHBhcnNlU0ZyYW1lSGVhZGVyKHNmcmFtZUhlYWRlckJ1ZmZlcik7CiAgICAgICAgLy8g5LuK5Zue44GvIHMgZmxhZyDjga8gMCDjga7jgb8KICAgICAgICBpZiAocyAhPT0gMCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlVORVhQRUNURUQtUy1GTEFHIik7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGRlcml2ZUtleSA9IGdldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICBpZiAoIWRlcml2ZUtleSkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGl2ID0gZ2VuZXJhdGVJVihjb3VudCwgY29ubmVjdGlvbklkLCBrZXlJZCk7CiAgICAgICAgaWYgKCFpdikgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGZyYW1lQWRkID0gZW5jb2RlRnJhbWVBZGQoZnJhbWVNZXRhZGF0YSwgc2ZyYW1lSGVhZGVyLCBjb25uZWN0aW9uSWQpOwogICAgICAgIGNyeXB0by5zdWJ0bGUKICAgICAgICAgICAgLmRlY3J5cHQoewogICAgICAgICAgICBuYW1lOiAiQUVTLUdDTSIsCiAgICAgICAgICAgIGl2OiBpdiwKICAgICAgICAgICAgYWRkaXRpb25hbERhdGE6IGZyYW1lQWRkLAogICAgICAgIH0sIGRlcml2ZUtleSwgbmV3IFVpbnQ4QXJyYXkoZW5jcnlwdGVkRnJhbWVCdWZmZXIpKQogICAgICAgICAgICAudGhlbigocGxhaW5UZXh0KSA9PiB7CiAgICAgICAgICAgIGNvbnN0IG5ld0Rhd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0SWQgPSAwOwpvbm1lc3NhZ2UgPSAoZXZlbnQpID0+IHsKICAgIGNvbnN0IHsgdHlwZSB9ID0gZXZlbnQuZGF0YTsKICAgIGlmICh0eXBlID09PSAic2VsZlNlY3JldEtleU1hdGVyaWFsIikgewogICAgICAgIGNvbnN0IHsgc2VsZlNlY3JldEtleU1hdGVyaWFsLCBzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdhaXRpbmdUaW1lIH0gPSBldmVudC5kYXRhOwogICAgICAgIGNvbnN0IHRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWxmU2VjcmV0S2V5TWF0ZXJpYWwuYnVmZmVyLCAiSEtERiIsIGZhbHNlLCBbImRlcml2ZUJpdHMiLCAiZGVyaXZlS2V5Il0pCiAgICAgICAgICAgICAgICAudGhlbigobWF0ZXJpYWwpID0+IHsKICAgICAgICAgICAgICAgIGdlbmVyYXRlRGVyaXZlS2V5KG1hdGVyaWFsKS50aGVuKChkZXJpdmVLZXkpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRTZWxmRGVyaXZlS2V5KHNlbGZDb25uZWN0aW9uSWQsIHNlbGZLZXlJZCwgZGVyaXZlS2V5KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgZ2VuZXJhdGVXcml0ZUlWKG1hdGVyaWFsKS50aGVuKCh3cml0ZUlWKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgc2V0V3JpdGVJVihzZWxmQ29ubmVjdGlvbklkLCBzZWxmS2V5SWQsIHdyaXRlSVYpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBzZXRXcml0ZUlWKGNvbm5lY3Rpb25JZCwga2V5SWQsIHdyaXRlSVYpOwogICA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gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=\";\nclass SoraE2EE {\n constructor() {\n // 対応しているかどうかの判断\n // @ts-ignore トライアル段階の API なので無視する\n const supportsInsertableStreams = !!RTCRtpSender.prototype.createEncodedStreams;\n if (!supportsInsertableStreams) {\n throw new Error(\"E2EE is not supported in this browser.\");\n }\n this.worker = null;\n this.onWorkerDisconnect = null;\n }\n // worker を起動する\n startWorker() {\n // ワーカーを起動する\n const workerScript = atob(WORKER_SCRIPT);\n this.worker = new Worker(URL.createObjectURL(new Blob([workerScript], { type: \"application/javascript\" })));\n this.worker.onmessage = (event) => {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n // role: sendrecv で multistream: false の場合は例外を発生させる\n if (role === \"sendrecv\" && options.multistream !== true) {\n throw new Error(\"Failed to parse options. Options multistream must be true when connecting using 'sendrecv'\");\n }\n if (redirect === true) {\n message.redirect = true;\n }\n if (typeof options.multistream === \"boolean\") {\n message.multistream = options.multistream;\n }\n if (typeof options.simulcast === \"boolean\") {\n message.simulcast = options.simulcast;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n if (typeof options.spotlight === \"boolean\") {\n message.spotlight = options.spotlight;\n }\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n if (options.signalingNotifyMetadata !== undefined) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n if (options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n if (options.bundleId !== undefined) {\n message.bundle_id = options.bundleId;\n }\n if (typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n if (typeof options.e2ee === \"boolean\") {\n message.e2ee = options.e2ee;\n }\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WS シグナリングで type offer メッセージを受信したシグナリング URL\n */\n connectedSignalingUrl: string;\n /**\n * WS シグナリングで最初に type connect を送信したシグナリング URL\n */\n contactSignalingUrl: string;\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.connectedSignalingUrl = \"\";\n this.contactSignalingUrl = \"\";\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private signalingTerminate(): void {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private abendPeerConnectionState(title: SoraAbendTitle): void {\n this.clearMonitorIceConnectionStateChange();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.contactSignalingUrl = \"\";\n this.connectedSignalingUrl = \"\";\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n this.connectedSignalingUrl = ws.url;\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n try {\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n } catch (error) {\n reject(error);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n // 初回に接続した URL を状態管理する\n if (!redirect) {\n this.contactSignalingUrl = ws.url;\n this.writeWebSocketSignalingLog(\"contact-signaling-url\", this.contactSignalingUrl);\n }\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = (_) => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(() => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = (_) => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(() => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n dataChannel.bufferedAmountLowThreshold = 65536;\n dataChannel.binaryType = \"arraybuffer\";\n this.soraDataChannels[dataChannel.label] = dataChannel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const dataChannel = event.target as RTCDataChannel;\n let data: ArrayBuffer | undefined = undefined;\n if (typeof event.data === \"string\") {\n data = new TextEncoder().encode(event.data);\n } else if (event.data instanceof ArrayBuffer) {\n data = event.data;\n } else {\n console.warn(\"Received onmessage event data is not of type String or ArrayBuffer.\");\n }\n\n if (data !== undefined) {\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n }\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n if (dataChannel.readyState !== \"open\") {\n throw new Error(\"Messaging DataChannel is not open\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n // sendrecv の場合、multistream に初期値を指定する\n const sendrecvOptions: ConnectionOptions = Object.assign({ multistream: true }, options);\n return new ConnectionPublisher(\n this.signalingUrlCandidates,\n \"sendrecv\",\n channelId,\n metadata,\n sendrecvOptions,\n this.debug\n );\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","BYTES_PER_ELEMENT","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","multistream","simulcast","simulcastRid","simulcast_rid","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","signalingNotifyMetadata","signaling_notify_metadata","clientId","client_id","bundleId","bundle_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","connectedSignalingUrl","contactSignalingUrl","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","signalingTerminate","dataChannel","initializeConnection","abendPeerConnectionState","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmountLowThreshold","bufferedAmount","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","target","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","getTracks","ontrack","streams","muted","onremovetrack","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendrecvOptions","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMediaStreamConstraints","mediastream","applyConstraints"],"mappings":"qOAslBA,MAAMA,EACFC,cAII,MADoCC,aAAaC,UAAUC,qBAEvD,MAAM,IAAIC,MAAM,0CAEpB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rBC,EAA6B,CAAEM,OAAO,EAAMC,OAAO,IAEnD,OAAO,IAAI6S,GAAqBrxB,KAAKokB,uBAAwB,WAAYrG,EAAWC,EAAUC,EAASje,KAAK2O,OAQ1Gmb,mBACF,OAAO9pB,KAAKokB,8BAOD,CAYb0N,SAAU3wB,eAAgBuC,SAClBhE,EAASqyB,SAASruB,IAgB1BsuB,WAAY,SAAU5N,EAA2CzV,GAAQ,GACvE,OAAO,IAAI8iB,GAAerN,EAAwBzV,IAOpDoC,QAAS,WACP,MAAO,qBAOTkhB,QAAS,CACPC,4BCnMJ/wB,eACEgxB,EACA1N,GAEA,GAAIA,EAAYlG,OAAsC,kBAAtBkG,EAAYlG,MAC1C,IAAK,MAAM7c,KAASywB,EAAYjM,uBACxBxkB,EAAM0wB,iBAAiB3N,EAAYlG,OAG7C,GAAIkG,EAAYjG,OAAsC,kBAAtBiG,EAAYjG,MAC1C,IAAK,MAAM9c,KAASywB,EAAYzL,uBACxBhlB,EAAM0wB,iBAAiB3N,EAAYjG"} \ No newline at end of file +{"version":3,"file":"sora.min.js","sources":["../packages/e2ee/dist/sora_e2ee.mjs","../node_modules/fflate/esm/browser.js","../packages/sdk/src/utils.ts","../packages/sdk/src/base.ts","../packages/sdk/src/publisher.ts","../packages/sdk/src/subscriber.ts","../packages/sdk/src/sora.ts","../packages/sdk/src/helpers.ts"],"sourcesContent":["/**\n * @sora/e2ee\n * WebRTC SFU Sora JavaScript E2EE Library\n * @version: 2021.1.0\n * @author: Shiguredo Inc.\n * @license: Apache-2.0\n **/\n\n// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nfunction WasmExec () {\n\t(() => {\n\t\t// Map multiple JavaScript environments to a single common API,\n\t\t// preferring web standards over Node.js API.\n\t\t//\n\t\t// Environments considered:\n\t\t// - Browsers\n\t\t// - Node.js\n\t\t// - Electron\n\t\t// - Parcel\n\t\n\t\tif (typeof global !== \"undefined\") ; else if (typeof window !== \"undefined\") {\n\t\t\twindow.global = window;\n\t\t} else if (typeof self !== \"undefined\") {\n\t\t\tself.global = self;\n\t\t} else {\n\t\t\tthrow new Error(\"cannot export Go (neither global, window nor self is defined)\");\n\t\t}\n\t\n\t\tif (!global.require && typeof require !== \"undefined\") {\n\t\t\tglobal.require = require;\n\t\t}\n\t\n\t\tif (!global.fs && global.require) {\n\t\t\tconst fs = require(\"fs\");\n\t\t\tif (Object.keys(fs) !== 0) {\n\t\t\t\tglobal.fs = fs;\n\t\t\t}\n\t\t}\n\t\n\t\tconst enosys = () => {\n\t\t\tconst err = new Error(\"not implemented\");\n\t\t\terr.code = \"ENOSYS\";\n\t\t\treturn err;\n\t\t};\n\t\n\t\tif (!global.fs) {\n\t\t\tlet outputBuf = \"\";\n\t\t\tglobal.fs = {\n\t\t\t\tconstants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused\n\t\t\t\twriteSync(fd, buf) {\n\t\t\t\t\toutputBuf += decoder.decode(buf);\n\t\t\t\t\tconst nl = outputBuf.lastIndexOf(\"\\n\");\n\t\t\t\t\tif (nl != -1) {\n\t\t\t\t\t\tconsole.log(outputBuf.substr(0, nl));\n\t\t\t\t\t\toutputBuf = outputBuf.substr(nl + 1);\n\t\t\t\t\t}\n\t\t\t\t\treturn buf.length;\n\t\t\t\t},\n\t\t\t\twrite(fd, buf, offset, length, position, callback) {\n\t\t\t\t\tif (offset !== 0 || length !== buf.length || position !== null) {\n\t\t\t\t\t\tcallback(enosys());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst n = this.writeSync(fd, buf);\n\t\t\t\t\tcallback(null, n);\n\t\t\t\t},\n\t\t\t\tchmod(path, mode, callback) { callback(enosys()); },\n\t\t\t\tchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tclose(fd, callback) { callback(enosys()); },\n\t\t\t\tfchmod(fd, mode, callback) { callback(enosys()); },\n\t\t\t\tfchown(fd, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tfstat(fd, callback) { callback(enosys()); },\n\t\t\t\tfsync(fd, callback) { callback(null); },\n\t\t\t\tftruncate(fd, length, callback) { callback(enosys()); },\n\t\t\t\tlchown(path, uid, gid, callback) { callback(enosys()); },\n\t\t\t\tlink(path, link, callback) { callback(enosys()); },\n\t\t\t\tlstat(path, callback) { callback(enosys()); },\n\t\t\t\tmkdir(path, perm, callback) { callback(enosys()); },\n\t\t\t\topen(path, flags, mode, callback) { callback(enosys()); },\n\t\t\t\tread(fd, buffer, offset, length, position, callback) { callback(enosys()); },\n\t\t\t\treaddir(path, callback) { callback(enosys()); },\n\t\t\t\treadlink(path, callback) { callback(enosys()); },\n\t\t\t\trename(from, to, callback) { callback(enosys()); },\n\t\t\t\trmdir(path, callback) { callback(enosys()); },\n\t\t\t\tstat(path, callback) { callback(enosys()); },\n\t\t\t\tsymlink(path, link, callback) { callback(enosys()); },\n\t\t\t\ttruncate(path, length, callback) { callback(enosys()); },\n\t\t\t\tunlink(path, callback) { callback(enosys()); },\n\t\t\t\tutimes(path, atime, mtime, callback) { callback(enosys()); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.process) {\n\t\t\tglobal.process = {\n\t\t\t\tgetuid() { return -1; },\n\t\t\t\tgetgid() { return -1; },\n\t\t\t\tgeteuid() { return -1; },\n\t\t\t\tgetegid() { return -1; },\n\t\t\t\tgetgroups() { throw enosys(); },\n\t\t\t\tpid: -1,\n\t\t\t\tppid: -1,\n\t\t\t\tumask() { throw enosys(); },\n\t\t\t\tcwd() { throw enosys(); },\n\t\t\t\tchdir() { throw enosys(); },\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.crypto) {\n\t\t\tconst nodeCrypto = require(\"crypto\");\n\t\t\tglobal.crypto = {\n\t\t\t\tgetRandomValues(b) {\n\t\t\t\t\tnodeCrypto.randomFillSync(b);\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.performance) {\n\t\t\tglobal.performance = {\n\t\t\t\tnow() {\n\t\t\t\t\tconst [sec, nsec] = process.hrtime();\n\t\t\t\t\treturn sec * 1000 + nsec / 1000000;\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\n\t\tif (!global.TextEncoder) {\n\t\t\tglobal.TextEncoder = require(\"util\").TextEncoder;\n\t\t}\n\t\n\t\tif (!global.TextDecoder) {\n\t\t\tglobal.TextDecoder = require(\"util\").TextDecoder;\n\t\t}\n\t\n\t\t// End of polyfills for common API.\n\t\n\t\tconst encoder = new TextEncoder(\"utf-8\");\n\t\tconst decoder = new TextDecoder(\"utf-8\");\n\t\n\t\tglobal.Go = class {\n\t\t\tconstructor() {\n\t\t\t\tthis.argv = [\"js\"];\n\t\t\t\tthis.env = {};\n\t\t\t\tthis.exit = (code) => {\n\t\t\t\t\tif (code !== 0) {\n\t\t\t\t\t\tconsole.warn(\"exit code:\", code);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tthis._exitPromise = new Promise((resolve) => {\n\t\t\t\t\tthis._resolveExitPromise = resolve;\n\t\t\t\t});\n\t\t\t\tthis._pendingEvent = null;\n\t\t\t\tthis._scheduledTimeouts = new Map();\n\t\t\t\tthis._nextCallbackTimeoutID = 1;\n\t\n\t\t\t\tconst setInt64 = (addr, v) => {\n\t\t\t\t\tthis.mem.setUint32(addr + 0, v, true);\n\t\t\t\t\tthis.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);\n\t\t\t\t};\n\t\n\t\t\t\tconst getInt64 = (addr) => {\n\t\t\t\t\tconst low = this.mem.getUint32(addr + 0, true);\n\t\t\t\t\tconst high = this.mem.getInt32(addr + 4, true);\n\t\t\t\t\treturn low + high * 4294967296;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadValue = (addr) => {\n\t\t\t\t\tconst f = this.mem.getFloat64(addr, true);\n\t\t\t\t\tif (f === 0) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isNaN(f)) {\n\t\t\t\t\t\treturn f;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tconst id = this.mem.getUint32(addr, true);\n\t\t\t\t\treturn this._values[id];\n\t\t\t\t};\n\t\n\t\t\t\tconst storeValue = (addr, v) => {\n\t\t\t\t\tconst nanHead = 0x7FF80000;\n\t\n\t\t\t\t\tif (typeof v === \"number\" && v !== 0) {\n\t\t\t\t\t\tif (isNaN(v)) {\n\t\t\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead, true);\n\t\t\t\t\t\t\tthis.mem.setUint32(addr, 0, true);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.mem.setFloat64(addr, v, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (v === undefined) {\n\t\t\t\t\t\tthis.mem.setFloat64(addr, 0, true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tlet id = this._ids.get(v);\n\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\tid = this._idPool.pop();\n\t\t\t\t\t\tif (id === undefined) {\n\t\t\t\t\t\t\tid = this._values.length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._values[id] = v;\n\t\t\t\t\t\tthis._goRefCounts[id] = 0;\n\t\t\t\t\t\tthis._ids.set(v, id);\n\t\t\t\t\t}\n\t\t\t\t\tthis._goRefCounts[id]++;\n\t\t\t\t\tlet typeFlag = 0;\n\t\t\t\t\tswitch (typeof v) {\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tif (v !== null) {\n\t\t\t\t\t\t\t\ttypeFlag = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\ttypeFlag = 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"symbol\":\n\t\t\t\t\t\t\ttypeFlag = 3;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"function\":\n\t\t\t\t\t\t\ttypeFlag = 4;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.mem.setUint32(addr + 4, nanHead | typeFlag, true);\n\t\t\t\t\tthis.mem.setUint32(addr, id, true);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSlice = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn new Uint8Array(this._inst.exports.mem.buffer, array, len);\n\t\t\t\t};\n\t\n\t\t\t\tconst loadSliceOfValues = (addr) => {\n\t\t\t\t\tconst array = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\tconst a = new Array(len);\n\t\t\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\t\t\ta[i] = loadValue(array + i * 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn a;\n\t\t\t\t};\n\t\n\t\t\t\tconst loadString = (addr) => {\n\t\t\t\t\tconst saddr = getInt64(addr + 0);\n\t\t\t\t\tconst len = getInt64(addr + 8);\n\t\t\t\t\treturn decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));\n\t\t\t\t};\n\t\n\t\t\t\tconst timeOrigin = Date.now() - performance.now();\n\t\t\t\tthis.importObject = {\n\t\t\t\t\tgo: {\n\t\t\t\t\t\t// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)\n\t\t\t\t\t\t// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported\n\t\t\t\t\t\t// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).\n\t\t\t\t\t\t// This changes the SP, thus we have to update the SP used by the imported function.\n\t\n\t\t\t\t\t\t// func wasmExit(code int32)\n\t\t\t\t\t\t\"runtime.wasmExit\": (sp) => {\n\t\t\t\t\t\t\tconst code = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tthis.exited = true;\n\t\t\t\t\t\t\tdelete this._inst;\n\t\t\t\t\t\t\tdelete this._values;\n\t\t\t\t\t\t\tdelete this._goRefCounts;\n\t\t\t\t\t\t\tdelete this._ids;\n\t\t\t\t\t\t\tdelete this._idPool;\n\t\t\t\t\t\t\tthis.exit(code);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)\n\t\t\t\t\t\t\"runtime.wasmWrite\": (sp) => {\n\t\t\t\t\t\t\tconst fd = getInt64(sp + 8);\n\t\t\t\t\t\t\tconst p = getInt64(sp + 16);\n\t\t\t\t\t\t\tconst n = this.mem.getInt32(sp + 24, true);\n\t\t\t\t\t\t\tfs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func resetMemoryDataView()\n\t\t\t\t\t\t\"runtime.resetMemoryDataView\": (sp) => {\n\t\t\t\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func nanotime1() int64\n\t\t\t\t\t\t\"runtime.nanotime1\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func walltime1() (sec int64, nsec int32)\n\t\t\t\t\t\t\"runtime.walltime1\": (sp) => {\n\t\t\t\t\t\t\tconst msec = (new Date).getTime();\n\t\t\t\t\t\t\tsetInt64(sp + 8, msec / 1000);\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func scheduleTimeoutEvent(delay int64) int32\n\t\t\t\t\t\t\"runtime.scheduleTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this._nextCallbackTimeoutID;\n\t\t\t\t\t\t\tthis._nextCallbackTimeoutID++;\n\t\t\t\t\t\t\tthis._scheduledTimeouts.set(id, setTimeout(\n\t\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\twhile (this._scheduledTimeouts.has(id)) {\n\t\t\t\t\t\t\t\t\t\t// for some reason Go failed to register the timeout event, log and try again\n\t\t\t\t\t\t\t\t\t\t// (temporary workaround for https://github.com/golang/go/issues/28975)\n\t\t\t\t\t\t\t\t\t\tconsole.warn(\"scheduleTimeoutEvent: missed timeout event\");\n\t\t\t\t\t\t\t\t\t\tthis._resume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\tthis.mem.setInt32(sp + 16, id, true);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func clearTimeoutEvent(id int32)\n\t\t\t\t\t\t\"runtime.clearTimeoutEvent\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getInt32(sp + 8, true);\n\t\t\t\t\t\t\tclearTimeout(this._scheduledTimeouts.get(id));\n\t\t\t\t\t\t\tthis._scheduledTimeouts.delete(id);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func getRandomData(r []byte)\n\t\t\t\t\t\t\"runtime.getRandomData\": (sp) => {\n\t\t\t\t\t\t\tcrypto.getRandomValues(loadSlice(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func finalizeRef(v ref)\n\t\t\t\t\t\t\"syscall/js.finalizeRef\": (sp) => {\n\t\t\t\t\t\t\tconst id = this.mem.getUint32(sp + 8, true);\n\t\t\t\t\t\t\tthis._goRefCounts[id]--;\n\t\t\t\t\t\t\tif (this._goRefCounts[id] === 0) {\n\t\t\t\t\t\t\t\tconst v = this._values[id];\n\t\t\t\t\t\t\t\tthis._values[id] = null;\n\t\t\t\t\t\t\t\tthis._ids.delete(v);\n\t\t\t\t\t\t\t\tthis._idPool.push(id);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func stringVal(value string) ref\n\t\t\t\t\t\t\"syscall/js.stringVal\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, loadString(sp + 8));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueGet(v ref, p string) ref\n\t\t\t\t\t\t\"syscall/js.valueGet\": (sp) => {\n\t\t\t\t\t\t\tconst result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\tstoreValue(sp + 32, result);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueSet(v ref, p string, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSet\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueDelete(v ref, p string)\n\t\t\t\t\t\t\"syscall/js.valueDelete\": (sp) => {\n\t\t\t\t\t\t\tReflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueIndex(v ref, i int) ref\n\t\t\t\t\t\t\"syscall/js.valueIndex\": (sp) => {\n\t\t\t\t\t\t\tstoreValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueSetIndex(v ref, i int, x ref)\n\t\t\t\t\t\t\"syscall/js.valueSetIndex\": (sp) => {\n\t\t\t\t\t\t\tReflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueCall(v ref, m string, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueCall\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst m = Reflect.get(v, loadString(sp + 16));\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 32);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(m, v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 56, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 64, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInvoke(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueInvoke\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.apply(v, undefined, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueNew(v ref, args []ref) (ref, bool)\n\t\t\t\t\t\t\"syscall/js.valueNew\": (sp) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst v = loadValue(sp + 8);\n\t\t\t\t\t\t\t\tconst args = loadSliceOfValues(sp + 16);\n\t\t\t\t\t\t\t\tconst result = Reflect.construct(v, args);\n\t\t\t\t\t\t\t\tsp = this._inst.exports.getsp(); // see comment above\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, result);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tstoreValue(sp + 40, err);\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueLength(v ref) int\n\t\t\t\t\t\t\"syscall/js.valueLength\": (sp) => {\n\t\t\t\t\t\t\tsetInt64(sp + 16, parseInt(loadValue(sp + 8).length));\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valuePrepareString(v ref) (ref, int)\n\t\t\t\t\t\t\"syscall/js.valuePrepareString\": (sp) => {\n\t\t\t\t\t\t\tconst str = encoder.encode(String(loadValue(sp + 8)));\n\t\t\t\t\t\t\tstoreValue(sp + 16, str);\n\t\t\t\t\t\t\tsetInt64(sp + 24, str.length);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// valueLoadString(v ref, b []byte)\n\t\t\t\t\t\t\"syscall/js.valueLoadString\": (sp) => {\n\t\t\t\t\t\t\tconst str = loadValue(sp + 8);\n\t\t\t\t\t\t\tloadSlice(sp + 16).set(str);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func valueInstanceOf(v ref, t ref) bool\n\t\t\t\t\t\t\"syscall/js.valueInstanceOf\": (sp) => {\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToGo(dst []byte, src ref) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToGo\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadSlice(sp + 8);\n\t\t\t\t\t\t\tconst src = loadValue(sp + 32);\n\t\t\t\t\t\t\tif (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t// func copyBytesToJS(dst ref, src []byte) (int, bool)\n\t\t\t\t\t\t\"syscall/js.copyBytesToJS\": (sp) => {\n\t\t\t\t\t\t\tconst dst = loadValue(sp + 8);\n\t\t\t\t\t\t\tconst src = loadSlice(sp + 16);\n\t\t\t\t\t\t\tif (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {\n\t\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 0);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst toCopy = src.subarray(0, dst.length);\n\t\t\t\t\t\t\tdst.set(toCopy);\n\t\t\t\t\t\t\tsetInt64(sp + 40, toCopy.length);\n\t\t\t\t\t\t\tthis.mem.setUint8(sp + 48, 1);\n\t\t\t\t\t\t},\n\t\n\t\t\t\t\t\t\"debug\": (value) => {\n\t\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tasync run(instance) {\n\t\t\t\tthis._inst = instance;\n\t\t\t\tthis.mem = new DataView(this._inst.exports.mem.buffer);\n\t\t\t\tthis._values = [ // JS values that Go currently has references to, indexed by reference id\n\t\t\t\t\tNaN,\n\t\t\t\t\t0,\n\t\t\t\t\tnull,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse,\n\t\t\t\t\tglobal,\n\t\t\t\t\tthis,\n\t\t\t\t];\n\t\t\t\tthis._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id\n\t\t\t\tthis._ids = new Map([ // mapping from JS values to reference ids\n\t\t\t\t\t[0, 1],\n\t\t\t\t\t[null, 2],\n\t\t\t\t\t[true, 3],\n\t\t\t\t\t[false, 4],\n\t\t\t\t\t[global, 5],\n\t\t\t\t\t[this, 6],\n\t\t\t\t]);\n\t\t\t\tthis._idPool = []; // unused ids that have been garbage collected\n\t\t\t\tthis.exited = false; // whether the Go program has exited\n\t\n\t\t\t\t// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.\n\t\t\t\tlet offset = 4096;\n\t\n\t\t\t\tconst strPtr = (str) => {\n\t\t\t\t\tconst ptr = offset;\n\t\t\t\t\tconst bytes = encoder.encode(str + \"\\0\");\n\t\t\t\t\tnew Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);\n\t\t\t\t\toffset += bytes.length;\n\t\t\t\t\tif (offset % 8 !== 0) {\n\t\t\t\t\t\toffset += 8 - (offset % 8);\n\t\t\t\t\t}\n\t\t\t\t\treturn ptr;\n\t\t\t\t};\n\t\n\t\t\t\tconst argc = this.argv.length;\n\t\n\t\t\t\tconst argvPtrs = [];\n\t\t\t\tthis.argv.forEach((arg) => {\n\t\t\t\t\targvPtrs.push(strPtr(arg));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst keys = Object.keys(this.env).sort();\n\t\t\t\tkeys.forEach((key) => {\n\t\t\t\t\targvPtrs.push(strPtr(`${key}=${this.env[key]}`));\n\t\t\t\t});\n\t\t\t\targvPtrs.push(0);\n\t\n\t\t\t\tconst argv = offset;\n\t\t\t\targvPtrs.forEach((ptr) => {\n\t\t\t\t\tthis.mem.setUint32(offset, ptr, true);\n\t\t\t\t\tthis.mem.setUint32(offset + 4, 0, true);\n\t\t\t\t\toffset += 8;\n\t\t\t\t});\n\t\n\t\t\t\tthis._inst.exports.run(argc, argv);\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t\tawait this._exitPromise;\n\t\t\t}\n\t\n\t\t\t_resume() {\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthrow new Error(\"Go program has already exited\");\n\t\t\t\t}\n\t\t\t\tthis._inst.exports.resume();\n\t\t\t\tif (this.exited) {\n\t\t\t\t\tthis._resolveExitPromise();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t_makeFuncWrapper(id) {\n\t\t\t\tconst go = this;\n\t\t\t\treturn function () {\n\t\t\t\t\tconst event = { id: id, this: this, args: arguments };\n\t\t\t\t\tgo._pendingEvent = event;\n\t\t\t\t\tgo._resume();\n\t\t\t\t\treturn event.result;\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\n\t\tif (\n\t\t\tglobal.require &&\n\t\t\tglobal.require.main === module &&\n\t\t\tglobal.process &&\n\t\t\tglobal.process.versions &&\n\t\t\t!global.process.versions.electron\n\t\t) {\n\t\t\tif (process.argv.length < 3) {\n\t\t\t\tconsole.error(\"usage: go_js_wasm_exec [wasm binary] [arguments]\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\n\t\t\tconst go = new Go();\n\t\t\tgo.argv = process.argv.slice(2);\n\t\t\tgo.env = Object.assign({ TMPDIR: require(\"os\").tmpdir() }, process.env);\n\t\t\tgo.exit = process.exit;\n\t\t\tWebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => {\n\t\t\t\tprocess.on(\"exit\", (code) => { // Node.js exits if no event handler is pending\n\t\t\t\t\tif (code === 0 && !go.exited) {\n\t\t\t\t\t\t// deadlock, make Go print error and stack traces\n\t\t\t\t\t\tgo._pendingEvent = { id: 0 };\n\t\t\t\t\t\tgo._resume();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn go.run(result.instance);\n\t\t\t}).catch((err) => {\n\t\t\t\tconsole.error(err);\n\t\t\t\tprocess.exit(1);\n\t\t\t});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uY3Rpb24gc2lsZW5jZUZyYW1lKGVuY29kZWRGcmFtZSkgewogICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkLCByZWNlaXZlTWVzc2FnZSDlj5fkv6HliY3jga7loLTlkIgKICAgIGlmIChlbmNvZGVkRnJhbWUudHlwZSA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgLy8g6Z+z5aOw44Gv5pqX5Y+35YyW44Gv44GE44KL44Go6IGe44GR44Gf44KC44Gu44GY44KD44Gq44GE44Gu44Gn572u44GN5o+b44GI44KLCiAgICAgICAgY29uc3QgbmV3RGF0YSA9IG5ldyBBcnJheUJ1ZmZlcigzKTsKICAgICAgICBjb25zdCBuZXdVaW50OCA9IG5ldyBVaW50OEFycmF5KG5ld0RhdGEpOwogICAgICAgIC8vIE9wdXMg44K144Kk44Os44Oz44K544OV44Os44O844OgCiAgICAgICAgbmV3VWludDguc2V0KFsweGQ4LCAweGZmLCAweGZlXSk7CiAgICAgICAgZW5jb2RlZEZyYW1lLmRhdGEgPSBuZXdEYXRhOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgLy8g5pig5YOP44GM5q2j5bi444GY44KD44Gq44GE44Gf44KBIFBMSSDjgrnjg4jjg7zjg6DjgYznmbrnlJ/jgZfjgabjgZfjgb7jgYYKICAgICAgICAvLyDjgZ3jga7jgZ/jgoEgMzIweDI0MCDjga7nnJ/jgaPpu5LjgarnlLvpnaLjgavnva7jgY3mj5vjgYjjgosKICAgICAgICBjb25zdCBuZXdEYXRhID0gbmV3IEFycmF5QnVmZmVyKDYwKTsKICAgICAgICBjb25zdCBuZXdVaW50OCA9IG5ldyBVaW50OEFycmF5KG5ld0RhdGEpOwogICAgICAgIC8vIHByZXR0aWVyLWlnbm9yZQogICAgICAgIG5ld1VpbnQ4LnNldChbMHhiMCwgMHgwNSwgMHgwMCwgMHg5ZCwgMHgwMSwgMHgyYSwgMHhhMCwgMHgwMCwgMHg1YSwgMHgwMCwKICAgICAgICAgICAgMHgzOSwgMH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iAgICAgICAgY29uc3Qgc2ZyYW1lSGVhZGVyID0gbmV3IFVpbnQ4QXJyYXkoc2ZyYW1lSGVhZGVyQnVmZmVyKTsKICAgICAgICBjb25zdCBjb25uZWN0aW9uSWQgPSB0ZXh0RGVjb2Rlci5kZWNvZGUoY29ubmVjdGlvbklkQnVmZmVyKTsKICAgICAgICBjb25zdCBbcywgY291bnQsIGtleUlkXSA9IHBhcnNlU0ZyYW1lSGVhZGVyKHNmcmFtZUhlYWRlckJ1ZmZlcik7CiAgICAgICAgLy8g5LuK5Zue44GvIHMgZmxhZyDjga8gMCDjga7jgb8KICAgICAgICBpZiAocyAhPT0gMCkgewogICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoIlVORVhQRUNURUQtUy1GTEFHIik7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGRlcml2ZUtleSA9IGdldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkKTsKICAgICAgICBpZiAoIWRlcml2ZUtleSkgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGl2ID0gZ2VuZXJhdGVJVihjb3VudCwgY29ubmVjdGlvbklkLCBrZXlJZCk7CiAgICAgICAgaWYgKCFpdikgewogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGZyYW1lQWRkID0gZW5jb2RlRnJhbWVBZGQoZnJhbWVNZXRhZGF0YSwgc2ZyYW1lSGVhZGVyLCBjb25uZWN0aW9uSWQpOwogICAgICAgIGNyeXB0by5zdWJ0bGUKICAgICAgICAgICAgLmRlY3J5cHQoewogICAgICAgICAgICBuYW1lOiAiQUVTLUdDTSIsCiAgICAgICAgICAgIGl2OiBpdiwKICAgICAgICAgICAgYWRkaXRpb25hbERhdGE6IGZyYW1lQWRkLAogICAgICAgIH0sIGRlcml2ZUtleSwgbmV3IFVpbnQ4QXJyYXkoZW5jcnlwdGVkRnJhbWVCdWZmZXIpKQogICAgICAgICAgICA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gICAgfSwgd2FpdGluZ1RpbWUgfHwgMCk7CiAgICAgICAgLy8gVE9ETzogKzEwMDAg44Gn6Y2155Sf5oiQ5b6M44Gr5a6f6KGM44GV44KM44KL44KI44GG44Gr44GX44Gm44GE44KL44GM55+t44GE5aC05ZCI44Gv5Ly444Gw44GZCiAgICAgICAgY29uc3QgcmVtb3ZhbFdhaXRpbmdUaW1lID0gKHdhaXRpbmdUaW1lIHx8IDApICsgMTAwMDsKICAgICAgICBpZiAocmVtb3ZhbFRpbWVvdXRJZCkgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zmnInjgooKICAgICAgICAgICAgaWYgKHdhaXRpbmdUaW1lKSB7CiAgICAgICAgICAgICAgICAvLyBjb25uZWN0aW9uLmRlc3Ryb3llZAogICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHJlbW92YWxUaW1lb3V0SWQpOwogICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4gewogICAgICAgICAgICAgICAgICAgIHJlbW92ZU9sZFJlbW90ZURlcml2ZUtleXMoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbFRpbWVvdXRJZCA9IDA7CiAgICAgICAgICAgICAgICB9LCByZW1vdmFsV2FpdGluZ1RpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICAvLyDli5XkvZzmuIjjgb/jgr/jgqTjg57jg7zjgarjgZcKICAgICAgICAgICAgLy8gY29ubmVjdGlvbi5jcmVhdGVkIOOBruWgtOWQiOOCguWwkeOBl+Wun+ihjOOCkumBheOCieOBm+OCiwogICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICByZW1vdmVPbGRSZW1vdGVEZXJpdmVLZXlzKCk7CiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocmVtb3ZhbFRpbWVvdXRJZCk7CiAgICAgICAgICAgICAgICByZW1vdmFsVGltZW91dElkID0gMDsKICAgICAgICAgICAgfSwgcmVtb3ZhbFdhaXRpbmdUaW1lKTsKICAgICAgICB9CiAgICB9CiAgICBlbHNlIGlmICh0eXBlID09PSAicmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIikgewogICAgICAgIGNvbnN0IHsgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxzIH0gPSBldmVudC5kYXRhOwogICAgICAgIGZvciAoY29uc3QgW2Nvbm5lY3Rpb25JZCwgcmVtb3RlU2VjcmV0S2V5TWF0ZXJpYWxdIG9mIE9iamVjdC5lbnRyaWVzKHJlbW90ZVNlY3JldEtleU1hdGVyaWFscykpIHsKICAgICAgICAgICAgY29uc3QgeyBrZXlJZCwgc2VjcmV0S2V5TWF0ZXJpYWwgfSA9IHJlbW90ZVNlY3JldEtleU1hdGVyaWFsOwogICAgICAgICAgICBjcnlwdG8uc3VidGxlCiAgICAgICAgICAgICAgICAuaW1wb3J0S2V5KCJyYXciLCBzZWNyZXRLZXlNYXRlcmlhbC5idWZmZXIsICJIS0RGIiwgZmFsc2UsIFsiZGVyaXZlQml0cyIsICJkZXJpdmVLZXkiXSkKICAgICAgICAgICAgICAgIC50aGVuKChtYXRlcmlhbCkgPT4gewogICAgICAgICAgICAgICAgZ2VuZXJhdGVEZXJpdmVLZXkobWF0ZXJpYWwpLnRoZW4oKGRlcml2ZUtleSkgPT4gewogICAgICAgICAgICAgICAgICAgIHNldFJlbW90ZURlcml2ZUtleShjb25uZWN0aW9uSWQsIGtleUlkLCBkZXJpdmVLZXkpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBnZW5lcmF0ZVdyaXRlSVYobWF0ZXJpYWwpLnRoZW4oKHdyaXRlSVYpID0+IHsKICAgICAgICAgICAgICAgICAgICBz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VG8od3JpdGFibGVTdHJlYW0pOwogICAgfQogICAgZWxzZSBpZiAodHlwZSA9PT0gImNsZWFyIikgewogICAgICAgIGNvdW50TWFwLmNsZWFyKCk7CiAgICAgICAgd3JpdGVJVk1hcC5jbGVhcigpOwogICAgICAgIHJlbW90ZURlcml2ZUtleU1hcC5jbGVhcigpOwogICAgICAgIGxhdGVzdFJlbW90ZUtleUlkTWFwLmNsZWFyKCk7CiAgICAgICAgc2VsZkRlcml2ZUtleU1hcC5jbGVhcigpOwogICAgfQp9Owo=\";\nclass SoraE2EE {\n constructor() {\n // 対応しているかどうかの判断\n // @ts-ignore トライアル段階の API なので無視する\n const supportsInsertableStreams = !!RTCRtpSender.prototype.createEncodedStreams;\n if (!supportsInsertableStreams) {\n throw new Error(\"E2EE is not supported in this browser.\");\n }\n this.worker = null;\n this.onWorkerDisconnect = null;\n }\n // worker を起動する\n startWorker() {\n // ワーカーを起動する\n const workerScript = atob(WORKER_SCRIPT);\n this.worker = new Worker(URL.createObjectURL(new Blob([workerScript], { type: \"application/javascript\" })));\n this.worker.onmessage = (event) => {\n const { operation } = event.data;\n if (operation === \"disconnect\" && typeof this.onWorkerDisconnect === \"function\") {\n this.onWorkerDisconnect();\n }\n };\n }\n // worker の掃除をする\n clearWorker() {\n if (this.worker) {\n this.worker.postMessage({\n type: \"clear\",\n });\n }\n }\n // worker を終了する\n terminateWorker() {\n if (this.worker) {\n this.worker.terminate();\n }\n }\n // 初期化処理\n async init() {\n const { preKeyBundle } = await window.e2ee.init();\n return preKeyBundle;\n }\n setupSenderTransform(sender) {\n if (!sender.track) {\n return;\n }\n // @ts-ignore トライアル段階の API なので無視する\n const senderStreams = sender.createEncodedStreams();\n const readableStream = senderStreams.readableStream || senderStreams.readable;\n const writableStream = senderStreams.writableStream || senderStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"encrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n setupReceiverTransform(receiver) {\n // @ts-ignore トライアル段階の API なので無視する\n const receiverStreams = receiver.createEncodedStreams();\n const readableStream = receiverStreams.readableStream || receiverStreams.readable;\n const writableStream = receiverStreams.writableStream || receiverStreams.writable;\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n const message = {\n type: \"decrypt\",\n readableStream: readableStream,\n writableStream: writableStream,\n };\n this.worker.postMessage(message, [readableStream, writableStream]);\n }\n postRemoteSecretKeyMaterials(result) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"remoteSecretKeyMaterials\",\n remoteSecretKeyMaterials: result.remoteSecretKeyMaterials,\n });\n }\n postRemoveRemoteDeriveKey(connectionId) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"removeRemoteDeriveKey\",\n connectionId: connectionId,\n });\n }\n postSelfSecretKeyMaterial(selfConnectionId, selfKeyId, selfSecretKeyMaterial, waitingTime = 0) {\n if (!this.worker) {\n throw new Error(\"Worker is null. Call startWorker in advance.\");\n }\n this.worker.postMessage({\n type: \"selfSecretKeyMaterial\",\n selfConnectionId: selfConnectionId,\n selfKeyId: selfKeyId,\n selfSecretKeyMaterial: selfSecretKeyMaterial,\n waitingTime: waitingTime,\n });\n }\n startSession(connectionId, preKeyBundle) {\n const [result, err] = window.e2ee.startSession(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n return result;\n }\n stopSession(connectionId) {\n const [result, err] = window.e2ee.stopSession(connectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n receiveMessage(message) {\n const [result, err] = window.e2ee.receiveMessage(message);\n if (err) {\n throw err;\n }\n return result;\n }\n start(selfConnectionId) {\n const [result, err] = window.e2ee.start(selfConnectionId);\n if (err) {\n throw err;\n }\n return result;\n }\n addPreKeyBundle(connectionId, preKeyBundle) {\n const err = window.e2ee.addPreKeyBundle(connectionId, preKeyBundle.identityKey, preKeyBundle.signedPreKey, preKeyBundle.preKeySignature);\n if (err) {\n throw err;\n }\n }\n selfFingerprint() {\n return window.e2ee.selfFingerprint();\n }\n remoteFingerprints() {\n return window.e2ee.remoteFingerprints();\n }\n static async loadWasm(wasmUrl) {\n if (!window.e2ee === undefined) {\n console.warn(\"E2ee wasm is already loaded. Will not be reload.\");\n return;\n }\n WasmExec();\n if (!window.Go) {\n throw new Error(`Failed to load module Go. window.Go is ${window.Go}.`);\n }\n const go = new Go();\n const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), go.importObject);\n go.run(instance);\n if (!window.e2ee) {\n throw new Error(`Failed to load module e2ee. window.e2ee is ${window.e2ee}.`);\n }\n }\n static version() {\n return \"2021.1.0\";\n }\n static wasmVersion() {\n return window.e2ee.version();\n }\n}\n\nexport { SoraE2EE as default };\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n ], { type: 'text/javascript' }))));\n w.onmessage = function (e) {\n var d = e.data, ed = d.$e$;\n if (ed) {\n var err = new Error(ed[0]);\n err['code'] = ed[1];\n err.stack = ed[2];\n cb(err, null);\n }\n else\n cb(null, d);\n };\n w.postMessage(msg, transfer);\n return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c == null && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != null) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, f.c, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n c = lft = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295;\n if (z) {\n e = b4(data, e - 12);\n if (b4(data, e) != 0x6064B50)\n err(13);\n c = b4(data, e + 32);\n o = b4(data, e + 48);\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n","import { unzlibSync } from \"fflate\";\n\nimport {\n ConnectionOptions,\n Browser,\n JSONType,\n DataChannelConfiguration,\n DataChannelEvent,\n DataChannelMessageEvent,\n PreKeyBundle,\n SignalingConnectMessage,\n SignalingConnectDataChannel,\n SignalingEvent,\n SignalingNotifyMetadata,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n} from \"./types\";\n\nfunction browser(): Browser {\n const ua = window.navigator.userAgent.toLocaleLowerCase();\n if (ua.indexOf(\"edge\") !== -1) {\n return \"edge\";\n } else if (ua.indexOf(\"chrome\") !== -1 && ua.indexOf(\"edge\") === -1) {\n return \"chrome\";\n } else if (ua.indexOf(\"safari\") !== -1 && ua.indexOf(\"chrome\") === -1) {\n return \"safari\";\n } else if (ua.indexOf(\"opera\") !== -1) {\n return \"opera\";\n } else if (ua.indexOf(\"firefox\") !== -1) {\n return \"firefox\";\n }\n return null;\n}\n\nfunction enabledSimulcast(): boolean {\n const REQUIRED_HEADER_EXTEMSIONS = [\n \"urn:ietf:params:rtp-hdrext:sdes:mid\",\n \"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\n \"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\",\n ];\n\n if (!window.RTCRtpSender) {\n return false;\n }\n if (!RTCRtpSender.getCapabilities) {\n return false;\n }\n const capabilities = RTCRtpSender.getCapabilities(\"video\");\n if (!capabilities) {\n return false;\n }\n const headerExtensions = capabilities.headerExtensions.map((h) => h.uri);\n const hasAllRequiredHeaderExtensions = REQUIRED_HEADER_EXTEMSIONS.every((h) => headerExtensions.includes(h));\n return hasAllRequiredHeaderExtensions;\n}\n\nfunction parseDataChannelConfiguration(dataChannelConfiguration: unknown): SignalingConnectDataChannel {\n if (typeof dataChannelConfiguration !== \"object\" || dataChannelConfiguration === null) {\n throw new Error(\"Failed to parse options dataChannels. Options dataChannels element must be type 'object'\");\n }\n const configuration = dataChannelConfiguration as DataChannelConfiguration;\n const result: SignalingConnectDataChannel = {};\n if (typeof configuration.label === \"string\") {\n result.label = configuration.label;\n }\n if (typeof configuration.direction === \"string\") {\n result.direction = configuration.direction;\n }\n if (typeof configuration.ordered === \"boolean\") {\n result.ordered = configuration.ordered;\n }\n if (typeof configuration.compress === \"boolean\") {\n result.compress = configuration.compress;\n }\n if (typeof configuration.maxPacketLifeTime === \"number\") {\n result.max_packet_life_time = configuration.maxPacketLifeTime;\n }\n if (typeof configuration.maxRetransmits === \"number\") {\n result.max_retransmits = configuration.maxRetransmits;\n }\n if (typeof configuration.protocol === \"string\") {\n result.protocol = configuration.protocol;\n }\n return result;\n}\n\nfunction parseDataChannelConfigurations(dataChannelConfigurations: unknown[]): SignalingConnectDataChannel[] {\n const result: SignalingConnectDataChannel[] = [];\n for (const dataChannelConfiguration of dataChannelConfigurations) {\n result.push(parseDataChannelConfiguration(dataChannelConfiguration));\n }\n return result;\n}\n\nexport function isSafari(): boolean {\n return browser() === \"safari\";\n}\n\nexport function isChrome(): boolean {\n return browser() === \"chrome\";\n}\n\nexport function createSignalingMessage(\n offerSDP: string,\n role: string,\n channelId: string | null | undefined,\n metadata: JSONType | undefined,\n options: ConnectionOptions,\n redirect: boolean\n): SignalingConnectMessage {\n if (role !== \"sendrecv\" && role !== \"sendonly\" && role !== \"recvonly\") {\n throw new Error(\"Unknown role type\");\n }\n if (channelId === null || channelId === undefined) {\n throw new Error(\"channelId can not be null or undefined\");\n }\n const message: SignalingConnectMessage = {\n type: \"connect\",\n sora_client: \"Sora JavaScript SDK __SORA_JS_SDK_VERSION__\",\n environment: window.navigator.userAgent,\n role: role,\n channel_id: channelId,\n sdp: offerSDP,\n audio: true,\n video: true,\n };\n // role: sendrecv で multistream: false の場合は例外を発生させる\n if (role === \"sendrecv\" && options.multistream !== true) {\n throw new Error(\"Failed to parse options. Options multistream must be true when connecting using 'sendrecv'\");\n }\n if (redirect === true) {\n message.redirect = true;\n }\n if (typeof options.multistream === \"boolean\") {\n message.multistream = options.multistream;\n }\n if (typeof options.simulcast === \"boolean\") {\n message.simulcast = options.simulcast;\n }\n const simalcastRids = [\"r0\", \"r1\", \"r2\"];\n if (options.simulcastRid !== undefined && 0 <= simalcastRids.indexOf(options.simulcastRid)) {\n message.simulcast_rid = options.simulcastRid;\n }\n if (typeof options.spotlight === \"boolean\") {\n message.spotlight = options.spotlight;\n }\n if (\"spotlightNumber\" in options) {\n message.spotlight_number = options.spotlightNumber;\n }\n const spotlightFocusRids = [\"none\", \"r0\", \"r1\", \"r2\"];\n if (options.spotlightFocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightFocusRid)) {\n message.spotlight_focus_rid = options.spotlightFocusRid;\n }\n if (options.spotlightUnfocusRid !== undefined && 0 <= spotlightFocusRids.indexOf(options.spotlightUnfocusRid)) {\n message.spotlight_unfocus_rid = options.spotlightUnfocusRid;\n }\n if (metadata !== undefined) {\n message.metadata = metadata;\n }\n if (options.signalingNotifyMetadata !== undefined) {\n message.signaling_notify_metadata = options.signalingNotifyMetadata;\n }\n if (options.clientId !== undefined) {\n message.client_id = options.clientId;\n }\n if (options.bundleId !== undefined) {\n message.bundle_id = options.bundleId;\n }\n if (typeof options.dataChannelSignaling === \"boolean\") {\n message.data_channel_signaling = options.dataChannelSignaling;\n }\n\n if (typeof options.ignoreDisconnectWebSocket === \"boolean\") {\n message.ignore_disconnect_websocket = options.ignoreDisconnectWebSocket;\n }\n\n // parse options\n const audioPropertyKeys = [\"audioCodecType\", \"audioBitRate\"];\n const audioOpusParamsPropertyKeys = [\n \"audioOpusParamsChannels\",\n \"audioOpusParamsClockRate\",\n \"audioOpusParamsMaxplaybackrate\",\n \"audioOpusParamsStereo\",\n \"audioOpusParamsSpropStereo\",\n \"audioOpusParamsMinptime\",\n \"audioOpusParamsPtime\",\n \"audioOpusParamsUseinbandfec\",\n \"audioOpusParamsUsedtx\",\n ];\n const videoPropertyKeys = [\"videoCodecType\", \"videoBitRate\"];\n const copyOptions = Object.assign({}, options);\n (Object.keys(copyOptions) as (keyof ConnectionOptions)[]).forEach((key) => {\n if (key === \"audio\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (key === \"video\" && typeof copyOptions[key] === \"boolean\") {\n return;\n }\n if (0 <= audioPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= audioOpusParamsPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n if (0 <= videoPropertyKeys.indexOf(key) && copyOptions[key] !== null) {\n return;\n }\n delete copyOptions[key];\n });\n\n if (copyOptions.audio !== undefined) {\n message.audio = copyOptions.audio;\n }\n const hasAudioProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioProperty) {\n message.audio = {};\n if (\"audioCodecType\" in copyOptions) {\n message.audio[\"codec_type\"] = copyOptions.audioCodecType;\n }\n if (\"audioBitRate\" in copyOptions) {\n message.audio[\"bit_rate\"] = copyOptions.audioBitRate;\n }\n }\n const hasAudioOpusParamsProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= audioOpusParamsPropertyKeys.indexOf(key);\n });\n if (message.audio && hasAudioOpusParamsProperty) {\n if (typeof message.audio != \"object\") {\n message.audio = {};\n }\n message.audio.opus_params = {};\n if (\"audioOpusParamsChannels\" in copyOptions) {\n message.audio.opus_params.channels = copyOptions.audioOpusParamsChannels;\n }\n if (\"audioOpusParamsClockRate\" in copyOptions) {\n message.audio.opus_params.clock_rate = copyOptions.audioOpusParamsClockRate;\n }\n if (\"audioOpusParamsMaxplaybackrate\" in copyOptions) {\n message.audio.opus_params.maxplaybackrate = copyOptions.audioOpusParamsMaxplaybackrate;\n }\n if (\"audioOpusParamsStereo\" in copyOptions) {\n message.audio.opus_params.stereo = copyOptions.audioOpusParamsStereo;\n }\n if (\"audioOpusParamsSpropStereo\" in copyOptions) {\n message.audio.opus_params.sprop_stereo = copyOptions.audioOpusParamsSpropStereo;\n }\n if (\"audioOpusParamsMinptime\" in copyOptions) {\n message.audio.opus_params.minptime = copyOptions.audioOpusParamsMinptime;\n }\n if (\"audioOpusParamsPtime\" in copyOptions) {\n message.audio.opus_params.ptime = copyOptions.audioOpusParamsPtime;\n }\n if (\"audioOpusParamsUseinbandfec\" in copyOptions) {\n message.audio.opus_params.useinbandfec = copyOptions.audioOpusParamsUseinbandfec;\n }\n if (\"audioOpusParamsUsedtx\" in copyOptions) {\n message.audio.opus_params.usedtx = copyOptions.audioOpusParamsUsedtx;\n }\n }\n\n if (copyOptions.video !== undefined) {\n message.video = copyOptions.video;\n }\n const hasVideoProperty = Object.keys(copyOptions).some((key) => {\n return 0 <= videoPropertyKeys.indexOf(key);\n });\n if (message.video && hasVideoProperty) {\n message.video = {};\n if (\"videoCodecType\" in copyOptions) {\n message.video[\"codec_type\"] = copyOptions.videoCodecType;\n }\n if (\"videoBitRate\" in copyOptions) {\n message.video[\"bit_rate\"] = copyOptions.videoBitRate;\n }\n }\n\n if (message.simulcast && !enabledSimulcast() && role !== \"recvonly\") {\n throw new Error(\"Simulcast can not be used with this browser\");\n }\n if (typeof options.e2ee === \"boolean\") {\n message.e2ee = options.e2ee;\n }\n if (options.e2ee === true) {\n if (message.signaling_notify_metadata === undefined) {\n message.signaling_notify_metadata = {};\n }\n if (message.signaling_notify_metadata === null || typeof message.signaling_notify_metadata !== \"object\") {\n throw new Error(\"E2EE failed. Options signalingNotifyMetadata must be type 'object'\");\n }\n if (message.video === true) {\n message.video = {};\n }\n if (message.video) {\n message.video[\"codec_type\"] = \"VP8\";\n }\n }\n\n if (Array.isArray(options.dataChannels) && 0 < options.dataChannels.length) {\n message.data_channels = parseDataChannelConfigurations(options.dataChannels);\n }\n\n return message;\n}\n\nexport function getSignalingNotifyAuthnMetadata(\n message: SignalingNotifyConnectionCreated | SignalingNotifyConnectionDestroyed | SignalingNotifyMetadata\n): JSONType {\n if (message.authn_metadata !== undefined) {\n return message.authn_metadata;\n } else if (message.metadata !== undefined) {\n return message.metadata;\n }\n return null;\n}\n\nexport function getSignalingNotifyData(message: SignalingNotifyConnectionCreated): SignalingNotifyMetadata[] {\n if (message.data && Array.isArray(message.data)) {\n return message.data;\n } else if (message.metadata_list && Array.isArray(message.metadata_list)) {\n return message.metadata_list;\n }\n return [];\n}\n\nexport function getPreKeyBundle(message: JSONType): PreKeyBundle | null {\n if (typeof message === \"object\" && message !== null && \"pre_key_bundle\" in message) {\n return message.pre_key_bundle as PreKeyBundle;\n }\n return null;\n}\n\nexport function trace(clientId: string | null, title: string, value: unknown): void {\n const dump = (record: unknown) => {\n if (record && typeof record === \"object\") {\n let keys = null;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n keys = Object.keys(JSON.parse(JSON.stringify(record)));\n } catch (_) {\n // 何もしない\n }\n if (keys && Array.isArray(keys)) {\n keys.forEach((key) => {\n console.group(key);\n dump((record as Record)[key]);\n console.groupEnd();\n });\n } else {\n console.info(record);\n }\n } else {\n console.info(record);\n }\n };\n let prefix = \"\";\n if (window.performance) {\n prefix = \"[\" + (window.performance.now() / 1000).toFixed(3) + \"]\";\n }\n if (clientId) {\n prefix = prefix + \"[\" + clientId + \"]\";\n }\n\n if (console.info !== undefined && console.group !== undefined) {\n console.group(prefix + \" \" + title);\n dump(value);\n console.groupEnd();\n } else {\n console.log(prefix + \" \" + title + \"\\n\", value);\n }\n}\n\nexport class ConnectError extends Error {\n code?: number;\n reason?: string;\n}\n\nexport function createSignalingEvent(eventType: string, data: unknown, transportType: TransportType): SignalingEvent {\n const event = new Event(eventType) as SignalingEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.transportType = transportType;\n return event;\n}\n\nexport function createDataChannelData(channel: RTCDataChannel): Record {\n return {\n binaryType: channel.binaryType,\n bufferedAmount: channel.bufferedAmount,\n bufferedAmountLowThreshold: channel.bufferedAmountLowThreshold,\n id: channel.id,\n label: channel.label,\n maxPacketLifeTime: channel.maxPacketLifeTime,\n maxRetransmits: channel.maxRetransmits,\n negotiated: channel.negotiated,\n ordered: channel.ordered,\n protocol: channel.protocol,\n readyState: channel.readyState,\n // @ts-ignore w3c 仕様には存在しない property\n reliable: channel.reliable,\n };\n}\n\nexport function createTimelineEvent(\n eventType: string,\n data: unknown,\n logType: TimelineEventLogType,\n dataChannelId?: number | null,\n dataChannelLabel?: string\n): TimelineEvent {\n const event = new Event(eventType) as TimelineEvent;\n // data をコピーする\n try {\n event.data = JSON.parse(JSON.stringify(data)) as unknown;\n } catch (_) {\n event.data = data;\n }\n event.logType = logType;\n event.dataChannelId = dataChannelId;\n event.dataChannelLabel = dataChannelLabel;\n return event;\n}\n\nexport function createDataChannelMessageEvent(label: string, data: ArrayBuffer): DataChannelMessageEvent {\n const event = new Event(\"message\") as DataChannelMessageEvent;\n event.label = label;\n event.data = data;\n return event;\n}\n\nexport function createDataChannelEvent(channel: DataChannelConfiguration): DataChannelEvent {\n const event = new Event(\"datachannel\") as DataChannelEvent;\n event.datachannel = channel;\n return event;\n}\n\nexport function parseDataChannelEventData(eventData: unknown, compress: boolean): string {\n if (compress) {\n const unzlibMessage = unzlibSync(new Uint8Array(eventData as Uint8Array));\n return new TextDecoder().decode(unzlibMessage);\n }\n return eventData as string;\n}\n","import { unzlibSync, zlibSync } from \"fflate\";\n\nimport {\n ConnectError,\n createDataChannelData,\n createDataChannelEvent,\n createDataChannelMessageEvent,\n createSignalingEvent,\n createSignalingMessage,\n createTimelineEvent,\n getPreKeyBundle,\n getSignalingNotifyAuthnMetadata,\n getSignalingNotifyData,\n isSafari,\n parseDataChannelEventData,\n trace,\n} from \"./utils\";\nimport {\n Callbacks,\n ConnectionOptions,\n JSONType,\n DataChannelConfiguration,\n SignalingConnectMessage,\n SignalingMessage,\n SignalingNotifyMessage,\n SignalingOfferMessage,\n SignalingOfferMessageDataChannel,\n SignalingPingMessage,\n SignalingPushMessage,\n SignalingReOfferMessage,\n SignalingRedirectMessage,\n SignalingReqStatsMessage,\n SignalingSwitchedMessage,\n SignalingUpdateMessage,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n TransportType,\n} from \"./types\";\nimport SoraE2EE from \"@sora/e2ee\";\n\ndeclare global {\n interface Algorithm {\n namedCurve: string;\n }\n}\n\n/**\n * Sora との WebRTC 接続を扱う基底クラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param role - ロール\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n * @param debug - デバッグフラグ\n */\nexport default class ConnectionBase {\n /**\n * ロール(sendonly | sendrecv | recvonly)\n */\n role: string;\n /**\n * チャネルID\n */\n channelId: string;\n /**\n * メタデータ\n */\n metadata: JSONType | undefined;\n /**\n * シグナリングに使用する URL 候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * 接続オプション\n */\n options: ConnectionOptions;\n /**\n * PeerConnection に渡す configuration\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n constraints: any;\n /**\n * デバッグフラグ\n */\n debug: boolean;\n /**\n * クライアントID\n */\n clientId: string | null;\n /**\n * コネクションID\n */\n connectionId: string | null;\n /**\n * リモートコネクションIDのリスト\n */\n remoteConnectionIds: string[];\n /**\n * メディアストリーム\n */\n stream: MediaStream | null;\n /**\n * type offer に含まれる認証 metadata\n */\n authMetadata: JSONType;\n /**\n * PeerConnection インスタンス\n */\n pc: RTCPeerConnection | null;\n /**\n * サイマルキャストで使用する RTCRtpEncodingParameters のリスト\n */\n encodings: RTCRtpEncodingParameters[];\n /**\n * WS シグナリングで type offer メッセージを受信したシグナリング URL\n */\n connectedSignalingUrl: string;\n /**\n * WS シグナリングで最初に type connect を送信したシグナリング URL\n */\n contactSignalingUrl: string;\n /**\n * WebSocket インスタンス\n */\n private ws: WebSocket | null;\n /**\n * 初回シグナリング時接続タイムアウト用のタイマーID\n */\n private connectionTimeoutTimerId: number;\n /**\n * WebSocket 切断監視用のタイマーID\n */\n private monitorSignalingWebSocketEventTimerId: number;\n /**\n * PeerConnection state 切断監視用のタイマーID\n */\n private monitorIceConnectionStateChangeTimerId: number;\n /**\n * 接続中の DataChannel リスト\n */\n private soraDataChannels: {\n [key in string]?: RTCDataChannel;\n };\n /**\n * 初回シグナリング接続時のタイムアウトに使用するタイムアウト時間(デフォルト 60000ms)\n */\n private connectionTimeout: number;\n /**\n * シグナリング候補のURLへの接続確認タイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private signalingCandidateTimeout: number;\n /**\n * 切断処理のタイムアウトに使用するタイムアウト時間(デフォルト 3000ms)\n */\n private disconnectWaitTimeout: number;\n /**\n * audio / video の msid\n */\n private mids: {\n audio: string;\n video: string;\n };\n /**\n * シグナリングを DataChannel へ switch したかどうかのフラグ\n */\n private signalingSwitched: boolean;\n /**\n * シグナリング type offer に含まれる DataChannel レコード\n */\n private signalingOfferMessageDataChannels: {\n [key in string]?: SignalingOfferMessageDataChannel;\n };\n /**\n * イベントコールバックのリスト\n */\n protected callbacks: Callbacks;\n /**\n * E2EE インスタンス\n */\n protected e2ee: SoraE2EE | null;\n\n constructor(\n signalingUrlCandidates: string | string[],\n role: string,\n channelId: string,\n metadata: JSONType,\n options: ConnectionOptions,\n debug: boolean\n ) {\n this.role = role;\n this.channelId = channelId;\n this.metadata = metadata;\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.options = options;\n // connection timeout の初期値をセットする\n this.connectionTimeout = 60000;\n if (typeof this.options.timeout === \"number\") {\n console.warn(\"@deprecated timeout option will be removed in a future version. Use connectionTimeout.\");\n this.connectionTimeout = this.options.timeout;\n }\n if (typeof this.options.connectionTimeout === \"number\") {\n this.connectionTimeout = this.options.connectionTimeout;\n }\n // WebSocket/DataChannel の disconnect timeout の初期値をセットする\n this.disconnectWaitTimeout = 3000;\n if (typeof this.options.disconnectWaitTimeout === \"number\") {\n this.disconnectWaitTimeout = this.options.disconnectWaitTimeout;\n }\n // signalingUrlCandidates に設定されている URL への接続チェック timeout の初期値をセットする\n this.signalingCandidateTimeout = 3000;\n if (typeof this.options.signalingCandidateTimeout === \"number\") {\n this.signalingCandidateTimeout = this.options.signalingCandidateTimeout;\n }\n this.constraints = null;\n this.debug = debug;\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.callbacks = {\n disconnect: (): void => {},\n push: (): void => {},\n addstream: (): void => {},\n track: (): void => {},\n removestream: (): void => {},\n removetrack: (): void => {},\n notify: (): void => {},\n log: (): void => {},\n timeout: (): void => {},\n timeline: (): void => {},\n signaling: (): void => {},\n message: (): void => {},\n datachannel: (): void => {},\n };\n this.authMetadata = null;\n this.e2ee = null;\n this.connectionTimeoutTimerId = 0;\n this.monitorSignalingWebSocketEventTimerId = 0;\n this.monitorIceConnectionStateChangeTimerId = 0;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.connectedSignalingUrl = \"\";\n this.contactSignalingUrl = \"\";\n }\n\n /**\n * SendRecv Object で発火するイベントのコールバックを設定するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * sendrecv.on(\"track\", (event) => {\n * // callback 処理\n * });\n * ```\n *\n * @remarks\n * addstream イベントは非推奨です. track イベントを使用してください\n *\n * removestream イベントは非推奨です. removetrack イベントを使用してください\n *\n * @param kind - イベントの種類(disconnect, push, track, removetrack, notify, log, timeout, timeline, signaling, message, datachannel)\n * @param callback - コールバック関数\n *\n * @public\n */\n on(kind: T, callback: U): void {\n // @deprecated message\n if (kind === \"addstream\") {\n console.warn(\"@deprecated addstream callback will be removed in a future version. Use track callback.\");\n } else if (kind === \"removestream\") {\n console.warn(\"@deprecated removestream callback will be removed in a future version. Use removetrack callback.\");\n }\n if (kind in this.callbacks) {\n this.callbacks[kind] = callback;\n }\n }\n\n /**\n * audio track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopAudioTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - audio track を削除する MediaStream\n *\n * @public\n */\n stopAudioTrack(stream: MediaStream): Promise {\n for (const track of stream.getAudioTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getAudioTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * video track を停止するメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * sendrecv.stopVideoTrack(mediaStream);\n * ```\n *\n * @remarks\n * stream の video track を停止後、PeerConnection の senders から対象の sender を削除します\n *\n * @param stream - video track を削除する MediaStream\n *\n * @public\n */\n stopVideoTrack(stream: MediaStream): Promise {\n for (const track of stream.getVideoTracks()) {\n track.enabled = false;\n }\n return new Promise((resolve) => {\n // すぐに stop すると視聴側に静止画像が残ってしまうので enabled false にした 100ms 後に stop する\n setTimeout(async () => {\n for (const track of stream.getVideoTracks()) {\n track.stop();\n stream.removeTrack(track);\n if (this.pc !== null) {\n const sender = this.pc.getSenders().find((s) => {\n return s.track && s.track.id === track.id;\n });\n if (sender) {\n await sender.replaceTrack(null);\n }\n }\n }\n resolve();\n }, 100);\n });\n }\n\n /**\n * audio track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({audio: true});\n * await sendrecv.replaceAudioTrack(mediaStream, replacedMediaStream.getAudioTracks()[0]);\n * ```\n *\n * @remarks\n * stream の audio track を停止後、新しい audio track をセットします\n *\n * @param stream - audio track を削除する MediaStream\n * @param audioTrack - 新しい audio track\n *\n * @public\n */\n async replaceAudioTrack(stream: MediaStream, audioTrack: MediaStreamTrack): Promise {\n await this.stopAudioTrack(stream);\n const transceiver = this.getAudioTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set an audio track. Audio track sender is undefined\");\n }\n stream.addTrack(audioTrack);\n await transceiver.sender.replaceTrack(audioTrack);\n }\n\n /**\n * video track を入れ替えするメソッド\n *\n * @example\n * ```\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n *\n * const replacedMediaStream = await navigator.mediaDevices.getUserMedia({video: true});\n * await sendrecv.replaceVideoTrack(mediaStream, replacedMediaStream.getVideoTracks()[0]);\n * ```\n *\n * @remarks\n * stream の video track を停止後、新しい video track をセットします\n *\n * @param stream - video track を削除する MediaStream\n * @param videoTrack - 新しい video track\n *\n * @public\n */\n async replaceVideoTrack(stream: MediaStream, videoTrack: MediaStreamTrack): Promise {\n await this.stopVideoTrack(stream);\n const transceiver = this.getVideoTransceiver();\n if (transceiver === null) {\n throw new Error(\"Unable to set video track. Video track sender is undefined\");\n }\n stream.addTrack(videoTrack);\n await transceiver.sender.replaceTrack(videoTrack);\n }\n\n /**\n * connect 処理中に例外が発生した場合の切断処理をするメソッド\n */\n private signalingTerminate(): void {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n if (this.pc) {\n this.pc.close();\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n }\n\n /**\n * PeerConnection の state に異常が発生した場合の切断処理をするメソッド\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n */\n private abendPeerConnectionState(title: SoraAbendTitle): void {\n this.clearMonitorIceConnectionStateChange();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // DataChannel を終了する\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n // WebSocket を終了する\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n // PeerConnection を終了する\n if (this.pc) {\n this.pc.close();\n }\n // E2EE worker を終了する\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n const event = this.soraCloseEvent(\"abend\", title);\n this.callbacks.disconnect(event);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n }\n\n /**\n * 何かしらの異常があった場合の切断処理\n *\n * @param title - disconnect callback に渡すイベントのタイトル\n * @param params - 切断時の状況を入れる Record\n */\n private async abend(title: SoraAbendTitle, params?: Record): Promise {\n this.clearMonitorIceConnectionStateChange();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event) => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n dataChannel.onmessage = null;\n dataChannel.onerror = null;\n }\n }\n // 終了処理を開始する\n if (this.soraDataChannels.signaling) {\n const message = { type: \"disconnect\", reason: title };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n await this.disconnectWebSocket(title);\n await this.disconnectPeerConnection();\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (title === \"WEBSOCKET-ONCLOSE\" && params && (params.code === 1000 || params.code === 1005)) {\n const event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", params);\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n this.callbacks.disconnect(event);\n return;\n }\n const event = this.soraCloseEvent(\"abend\", title, params);\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n this.callbacks.disconnect(this.soraCloseEvent(\"abend\", title, params));\n }\n\n /**\n * 接続状態の初期化をするメソッド\n */\n private initializeConnection(): void {\n this.clientId = null;\n this.connectionId = null;\n this.remoteConnectionIds = [];\n this.stream = null;\n this.ws = null;\n this.pc = null;\n this.encodings = [];\n this.authMetadata = null;\n this.e2ee = null;\n this.soraDataChannels = {};\n this.mids = {\n audio: \"\",\n video: \"\",\n };\n this.signalingSwitched = false;\n this.signalingOfferMessageDataChannels = {};\n this.contactSignalingUrl = \"\";\n this.connectedSignalingUrl = \"\";\n this.clearConnectionTimeout();\n }\n\n /**\n * WebSocket を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n *\n * @param title - type disconnect 時の reason\n */\n private disconnectWebSocket(title: SoraAbendTitle | \"NO-ERROR\"): Promise<{ code: number; reason: string } | null> {\n let timerId = 0;\n if (this.signalingSwitched) {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n return Promise.resolve(null);\n }\n return new Promise((resolve, _) => {\n if (!this.ws) {\n return resolve(null);\n }\n this.ws.onclose = (event) => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n clearTimeout(timerId);\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n return resolve({ code: event.code, reason: event.reason });\n };\n if (this.ws.readyState === 1) {\n const message = { type: \"disconnect\", reason: title };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-disconnect\", message);\n // WebSocket 切断を待つ\n timerId = setTimeout(() => {\n if (this.ws) {\n this.ws.close();\n this.ws = null;\n }\n resolve({ code: 1006, reason: \"\" });\n }, this.disconnectWaitTimeout);\n } else {\n // ws の state が open ではない場合は後処理をして終わる\n this.ws.close();\n this.ws = null;\n return resolve(null);\n }\n });\n }\n\n /**\n * DataChannel を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectDataChannel(): Promise<{ code: number; reason: string } | null> {\n // DataChannel の強制終了処理\n const closeDataChannels = () => {\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onerror = null;\n dataChannel.close();\n }\n delete this.soraDataChannels[key];\n }\n };\n return new Promise((resolve, reject) => {\n // DataChannel label signaling が存在しない場合は強制終了処理をする\n if (!this.soraDataChannels.signaling) {\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n }\n // disconnectWaitTimeout で指定された時間経過しても切断しない場合は強制終了処理をする\n const disconnectWaitTimeoutId = setTimeout(() => {\n closeDataChannels();\n return reject();\n }, this.disconnectWaitTimeout);\n\n const onClosePromises: Promise[] = [];\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n // onerror が発火した場合は強制終了処理をする\n dataChannel.onerror = () => {\n clearTimeout(disconnectWaitTimeoutId);\n closeDataChannels();\n return resolve({ code: 4999, reason: \"\" });\n };\n // すべての DataChannel の readyState が \"closed\" になったことを確認する Promsie を生成する\n const p = (): Promise => {\n return new Promise((res, _) => {\n // disconnectWaitTimeout 時間を過ぎた場合に終了させるための counter を作成する\n let counter = 0;\n // onclose 内で readyState の変化を待つと非同期のまま複数回 disconnect を呼んだ場合に\n // callback が上書きされて必ず DISCONNECT-TIMEOUT になってしまうので setInterval を使う\n const timerId = setInterval(() => {\n counter++;\n if (dataChannel.readyState === \"closed\") {\n clearInterval(timerId);\n res();\n }\n if (this.disconnectWaitTimeout < counter * 100) {\n res();\n clearInterval(timerId);\n }\n }, 100);\n });\n };\n onClosePromises.push(p());\n }\n }\n // すべての DataChannel で onclose が発火した場合は resolve にする\n Promise.all(onClosePromises)\n .then(() => {\n // dataChannels が空の場合は切断処理が終わっているとみなす\n if (0 === Object.keys(this.soraDataChannels).length) {\n resolve(null);\n } else {\n resolve({ code: 4999, reason: \"\" });\n }\n })\n .finally(() => {\n closeDataChannels();\n clearTimeout(disconnectWaitTimeoutId);\n });\n const message = { type: \"disconnect\", reason: \"NO-ERROR\" };\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(zlibMessage);\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n } else {\n if (this.soraDataChannels.signaling.readyState === \"open\") {\n // Firefox で readyState が open でも DataChannel send で例外がでる場合があるため処理する\n try {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n this.writeDataChannelSignalingLog(\"send-disconnect\", this.soraDataChannels.signaling, message);\n } catch (e) {\n const errorMessage = (e as Error).message;\n this.writeDataChannelSignalingLog(\n \"failed-to-send-disconnect\",\n this.soraDataChannels.signaling,\n errorMessage\n );\n }\n }\n }\n });\n }\n\n /**\n * PeerConnection を切断するメソッド\n *\n * @remarks\n * 正常/異常どちらの切断でも使用する\n */\n private disconnectPeerConnection(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc && this.pc.connectionState !== \"closed\") {\n this.pc.close();\n }\n return resolve();\n });\n }\n\n /**\n * 切断処理をするメソッド\n *\n * @example\n * ```\n * await sendrecv.disconnect();\n * ```\n *\n * @public\n */\n async disconnect(): Promise {\n this.clearMonitorIceConnectionStateChange();\n // callback を止める\n if (this.pc) {\n this.pc.ondatachannel = null;\n this.pc.oniceconnectionstatechange = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.onconnectionstatechange = null;\n }\n if (this.ws) {\n // onclose はログを吐く専用に残す\n this.ws.onclose = (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n };\n this.ws.onmessage = null;\n this.ws.onerror = null;\n }\n for (const key of Object.keys(this.soraDataChannels)) {\n const dataChannel = this.soraDataChannels[key];\n if (dataChannel) {\n dataChannel.onmessage = null;\n // onclose はログを吐く専用に残す\n dataChannel.onclose = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n };\n }\n }\n let event = null;\n if (this.signalingSwitched) {\n // DataChannel の切断処理がタイムアウトした場合は event を abend に差し替える\n try {\n const reason = await this.disconnectDataChannel();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n } catch (_) {\n event = this.soraCloseEvent(\"abend\", \"DISCONNECT-TIMEOUT\");\n }\n await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n } else {\n const reason = await this.disconnectWebSocket(\"NO-ERROR\");\n await this.disconnectPeerConnection();\n if (reason !== null) {\n event = this.soraCloseEvent(\"normal\", \"DISCONNECT\", reason);\n }\n }\n if (this.e2ee) {\n this.e2ee.terminateWorker();\n }\n this.initializeConnection();\n if (event) {\n if (event.type === \"abend\") {\n this.writeSoraTimelineLog(\"disconnect-abend\", event);\n } else if (event.type === \"normal\") {\n this.writeSoraTimelineLog(\"disconnect-normal\", event);\n }\n this.callbacks.disconnect(event);\n }\n }\n\n /**\n * E2EE の初期設定をするメソッド\n */\n protected setupE2EE(): void {\n if (this.options.e2ee === true) {\n this.e2ee = new SoraE2EE();\n this.e2ee.onWorkerDisconnect = async (): Promise => {\n await this.abend(\"INTERNAL-ERROR\", { reason: \"CRASH-E2EE-WORKER\" });\n };\n this.e2ee.startWorker();\n }\n }\n\n /**\n * E2EE を開始するメソッド\n */\n protected startE2EE(): void {\n if (this.options.e2ee === true && this.e2ee) {\n if (!this.connectionId) {\n const error = new Error();\n error.message = `E2EE failed. Self connectionId is null`;\n throw error;\n }\n this.e2ee.clearWorker();\n const result = this.e2ee.start(this.connectionId);\n this.e2ee.postSelfSecretKeyMaterial(this.connectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n\n /**\n * シグナリングに使う WebSocket インスタンスを作成するメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param signalingUrlCandidates - シグナリング候補の URL. 後方互換のため string | string[] を受け取る\n *\n * @returns\n * 接続できた WebScoket インスタンスを返します\n */\n protected async getSignalingWebSocket(signalingUrlCandidates: string | string[]): Promise {\n if (typeof signalingUrlCandidates === \"string\") {\n // signaling url の候補が文字列の場合\n const signalingUrl = signalingUrlCandidates;\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n ws.onclose = (event): void => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n reject(error);\n };\n ws.onopen = (_): void => {\n resolve(ws);\n };\n });\n } else if (Array.isArray(signalingUrlCandidates)) {\n // signaling url の候補が Array の場合\n // すでに候補の WebSocket が発見されているかどうかのフラグ\n let resolved = false;\n const testSignalingUrlCandidate = (signalingUrl: string): Promise => {\n return new Promise((resolve, reject) => {\n const ws = new WebSocket(signalingUrl);\n // 一定時間経過しても反応がなかった場合は処理を中断する\n const timerId = setTimeout(() => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"timeout\",\n url: ws.url,\n });\n if (ws && !resolved) {\n ws.onclose = null;\n ws.onerror = null;\n ws.onopen = null;\n ws.close();\n reject();\n }\n }, this.signalingCandidateTimeout);\n ws.onclose = (event): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"close\",\n url: ws.url,\n message: `WebSocket closed`,\n code: event.code,\n reason: event.reason,\n });\n if (ws) {\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onerror = (_): void => {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"error\",\n url: ws.url,\n message: `Failed to connect WebSocket`,\n });\n if (ws) {\n ws.onclose = null;\n ws.close();\n }\n clearInterval(timerId);\n reject();\n };\n ws.onopen = (_): void => {\n if (ws) {\n clearInterval(timerId);\n if (resolved) {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: false,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n ws.close();\n reject();\n } else {\n this.writeWebSocketSignalingLog(\"signaling-url-candidate\", {\n type: \"open\",\n url: ws.url,\n selected: true,\n });\n ws.onerror = null;\n ws.onclose = null;\n ws.onopen = null;\n resolved = true;\n resolve(ws);\n }\n }\n };\n });\n };\n try {\n return await Promise.any(signalingUrlCandidates.map((signalingUrl) => testSignalingUrlCandidate(signalingUrl)));\n } catch (e) {\n throw new ConnectError(\"Signaling failed. All signaling URL candidates failed to connect\");\n }\n }\n throw new ConnectError(\"Signaling failed. Invalid format signaling URL candidates\");\n }\n\n /**\n * シグナリング処理を行うメソッド\n *\n * @remarks\n * シグナリング候補の URL 一覧に順に接続します\n *\n * 接続できた URL がない場合は例外が発生します\n *\n * @param ws - WebSocket インスタンス\n * @param redirect - クラスター接続時にリダイレクトされた場合のフラグ\n *\n * @returns\n * Sora から受け取った type offer メッセージを返します\n */\n protected async signaling(ws: WebSocket, redirect = false): Promise {\n const offer = await this.createOffer();\n this.trace(\"CREATE OFFER\", offer);\n return new Promise((resolve, reject) => {\n this.writeWebSocketSignalingLog(\"new-websocket\", ws.url);\n // websocket の各 callback を設定する\n ws.binaryType = \"arraybuffer\";\n ws.onclose = (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n this.signalingTerminate();\n reject(error);\n };\n ws.onmessage = async (event): Promise => {\n // E2EE 時専用処理\n if (event.data instanceof ArrayBuffer) {\n this.writeWebSocketSignalingLog(\"onmessage-e2ee\", event.data);\n this.signalingOnMessageE2EE(event.data);\n return;\n }\n if (typeof event.data !== \"string\") {\n throw new Error(\"Received invalid signaling data\");\n }\n const message = JSON.parse(event.data) as SignalingMessage;\n if (message.type == \"offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-offer\", message);\n this.signalingOnMessageTypeOffer(message);\n this.connectedSignalingUrl = ws.url;\n resolve(message);\n } else if (message.type == \"update\") {\n this.writeWebSocketSignalingLog(\"onmessage-update\", message);\n await this.signalingOnMessageTypeUpdate(message);\n } else if (message.type == \"re-offer\") {\n this.writeWebSocketSignalingLog(\"onmessage-re-offer\", message);\n await this.signalingOnMessageTypeReOffer(message);\n } else if (message.type == \"ping\") {\n await this.signalingOnMessageTypePing(message);\n } else if (message.type == \"push\") {\n this.callbacks.push(message, \"websocket\");\n } else if (message.type == \"notify\") {\n if (message.event_type === \"connection.created\") {\n this.writeWebSocketTimelineLog(\"notify-connection.created\", message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeWebSocketTimelineLog(\"notify-connection.destroyed\", message);\n }\n this.signalingOnMessageTypeNotify(message, \"websocket\");\n } else if (message.type == \"switched\") {\n this.writeWebSocketSignalingLog(\"onmessage-switched\", message);\n this.signalingOnMessageTypeSwitched(message);\n } else if (message.type == \"redirect\") {\n this.writeWebSocketSignalingLog(\"onmessage-redirect\", message);\n try {\n const redirectMessage = await this.signalingOnMessageTypeRedirect(message);\n resolve(redirectMessage);\n } catch (error) {\n reject(error);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n let signalingMessage: SignalingConnectMessage;\n try {\n signalingMessage = createSignalingMessage(\n offer.sdp || \"\",\n this.role,\n this.channelId,\n this.metadata,\n this.options,\n redirect\n );\n } catch (error) {\n reject(error);\n return;\n }\n if (signalingMessage.e2ee && this.e2ee) {\n const initResult = await this.e2ee.init();\n // @ts-ignore signalingMessage の e2ee が true の場合は signalingNotifyMetadata が必ず object になる\n signalingMessage[\"signaling_notify_metadata\"][\"pre_key_bundle\"] = initResult;\n }\n this.trace(\"SIGNALING CONNECT MESSAGE\", signalingMessage);\n if (ws) {\n ws.send(JSON.stringify(signalingMessage));\n this.writeWebSocketSignalingLog(`send-${signalingMessage.type}`, signalingMessage);\n this.ws = ws;\n // 初回に接続した URL を状態管理する\n if (!redirect) {\n this.contactSignalingUrl = ws.url;\n this.writeWebSocketSignalingLog(\"contact-signaling-url\", this.contactSignalingUrl);\n }\n }\n })();\n });\n }\n\n /**\n * PeerConnection 接続処理をするメソッド\n *\n * @param message - シグナリング処理で受け取った type offer メッセージ\n */\n protected async connectPeerConnection(message: SignalingOfferMessage): Promise {\n let config = Object.assign({}, message.config);\n if (this.e2ee) {\n // @ts-ignore https://w3c.github.io/webrtc-encoded-transform/#specification\n config = Object.assign({ encodedInsertableStreams: true }, config);\n }\n if (window.RTCPeerConnection.generateCertificate !== undefined) {\n const certificate = await window.RTCPeerConnection.generateCertificate({ name: \"ECDSA\", namedCurve: \"P-256\" });\n config = Object.assign({ certificates: [certificate] }, config);\n }\n this.trace(\"PEER CONNECTION CONFIG\", config);\n this.writePeerConnectionTimelineLog(\"new-peerconnection\", config);\n // @ts-ignore Chrome の場合は第2引数に goog オプションを渡すことができる\n this.pc = new window.RTCPeerConnection(config, this.constraints);\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n }\n };\n this.pc.onicegatheringstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onicegatheringstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.onconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n }\n };\n this.pc.ondatachannel = (event): void => {\n this.onDataChannel(event);\n };\n return;\n }\n\n /**\n * setRemoteDescription 処理を行うメソッド\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async setRemoteDescription(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n const sessionDescription = new RTCSessionDescription({ type: \"offer\", sdp: message.sdp });\n await this.pc.setRemoteDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-remote-description\", sessionDescription);\n return;\n }\n\n /**\n * createAnswer 処理を行うメソッド\n *\n * @remarks\n * サイマルキャスト用の setParameters 処理もここで行う\n *\n * @param message - シグナリング処理で受け取った type offer | type update | type re-offer メッセージ\n */\n protected async createAnswer(\n message: SignalingOfferMessage | SignalingUpdateMessage | SignalingReOfferMessage\n ): Promise {\n if (!this.pc) {\n return;\n }\n // mid と transceiver.direction を合わせる\n for (const mid of Object.values(this.mids)) {\n const transceiver = this.pc.getTransceivers().find((t) => t.mid === mid);\n if (transceiver && transceiver.direction === \"recvonly\") {\n transceiver.direction = \"sendrecv\";\n }\n }\n // simulcast の場合\n if (this.options.simulcast && (this.role === \"sendrecv\" || this.role === \"sendonly\")) {\n const transceiver = this.pc.getTransceivers().find((t) => {\n if (t.mid === null) {\n return;\n }\n if (t.sender.track === null) {\n return;\n }\n if (t.currentDirection !== null && t.currentDirection !== \"sendonly\") {\n return;\n }\n if (this.mids.video !== \"\" && this.mids.video === t.mid) {\n return t;\n }\n if (0 <= t.mid.indexOf(\"video\")) {\n return t;\n }\n });\n if (transceiver) {\n await this.setSenderParameters(transceiver, this.encodings);\n await this.setRemoteDescription(message);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n // setRemoteDescription 後でないと active が反映されないのでもう一度呼ぶ\n await this.setSenderParameters(transceiver, this.encodings);\n const sessionDescription = await this.pc.createAnswer();\n await this.pc.setLocalDescription(sessionDescription);\n this.trace(\"TRANSCEIVER SENDER GET_PARAMETERS\", transceiver.sender.getParameters());\n return;\n }\n }\n const sessionDescription = await this.pc.createAnswer();\n this.writePeerConnectionTimelineLog(\"create-answer\", sessionDescription);\n await this.pc.setLocalDescription(sessionDescription);\n this.writePeerConnectionTimelineLog(\"set-local-description\", sessionDescription);\n return;\n }\n\n /**\n * シグナリングサーバーに type answer を投げるメソッド\n */\n protected sendAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n const message = { type: \"answer\", sdp: this.pc.localDescription.sdp };\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(\"send-answer\", message);\n }\n return;\n }\n\n /**\n * iceCnadidate 処理をするメソッド\n */\n protected onIceCandidate(): Promise {\n return new Promise((resolve, _) => {\n if (this.pc) {\n this.pc.oniceconnectionstatechange = (_): void => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n if (this.pc.iceConnectionState === \"connected\") {\n resolve();\n }\n }\n };\n this.pc.onicecandidate = (event): void => {\n this.writePeerConnectionTimelineLog(\"onicecandidate\", event.candidate);\n if (this.pc) {\n this.trace(\"ONICECANDIDATE ICEGATHERINGSTATE\", this.pc.iceGatheringState);\n }\n // TODO(yuito): Firefox は を投げてくるようになったので対応する\n if (event.candidate === null) {\n resolve();\n } else {\n const candidate = event.candidate.toJSON();\n const message = Object.assign(candidate, { type: \"candidate\" }) as { type: string; [key: string]: unknown };\n this.trace(\"ONICECANDIDATE CANDIDATE MESSAGE\", message);\n this.sendSignalingMessage(message);\n }\n };\n }\n });\n }\n\n /**\n * connectionState が \"connected\" になるのを監視するメソッド\n *\n * @remarks\n * PeerConnection.connectionState が実装されていない場合は何もしない\n */\n protected waitChangeConnectionStateConnected(): Promise {\n return new Promise((resolve, reject) => {\n // connectionState が存在しない場合はそのまま抜ける\n if (this.pc && this.pc.connectionState === undefined) {\n resolve();\n return;\n }\n const timerId = setInterval(() => {\n if (!this.pc) {\n const error = new Error();\n error.message = \"PeerConnection connectionState did not change to 'connected'\";\n clearInterval(timerId);\n reject(error);\n } else if (this.pc && this.pc.connectionState === \"connected\") {\n clearInterval(timerId);\n resolve();\n }\n }, 10);\n });\n }\n\n /**\n * 初回シグナリング接続時の WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorSignalingWebSocketEvent(): Promise {\n return new Promise((_, reject) => {\n this.monitorSignalingWebSocketEventTimerId = setInterval(() => {\n if (!this.ws) {\n return;\n }\n this.clearMonitorSignalingWebSocketEvent();\n this.ws.onclose = (event) => {\n const error = new ConnectError(\n `Signaling failed. CloseEventCode:${event.code} CloseEventReason:'${event.reason}'`\n );\n error.code = event.code;\n error.reason = event.reason;\n this.writeWebSocketTimelineLog(\"onclose\", error);\n this.signalingTerminate();\n reject(error);\n };\n this.ws.onerror = (_) => {\n const error = new ConnectError(`Signaling failed. WebSocket onerror was called`);\n this.writeWebSocketSignalingLog(\"onerror\", error);\n this.signalingTerminate();\n reject(error);\n };\n }, 100);\n });\n }\n\n /**\n * WebSocket の切断を監視するメソッド\n *\n * @remarks\n * 意図しない切断があった場合には異常終了処理を実行する\n */\n protected monitorWebSocketEvent(): void {\n if (!this.ws) {\n return;\n }\n this.ws.onclose = async (event) => {\n this.writeWebSocketTimelineLog(\"onclose\", { code: event.code, reason: event.reason });\n await this.abend(\"WEBSOCKET-ONCLOSE\", { code: event.code, reason: event.reason });\n };\n this.ws.onerror = async (_) => {\n this.writeWebSocketSignalingLog(\"onerror\");\n await this.abend(\"WEBSOCKET-ONERROR\");\n };\n }\n\n /**\n * 初回シグナリング後 PeerConnection の state を監視するメソッド\n *\n * @remarks\n * connectionState, iceConnectionState を監視して不正な場合に切断する\n */\n protected monitorPeerConnectionState(): void {\n if (!this.pc) {\n return;\n }\n this.pc.oniceconnectionstatechange = (_) => {\n // connectionState が undefined の場合は iceConnectionState を見て判定する\n if (this.pc && this.pc.connectionState === undefined) {\n this.writePeerConnectionTimelineLog(\"oniceconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n this.trace(\"ONICECONNECTIONSTATECHANGE ICECONNECTIONSTATE\", this.pc.iceConnectionState);\n clearTimeout(this.monitorIceConnectionStateChangeTimerId);\n // iceConnectionState \"failed\" で切断する\n if (this.pc.iceConnectionState === \"failed\") {\n this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-FAILED\");\n }\n // iceConnectionState \"disconnected\" になってから 10000ms の間変化がない場合切断する\n else if (this.pc.iceConnectionState === \"disconnected\") {\n this.monitorIceConnectionStateChangeTimerId = setTimeout(() => {\n if (this.pc && this.pc.iceConnectionState === \"disconnected\") {\n this.abendPeerConnectionState(\"ICE-CONNECTION-STATE-DISCONNECTED-TIMEOUT\");\n }\n }, 10000);\n }\n }\n };\n this.pc.onconnectionstatechange = (_) => {\n if (this.pc) {\n this.writePeerConnectionTimelineLog(\"onconnectionstatechange\", {\n connectionState: this.pc.connectionState,\n iceConnectionState: this.pc.iceConnectionState,\n iceGatheringState: this.pc.iceGatheringState,\n });\n if (this.pc.connectionState === \"failed\") {\n this.abendPeerConnectionState(\"CONNECTION-STATE-FAILED\");\n }\n }\n };\n }\n\n /**\n * 初回シグナリングの接続タイムアウト処理をするメソッド\n */\n protected setConnectionTimeout(): Promise {\n return new Promise((_, reject) => {\n if (0 < this.connectionTimeout) {\n this.connectionTimeoutTimerId = setTimeout(() => {\n if (\n !this.pc ||\n (this.pc && this.pc.connectionState !== undefined && this.pc.connectionState !== \"connected\")\n ) {\n const error = new Error();\n error.message = \"Signaling connection timeout\";\n this.callbacks.timeout();\n this.trace(\"DISCONNECT\", \"Signaling connection timeout\");\n this.writePeerConnectionTimelineLog(\"signaling-connection-timeout\", {\n connectionTimeout: this.connectionTimeout,\n });\n this.signalingTerminate();\n reject(error);\n }\n }, this.connectionTimeout);\n }\n });\n }\n\n /**\n * setConnectionTimeout でセットしたタイマーを止めるメソッド\n */\n protected clearConnectionTimeout(): void {\n clearTimeout(this.connectionTimeoutTimerId);\n }\n\n /**\n * monitorSignalingWebSocketEvent でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorSignalingWebSocketEvent(): void {\n clearInterval(this.monitorSignalingWebSocketEventTimerId);\n }\n\n /**\n * monitorPeerConnectionState でセットしたタイマーを止めるメソッド\n */\n protected clearMonitorIceConnectionStateChange(): void {\n clearInterval(this.monitorIceConnectionStateChangeTimerId);\n }\n\n /**\n * trace log を出力するメソッド\n *\n * @param title - ログのタイトル\n * @param message - ログの本文\n */\n protected trace(title: string, message: unknown): void {\n this.callbacks.log(title, message as JSONType);\n if (!this.debug) {\n return;\n }\n trace(this.clientId, title, message);\n }\n\n /**\n * WebSocket のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketSignalingLog(eventType: string, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"websocket\"));\n this.writeWebSocketTimelineLog(eventType, data);\n }\n\n /**\n * DataChannel のシグナリングログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelSignalingLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n this.callbacks.signaling(createSignalingEvent(eventType, data, \"datachannel\"));\n this.writeDataChannelTimelineLog(eventType, channel, data);\n }\n\n /**\n * WebSocket のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeWebSocketTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"websocket\");\n this.callbacks.timeline(event);\n }\n\n /**\n * DataChannel のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeDataChannelTimelineLog(eventType: string, channel: RTCDataChannel, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"datachannel\", channel.id, channel.label);\n this.callbacks.timeline(event);\n }\n\n /**\n * PeerConnection のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writePeerConnectionTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"peerconnection\");\n this.callbacks.timeline(event);\n }\n\n /**\n * Sora との接続のタイムラインログ処理をするメソッド\n *\n * @param eventType - イベントタイプ\n * @param data - イベントデータ\n */\n protected writeSoraTimelineLog(eventType: string, data?: unknown): void {\n const event = createTimelineEvent(eventType, data, \"sora\");\n this.callbacks.timeline(event);\n }\n\n /**\n * createOffer 処理をするメソッド\n *\n * @returns\n * 生成した RTCSessionDescription を返します\n */\n private async createOffer(): Promise {\n const config = { iceServers: [] };\n const pc = new window.RTCPeerConnection(config);\n if (isSafari()) {\n pc.addTransceiver(\"video\", { direction: \"recvonly\" });\n pc.addTransceiver(\"audio\", { direction: \"recvonly\" });\n const offer = await pc.createOffer();\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n const offer = await pc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true });\n pc.close();\n this.writePeerConnectionTimelineLog(\"create-offer\", offer);\n return offer;\n }\n\n /**\n * シグナリングサーバーから受け取った type e2ee メッセージを処理をするメソッド\n *\n * @param data - E2EE 用バイナリメッセージ\n */\n private signalingOnMessageE2EE(data: ArrayBuffer): void {\n if (this.e2ee) {\n const message = new Uint8Array(data);\n const result = this.e2ee.receiveMessage(message);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type offer メッセージを処理をするメソッド\n *\n * @param message - type offer メッセージ\n */\n private signalingOnMessageTypeOffer(message: SignalingOfferMessage): void {\n this.clientId = message.client_id;\n this.connectionId = message.connection_id;\n if (message.metadata !== undefined) {\n this.authMetadata = message.metadata;\n }\n if (Array.isArray(message.encodings)) {\n this.encodings = message.encodings;\n }\n if (message.mid !== undefined && message.mid.audio !== undefined) {\n this.mids.audio = message.mid.audio;\n }\n if (message.mid !== undefined && message.mid.video !== undefined) {\n this.mids.video = message.mid.video;\n }\n if (message.data_channels) {\n for (const dc of message.data_channels) {\n this.signalingOfferMessageDataChannels[dc.label] = dc;\n }\n }\n this.trace(\"SIGNALING OFFER MESSAGE\", message);\n this.trace(\"OFFER SDP\", message.sdp);\n }\n\n /**\n * シグナリングサーバーに type update を投げるメソッド\n */\n private sendUpdateAnswer(): void {\n if (this.pc && this.ws && this.pc.localDescription) {\n this.trace(\"ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"update\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーに type re-answer を投げるメソッド\n */\n private sendReAnswer(): void {\n if (this.pc && this.pc.localDescription) {\n this.trace(\"RE ANSWER SDP\", this.pc.localDescription.sdp);\n this.sendSignalingMessage({ type: \"re-answer\", sdp: this.pc.localDescription.sdp });\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type update メッセージを処理をするメソッド\n *\n * @param message - type update メッセージ\n */\n private async signalingOnMessageTypeUpdate(message: SignalingUpdateMessage): Promise {\n this.trace(\"SIGNALING UPDATE MESSGE\", message);\n this.trace(\"UPDATE SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendUpdateAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type re-offer メッセージを処理をするメソッド\n *\n * @param message - type re-offer メッセージ\n */\n private async signalingOnMessageTypeReOffer(message: SignalingReOfferMessage): Promise {\n this.trace(\"SIGNALING RE OFFER MESSGE\", message);\n this.trace(\"RE OFFER SDP\", message.sdp);\n await this.setRemoteDescription(message);\n await this.createAnswer(message);\n this.sendReAnswer();\n }\n\n /**\n * シグナリングサーバーから受け取った type ping メッセージを処理をするメソッド\n *\n * @param message - type ping メッセージ\n */\n private async signalingOnMessageTypePing(message: SignalingPingMessage): Promise {\n const pongMessage: { type: \"pong\"; stats?: RTCStatsReport[] } = { type: \"pong\" };\n if (message.stats) {\n const stats = await this.getStats();\n pongMessage.stats = stats;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify(pongMessage));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type notify メッセージを処理をするメソッド\n *\n * @param message - type notify メッセージ\n */\n private signalingOnMessageTypeNotify(message: SignalingNotifyMessage, transportType: TransportType): void {\n if (message.event_type === \"connection.created\") {\n const connectionId = message.connection_id;\n if (this.connectionId !== connectionId) {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.startSession(connectionId, preKeyBundle);\n this.e2ee.postRemoteSecretKeyMaterials(result);\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n // messages を送信し終えてから、selfSecretKeyMaterial を更新する\n this.e2ee.postSelfSecretKeyMaterial(result.selfConnectionId, result.selfKeyId, result.selfSecretKeyMaterial);\n }\n }\n const data = getSignalingNotifyData(message);\n data.forEach((metadata) => {\n const authnMetadata = getSignalingNotifyAuthnMetadata(metadata);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = metadata.connection_id;\n if (connectionId && this.e2ee && preKeyBundle) {\n this.e2ee.addPreKeyBundle(connectionId, preKeyBundle);\n }\n });\n } else if (message.event_type === \"connection.destroyed\") {\n const authnMetadata = getSignalingNotifyAuthnMetadata(message);\n const preKeyBundle = getPreKeyBundle(authnMetadata);\n const connectionId = message.connection_id;\n if (preKeyBundle && this.e2ee && connectionId) {\n const result = this.e2ee.stopSession(connectionId);\n this.e2ee.postSelfSecretKeyMaterial(\n result.selfConnectionId,\n result.selfKeyId,\n result.selfSecretKeyMaterial,\n 5000\n );\n result.messages.forEach((message) => {\n this.sendE2EEMessage(message.buffer);\n });\n this.e2ee.postRemoveRemoteDeriveKey(connectionId);\n }\n }\n this.callbacks.notify(message, transportType);\n }\n\n /**\n * シグナリングサーバーから受け取った type switched メッセージを処理をするメソッド\n *\n * @param message - type switched メッセージ\n */\n private signalingOnMessageTypeSwitched(message: SignalingSwitchedMessage): void {\n this.signalingSwitched = true;\n if (!this.ws) {\n return;\n }\n if (message[\"ignore_disconnect_websocket\"]) {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.close();\n this.ws = null;\n }\n this.writeWebSocketSignalingLog(\"close\");\n }\n for (const channel of this.datachannels) {\n this.callbacks.datachannel(createDataChannelEvent(channel));\n }\n }\n\n /**\n * シグナリングサーバーから受け取った type redirect メッセージを処理をするメソッド\n *\n * @param message - type redirect メッセージ\n */\n private async signalingOnMessageTypeRedirect(message: SignalingRedirectMessage): Promise {\n if (this.ws) {\n this.ws.onclose = null;\n this.ws.onerror = null;\n this.ws.close();\n this.ws = null;\n }\n const ws = await this.getSignalingWebSocket(message.location);\n const signalingMessage = await this.signaling(ws, true);\n return signalingMessage;\n }\n\n /**\n * sender の parameters に encodings をセットするメソッド\n *\n * @remarks\n * サイマルキャスト用の処理\n */\n private async setSenderParameters(\n transceiver: RTCRtpTransceiver,\n encodings: RTCRtpEncodingParameters[]\n ): Promise {\n const originalParameters = transceiver.sender.getParameters();\n // @ts-ignore\n originalParameters.encodings = encodings;\n await transceiver.sender.setParameters(originalParameters);\n this.trace(\"TRANSCEIVER SENDER SET_PARAMETERS\", originalParameters);\n this.writePeerConnectionTimelineLog(\"transceiver-sender-set-parameters\", originalParameters);\n return;\n }\n\n /**\n * PeerConnection から RTCStatsReport を取得するためのメソッド\n */\n private async getStats(): Promise {\n const stats: RTCStatsReport[] = [];\n if (!this.pc) {\n return stats;\n }\n const reports = await this.pc.getStats();\n reports.forEach((s) => {\n stats.push(s as RTCStatsReport);\n });\n return stats;\n }\n\n /**\n * PeerConnection の ondatachannel callback メソッド\n *\n * @param dataChannelEvent - DataChannel イベント\n */\n private onDataChannel(dataChannelEvent: RTCDataChannelEvent): void {\n const dataChannel = dataChannelEvent.channel;\n dataChannel.bufferedAmountLowThreshold = 65536;\n dataChannel.binaryType = \"arraybuffer\";\n this.soraDataChannels[dataChannel.label] = dataChannel;\n this.writeDataChannelTimelineLog(\"ondatachannel\", dataChannel, createDataChannelData(dataChannel));\n // onbufferedamountlow\n dataChannelEvent.channel.onbufferedamountlow = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onbufferedamountlow\", channel);\n };\n // onopen\n dataChannelEvent.channel.onopen = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n this.trace(\"OPEN DATA CHANNEL\", channel.label);\n if (channel.label === \"signaling\" && this.ws) {\n this.writeDataChannelSignalingLog(\"onopen\", channel);\n } else {\n this.writeDataChannelTimelineLog(\"onopen\", channel);\n }\n };\n // onclose\n dataChannelEvent.channel.onclose = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onclose\", channel);\n this.trace(\"CLOSE DATA CHANNEL\", channel.label);\n await this.disconnect();\n };\n // onerror\n dataChannelEvent.channel.onerror = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n this.writeDataChannelTimelineLog(\"onerror\", channel);\n this.trace(\"ERROR DATA CHANNEL\", channel.label);\n await this.abend(\"DATA-CHANNEL-ONERROR\", { params: { label: channel.label } });\n };\n // onmessage\n if (dataChannelEvent.channel.label === \"signaling\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingMessage;\n this.writeDataChannelSignalingLog(`onmessage-${message.type}`, channel, message);\n if (message.type === \"re-offer\") {\n await this.signalingOnMessageTypeReOffer(message);\n }\n };\n } else if (dataChannelEvent.channel.label === \"notify\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingNotifyMessage;\n if (message.event_type === \"connection.created\") {\n this.writeDataChannelTimelineLog(\"notify-connection.created\", channel, message);\n } else if (message.event_type === \"connection.destroyed\") {\n this.writeDataChannelTimelineLog(\"notify-connection.destroyed\", channel, message);\n }\n this.signalingOnMessageTypeNotify(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"push\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingPushMessage;\n this.callbacks.push(message, \"datachannel\");\n };\n } else if (dataChannelEvent.channel.label === \"e2ee\") {\n dataChannelEvent.channel.onmessage = (event): void => {\n const channel = event.currentTarget as RTCDataChannel;\n const data = event.data as ArrayBuffer;\n this.signalingOnMessageE2EE(data);\n this.writeDataChannelSignalingLog(\"onmessage-e2ee\", channel, data);\n };\n } else if (dataChannelEvent.channel.label === \"stats\") {\n dataChannelEvent.channel.onmessage = async (event): Promise => {\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const data = parseDataChannelEventData(event.data, dataChannelSettings.compress);\n const message = JSON.parse(data) as SignalingReqStatsMessage;\n if (message.type === \"req-stats\") {\n const stats = await this.getStats();\n this.sendStatsMessage(stats);\n }\n };\n } else if (/^#.*/.exec(dataChannelEvent.channel.label)) {\n dataChannelEvent.channel.onmessage = (event): void => {\n if (event.currentTarget === null) {\n return;\n }\n const channel = event.currentTarget as RTCDataChannel;\n const label = channel.label;\n const dataChannelSettings = this.signalingOfferMessageDataChannels[label];\n if (!dataChannelSettings) {\n console.warn(\n `Received onmessage event for '${label}' DataChannel. But '${label}' DataChannel settings doesn't exist`\n );\n return;\n }\n const dataChannel = event.target as RTCDataChannel;\n let data: ArrayBuffer | undefined = undefined;\n if (typeof event.data === \"string\") {\n data = new TextEncoder().encode(event.data);\n } else if (event.data instanceof ArrayBuffer) {\n data = event.data;\n } else {\n console.warn(\"Received onmessage event data is not of type String or ArrayBuffer.\");\n }\n\n if (data !== undefined) {\n if (dataChannelSettings.compress === true) {\n data = unzlibSync(new Uint8Array(data)).buffer;\n }\n this.callbacks.message(createDataChannelMessageEvent(dataChannel.label, data));\n }\n };\n }\n }\n\n /**\n * シグナリングサーバーへメッセージを送信するメソッド\n *\n * @param message - 送信するメッセージ\n */\n private sendSignalingMessage(message: { type: string; [key: string]: unknown }): void {\n if (this.soraDataChannels.signaling) {\n if (\n this.signalingOfferMessageDataChannels.signaling &&\n this.signalingOfferMessageDataChannels.signaling.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.signaling.send(zlibMessage);\n } else {\n this.soraDataChannels.signaling.send(JSON.stringify(message));\n }\n this.writeDataChannelSignalingLog(`send-${message.type}`, this.soraDataChannels.signaling, message);\n } else if (this.ws !== null) {\n this.ws.send(JSON.stringify(message));\n this.writeWebSocketSignalingLog(`send-${message.type}`, message);\n }\n }\n\n /**\n * シグナリングサーバーに E2E 用メッセージを投げるメソッド\n *\n * @param message - 送信するバイナリメッセージ\n */\n private sendE2EEMessage(message: ArrayBuffer): void {\n if (this.soraDataChannels.e2ee) {\n this.soraDataChannels.e2ee.send(message);\n this.writeDataChannelSignalingLog(\"send-e2ee\", this.soraDataChannels.e2ee, message);\n } else if (this.ws !== null) {\n this.ws.send(message);\n this.writeWebSocketSignalingLog(\"send-e2ee\", message);\n }\n }\n\n /**\n * シグナリングサーバーに stats メッセージを投げるメソッド\n *\n * @param reports - RTCStatsReport のリスト\n */\n private sendStatsMessage(reports: RTCStatsReport[]): void {\n if (this.soraDataChannels.stats) {\n const message = {\n type: \"stats\",\n reports: reports,\n };\n if (\n this.signalingOfferMessageDataChannels.stats &&\n this.signalingOfferMessageDataChannels.stats.compress === true\n ) {\n const binaryMessage = new TextEncoder().encode(JSON.stringify(message));\n const zlibMessage = zlibSync(binaryMessage, {});\n this.soraDataChannels.stats.send(zlibMessage);\n } else {\n this.soraDataChannels.stats.send(JSON.stringify(message));\n }\n }\n }\n\n /**\n * audio transceiver を取得するメソッド\n */\n private getAudioTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.audio) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.audio;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * video transceiver を取得するメソッド\n */\n private getVideoTransceiver(): RTCRtpTransceiver | null {\n if (this.pc && this.mids.video) {\n const transceiver = this.pc.getTransceivers().find((transceiver) => {\n return transceiver.mid === this.mids.video;\n });\n return transceiver || null;\n }\n return null;\n }\n\n /**\n * disconnect callback に渡す Event オブジェクトを生成するためのメソッド\n *\n * @param type - Event タイプ(normal | abend)\n * @param title - Event タイトル\n * @param initDict - Event に設定するオプションパラメーター\n */\n private soraCloseEvent(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict): SoraCloseEvent {\n const soraCloseEvent = class SoraCloseEvent extends Event {\n title: string;\n code?: number;\n reason?: string;\n params?: Record;\n\n constructor(type: SoraCloseEventType, title: string, initDict?: SoraCloseEventInitDict) {\n super(type);\n if (initDict) {\n if (initDict.code) {\n this.code = initDict.code;\n }\n if (initDict.reason) {\n this.reason = initDict.reason;\n }\n if (initDict.params) {\n this.params = initDict.params;\n }\n }\n this.title = title;\n }\n };\n return new soraCloseEvent(type, title, initDict);\n }\n\n /**\n * DataChannel を使用してメッセージを送信するメソッド\n *\n * @param label - メッセージを送信する DataChannel のラベル\n * @param message - Uint8Array\n */\n sendMessage(label: string, message: Uint8Array): void {\n const dataChannel = this.soraDataChannels[label];\n // 接続していない場合は何もしない\n if (this.pc === null) {\n return;\n }\n if (dataChannel === undefined) {\n throw new Error(\"Could not find DataChannel\");\n }\n if (dataChannel.readyState !== \"open\") {\n throw new Error(\"Messaging DataChannel is not open\");\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (settings !== undefined && settings.compress === true) {\n const zlibMessage = zlibSync(message, {});\n dataChannel.send(zlibMessage);\n } else {\n dataChannel.send(message);\n }\n }\n\n /**\n * E2EE の自分のフィンガープリント\n */\n get e2eeSelfFingerprint(): string | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.selfFingerprint();\n }\n return;\n }\n\n /**\n * E2EE のリモートのフィンガープリントリスト\n */\n get e2eeRemoteFingerprints(): Record | undefined {\n if (this.options.e2ee && this.e2ee) {\n return this.e2ee.remoteFingerprints();\n }\n return;\n }\n\n /**\n * audio が有効かどうか\n */\n get audio(): boolean {\n return this.getAudioTransceiver() !== null;\n }\n\n /**\n * video が有効かどうか\n */\n get video(): boolean {\n return this.getVideoTransceiver() !== null;\n }\n\n /**\n * シグナリングに使用する URL\n *\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n\n /**\n * DataChannel メッセージング用の DataChannel 情報のリスト\n */\n get datachannels(): DataChannelConfiguration[] {\n if (!this.signalingSwitched) {\n return [];\n }\n const messagingDataChannellabels = Object.keys(this.signalingOfferMessageDataChannels).filter((label) => {\n return /^#.*/.exec(label);\n });\n const result: DataChannelConfiguration[] = [];\n for (const label of messagingDataChannellabels) {\n const dataChannel = this.soraDataChannels[label];\n if (!dataChannel) {\n continue;\n }\n const settings = this.signalingOfferMessageDataChannels[label];\n if (!settings) {\n continue;\n }\n const messagingDataChannel: DataChannelConfiguration = {\n label: dataChannel.label,\n ordered: dataChannel.ordered,\n protocol: dataChannel.protocol,\n compress: settings.compress,\n direction: settings.direction,\n };\n if (typeof dataChannel.maxPacketLifeTime === \"number\") {\n messagingDataChannel.maxPacketLifeTime = dataChannel.maxPacketLifeTime;\n }\n if (typeof dataChannel.maxRetransmits === \"number\") {\n messagingDataChannel.maxRetransmits = dataChannel.maxRetransmits;\n }\n result.push(messagingDataChannel);\n }\n return result;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"sendonly\" または \"sendrecv\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionPublisher extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const sendrecv = connection.sendrecv(\"sora\");\n * const mediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});\n * await sendrecv.connect(mediaStream);\n * ```\n *\n * @param stream - メディアストリーム\n *\n * @public\n */\n async connect(stream: MediaStream): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n } else {\n await Promise.race([\n this.singleStream(stream).finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n }\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async singleStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n *\n * @param stream - メディアストリーム\n */\n private async multiStream(stream: MediaStream): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (!stream) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const index = this.remoteConnectionIds.indexOf(event.target.id as string);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n stream.getTracks().forEach((track) => {\n if (this.pc) {\n this.pc.addTrack(track, stream);\n }\n });\n this.stream = stream;\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n if (this.pc && this.e2ee) {\n this.pc.getSenders().forEach((sender) => {\n if (this.e2ee) {\n this.e2ee.setupSenderTransform(sender);\n }\n });\n }\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return stream;\n }\n}\n","import ConnectionBase from \"./base\";\n\n/**\n * Role が \"recvonly\" の場合に Sora との WebRTC 接続を扱うクラス\n */\nexport default class ConnectionSubscriber extends ConnectionBase {\n /**\n * Sora へ接続するメソッド\n *\n * @example\n * ```typescript\n * const recvonly = connection.sendrecv(\"sora\");\n * await recvonly.connect();\n * ```\n *\n * @public\n */\n async connect(): Promise {\n if (this.options.multistream) {\n await Promise.race([\n this.multiStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return;\n } else {\n const stream = await Promise.race([\n this.singleStream().finally(() => {\n this.clearConnectionTimeout();\n this.clearMonitorSignalingWebSocketEvent();\n }),\n this.setConnectionTimeout(),\n this.monitorSignalingWebSocketEvent(),\n ]);\n this.monitorWebSocketEvent();\n this.monitorPeerConnectionState();\n return stream;\n }\n }\n\n /**\n * シングルストリームで Sora へ接続するメソッド\n */\n private async singleStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n this.stream = event.streams[0];\n const streamId = this.stream.id;\n if (streamId === \"default\") {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": streamId,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n this.stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(streamId)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = this.stream;\n this.remoteConnectionIds.push(streamId);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return this.stream || new MediaStream();\n }\n\n /**\n * マルチストリームで Sora へ接続するメソッド\n */\n private async multiStream(): Promise {\n await this.disconnect();\n this.setupE2EE();\n const ws = await this.getSignalingWebSocket(this.signalingUrlCandidates);\n const signalingMessage = await this.signaling(ws);\n this.startE2EE();\n await this.connectPeerConnection(signalingMessage);\n if (this.pc) {\n this.pc.ontrack = (event): void => {\n const stream = event.streams[0];\n if (stream.id === \"default\") {\n return;\n }\n if (stream.id === this.connectionId) {\n return;\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n \"stream.id\": stream.id,\n id: event.track.id,\n label: event.track.label,\n enabled: event.track.enabled,\n kind: event.track.kind,\n muted: event.track.muted,\n readyState: event.track.readyState,\n };\n this.writePeerConnectionTimelineLog(\"ontrack\", data);\n if (this.e2ee) {\n this.e2ee.setupReceiverTransform(event.receiver);\n }\n this.callbacks.track(event);\n stream.onremovetrack = (event): void => {\n this.callbacks.removetrack(event);\n if (event.target) {\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n const targetId = event.target.id as string;\n const index = this.remoteConnectionIds.indexOf(targetId);\n if (-1 < index) {\n delete this.remoteConnectionIds[index];\n // @ts-ignore TODO(yuito): 後方互換のため peerConnection.onremovestream と同じ仕様で残す\n event.stream = event.target;\n this.callbacks.removestream(event);\n }\n }\n };\n if (-1 < this.remoteConnectionIds.indexOf(stream.id)) {\n return;\n }\n // @ts-ignore TODO(yuito): 最新ブラウザでは無くなった API だが後方互換のため残す\n event.stream = stream;\n this.remoteConnectionIds.push(stream.id);\n this.callbacks.addstream(event);\n };\n }\n await this.setRemoteDescription(signalingMessage);\n await this.createAnswer(signalingMessage);\n this.sendAnswer();\n await this.onIceCandidate();\n await this.waitChangeConnectionStateConnected();\n return;\n }\n}\n","import SoraE2EE from \"@sora/e2ee\";\n\nimport ConnectionBase from \"./base\";\nimport ConnectionPublisher from \"./publisher\";\nimport ConnectionSubscriber from \"./subscriber\";\nimport { applyMediaStreamConstraints } from \"./helpers\";\nimport type {\n AudioCodecType,\n Callbacks,\n ConnectionOptions,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n} from \"./types\";\n\n/**\n * Role 毎の Connection インスタンスを生成するためのクラス\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL の候補\n * @param debug - デバッグフラグ\n */\nclass SoraConnection {\n /**\n * シグナリングに使用する URL の候補\n */\n signalingUrlCandidates: string | string[];\n /**\n * デバッグフラグ\n */\n debug: boolean;\n\n constructor(signalingUrlCandidates: string | string[], debug = false) {\n this.signalingUrlCandidates = signalingUrlCandidates;\n this.debug = debug;\n }\n /**\n * role sendrecv で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendrecv = connection.sendrecv(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role sendrecv な Connection オブジェクトを返します\n *\n * @public\n */\n sendrecv(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n // sendrecv の場合、multistream に初期値を指定する\n const sendrecvOptions: ConnectionOptions = Object.assign({ multistream: true }, options);\n return new ConnectionPublisher(\n this.signalingUrlCandidates,\n \"sendrecv\",\n channelId,\n metadata,\n sendrecvOptions,\n this.debug\n );\n }\n /**\n * role sendonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const sendonly = connection.sendonly(\"sora\");\n * ```\n *\n * @returns\n * role sendonly な Connection オブジェクトを返します\n *\n * @public\n */\n sendonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionPublisher {\n return new ConnectionPublisher(this.signalingUrlCandidates, \"sendonly\", channelId, metadata, options, this.debug);\n }\n /**\n * role recvonly で接続するための Connecion インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * const recvonly = connection.recvonly(\"sora\");\n * ```\n *\n * @param channelId - チャネルID\n * @param metadata - メタデータ\n * @param options - コネクションオプション\n *\n * @returns\n * role recvonly な Connection オブジェクトを返します\n *\n * @public\n */\n recvonly(\n channelId: string,\n metadata: JSONType = null,\n options: ConnectionOptions = { audio: true, video: true }\n ): ConnectionSubscriber {\n return new ConnectionSubscriber(this.signalingUrlCandidates, \"recvonly\", channelId, metadata, options, this.debug);\n }\n /**\n * シグナリングに使用する URL の候補\n *\n * @public\n * @deprecated\n */\n get signalingUrl(): string | string[] {\n return this.signalingUrlCandidates;\n }\n}\n\n/**\n * Sora JS SDK package\n */\nexport default {\n /**\n * E2EE で使用する WASM の読み込みを行うメソッド\n *\n * @example\n * ```typescript\n * Sora.initE2EE(\"http://192.0.2.100/wasm.wasm\");\n * ```\n * @param wasmUrl - E2EE WASM の URL\n *\n * @public\n */\n initE2EE: async function (wasmUrl: string): Promise {\n await SoraE2EE.loadWasm(wasmUrl);\n },\n /**\n * SoraConnection インスタンスを生成するメソッド\n *\n * @example\n * ```typescript\n * const connection = Sora.connection('ws://192.0.2.100:5000/signaling', true);\n * ```\n *\n * @param signalingUrlCandidates - シグナリングに使用する URL 候補\n * @param debug - デバッグフラグ\n *\n * @public\n *\n */\n connection: function (signalingUrlCandidates: string | string[], debug = false): SoraConnection {\n return new SoraConnection(signalingUrlCandidates, debug);\n },\n /**\n * SDK のバージョンを返すメソッド\n *\n * @public\n */\n version: function (): string {\n return \"__SORA_JS_SDK_VERSION__\";\n },\n /**\n * WebRTC のユーティリティ関数群\n *\n * @public\n */\n helpers: {\n applyMediaStreamConstraints,\n },\n};\n\nexport type {\n AudioCodecType,\n Callbacks,\n ConnectionBase,\n ConnectionOptions,\n ConnectionPublisher,\n ConnectionSubscriber,\n DataChannelConfiguration,\n DataChannelDirection,\n DataChannelEvent,\n DataChannelMessageEvent,\n JSONType,\n Role,\n SignalingEvent,\n SignalingNotifyConnectionCreated,\n SignalingNotifyConnectionDestroyed,\n SignalingNotifyConnectionUpdated,\n SignalingNotifyMessage,\n SignalingNotifyMetadata,\n SignalingNotifyNetworkStatus,\n SignalingNotifySpotlightChanged,\n SignalingNotifySpotlightFocused,\n SignalingNotifySpotlightUnfocused,\n SignalingPushMessage,\n Simulcast,\n SimulcastRid,\n SoraAbendTitle,\n SoraCloseEvent,\n SoraCloseEventInitDict,\n SoraCloseEventType,\n SoraConnection,\n SpotlightFocusRid,\n TimelineEvent,\n TimelineEventLogType,\n TransportType,\n VideoCodecType,\n};\n","/**\n * MediaStream の constraints を動的に変更するメソッド.\n *\n * @param mediastream - メディアストリーム\n *\n * @param constraints - メディアストリーム制約\n *\n * @public\n */\nasync function applyMediaStreamConstraints(\n mediastream: MediaStream,\n constraints: MediaStreamConstraints\n): Promise {\n if (constraints.audio && typeof constraints.audio !== \"boolean\") {\n for (const track of mediastream.getAudioTracks()) {\n await track.applyConstraints(constraints.audio);\n }\n }\n if (constraints.video && typeof constraints.video !== \"boolean\") {\n for (const track of mediastream.getVideoTracks()) {\n await track.applyConstraints(constraints.video);\n }\n }\n}\n\nexport { applyMediaStreamConstraints };\n"],"names":["SoraE2EE","constructor","RTCRtpSender","prototype","createEncodedStreams","Error","this","worker","onWorkerDisconnect","startWorker","workerScript","atob","Worker","URL","createObjectURL","Blob","type","onmessage","event","operation","data","clearWorker","postMessage","terminateWorker","terminate","async","preKeyBundle","window","e2ee","init","setupSenderTransform","sender","track","senderStreams","readableStream","readable","writableStream","writable","message","setupReceiverTransform","receiver","receiverStreams","postRemoteSecretKeyMaterials","result","remoteSecretKeyMaterials","postRemoveRemoteDeriveKey","connectionId","postSelfSecretKeyMaterial","selfConnectionId","selfKeyId","selfSecretKeyMaterial","waitingTime","startSession","err","identityKey","signedPreKey","preKeySignature","stopSession","receiveMessage","start","addPreKeyBundle","selfFingerprint","remoteFingerprints","static","wasmUrl","undefined","console","warn","global","self","require","fs","Object","keys","enosys","code","outputBuf","constants","O_WRONLY","O_RDWR","O_CREAT","O_TRUNC","O_APPEND","O_EXCL","writeSync","fd","buf","decoder","decode","nl","lastIndexOf","log","substr","length","write","offset","position","callback","chmod","path","mode","chown","uid","gid","close","fchmod","fchown","fstat","fsync","ftruncate","lchown","link","lstat","mkdir","perm","open","flags","read","buffer","readdir","readlink","rename","from","to","rmdir","stat","symlink","truncate","unlink","utimes","atime","mtime","process","getuid","getgid","geteuid","getegid","getgroups","pid","ppid","umask","cwd","chdir","crypto","nodeCrypto","getRandomValues","b","randomFillSync","performance","now","sec","nsec","hrtime","TextEncoder","TextDecoder","encoder","Go","argv","env","exit","_exitPromise","Promise","resolve","_resolveExitPromise","_pendingEvent","_scheduledTimeouts","Map","_nextCallbackTimeoutID","setInt64","addr","v","mem","setUint32","Math","floor","getInt64","getUint32","getInt32","loadValue","f","getFloat64","isNaN","id","_values","storeValue","nanHead","setFloat64","_ids","get","_idPool","pop","_goRefCounts","set","typeFlag","loadSlice","array","len","Uint8Array","_inst","exports","loadSliceOfValues","a","Array","i","loadString","saddr","DataView","timeOrigin","Date","importObject","go","sp","exited","p","n","msec","getTime","setInt32","setTimeout","_resume","has","clearTimeout","delete","push","Reflect","getsp","deleteProperty","m","args","apply","setUint8","construct","parseInt","str","encode","String","dst","src","Uint8ClampedArray","toCopy","subarray","debug","value","instance","NaN","fill","Infinity","strPtr","ptr","bytes","argc","argvPtrs","forEach","arg","sort","key","run","resume","_makeFuncWrapper","arguments","main","module","versions","electron","error","slice","assign","TMPDIR","tmpdir","WebAssembly","instantiate","readFileSync","then","on","catch","instantiateStreaming","fetch","version","u8","u16","Uint16Array","u32","Uint32Array","fleb","fdeb","clim","freb","eb","r","j","_a","fl","revfl","_b","revfd","rev","x","hMap","cd","mb","s","l","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","max","bits","d","o","bits16","shft","slc","e","BYTES_PER_ELEMENT","ec","ind","msg","nt","captureStackTrace","wbits","wbits16","hTree","t","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","c","cl","cli","cln","cls","w","clen","cf","wfblk","out","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","dl","flen","ftlen","dtlen","llm","lcts","it","clct","deo","dopt","opt","pre","post","st","lvl","plvl","lst","ceil","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","min","maxd","ml","mmd","md","ti","lin","din","dflt","level","zlibSync","opts","adler","lv","zlh","wbytes","unzlibSync","sl","noBuf","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","sym","add","dsym","end","inflt","td","stream","parseDataChannelConfiguration","dataChannelConfiguration","configuration","label","direction","ordered","compress","maxPacketLifeTime","max_packet_life_time","maxRetransmits","max_retransmits","protocol","isSafari","ua","navigator","userAgent","toLocaleLowerCase","indexOf","browser","createSignalingMessage","offerSDP","role","channelId","metadata","options","redirect","sora_client","environment","channel_id","sdp","audio","video","multistream","simulcast","simulcastRid","simulcast_rid","spotlight","spotlight_number","spotlightNumber","spotlightFocusRids","spotlightFocusRid","spotlight_focus_rid","spotlightUnfocusRid","spotlight_unfocus_rid","signalingNotifyMetadata","signaling_notify_metadata","clientId","client_id","bundleId","bundle_id","dataChannelSignaling","data_channel_signaling","ignoreDisconnectWebSocket","ignore_disconnect_websocket","audioPropertyKeys","audioOpusParamsPropertyKeys","videoPropertyKeys","copyOptions","hasAudioProperty","some","audioCodecType","audioBitRate","hasAudioOpusParamsProperty","opus_params","channels","audioOpusParamsChannels","clock_rate","audioOpusParamsClockRate","maxplaybackrate","audioOpusParamsMaxplaybackrate","stereo","audioOpusParamsStereo","sprop_stereo","audioOpusParamsSpropStereo","minptime","audioOpusParamsMinptime","ptime","audioOpusParamsPtime","useinbandfec","audioOpusParamsUseinbandfec","usedtx","audioOpusParamsUsedtx","hasVideoProperty","videoCodecType","videoBitRate","getCapabilities","capabilities","headerExtensions","map","h","uri","every","includes","enabledSimulcast","isArray","dataChannels","data_channels","dataChannelConfigurations","parseDataChannelConfigurations","getSignalingNotifyAuthnMetadata","authn_metadata","getPreKeyBundle","pre_key_bundle","ConnectError","createSignalingEvent","eventType","transportType","Event","JSON","parse","stringify","_","createTimelineEvent","logType","dataChannelId","dataChannelLabel","createDataChannelEvent","channel","datachannel","parseDataChannelEventData","eventData","unzlibMessage","ConnectionBase","signalingUrlCandidates","connectionTimeout","timeout","disconnectWaitTimeout","signalingCandidateTimeout","constraints","remoteConnectionIds","ws","pc","encodings","callbacks","disconnect","addstream","removestream","removetrack","notify","timeline","signaling","authMetadata","connectionTimeoutTimerId","monitorSignalingWebSocketEventTimerId","monitorIceConnectionStateChangeTimerId","soraDataChannels","mids","signalingSwitched","signalingOfferMessageDataChannels","connectedSignalingUrl","contactSignalingUrl","kind","stopAudioTrack","getAudioTracks","enabled","stop","removeTrack","getSenders","find","replaceTrack","stopVideoTrack","getVideoTracks","audioTrack","transceiver","getAudioTransceiver","addTrack","videoTrack","getVideoTransceiver","signalingTerminate","dataChannel","initializeConnection","abendPeerConnectionState","title","clearMonitorIceConnectionStateChange","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange","onconnectionstatechange","onclose","writeWebSocketTimelineLog","reason","onerror","currentTarget","writeDataChannelTimelineLog","trace","soraCloseEvent","writeSoraTimelineLog","params","zlibMessage","readyState","send","writeDataChannelSignalingLog","errorMessage","disconnectWebSocket","disconnectPeerConnection","clearConnectionTimeout","timerId","writeWebSocketSignalingLog","disconnectDataChannel","closeDataChannels","reject","disconnectWaitTimeoutId","onClosePromises","res","counter","setInterval","clearInterval","all","finally","connectionState","setupE2EE","abend","startE2EE","signalingUrl","WebSocket","onopen","resolved","testSignalingUrlCandidate","url","selected","any","offer","createOffer","binaryType","ArrayBuffer","signalingOnMessageE2EE","signalingOnMessageTypeOffer","signalingOnMessageTypeUpdate","signalingOnMessageTypeReOffer","signalingOnMessageTypePing","event_type","signalingOnMessageTypeNotify","signalingOnMessageTypeSwitched","redirectMessage","signalingOnMessageTypeRedirect","signalingMessage","initResult","config","encodedInsertableStreams","RTCPeerConnection","generateCertificate","certificate","name","namedCurve","certificates","writePeerConnectionTimelineLog","iceConnectionState","iceGatheringState","onDataChannel","sessionDescription","RTCSessionDescription","setRemoteDescription","mid","values","getTransceivers","currentDirection","setSenderParameters","getParameters","createAnswer","setLocalDescription","sendAnswer","localDescription","onIceCandidate","onicecandidate","candidate","toJSON","sendSignalingMessage","waitChangeConnectionStateConnected","monitorSignalingWebSocketEvent","clearMonitorSignalingWebSocketEvent","monitorWebSocketEvent","monitorPeerConnectionState","setConnectionTimeout","dump","record","group","groupEnd","info","prefix","toFixed","iceServers","addTransceiver","offerToReceiveAudio","offerToReceiveVideo","messages","sendE2EEMessage","connection_id","dc","sendUpdateAnswer","sendReAnswer","pongMessage","stats","getStats","metadata_list","getSignalingNotifyData","datachannels","getSignalingWebSocket","location","originalParameters","setParameters","dataChannelEvent","bufferedAmountLowThreshold","bufferedAmount","negotiated","reliable","onbufferedamountlow","dataChannelSettings","sendStatsMessage","exec","target","createDataChannelMessageEvent","reports","initDict","super","sendMessage","settings","e2eeSelfFingerprint","e2eeRemoteFingerprints","messagingDataChannellabels","filter","messagingDataChannel","ConnectionPublisher","race","multiStream","singleStream","connectPeerConnection","getTracks","ontrack","streams","muted","onremovetrack","index","ConnectionSubscriber","streamId","targetId","MediaStream","SoraConnection","sendrecv","sendrecvOptions","sendonly","recvonly","initE2EE","loadWasm","connection","helpers","applyMediaStreamConstraints","mediastream","applyConstraints"],"mappings":"qOAslBA,MAAMA,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rG,EAAWC,EAAUC,EAASje,KAAK2O,OAoB7GkjB,SACE9T,EACAC,EAAqB,KACrBC,EAA6B,CAAEM,OAAO,EAAMC,OAAO,IAEnD,OAAO,IAAI6S,GAAqBrxB,KAAKokB,uBAAwB,WAAYrG,EAAWC,EAAUC,EAASje,KAAK2O,OAQ1Gmb,mBACF,OAAO9pB,KAAKokB,8BAOD,CAYb0N,SAAU3wB,eAAgBuC,SAClBhE,EAASqyB,SAASruB,IAgB1BsuB,WAAY,SAAU5N,EAA2CzV,GAAQ,GACvE,OAAO,IAAI8iB,GAAerN,EAAwBzV,IAOpDoC,QAAS,WACP,MAAO,YAOTkhB,QAAS,CACPC,4BCnMJ/wB,eACEgxB,EACA1N,GAEA,GAAIA,EAAYlG,OAAsC,kBAAtBkG,EAAYlG,MAC1C,IAAK,MAAM7c,KAASywB,EAAYjM,uBACxBxkB,EAAM0wB,iBAAiB3N,EAAYlG,OAG7C,GAAIkG,EAAYjG,OAAsC,kBAAtBiG,EAAYjG,MAC1C,IAAK,MAAM9c,KAASywB,EAAYzL,uBACxBhlB,EAAM0wB,iBAAiB3N,EAAYjG"} \ No newline at end of file diff --git a/dist/sora.mjs b/dist/sora.mjs index 76ad39a9..a7fbbade 100644 --- a/dist/sora.mjs +++ b/dist/sora.mjs @@ -1,7 +1,7 @@ /** * sora-js-sdk * WebRTC SFU Sora JavaScript SDK - * @version: 2022.1.0-canary.6 + * @version: 2022.1.0 * @author: Shiguredo Inc. * @license: Apache-2.0 **/ @@ -1627,7 +1627,7 @@ function createSignalingMessage(offerSDP, role, channelId, metadata, options, re } const message = { type: "connect", - sora_client: "Sora JavaScript SDK 2022.1.0-canary.6", + sora_client: "Sora JavaScript SDK 2022.1.0", environment: window.navigator.userAgent, role: role, channel_id: channelId, @@ -4385,7 +4385,7 @@ var sora = { * @public */ version: function () { - return "2022.1.0-canary.6"; + return "2022.1.0"; }, /** * WebRTC のユーティリティ関数群