dd-trace 6.10.0 → 6.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-3rdparty.csv +5 -0
- package/README.md +0 -17
- package/index.d.ts +128 -6
- package/initialize.mjs +28 -17
- package/openfeature.js +2 -2
- package/package.json +27 -23
- package/packages/datadog-esbuild/index.js +0 -34
- package/packages/datadog-instrumentations/src/anthropic.js +210 -15
- package/packages/datadog-instrumentations/src/aws-sdk.js +9 -1
- package/packages/datadog-instrumentations/src/browser-bunyan.js +11 -0
- package/packages/datadog-instrumentations/src/bunyan.js +3 -16
- package/packages/datadog-instrumentations/src/cucumber.js +30 -15
- package/packages/datadog-instrumentations/src/cypress-config.js +182 -16
- package/packages/datadog-instrumentations/src/cypress-legacy-finalizers.js +30 -0
- package/packages/datadog-instrumentations/src/cypress.js +2 -0
- package/packages/datadog-instrumentations/src/fastify.js +2 -0
- package/packages/datadog-instrumentations/src/helpers/bunyan.js +22 -0
- package/packages/datadog-instrumentations/src/helpers/hooks.js +2 -1
- package/packages/datadog-instrumentations/src/helpers/pool-acquire.js +9 -4
- package/packages/datadog-instrumentations/src/helpers/register.js +10 -8
- package/packages/datadog-instrumentations/src/jest.js +25 -17
- package/packages/datadog-instrumentations/src/mariadb.js +278 -21
- package/packages/datadog-instrumentations/src/mocha/main.js +539 -55
- package/packages/datadog-instrumentations/src/mocha/utils.js +135 -19
- package/packages/datadog-instrumentations/src/playwright-reporter.js +247 -0
- package/packages/datadog-instrumentations/src/playwright.js +182 -35
- package/packages/datadog-instrumentations/src/router.js +2 -0
- package/packages/datadog-instrumentations/src/vitest-main-no-worker-init.js +6 -8
- package/packages/datadog-instrumentations/src/vitest-main.js +11 -3
- package/packages/datadog-plugin-aws-sdk/src/base.js +1 -0
- package/packages/datadog-plugin-aws-sdk/src/services/eventbridge.js +163 -44
- package/packages/datadog-plugin-aws-sdk/src/services/kinesis.js +2 -8
- package/packages/datadog-plugin-azure-functions/src/index.js +1 -1
- package/packages/datadog-plugin-browser-bunyan/src/index.js +9 -0
- package/packages/datadog-plugin-bunyan/src/index.js +5 -8
- package/packages/datadog-plugin-cucumber/src/index.js +11 -0
- package/packages/datadog-plugin-cypress/src/after-run.js +5 -1
- package/packages/datadog-plugin-cypress/src/after-spec.js +5 -1
- package/packages/datadog-plugin-cypress/src/cypress-plugin.js +81 -29
- package/packages/datadog-plugin-cypress/src/finalization.js +76 -0
- package/packages/datadog-plugin-cypress/src/index.js +12 -6
- package/packages/datadog-plugin-cypress/src/plugin.js +16 -3
- package/packages/datadog-plugin-dd-trace-api/src/index.js +4 -0
- package/packages/datadog-plugin-electron/src/index.js +2 -0
- package/packages/datadog-plugin-fs/src/index.js +1 -1
- package/packages/datadog-plugin-jest/src/index.js +6 -0
- package/packages/datadog-plugin-mocha/src/index.js +56 -1
- package/packages/datadog-plugin-nats/src/index.js +1 -1
- package/packages/datadog-plugin-openai/src/tracing.js +41 -30
- package/packages/datadog-plugin-openai-agents/src/integration.js +1 -0
- package/packages/datadog-plugin-playwright/src/index.js +46 -13
- package/packages/datadog-plugin-vitest/src/index.js +6 -0
- package/packages/datadog-webpack/index.js +0 -11
- package/packages/dd-trace/index.js +0 -1
- package/packages/dd-trace/src/agent/info.js +6 -5
- package/packages/dd-trace/src/aiguard/client.js +100 -1
- package/packages/dd-trace/src/aiguard/errors.js +41 -0
- package/packages/dd-trace/src/aiguard/evaluation.js +357 -0
- package/packages/dd-trace/src/aiguard/integrations/anthropic.js +70 -0
- package/packages/dd-trace/src/aiguard/integrations/index.js +4 -0
- package/packages/dd-trace/src/aiguard/messages/anthropic.js +423 -0
- package/packages/dd-trace/src/aiguard/messages/openai.js +1 -24
- package/packages/dd-trace/src/aiguard/messages/utils.js +28 -0
- package/packages/dd-trace/src/aiguard/messages/vercel-ai.js +1 -11
- package/packages/dd-trace/src/aiguard/sdk.js +22 -278
- package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js +9 -12
- package/packages/dd-trace/src/appsec/reporter.js +2 -0
- package/packages/dd-trace/src/appsec/telemetry/index.js +13 -0
- package/packages/dd-trace/src/appsec/telemetry/rasp.js +16 -0
- package/packages/dd-trace/src/appsec/telemetry/waf.js +24 -0
- package/packages/dd-trace/src/carrier.js +107 -48
- package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/worker/index.js +1 -0
- package/packages/dd-trace/src/ci-visibility/early-flake-detection/get-known-tests.js +5 -5
- package/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js +29 -3
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/coverage-writer.js +27 -9
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/di-logs-writer.js +21 -5
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/request-tracker.js +164 -0
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/writer.js +26 -8
- package/packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js +365 -32
- package/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js +6 -4
- package/packages/dd-trace/src/ci-visibility/exporters/request.js +201 -0
- package/packages/dd-trace/src/ci-visibility/exporters/test-worker/index.js +5 -3
- package/packages/dd-trace/src/ci-visibility/exporters/test-worker/writer.js +9 -5
- package/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +7 -4
- package/packages/dd-trace/src/ci-visibility/requests/get-library-configuration.js +4 -2
- package/packages/dd-trace/src/ci-visibility/requests/rate-limit.js +39 -0
- package/packages/dd-trace/src/ci-visibility/requests/request.js +3 -6
- package/packages/dd-trace/src/ci-visibility/requests/upload-coverage-report.js +4 -2
- package/packages/dd-trace/src/ci-visibility/requests/upload-test-screenshot.js +10 -4
- package/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js +5 -5
- package/packages/dd-trace/src/config/generated-config-types.d.ts +4 -0
- package/packages/dd-trace/src/config/index.js +13 -2
- package/packages/dd-trace/src/config/major-overrides.js +7 -0
- package/packages/dd-trace/src/config/supported-configurations.json +14 -0
- package/packages/dd-trace/src/datastreams/index.js +2 -0
- package/packages/dd-trace/src/datastreams/manager.js +9 -2
- package/packages/dd-trace/src/datastreams/processor.js +15 -13
- package/packages/dd-trace/src/datastreams/size.js +5 -0
- package/packages/dd-trace/src/debugger/constants.js +1 -0
- package/packages/dd-trace/src/debugger/devtools_client/condition.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/index.js +5 -11
- package/packages/dd-trace/src/debugger/index.js +4 -2
- package/packages/dd-trace/src/debugger/inspect-segment.js +154 -0
- package/packages/dd-trace/src/evp_proxy/constants.js +8 -0
- package/packages/dd-trace/src/evp_proxy/direct.js +64 -0
- package/packages/dd-trace/src/evp_proxy/discovery.js +133 -0
- package/packages/dd-trace/src/evp_proxy/path.js +22 -0
- package/packages/dd-trace/src/exporters/agent/writer.js +49 -9
- package/packages/dd-trace/src/exporters/common/buffering-exporter.js +6 -4
- package/packages/dd-trace/src/exporters/common/request.js +5 -2
- package/packages/dd-trace/src/exporters/common/writer.js +11 -6
- package/packages/dd-trace/src/llmobs/experiments/client.js +167 -5
- package/packages/dd-trace/src/llmobs/experiments/dataset.js +484 -92
- package/packages/dd-trace/src/llmobs/experiments/experiment.js +302 -29
- package/packages/dd-trace/src/llmobs/experiments/index.js +75 -64
- package/packages/dd-trace/src/llmobs/experiments/noop.js +135 -7
- package/packages/dd-trace/src/llmobs/experiments/result.js +1 -0
- package/packages/dd-trace/src/llmobs/experiments/util.js +101 -9
- package/packages/dd-trace/src/llmobs/plugins/ai/util.js +12 -3
- package/packages/dd-trace/src/llmobs/plugins/base.js +4 -2
- package/packages/dd-trace/src/noop/proxy.js +3 -4
- package/packages/dd-trace/src/openfeature/constants/constants.js +0 -18
- package/packages/dd-trace/src/openfeature/flagging_provider.js +18 -2
- package/packages/dd-trace/src/openfeature/index.js +7 -4
- package/packages/dd-trace/src/openfeature/remote_config.js +1 -1
- package/packages/dd-trace/src/openfeature/writers/base.js +153 -11
- package/packages/dd-trace/src/openfeature/writers/exposures.js +62 -14
- package/packages/dd-trace/src/openfeature/writers/util.js +97 -15
- package/packages/dd-trace/src/opentelemetry/context_manager.js +7 -7
- package/packages/dd-trace/src/opentelemetry/logs/batch_log_processor.js +2 -1
- package/packages/dd-trace/src/opentelemetry/logs/logger.js +67 -11
- package/packages/dd-trace/src/opentelemetry/logs/otlp_transformer.js +14 -3
- package/packages/dd-trace/src/opentelemetry/metrics/index.js +25 -12
- package/packages/dd-trace/src/opentelemetry/metrics/otlp_span_stats_exporter.js +2 -5
- package/packages/dd-trace/src/opentelemetry/metrics/otlp_span_stats_transformer.js +96 -43
- package/packages/dd-trace/src/opentracing/propagation/text_map.js +22 -13
- package/packages/dd-trace/src/opentracing/tracer.js +5 -2
- package/packages/dd-trace/src/otel-thread-ctx.js +387 -0
- package/packages/dd-trace/src/plugin_manager.js +3 -3
- package/packages/dd-trace/src/plugins/ci_plugin.js +6 -1
- package/packages/dd-trace/src/plugins/index.js +1 -0
- package/packages/dd-trace/src/plugins/util/jest.js +4 -3
- package/packages/dd-trace/src/plugins/util/test.js +9 -9
- package/packages/dd-trace/src/plugins/util/web.js +3 -0
- package/packages/dd-trace/src/profiling/profiler.js +1 -1
- package/packages/dd-trace/src/profiling/profilers/space.js +1 -3
- package/packages/dd-trace/src/profiling/profilers/wall.js +37 -90
- package/packages/dd-trace/src/profiling/webspan-utils.js +45 -0
- package/packages/dd-trace/src/proxy.js +38 -29
- package/packages/dd-trace/src/ritm.js +9 -2
- package/packages/dd-trace/src/serverless.js +37 -0
- package/packages/dd-trace/src/span_format.js +1 -0
- package/packages/dd-trace/src/span_stats.js +30 -3
- package/packages/dd-trace/src/storage-channels.js +86 -0
- package/packages/dd-trace/src/telemetry/metrics.js +62 -8
- package/packages/dd-trace/src/telemetry/send-data.js +1 -0
- package/packages/dd-trace/src/tracer.js +9 -2
- package/packages/dd-trace/src/tracer_metadata.js +14 -1
- package/packages/dd-trace/src/web-tags-cache.js +132 -0
- package/vendor/dist/@datadog/openfeature-node-server/LICENSE +201 -0
- package/vendor/dist/@datadog/openfeature-node-server/index.js +1 -0
- package/vendor/dist/@datadog/sketches-js/index.js +1 -1
- package/vendor/dist/https-proxy-agent/LICENSE +22 -0
- package/vendor/dist/https-proxy-agent/index.js +4 -0
- package/vendor/dist/protobufjs/index.js +1 -1
- package/vendor/dist/protobufjs/minimal/index.js +1 -1
- package/vendor/dist/proxy-from-env/LICENSE +20 -0
- package/vendor/dist/proxy-from-env/index.js +1 -0
- package/packages/datadog-instrumentations/src/helpers/optional-peer-bundler.js +0 -65
- package/packages/datadog-webpack/src/optional-peer-loader.js +0 -17
- package/packages/dd-trace/src/feature-registry.js +0 -29
- package/packages/dd-trace/src/openfeature/register.js +0 -35
- package/packages/dd-trace/src/openfeature/require-provider.js +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var t={"./long/umd/index.js"(t,r){!function(i,e){function preferDefault(t){return t.default||t}"function"==typeof define&&define.amd?define([],function(){var t={};return e(t),preferDefault(t)}):(e(r),t.exports=preferDefault(r))}("u">typeof globalThis?globalThis:"u">typeof self&&self,function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=null;try{r=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function Long(t,r,i){this.low=0|t,this.high=0|r,this.unsigned=!!i}function isLong(t){return!0===(t&&t.__isLong__)}function ctz32(t){var r=Math.clz32(t&-t);return t?31-r:r}Long.prototype.__isLong__,Object.defineProperty(Long.prototype,"__isLong__",{value:!0}),Long.isLong=isLong;var i={},e={};function fromInt(t,r){var o,n,s;if(r)return(t>>>=0,(s=0<=t&&t<256)&&(n=e[t]))?n:(o=fromBits(t,0,!0),s&&(e[t]=o),o);return(t|=0,(s=-128<=t&&t<128)&&(n=i[t]))?n:(o=fromBits(t,t<0?-1:0,!1),s&&(i[t]=o),o)}function fromNumber(t,r){if(isNaN(t))return r?a:f;if(r){if(t<0)return a;if(t>=s)return d}else{if(t<=-u)return v;if(t+1>=u)return g}return t<0?fromNumber(-t,r).neg():fromBits(t%n|0,t/n|0,r)}function fromBits(t,r,i){return new Long(t,r,i)}Long.fromInt=fromInt,Long.fromNumber=fromNumber,Long.fromBits=fromBits;var o=Math.pow;function fromString(t,r,i){if(0===t.length)throw Error("empty string");if("number"==typeof r?(i=r,r=!1):r=!!r,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return r?a:f;if((i=i||10)<2||36<i)throw RangeError("radix");if((e=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===e)return fromString(t.substring(1),r,i).neg();for(var e,n=fromNumber(o(i,8)),s=f,u=0;u<t.length;u+=8){var h=Math.min(8,t.length-u),l=parseInt(t.substring(u,u+h),i);if(h<8){var c=fromNumber(o(i,h));s=s.mul(c).add(fromNumber(l))}else s=(s=s.mul(n)).add(fromNumber(l))}return s.unsigned=r,s}function fromValue(t,r){return"number"==typeof t?fromNumber(t,r):"string"==typeof t?fromString(t,r):fromBits(t.low,t.high,"boolean"==typeof r?r:t.unsigned)}Long.fromString=fromString,Long.fromValue=fromValue;var n=0x100000000,s=0xffffffffffffffff,u=0x8000000000000000,h=fromInt(0x1000000),f=fromInt(0);Long.ZERO=f;var a=fromInt(0,!0);Long.UZERO=a;var l=fromInt(1);Long.ONE=l;var c=fromInt(1,!0);Long.UONE=c;var p=fromInt(-1);Long.NEG_ONE=p;var g=fromBits(-1,0x7fffffff,!1);Long.MAX_VALUE=g;var d=fromBits(-1,-1,!0);Long.MAX_UNSIGNED_VALUE=d;var v=fromBits(0,-0x80000000,!1);Long.MIN_VALUE=v;var b=Long.prototype;b.toInt=function(){return this.unsigned?this.low>>>0:this.low},b.toNumber=function(){return this.unsigned?(this.high>>>0)*n+(this.low>>>0):this.high*n+(this.low>>>0)},b.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(!this.eq(v))return"-"+this.neg().toString(t);else{var r=fromNumber(t),i=this.div(r),e=i.mul(r).sub(this);return i.toString(t)+e.toInt().toString(t)}for(var n=fromNumber(o(t,6),this.unsigned),s=this,u="";;){var h=s.div(n),f=(s.sub(h.mul(n)).toInt()>>>0).toString(t);if((s=h).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},b.getHighBits=function(){return this.high},b.getHighBitsUnsigned=function(){return this.high>>>0},b.getLowBits=function(){return this.low},b.getLowBitsUnsigned=function(){return this.low>>>0},b.getNumBitsAbs=function(){if(this.isNegative())return this.eq(v)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,r=31;r>0&&(t&1<<r)==0;r--);return 0!=this.high?r+33:r+1},b.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&-1===t&&(0!==this.low||-2097152!==this.high)},b.isZero=function(){return 0===this.high&&0===this.low},b.eqz=b.isZero,b.isNegative=function(){return!this.unsigned&&this.high<0},b.isPositive=function(){return this.unsigned||this.high>=0},b.isOdd=function(){return(1&this.low)==1},b.isEven=function(){return(1&this.low)==0},b.equals=function(t){return isLong(t)||(t=fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},b.eq=b.equals,b.notEquals=function(t){return!this.eq(t)},b.neq=b.notEquals,b.ne=b.notEquals,b.lessThan=function(t){return 0>this.comp(t)},b.lt=b.lessThan,b.lessThanOrEqual=function(t){return 0>=this.comp(t)},b.lte=b.lessThanOrEqual,b.le=b.lessThanOrEqual,b.greaterThan=function(t){return this.comp(t)>0},b.gt=b.greaterThan,b.greaterThanOrEqual=function(t){return this.comp(t)>=0},b.gte=b.greaterThanOrEqual,b.ge=b.greaterThanOrEqual,b.compare=function(t){if(isLong(t)||(t=fromValue(t)),this.eq(t))return 0;var r=this.isNegative(),i=t.isNegative();return r&&!i?-1:!r&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},b.comp=b.compare,b.negate=function(){return!this.unsigned&&this.eq(v)?v:this.not().add(l)},b.neg=b.negate,b.add=function(t){isLong(t)||(t=fromValue(t));var r,i,e=this.high>>>16,o=65535&this.high,n=this.low>>>16,s=65535&this.low,u=t.high>>>16,h=65535&t.high,f=t.low>>>16,a=65535&t.low,l=0,c=0;return r=0+((i=0+(s+a))>>>16),i&=65535,r+=n+f,c+=r>>>16,r&=65535,c+=o+h,l+=c>>>16,c&=65535,l+=e+u,fromBits(r<<16|i,(l&=65535)<<16|c,this.unsigned)},b.subtract=function(t){return isLong(t)||(t=fromValue(t)),this.add(t.neg())},b.sub=b.subtract,b.multiply=function(t){if(this.isZero())return this;if(isLong(t)||(t=fromValue(t)),r)return fromBits(r.mul(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned);if(t.isZero())return this.unsigned?a:f;if(this.eq(v))return t.isOdd()?v:f;if(t.eq(v))return this.isOdd()?v:f;if(this.isNegative())if(t.isNegative())return this.neg().mul(t.neg());else return this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(h)&&t.lt(h))return fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var i,e,o=this.high>>>16,n=65535&this.high,s=this.low>>>16,u=65535&this.low,l=t.high>>>16,c=65535&t.high,p=t.low>>>16,g=65535&t.low,d=0,b=0;return i=0+((e=0+u*g)>>>16),e&=65535,i+=s*g,b+=i>>>16,i&=65535,i+=u*p,b+=i>>>16,i&=65535,b+=n*g,d+=b>>>16,b&=65535,b+=s*p,d+=b>>>16,b&=65535,b+=u*c,d+=b>>>16,b&=65535,d+=o*g+n*p+s*c+u*l,fromBits(i<<16|e,(d&=65535)<<16|b,this.unsigned)},b.mul=b.multiply,b.divide=function(t){if(isLong(t)||(t=fromValue(t)),t.isZero())throw Error("division by zero");if(r){var i,e,n;return this.unsigned||-0x80000000!==this.high||-1!==t.low||-1!==t.high?fromBits((this.unsigned?r.div_u:r.div_s)(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned):this}if(this.isZero())return this.unsigned?a:f;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return a;if(t.gt(this.shru(1)))return c;n=a}else{if(this.eq(v))if(t.eq(l)||t.eq(p))return v;else return t.eq(v)?l:(i=this.shr(1).div(t).shl(1)).eq(f)?t.isNegative()?l:p:(e=this.sub(t.mul(i)),n=i.add(e.div(t)));if(t.eq(v))return this.unsigned?a:f;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();n=f}for(e=this;e.gte(t);){for(var s=Math.ceil(Math.log(i=Math.max(1,Math.floor(e.toNumber()/t.toNumber())))/Math.LN2),u=s<=48?1:o(2,s-48),h=fromNumber(i),g=h.mul(t);g.isNegative()||g.gt(e);)i-=u,g=(h=fromNumber(i,this.unsigned)).mul(t);h.isZero()&&(h=l),n=n.add(h),e=e.sub(g)}return n},b.div=b.divide,b.modulo=function(t){return(isLong(t)||(t=fromValue(t)),r)?fromBits((this.unsigned?r.rem_u:r.rem_s)(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},b.mod=b.modulo,b.rem=b.modulo,b.not=function(){return fromBits(~this.low,~this.high,this.unsigned)},b.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},b.clz=b.countLeadingZeros,b.countTrailingZeros=function(){return this.low?ctz32(this.low):ctz32(this.high)+32},b.ctz=b.countTrailingZeros,b.and=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low&t.low,this.high&t.high,this.unsigned)},b.or=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low|t.low,this.high|t.high,this.unsigned)},b.xor=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low^t.low,this.high^t.high,this.unsigned)},b.shiftLeft=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):fromBits(0,this.low<<t-32,this.unsigned)},b.shl=b.shiftLeft,b.shiftRight=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},b.shr=b.shiftRight,b.shiftRightUnsigned=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):32===t?fromBits(this.high,0,this.unsigned):fromBits(this.high>>>t-32,0,this.unsigned)},b.shru=b.shiftRightUnsigned,b.shr_u=b.shiftRightUnsigned,b.rotateLeft=function(t){var r;return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:32===t?fromBits(this.high,this.low,this.unsigned):t<32?(r=32-t,fromBits(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,fromBits(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))},b.rotl=b.rotateLeft,b.rotateRight=function(t){var r;return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:32===t?fromBits(this.high,this.low,this.unsigned):t<32?(r=32-t,fromBits(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,fromBits(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))},b.rotr=b.rotateRight,b.toSigned=function(){return this.unsigned?fromBits(this.low,this.high,!1):this},b.toUnsigned=function(){return this.unsigned?this:fromBits(this.low,this.high,!0)},b.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},b.toBytesLE=function(){var t=this.high,r=this.low;return[255&r,r>>>8&255,r>>>16&255,r>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},b.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,r>>>24,r>>>16&255,r>>>8&255,255&r]},Long.fromBytes=function(t,r,i){return i?Long.fromBytesLE(t,r):Long.fromBytesBE(t,r)},Long.fromBytesLE=function(t,r){return new Long(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)},Long.fromBytesBE=function(t,r){return new Long(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)},"function"==typeof BigInt&&(Long.fromBigInt=function(t,r){return fromBits(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),r)},Long.fromValue=function(t,r){return"bigint"==typeof t?Long.fromBigInt(t,r):fromValue(t,r)},b.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t}),t.default=Long})},"./protobufjs/minimal.js"(t,r,i){"use strict";t.exports=i("./protobufjs/src/index-minimal.js")},"./protobufjs/src/index-minimal.js"(t,r,i){"use strict";function configure(){r.util.LongBits._configure(r.util.Long),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=i("./protobufjs/src/writer.js"),r.BufferWriter=i("./protobufjs/src/writer_buffer.js"),r.Reader=i("./protobufjs/src/reader.js"),r.BufferReader=i("./protobufjs/src/reader_buffer.js"),r.util=i("./protobufjs/src/util/minimal.js"),r.rpc=i("./protobufjs/src/rpc.js"),r.roots=i("./protobufjs/src/roots.js"),r.configure=configure,configure()},"./protobufjs/src/reader.js"(t,r,i){"use strict";t.exports=Reader;var e,o=i("./protobufjs/src/util/minimal.js"),n=o.LongBits,s=o.utf8;function indexOutOfRange(t,r){return RangeError("index out of range: "+t.pos+" + "+(r||1)+" > "+t.len)}function Reader(t){this.buf=t,this.pos=0,this.len=t.length,this.view=null,this.discardUnknown=Reader.discardUnknown}function create_array(t){if(Array.isArray(t)&&(t=new Uint8Array(t)),t instanceof Uint8Array)return new Reader(t);throw Error("illegal buffer")}var create=function(){return o.Buffer?function(t){return(Reader.create=function(t){return o.Buffer.isBuffer(t)?new e(t):create_array(t)})(t)}:create_array};function readLongVarint(){var t=new n(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;r=0}else{for(;r<4&&!(this.pos>=this.len);++r)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>0,this.buf[this.pos++]<128)return t;throw indexOutOfRange(this)}if(this.len-this.pos>4){for(;r<5;++r)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}else for(;r<5;++r){if(this.pos>=this.len)throw indexOutOfRange(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function readFixed32_end(t,r){return(t[r-4]|t[r-3]<<8|t[r-2]<<16|t[r-1]<<24)>>>0}function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new n(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}function getLazyView(t,r,i){var e=t.view;if(e||r<i)return e;var o=t.buf;return t.view=new DataView(o.buffer,o.byteOffset,o.byteLength)}Reader.create=create(),Reader.prototype.raw=function(t,r){return this.buf.subarray(t,r)},Reader.prototype.uint32=function(){var t=this.buf,r=this.pos,i=(127&t[r])>>>0;if(t[r++]<128||(i=(i|(127&t[r])<<7)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<14)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<21)>>>0,t[r++]<128)||(i=(i|(15&t[r])<<28)>>>0,t[r++]<128))return this.pos=r,i;for(var e=0;e<5;++e){if(r>=this.len)throw this.pos=r,indexOutOfRange(this);if(t[r++]<128)return this.pos=r,i}throw this.pos=r,Error("invalid varint encoding")},Reader.prototype.tag=function(){var t=this.buf,r=this.pos,i=(127&t[r])>>>0;if(t[r++]<128||(i=(i|(127&t[r])<<7)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<14)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<21)>>>0,t[r++]<128))return this.pos=r,i;if(i=(i|(15&t[r])<<28)>>>0,t[r]<128&&(112&t[r])==0)return this.pos=r+1,i;throw this.pos=r+1,Error("invalid tag encoding")},Reader.prototype.int32=function(){return 0|this.uint32()},Reader.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)},Reader.prototype.bool=function(){for(var t,r=!1,i=0;i<10;++i){if(this.pos>=this.len)throw indexOutOfRange(this);if(127&(t=this.buf[this.pos++])&&(r=!0),t<128)return r}throw Error("invalid varint encoding")},Reader.prototype.fixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)},Reader.prototype.sfixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return 0|readFixed32_end(this.buf,this.pos+=4)},Reader.prototype.float=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);var t=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},Reader.prototype.double=function(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);var t=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},Reader.prototype.uint32s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.uint32());return t},Reader.prototype.int32s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.int32());return t},Reader.prototype.sint32s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.sint32());return t},Reader.prototype.bools=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.bool());return t},Reader.prototype.fixed32s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>2,o=t.length,n=this.pos;t.length=o+e;var s=getLazyView(this,e,128);if(s)for(var u=0;u<e;++u,n+=4)t[o++]=s.getUint32(n,!0);else for(var h=this.buf,f=0;f<e;++f,n+=4)t[o++]=readFixed32_end(h,n+4);if(this.pos=n,n!==i)throw indexOutOfRange(this,4);return t},Reader.prototype.sfixed32s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>2,o=t.length,n=this.pos;t.length=o+e;var s=getLazyView(this,e,128);if(s)for(var u=0;u<e;++u,n+=4)t[o++]=s.getInt32(n,!0);else for(var h=this.buf,f=0;f<e;++f,n+=4)t[o++]=0|readFixed32_end(h,n+4);if(this.pos=n,n!==i)throw indexOutOfRange(this,4);return t},Reader.prototype.floats=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>2,n=t.length,s=this.pos;t.length=n+e;var u=getLazyView(this,e,8);if(u)for(var h=0;h<e;++h,s+=4)t[n++]=u.getFloat32(s,!0);else for(var f=this.buf,a=0;a<e;++a,s+=4)t[n++]=o.float.readFloatLE(f,s);if(this.pos=s,s!==i)throw indexOutOfRange(this,4);return t},Reader.prototype.doubles=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>3,n=t.length,s=this.pos;t.length=n+e;var u=getLazyView(this,e,8);if(u)for(var h=0;h<e;++h,s+=8)t[n++]=u.getFloat64(s,!0);else for(var f=this.buf,a=0;a<e;++a,s+=8)t[n++]=o.float.readDoubleLE(f,s);if(this.pos=s,s!==i)throw indexOutOfRange(this,8);return t},Reader.prototype.uint64s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.uint64());return t},Reader.prototype.int64s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.int64());return t},Reader.prototype.sint64s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.sint64());return t},Reader.prototype.fixed64s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r,e=t.length;if(i>this.len)throw indexOutOfRange(this,r);var o=r>>>3;t.length=e+o;for(var n=0;n<o;++n)t[e++]=this.fixed64();if(this.pos!==i)throw indexOutOfRange(this,8);return t},Reader.prototype.sfixed64s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r,e=t.length;if(i>this.len)throw indexOutOfRange(this,r);var o=r>>>3;t.length=e+o;for(var n=0;n<o;++n)t[e++]=this.sfixed64();if(this.pos!==i)throw indexOutOfRange(this,8);return t},Reader.prototype.bytes=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);return this.pos=i,this.raw(r,i)},Reader.prototype.string=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);return this.pos=i,s.read(this.buf,r,i)},Reader.prototype.stringVerify=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);return this.pos=i,s.readStrict(this.buf,r,i)},Reader.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw indexOutOfRange(this,t);this.pos+=t}else do if(this.pos>=this.len)throw indexOutOfRange(this);while(128&this.buf[this.pos++]);return this},Reader.recursionLimit=o.recursionLimit,Reader.discardUnknown=!0,Reader.prototype.skipType=function(t,r,i){if(void 0===r&&(r=0),r>Reader.recursionLimit)throw Error("max depth exceeded");if(0===i)throw Error("illegal tag: field number 0");switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var e=this.tag(),o=e>>>3;if(t=7&e,!o)throw Error("illegal tag: field number 0");if(4===t){if(void 0!==i&&o!==i)throw Error("invalid end group tag");break}this.skipType(t,r+1,o)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},Reader._configure=function(t){e=t,Reader.create=create(),e._configure();var r=o.Long?"toLong":"toNumber";o.merge(Reader.prototype,{int64:function(){return readLongVarint.call(this)[r](!1)},uint64:function(){return readLongVarint.call(this)[r](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[r](!1)},fixed64:function(){return readFixed64.call(this)[r](!0)},sfixed64:function(){return readFixed64.call(this)[r](!1)}})}},"./protobufjs/src/reader_buffer.js"(t,r,i){"use strict";t.exports=BufferReader;var e=i("./protobufjs/src/reader.js");BufferReader.prototype=Object.create(e.prototype,{constructor:{value:BufferReader,writable:!0,enumerable:!1,configurable:!0}});var o=i("./protobufjs/src/util/minimal.js");function BufferReader(t){e.call(this,t)}BufferReader._configure=function(){o.Buffer&&(BufferReader.prototype._slice=o.Buffer.prototype.slice)},BufferReader.prototype.raw=function(t,r){return this._slice.call(this.buf,t,r)},BufferReader.prototype.string=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw RangeError("index out of range: "+this.pos+" + "+t+" > "+this.len);return this.pos=i,this.buf.utf8Slice?this.buf.utf8Slice(r,i):this.buf.toString("utf-8",r,i)},BufferReader._configure()},"./protobufjs/src/roots.js"(t){"use strict";t.exports=Object.create(null)},"./protobufjs/src/rpc.js"(t,r,i){"use strict";r.Service=i("./protobufjs/src/rpc/service.js")},"./protobufjs/src/rpc/service.js"(t,r,i){"use strict";t.exports=Service;var e=i("./protobufjs/src/util/minimal.js");function Service(t,r,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!r,this.responseDelimited=!!i}Service.prototype=Object.create(e.EventEmitter.prototype,{constructor:{value:Service,writable:!0,enumerable:!1,configurable:!0}}),Service.prototype.rpcCall=function rpcCall(t,r,i,o,n){if(!o)throw TypeError("request must be specified");var s=this;if(!n)return e.asPromise(rpcCall,s,t,r,i,o);if(!s.rpcImpl)return void setTimeout(function(){n(Error("already ended"))},0);try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(r,e){if(r)return s.emit("error",r,t),n(r);if(null===e)return void s.end(!0);if(!(e instanceof i))try{e=i[s.responseDelimited?"decodeDelimited":"decode"](e)}catch(r){return s.emit("error",r,t),n(r)}return s.emit("data",e,t),n(null,e)})}catch(r){s.emit("error",r,t),setTimeout(function(){n(r)},0);return}},Service.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},"./protobufjs/src/util/aspromise.js"(t){"use strict";t.exports=function asPromise(t,r){for(var i=Array(arguments.length-1),e=0,o=2,n=!0;o<arguments.length;)i[e++]=arguments[o++];return new Promise(function(o,s){i[e]=function(t){if(n)if(n=!1,t)s(t);else{for(var r=Array(arguments.length-1),i=0;i<r.length;)r[i++]=arguments[i];o.apply(null,r)}};try{t.apply(r||null,i)}catch(t){n&&(n=!1,s(t))}})}},"./protobufjs/src/util/base64.js"(t,r){"use strict";r.length=function(t){var r=t.length;if(!r)return 0;for(;r>0&&"="===t.charAt(r-1);)--r;return Math.floor(3*r/4)};for(var i=Array(64),e=Array(123),o=0;o<64;)e[i[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;e[45]=62,e[95]=63,r.encode=function(t,r,e){for(var o,n=null,s=[],u=0,h=0;r<e;){var f=t[r++];switch(h){case 0:s[u++]=i[f>>2],o=(3&f)<<4,h=1;break;case 1:s[u++]=i[o|f>>4],o=(15&f)<<2,h=2;break;case 2:s[u++]=i[o|f>>6],s[u++]=i[63&f],h=0}u>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,s)),u=0)}return(h&&(s[u++]=i[o],s[u++]=61,1===h&&(s[u++]=61)),n)?(u&&n.push(String.fromCharCode.apply(String,s.slice(0,u))),n.join("")):String.fromCharCode.apply(String,s.slice(0,u))};var n="invalid encoding";r.decode=function(t,r,i){for(var o,s=i,u=0,h=0;h<t.length;){var f=t.charCodeAt(h++);if(61===f&&u>1)break;if(void 0===(f=e[f]))throw Error(n);switch(u){case 0:o=f,u=1;break;case 1:r[i++]=o<<2|(48&f)>>4,o=f,u=2;break;case 2:r[i++]=(15&o)<<4|(60&f)>>2,o=f,u=3;break;case 3:r[i++]=(3&o)<<6|f,u=0}}if(1===u)throw Error(n);return i-s};var s=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,u=/[-_]/,h=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;r.test=function(t){return s.test(t)||u.test(t)&&h.test(t)}},"./protobufjs/src/util/eventemitter.js"(t){"use strict";function EventEmitter(){this._listeners=Object.create(null)}t.exports=EventEmitter,EventEmitter.prototype.on=function(t,r,i){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:r,ctx:i||this}),this},EventEmitter.prototype.off=function(t,r){if(void 0===t)this._listeners=Object.create(null);else if(void 0===r)this._listeners[t]=[];else{var i=this._listeners[t];if(!i)return this;for(var e=0;e<i.length;)i[e].fn===r?i.splice(e,1):++e}return this},EventEmitter.prototype.emit=function(t){var r=this._listeners[t];if(r){for(var i=[],e=1;e<arguments.length;)i.push(arguments[e++]);for(e=0;e<r.length;)r[e].fn.apply(r[e++].ctx,i)}return this}},"./protobufjs/src/util/float.js"(t){"use strict";function factory(t){if("u">typeof Float32Array)!function(){var r=new Float32Array([-0]),i=new Uint8Array(r.buffer),e=128===i[3];function writeFloat_f32_cpy(t,e,o){r[0]=t,e[o]=i[0],e[o+1]=i[1],e[o+2]=i[2],e[o+3]=i[3]}function writeFloat_f32_rev(t,e,o){r[0]=t,e[o]=i[3],e[o+1]=i[2],e[o+2]=i[1],e[o+3]=i[0]}function readFloat_f32_cpy(t,e){return i[0]=t[e],i[1]=t[e+1],i[2]=t[e+2],i[3]=t[e+3],r[0]}function readFloat_f32_rev(t,e){return i[3]=t[e],i[2]=t[e+1],i[1]=t[e+2],i[0]=t[e+3],r[0]}t.writeFloatLE=e?writeFloat_f32_cpy:writeFloat_f32_rev,t.writeFloatBE=e?writeFloat_f32_rev:writeFloat_f32_cpy,t.readFloatLE=e?readFloat_f32_cpy:readFloat_f32_rev,t.readFloatBE=e?readFloat_f32_rev:readFloat_f32_cpy}();else{function writeFloat_ieee754(t,r,i,e){var o=+(r<0);if(o&&(r=-r),0===r)t(1/r>0?0:0x80000000,i,e);else if(isNaN(r))t(0x7fc00000,i,e);else if(r>34028234663852886e22)t((o<<31|0x7f800000)>>>0,i,e);else if(r<11754943508222875e-54)t((o<<31|Math.round(r/1401298464324817e-60))>>>0,i,e);else{var n=Math.floor(Math.log(r)/Math.LN2),s=8388607&Math.round(r*Math.pow(2,-n)*8388608);t((o<<31|n+127<<23|s)>>>0,i,e)}}function readFloat_ieee754(t,r,i){var e=t(r,i),o=(e>>31)*2+1,n=e>>>23&255,s=8388607&e;return 255===n?s?NaN:1/0*o:0===n?1401298464324817e-60*o*s:o*Math.pow(2,n-150)*(s+8388608)}t.writeFloatLE=writeFloat_ieee754.bind(null,writeUintLE),t.writeFloatBE=writeFloat_ieee754.bind(null,writeUintBE),t.readFloatLE=readFloat_ieee754.bind(null,readUintLE),t.readFloatBE=readFloat_ieee754.bind(null,readUintBE)}if("u">typeof Float64Array)!function(){var r=new Float64Array([-0]),i=new Uint8Array(r.buffer),e=128===i[7];function writeDouble_f64_cpy(t,e,o){r[0]=t,e[o]=i[0],e[o+1]=i[1],e[o+2]=i[2],e[o+3]=i[3],e[o+4]=i[4],e[o+5]=i[5],e[o+6]=i[6],e[o+7]=i[7]}function writeDouble_f64_rev(t,e,o){r[0]=t,e[o]=i[7],e[o+1]=i[6],e[o+2]=i[5],e[o+3]=i[4],e[o+4]=i[3],e[o+5]=i[2],e[o+6]=i[1],e[o+7]=i[0]}function readDouble_f64_cpy(t,e){return i[0]=t[e],i[1]=t[e+1],i[2]=t[e+2],i[3]=t[e+3],i[4]=t[e+4],i[5]=t[e+5],i[6]=t[e+6],i[7]=t[e+7],r[0]}function readDouble_f64_rev(t,e){return i[7]=t[e],i[6]=t[e+1],i[5]=t[e+2],i[4]=t[e+3],i[3]=t[e+4],i[2]=t[e+5],i[1]=t[e+6],i[0]=t[e+7],r[0]}t.writeDoubleLE=e?writeDouble_f64_cpy:writeDouble_f64_rev,t.writeDoubleBE=e?writeDouble_f64_rev:writeDouble_f64_cpy,t.readDoubleLE=e?readDouble_f64_cpy:readDouble_f64_rev,t.readDoubleBE=e?readDouble_f64_rev:readDouble_f64_cpy}();else{function writeDouble_ieee754(t,r,i,e,o,n){var s,u=+(e<0);if(u&&(e=-e),0===e)t(0,o,n+r),t(1/e>0?0:0x80000000,o,n+i);else if(isNaN(e))t(0,o,n+r),t(0x7ff80000,o,n+i);else if(e>17976931348623157e292)t(0,o,n+r),t((u<<31|0x7ff00000)>>>0,o,n+i);else if(e<22250738585072014e-324)t((s=e/5e-324)>>>0,o,n+r),t((u<<31|s/0x100000000)>>>0,o,n+i);else{var h=Math.floor(Math.log(e)/Math.LN2);1024===h&&(h=1023),t(0x10000000000000*(s=e*Math.pow(2,-h))>>>0,o,n+r),t((u<<31|h+1023<<20|1048576*s&1048575)>>>0,o,n+i)}}function readDouble_ieee754(t,r,i,e,o){var n=t(e,o+r),s=t(e,o+i),u=(s>>31)*2+1,h=s>>>20&2047,f=0x100000000*(1048575&s)+n;return 2047===h?f?NaN:1/0*u:0===h?5e-324*u*f:u*Math.pow(2,h-1075)*(f+0x10000000000000)}t.writeDoubleLE=writeDouble_ieee754.bind(null,writeUintLE,0,4),t.writeDoubleBE=writeDouble_ieee754.bind(null,writeUintBE,4,0),t.readDoubleLE=readDouble_ieee754.bind(null,readUintLE,0,4),t.readDoubleBE=readDouble_ieee754.bind(null,readUintBE,4,0)}return t}function writeUintLE(t,r,i){r[i]=255&t,r[i+1]=t>>>8&255,r[i+2]=t>>>16&255,r[i+3]=t>>>24}function writeUintBE(t,r,i){r[i]=t>>>24,r[i+1]=t>>>16&255,r[i+2]=t>>>8&255,r[i+3]=255&t}function readUintLE(t,r){return(t[r]|t[r+1]<<8|t[r+2]<<16|t[r+3]<<24)>>>0}function readUintBE(t,r){return(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0}t.exports=factory(factory)},"./protobufjs/src/util/longbits.js"(t){"use strict";function LongBits(t,r){this.lo=t>>>0,this.hi=r>>>0}t.exports=LongBits;var r,i=LongBits.zero=new LongBits(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var e=LongBits.zeroHash="\0\0\0\0\0\0\0\0";LongBits.fromNumber=function(t){if(0===t)return i;var r=t<0;r&&(t=-t);var e=t>>>0,o=(t-e)/0x100000000>>>0;return r&&(o=~o>>>0,e=~e>>>0,++e>0xffffffff&&(e=0,++o>0xffffffff&&(o=0))),new LongBits(e,o)},LongBits.from=function(t){if("number"==typeof t)return LongBits.fromNumber(t);if("string"==typeof t||t instanceof String)if(!r)return LongBits.fromNumber(parseInt(t,10));else t=r.fromString(t);return t.low||t.high?new LongBits(t.low>>>0,t.high>>>0):i},LongBits.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var r=~this.lo+1>>>0,i=~this.hi>>>0;return r||(i=i+1>>>0),-(r+0x100000000*i)}return this.lo+0x100000000*this.hi},LongBits.prototype.toLong=function(t){return r?new r(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var o=String.prototype.charCodeAt;LongBits.fromHash=function(t){return t===e?i:new LongBits((o.call(t,0)|o.call(t,1)<<8|o.call(t,2)<<16|o.call(t,3)<<24)>>>0,(o.call(t,4)|o.call(t,5)<<8|o.call(t,6)<<16|o.call(t,7)<<24)>>>0)},LongBits.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},LongBits.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},LongBits.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},LongBits.prototype.length=function(){var t=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===r?t<16384?t<128?1:2:t<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:i<128?9:10},LongBits._configure=function(t){r=t}},"./protobufjs/src/util/minimal.js"(t,r,i){"use strict";function isUnsafeProperty(t){return"__proto__"===t||"prototype"===t||"constructor"===t}function merge(t){var r="boolean"==typeof arguments[arguments.length-1],i=r?arguments.length-1:arguments.length;r=r&&arguments[arguments.length-1];for(var e=1;e<i;++e){var o=arguments[e];if(o)for(var n=Object.keys(o),s=0;s<n.length;++s)isUnsafeProperty(n[s])||r&&Object.prototype.hasOwnProperty.call(t,n[s])&&void 0!==t[n[s]]||(t[n[s]]=o[n[s]])}return t}function newError(t){function CustomError(t,r){if(!(this instanceof CustomError))return new CustomError(t,r);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,CustomError):Object.defineProperty(this,"stack",{value:Error().stack||""}),r&&merge(this,r)}return CustomError.prototype=Object.create(Error.prototype,{constructor:{value:CustomError,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),CustomError}r.asPromise=i("./protobufjs/src/util/aspromise.js"),r.base64=i("./protobufjs/src/util/base64.js"),r.EventEmitter=i("./protobufjs/src/util/eventemitter.js"),r.float=i("./protobufjs/src/util/float.js"),r.utf8=i("./protobufjs/src/util/utf8.js"),r.pool=i("./protobufjs/src/util/pool.js"),r.LongBits=i("./protobufjs/src/util/longbits.js"),r.isUnsafeProperty=isUnsafeProperty,r.isNode=!!("u">typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),r.global=r.isNode&&global||"u">typeof window&&window||"u">typeof self&&self||"u">typeof globalThis&&globalThis||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,r){var i=t[r];return!!(null!=i&&Object.hasOwnProperty.call(t,r))&&("object"!=typeof i||(Array.isArray(i)?i.length:Object.keys(i).length)>0)},r.Buffer=function(){try{var t=r.global.Buffer;return t.prototype.utf8Write||r.isNode?t:null}catch(t){return null}}(),r.newBuffer=function(t){var i=r.Buffer;return"number"==typeof t?i?i.allocUnsafe(t):new Uint8Array(t):i?i.from(t):new Uint8Array(t)},r.rawField=function(t,i,e){var o=[],n=t<<3|i;for(n>>>=0;n>127;)o.push(127&n|128),n>>>=7;o.push(n);for(var s=0;s<e.length;++s)o.push(e[s]);return r.newBuffer(o)},r.Array=Uint8Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||function(){try{var t=i("./long/umd/index.js");return t&&t.isLong?t:null}catch(t){return null}}(),r.key2Re=/^(?:true|false|0|1)$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,i){var e=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(e.lo,e.hi,i):e.toNumber(!!i)},r.longFromKey=function(t,i){return r.key64Re.test(t)&&!r.key32Re.test(t)?r.longFromHash(t,i):t},r.boolFromKey=function(t){return"true"===t||"1"===t},r.merge=merge,r.nestingLimit=32,r.recursionLimit=100,r.makeProp=function(t,r,i){Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:void 0===i||i,configurable:!0,writable:!0})},r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=newError,r.ProtocolError=newError("ProtocolError"),r.oneOfGetter=function(t){for(var r={},i=0;i<t.length;++i)r[t[i]]=1;return function(){for(var t=Object.keys(this),i=t.length-1;i>-1;--i)if(1===r[t[i]]&&void 0!==this[t[i]]&&null!==this[t[i]])return t[i]}},r.oneOfSetter=function(t){return function(r){for(var i=0;i<t.length;++i)t[i]!==r&&delete this[t[i]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0}},"./protobufjs/src/util/pool.js"(t){"use strict";t.exports=function pool(t,r,i){var e=i||8192,o=e>>>1,n=null,s=e;return function(i){if(i<1||i>o)return t(i);s+i>e&&(n=t(e),s=0);var u=r.call(n,s,s+=i);return 7&s&&(s=(7|s)+1),u}}},"./protobufjs/src/util/utf8.js"(t,r){"use strict";var i,e=new TextDecoder("utf-8",{ignoreBOM:!0});try{i=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}catch(t){i=e}function utf8_read_js(t,r,i,e){for(var o=r;o<i;){var n=t[o++];if(n<=127)e+=String.fromCharCode(n);else if(n>=192&&n<224){var s=(31&n)<<6|63&t[o++];e+=s>=128?String.fromCharCode(s):"�"}else if(n>=224&&n<240){var u=(15&n)<<12|(63&t[o++])<<6|63&t[o++];e+=u>=2048?String.fromCharCode(u):"�"}else if(n>=240){var h=(7&n)<<18|(63&t[o++])<<12|(63&t[o++])<<6|63&t[o++];h<65536||h>1114111?e+="�":(h-=65536,e+=String.fromCharCode(55296+(h>>10)),e+=String.fromCharCode(56320+(1023&h)))}}return e}function utf8_read_decoder(t,r,i,e){var o=0===i&&e===r.length?r:r.subarray(i,e);return t.decode(o)}r.length=function(t){for(var r=0,i=0,e=0;e<t.length;++e)(i=t.charCodeAt(e))<128?r+=1:i<2048?r+=2:(64512&i)==55296&&(64512&t.charCodeAt(e+1))==56320?(++e,r+=4):r+=3;return r},r.read=function(t,r,i){if(i-r<1)return"";if(i-r>=64)return utf8_read_decoder(e,t,r,i);for(var o,n,s,u,h,f,a,l,c="",p=r;p+7<i;p+=8){if(o=t[p],n=t[p+1],s=t[p+2],u=t[p+3],h=t[p+4],f=t[p+5],(o|n|s|u|h|f|(a=t[p+6])|(l=t[p+7]))&128)return utf8_read_js(t,p,i,c);c+=String.fromCharCode(o,n,s,u,h,f,a,l)}for(;p<i;++p){if(128&(o=t[p]))return utf8_read_js(t,p,i,c);c+=String.fromCharCode(o)}return c},r.readStrict=function(t,r,e){if(e-r<1)return"";if(e-r>=64)return utf8_read_decoder(i,t,r,e);for(var o,n,s,u,h,f,a,l,c="",p=r;p+7<e;p+=8){if(o=t[p],n=t[p+1],s=t[p+2],u=t[p+3],h=t[p+4],f=t[p+5],(o|n|s|u|h|f|(a=t[p+6])|(l=t[p+7]))&128)return c+utf8_read_decoder(i,t,p,e);c+=String.fromCharCode(o,n,s,u,h,f,a,l)}for(;p<e;++p){if(128&(o=t[p]))return c+utf8_read_decoder(i,t,p,e);c+=String.fromCharCode(o)}return c},r.write=function(t,r,i){for(var e,o,n=i,s=0;s<t.length;++s)(e=t.charCodeAt(s))<128?r[i++]=e:(e<2048?r[i++]=e>>6|192:((64512&e)==55296&&(64512&(o=t.charCodeAt(s+1)))==56320?(e=65536+((1023&e)<<10)+(1023&o),++s,r[i++]=e>>18|240,r[i++]=e>>12&63|128):r[i++]=e>>12|224,r[i++]=e>>6&63|128),r[i++]=63&e|128);return i-n}},"./protobufjs/src/writer.js"(t,r,i){"use strict";t.exports=Writer;var e,o=i("./protobufjs/src/util/minimal.js"),n=o.LongBits,s=o.base64,u=o.utf8;function Writer(){this.pos=0,this.buf=this.constructor.alloc(64),this.view=null,this.states=null}Object.defineProperty(Writer.prototype,"len",{configurable:!0,enumerable:!0,get:function(){return this.pos}});var create=function(){return o.Buffer?function(){return(Writer.create=function(){return new e})()}:function(){return new Writer}};function sizeVarint32(t){return t<128?1:t<16384?2:t<2097152?3:t<0x10000000?4:5}function writeStringAscii(t,r,i){for(var e=0;e<t.length;)r[i++]=t.charCodeAt(e++)}function writeVarint32(t,r,i){for(;t>127;)r[i++]=127&t|128,t>>>=7;return r[i]=t,i+1}function writeVarint64(t,r,i){for(var e=t.lo,o=t.hi;o;)r[i++]=127&e|128,e=(e>>>7|o<<25)>>>0,o>>>=7;for(;e>127;)r[i++]=127&e|128,e>>>=7;return r[i]=e,i+1}function writeFixed32(t,r,i){r[i]=255&t,r[i+1]=t>>>8&255,r[i+2]=t>>>16&255,r[i+3]=t>>>24}function getLazyView(t,r,i){var e=t.view;if(e||r<i)return e;var o=t.buf;return t.view=new DataView(o.buffer,o.byteOffset,o.byteLength)}Writer.create=create(),Writer.alloc=function(t){return new Uint8Array(t)},Writer.alloc=o.pool(Writer.alloc,Uint8Array.prototype.subarray),Writer.prototype._reserve=function(t){var r=this.pos+t;if(r>this.buf.length){var i=this.buf.length<<1;i<r&&(i=r);var e=this.constructor.alloc(i);e.set(this.buf.subarray(0,this.pos),0),this.buf=e,this.view=null}},Writer.prototype.uint32=function(t){t>>>=0,this._reserve(5);var r=this.pos;return this.pos=writeVarint32(t,this.buf,r),this},Writer.prototype.int32=function(t){return(t|=0)<0?(this._reserve(10),writeVarint64(n.fromNumber(t),this.buf,this.pos),this.pos+=10,this):this.uint32(t)},Writer.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},Writer.prototype.uint64=function(t){var r=n.from(t);this._reserve(10);var i=this.pos;return this.pos=writeVarint64(r,this.buf,i),this},Writer.prototype.int64=Writer.prototype.uint64,Writer.prototype.sint64=function(t){var r=n.from(t).zzEncode();this._reserve(10);var i=this.pos;return this.pos=writeVarint64(r,this.buf,i),this},Writer.prototype.bool=function(t){return this._reserve(1),this.buf[this.pos++]=+!!t,this},Writer.prototype.fixed32=function(t){return this._reserve(4),writeFixed32(t>>>0,this.buf,this.pos),this.pos+=4,this},Writer.prototype.sfixed32=Writer.prototype.fixed32,Writer.prototype.fixed64=function(t){var r=n.from(t);return this._reserve(8),writeFixed32(r.lo,this.buf,this.pos),writeFixed32(r.hi,this.buf,this.pos+4),this.pos+=8,this},Writer.prototype.sfixed64=Writer.prototype.fixed64,Writer.prototype.float=function(t){return this._reserve(4),o.float.writeFloatLE(t,this.buf,this.pos),this.pos+=4,this},Writer.prototype.double=function(t){return this._reserve(8),o.float.writeDoubleLE(t,this.buf,this.pos),this.pos+=8,this},Writer.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this._reserve(1),this.buf[this.pos++]=0,this;if(o.isString(t)){var i=Writer.alloc(r=s.length(t));s.decode(t,i,0),t=i}return this.uint32(r),this._reserve(r),this.buf.set(t,this.pos),this.pos+=r,this},Writer.prototype.raw=function(t){var r=t.length>>>0;return r&&(this._reserve(r),this.buf.set(t,this.pos),this.pos+=r),this},Writer.prototype._delim=function(t,r){var i=sizeVarint32(r);return i>1&&this.buf.copyWithin(t+i,t+1,t+1+r),writeVarint32(r,this.buf,t),this.pos=t+i+r,this},Writer.prototype.string=function(t){var r=t.length;if(!r)return this._reserve(1),this.buf[this.pos++]=0,this;if(r<128){this._reserve(3*r+5);var i=this.pos;return this._delim(i,u.write(t,this.buf,i+1))}var e=u.length(t);return this.uint32(e),this._reserve(e),e===t.length?writeStringAscii(t,this.buf,this.pos):u.write(t,this.buf,this.pos),this.pos+=e,this},Writer.prototype.uint32s=function(t){var r=t.length;this._reserve(5*r+5);for(var i=this.buf,e=this.pos,o=e+1,n=0;n<r;++n)o=writeVarint32(t[n]>>>0,i,o);return this._delim(e,o-e-1)},Writer.prototype.int32s=function(t){var r=t.length;this._reserve(10*r+5);for(var i,e=this.buf,o=this.pos,s=o+1,u=0;u<r;++u)s=(i=0|t[u])<0?writeVarint64(n.fromNumber(i),e,s):writeVarint32(i,e,s);return this._delim(o,s-o-1)},Writer.prototype.sint32s=function(t){var r=t.length;this._reserve(5*r+5);for(var i=this.buf,e=this.pos,o=e+1,n=0;n<r;++n)o=writeVarint32((t[n]<<1^t[n]>>31)>>>0,i,o);return this._delim(e,o-e-1)},Writer.prototype.uint64s=function(t){var r=t.length;this._reserve(10*r+5);for(var i=this.buf,e=this.pos,o=e+1,s=0;s<r;++s)o=writeVarint64(n.from(t[s]),i,o);return this._delim(e,o-e-1)},Writer.prototype.int64s=Writer.prototype.uint64s,Writer.prototype.sint64s=function(t){var r=t.length;this._reserve(10*r+5);for(var i=this.buf,e=this.pos,o=e+1,s=0;s<r;++s)o=writeVarint64(n.from(t[s]).zzEncode(),i,o);return this._delim(e,o-e-1)},Writer.prototype.bools=function(t){var r=t.length;this.uint32(r),this._reserve(r);for(var i=this.buf,e=this.pos,o=0;o<r;++o)i[e++]=+!!t[o];return this.pos+=r,this},Writer.prototype.fixed32s=function(t){var r=t.length,i=4*r;this.uint32(i),this._reserve(i);var e,o=this.pos,n=getLazyView(this,r,128);if(n)for(e=0;e<r;++e)n.setUint32(o,t[e]>>>0,!0),o+=4;else{var s=this.buf;for(e=0;e<r;++e)writeFixed32(t[e]>>>0,s,o),o+=4}return this.pos+=i,this},Writer.prototype.sfixed32s=Writer.prototype.fixed32s,Writer.prototype.fixed64s=function(t){var r=t.length,i=8*r;this.uint32(i),this._reserve(i);var e,o,s=this.pos,u=getLazyView(this,r,128);if(u)for(e=0;e<r;++e)o=n.from(t[e]),u.setUint32(s,o.lo,!0),u.setUint32(s+4,o.hi,!0),s+=8;else{var h=this.buf;for(e=0;e<r;++e)writeFixed32((o=n.from(t[e])).lo,h,s),writeFixed32(o.hi,h,s+4),s+=8}return this.pos+=i,this},Writer.prototype.sfixed64s=Writer.prototype.fixed64s,Writer.prototype.floats=function(t){var r=t.length,i=4*r;this.uint32(i),this._reserve(i);var e,n=this.pos,s=getLazyView(this,r,16);if(s)for(e=0;e<r;++e)s.setFloat32(n,t[e],!0),n+=4;else{var u=this.buf;for(e=0;e<r;++e)o.float.writeFloatLE(t[e],u,n),n+=4}return this.pos+=i,this},Writer.prototype.doubles=function(t){var r=t.length,i=8*r;this.uint32(i),this._reserve(i);var e,n=this.pos,s=getLazyView(this,r,16);if(s)for(e=0;e<r;++e)s.setFloat64(n,t[e],!0),n+=8;else{var u=this.buf;for(e=0;e<r;++e)o.float.writeDoubleLE(t[e],u,n),n+=8}return this.pos+=i,this},Writer.prototype.fork=function(){return this._reserve(1),(this.states||(this.states=[])).push(this.pos),this.pos+=1,this},Writer.prototype.reset=function(){var t=this.states;return t&&t.length?this.pos=t.pop():this.pos=0,this},Writer.prototype.ldelim=function(){var t,r,i=this.states;if(i&&i.length){var e=i.pop();(r=sizeVarint32(t=this.pos-e-1))>1?(this._reserve(r-1),this.buf.copyWithin(e+r,e+1,e+1+t),this.pos+=r-1,writeVarint32(t,this.buf,e)):this.buf[e]=t}else r=sizeVarint32(t=this.pos),this._reserve(r),this.buf.copyWithin(r,0,t),writeVarint32(t,this.buf,0),this.pos+=r;return this},Writer.prototype.finish=function(t){if(t)return this.buf.subarray(0,this.pos);var r=this.constructor.alloc(this.pos);return r.set(this.buf.subarray(0,this.pos),0),r},Writer.prototype.finishInto=function(t,r){return void 0===r&&(r=0),t.set(this.buf.subarray(0,this.pos),r),t},Writer._configure=function(t){e=t,Writer.create=create(),e._configure()}},"./protobufjs/src/writer_buffer.js"(t,r,i){"use strict";t.exports=BufferWriter;var e,o=i("./protobufjs/src/writer.js");BufferWriter.prototype=Object.create(o.prototype,{constructor:{value:BufferWriter,writable:!0,enumerable:!1,configurable:!0}});var n=i("./protobufjs/src/util/minimal.js");function BufferWriter(){o.call(this)}BufferWriter._configure=function(){BufferWriter.alloc=n.Buffer&&n.Buffer.allocUnsafe,e=n.Buffer&&n.Buffer.prototype.utf8Write?function(t,r,i){return r.utf8Write(t,i)}:function(t,r,i){return r.write(t,i)}},BufferWriter.prototype.bytes=function(t){n.isString(t)&&(t=n.Buffer.from(t,"base64"));var r=t.length>>>0;return this.uint32(r),r&&(this._reserve(r),this.buf.set(t,this.pos),this.pos+=r),this},BufferWriter.prototype.string=function(t){var r=t.length;if(!r)return this._reserve(1),this.buf[this.pos++]=0,this;if(r<128){this._reserve(3*r+5);var i=this.pos,o=this.buf;return this._delim(i,r<40?n.utf8.write(t,o,i+1):e(t,o,i+1))}var s=n.Buffer.byteLength(t);return this.uint32(s),this._reserve(s),e(t,this.buf,this.pos),this.pos+=s,this},BufferWriter._configure()}},r={};function __webpack_require__(i){var e=r[i];if(void 0!==e)return e.exports;var o=r[i]={exports:{}};return t[i].call(o.exports,o,o.exports,__webpack_require__),o.exports}var i=__webpack_require__("./protobufjs/minimal.js");module.exports=i})();
|
|
1
|
+
(()=>{var t={"./long/umd/index.js"(t,r){!function(i,e){function preferDefault(t){return t.default||t}"function"==typeof define&&define.amd?define([],function(){var t={};return e(t),preferDefault(t)}):(e(r),t.exports=preferDefault(r))}("u">typeof globalThis?globalThis:"u">typeof self&&self,function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=null;try{r=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function Long(t,r,i){this.low=0|t,this.high=0|r,this.unsigned=!!i}function isLong(t){return!0===(t&&t.__isLong__)}function ctz32(t){var r=Math.clz32(t&-t);return t?31-r:r}Long.prototype.__isLong__,Object.defineProperty(Long.prototype,"__isLong__",{value:!0}),Long.isLong=isLong;var i={},e={};function fromInt(t,r){var o,s,n;if(r)return(t>>>=0,(n=0<=t&&t<256)&&(s=e[t]))?s:(o=fromBits(t,0,!0),n&&(e[t]=o),o);return(t|=0,(n=-128<=t&&t<128)&&(s=i[t]))?s:(o=fromBits(t,t<0?-1:0,!1),n&&(i[t]=o),o)}function fromNumber(t,r){if(isNaN(t))return r?a:f;if(r){if(t<0)return a;if(t>=n)return d}else{if(t<=-u)return v;if(t+1>=u)return g}return t<0?fromNumber(-t,r).neg():fromBits(t%s|0,t/s|0,r)}function fromBits(t,r,i){return new Long(t,r,i)}Long.fromInt=fromInt,Long.fromNumber=fromNumber,Long.fromBits=fromBits;var o=Math.pow;function fromString(t,r,i){if(0===t.length)throw Error("empty string");if("number"==typeof r?(i=r,r=!1):r=!!r,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return r?a:f;if((i=i||10)<2||36<i)throw RangeError("radix");if((e=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===e)return fromString(t.substring(1),r,i).neg();for(var e,s=fromNumber(o(i,8)),n=f,u=0;u<t.length;u+=8){var h=Math.min(8,t.length-u),l=parseInt(t.substring(u,u+h),i);if(h<8){var p=fromNumber(o(i,h));n=n.mul(p).add(fromNumber(l))}else n=(n=n.mul(s)).add(fromNumber(l))}return n.unsigned=r,n}function fromValue(t,r){return"number"==typeof t?fromNumber(t,r):"string"==typeof t?fromString(t,r):fromBits(t.low,t.high,"boolean"==typeof r?r:t.unsigned)}Long.fromString=fromString,Long.fromValue=fromValue;var s=0x100000000,n=0xffffffffffffffff,u=0x8000000000000000,h=fromInt(0x1000000),f=fromInt(0);Long.ZERO=f;var a=fromInt(0,!0);Long.UZERO=a;var l=fromInt(1);Long.ONE=l;var p=fromInt(1,!0);Long.UONE=p;var c=fromInt(-1);Long.NEG_ONE=c;var g=fromBits(-1,0x7fffffff,!1);Long.MAX_VALUE=g;var d=fromBits(-1,-1,!0);Long.MAX_UNSIGNED_VALUE=d;var v=fromBits(0,-0x80000000,!1);Long.MIN_VALUE=v;var b=Long.prototype;b.toInt=function(){return this.unsigned?this.low>>>0:this.low},b.toNumber=function(){return this.unsigned?(this.high>>>0)*s+(this.low>>>0):this.high*s+(this.low>>>0)},b.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(!this.eq(v))return"-"+this.neg().toString(t);else{var r=fromNumber(t),i=this.div(r),e=i.mul(r).sub(this);return i.toString(t)+e.toInt().toString(t)}for(var s=fromNumber(o(t,6),this.unsigned),n=this,u="";;){var h=n.div(s),f=(n.sub(h.mul(s)).toInt()>>>0).toString(t);if((n=h).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},b.getHighBits=function(){return this.high},b.getHighBitsUnsigned=function(){return this.high>>>0},b.getLowBits=function(){return this.low},b.getLowBitsUnsigned=function(){return this.low>>>0},b.getNumBitsAbs=function(){if(this.isNegative())return this.eq(v)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,r=31;r>0&&(t&1<<r)==0;r--);return 0!=this.high?r+33:r+1},b.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&-1===t&&(0!==this.low||-2097152!==this.high)},b.isZero=function(){return 0===this.high&&0===this.low},b.eqz=b.isZero,b.isNegative=function(){return!this.unsigned&&this.high<0},b.isPositive=function(){return this.unsigned||this.high>=0},b.isOdd=function(){return(1&this.low)==1},b.isEven=function(){return(1&this.low)==0},b.equals=function(t){return isLong(t)||(t=fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},b.eq=b.equals,b.notEquals=function(t){return!this.eq(t)},b.neq=b.notEquals,b.ne=b.notEquals,b.lessThan=function(t){return 0>this.comp(t)},b.lt=b.lessThan,b.lessThanOrEqual=function(t){return 0>=this.comp(t)},b.lte=b.lessThanOrEqual,b.le=b.lessThanOrEqual,b.greaterThan=function(t){return this.comp(t)>0},b.gt=b.greaterThan,b.greaterThanOrEqual=function(t){return this.comp(t)>=0},b.gte=b.greaterThanOrEqual,b.ge=b.greaterThanOrEqual,b.compare=function(t){if(isLong(t)||(t=fromValue(t)),this.eq(t))return 0;var r=this.isNegative(),i=t.isNegative();return r&&!i?-1:!r&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},b.comp=b.compare,b.negate=function(){return!this.unsigned&&this.eq(v)?v:this.not().add(l)},b.neg=b.negate,b.add=function(t){isLong(t)||(t=fromValue(t));var r,i,e=this.high>>>16,o=65535&this.high,s=this.low>>>16,n=65535&this.low,u=t.high>>>16,h=65535&t.high,f=t.low>>>16,a=65535&t.low,l=0,p=0;return r=0+((i=0+(n+a))>>>16),i&=65535,r+=s+f,p+=r>>>16,r&=65535,p+=o+h,l+=p>>>16,p&=65535,l+=e+u,fromBits(r<<16|i,(l&=65535)<<16|p,this.unsigned)},b.subtract=function(t){return isLong(t)||(t=fromValue(t)),this.add(t.neg())},b.sub=b.subtract,b.multiply=function(t){if(this.isZero())return this;if(isLong(t)||(t=fromValue(t)),r)return fromBits(r.mul(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned);if(t.isZero())return this.unsigned?a:f;if(this.eq(v))return t.isOdd()?v:f;if(t.eq(v))return this.isOdd()?v:f;if(this.isNegative())if(t.isNegative())return this.neg().mul(t.neg());else return this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(h)&&t.lt(h))return fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var i,e,o=this.high>>>16,s=65535&this.high,n=this.low>>>16,u=65535&this.low,l=t.high>>>16,p=65535&t.high,c=t.low>>>16,g=65535&t.low,d=0,b=0;return i=0+((e=0+u*g)>>>16),e&=65535,i+=n*g,b+=i>>>16,i&=65535,i+=u*c,b+=i>>>16,i&=65535,b+=s*g,d+=b>>>16,b&=65535,b+=n*c,d+=b>>>16,b&=65535,b+=u*p,d+=b>>>16,b&=65535,d+=o*g+s*c+n*p+u*l,fromBits(i<<16|e,(d&=65535)<<16|b,this.unsigned)},b.mul=b.multiply,b.divide=function(t){if(isLong(t)||(t=fromValue(t)),t.isZero())throw Error("division by zero");if(r){var i,e,s;return this.unsigned||-0x80000000!==this.high||-1!==t.low||-1!==t.high?fromBits((this.unsigned?r.div_u:r.div_s)(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned):this}if(this.isZero())return this.unsigned?a:f;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return a;if(t.gt(this.shru(1)))return p;s=a}else{if(this.eq(v))if(t.eq(l)||t.eq(c))return v;else return t.eq(v)?l:(i=this.shr(1).div(t).shl(1)).eq(f)?t.isNegative()?l:c:(e=this.sub(t.mul(i)),s=i.add(e.div(t)));if(t.eq(v))return this.unsigned?a:f;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=f}for(e=this;e.gte(t);){for(var n=Math.ceil(Math.log(i=Math.max(1,Math.floor(e.toNumber()/t.toNumber())))/Math.LN2),u=n<=48?1:o(2,n-48),h=fromNumber(i),g=h.mul(t);g.isNegative()||g.gt(e);)i-=u,g=(h=fromNumber(i,this.unsigned)).mul(t);h.isZero()&&(h=l),s=s.add(h),e=e.sub(g)}return s},b.div=b.divide,b.modulo=function(t){return(isLong(t)||(t=fromValue(t)),r)?fromBits((this.unsigned?r.rem_u:r.rem_s)(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},b.mod=b.modulo,b.rem=b.modulo,b.not=function(){return fromBits(~this.low,~this.high,this.unsigned)},b.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},b.clz=b.countLeadingZeros,b.countTrailingZeros=function(){return this.low?ctz32(this.low):ctz32(this.high)+32},b.ctz=b.countTrailingZeros,b.and=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low&t.low,this.high&t.high,this.unsigned)},b.or=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low|t.low,this.high|t.high,this.unsigned)},b.xor=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low^t.low,this.high^t.high,this.unsigned)},b.shiftLeft=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):fromBits(0,this.low<<t-32,this.unsigned)},b.shl=b.shiftLeft,b.shiftRight=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},b.shr=b.shiftRight,b.shiftRightUnsigned=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):32===t?fromBits(this.high,0,this.unsigned):fromBits(this.high>>>t-32,0,this.unsigned)},b.shru=b.shiftRightUnsigned,b.shr_u=b.shiftRightUnsigned,b.rotateLeft=function(t){var r;return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:32===t?fromBits(this.high,this.low,this.unsigned):t<32?(r=32-t,fromBits(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,fromBits(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))},b.rotl=b.rotateLeft,b.rotateRight=function(t){var r;return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:32===t?fromBits(this.high,this.low,this.unsigned):t<32?(r=32-t,fromBits(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,fromBits(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))},b.rotr=b.rotateRight,b.toSigned=function(){return this.unsigned?fromBits(this.low,this.high,!1):this},b.toUnsigned=function(){return this.unsigned?this:fromBits(this.low,this.high,!0)},b.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},b.toBytesLE=function(){var t=this.high,r=this.low;return[255&r,r>>>8&255,r>>>16&255,r>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},b.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,r>>>24,r>>>16&255,r>>>8&255,255&r]},Long.fromBytes=function(t,r,i){return i?Long.fromBytesLE(t,r):Long.fromBytesBE(t,r)},Long.fromBytesLE=function(t,r){return new Long(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)},Long.fromBytesBE=function(t,r){return new Long(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)},"function"==typeof BigInt&&(Long.fromBigInt=function(t,r){return fromBits(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),r)},Long.fromValue=function(t,r){return"bigint"==typeof t?Long.fromBigInt(t,r):fromValue(t,r)},b.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t}),t.default=Long})},"./protobufjs/minimal.js"(t,r,i){"use strict";t.exports=i("./protobufjs/src/index-minimal.js")},"./protobufjs/src/index-minimal.js"(t,r,i){"use strict";function configure(){r.util.LongBits._configure(r.util.Long),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=i("./protobufjs/src/writer.js"),r.BufferWriter=i("./protobufjs/src/writer_buffer.js"),r.Reader=i("./protobufjs/src/reader.js"),r.BufferReader=i("./protobufjs/src/reader_buffer.js"),r.util=i("./protobufjs/src/util/minimal.js"),r.rpc=i("./protobufjs/src/rpc.js"),r.roots=i("./protobufjs/src/roots.js"),r.configure=configure,configure()},"./protobufjs/src/reader.js"(t,r,i){"use strict";t.exports=Reader;var e,o=i("./protobufjs/src/util/minimal.js"),s=o.LongBits,n=o.utf8;function indexOutOfRange(t,r){return RangeError("index out of range: "+t.pos+" + "+(r||1)+" > "+t.len)}function Reader(t){this.buf=t,this.pos=0,this.len=t.length,this.view=null,this.discardUnknown=Reader.discardUnknown}function create_array(t){if(Array.isArray(t)&&(t=new Uint8Array(t)),t instanceof Uint8Array)return new Reader(t);throw Error("illegal buffer")}var create=function(){return o.Buffer?function(t){return(Reader.create=function(t){return o.Buffer.isBuffer(t)?new e(t):create_array(t)})(t)}:create_array};function readLongVarint(){var t=new s(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;r=0}else{for(;r<4&&!(this.pos>=this.len);++r)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>0,this.buf[this.pos++]<128)return t;throw indexOutOfRange(this)}if(this.len-this.pos>4){for(;r<5;++r)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}else for(;r<5;++r){if(this.pos>=this.len)throw indexOutOfRange(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function readFixed32_end(t,r){return(t[r-4]|t[r-3]<<8|t[r-2]<<16|t[r-1]<<24)>>>0}function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new s(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}function getLazyView(t,r,i){var e=t.view;if(e||r<i)return e;var o=t.buf;return t.view=new DataView(o.buffer,o.byteOffset,o.byteLength)}Reader.create=create(),Reader.prototype.raw=function(t,r){return this.buf.subarray(t,r)},Reader.prototype.uint32=function(){var t=this.buf,r=this.pos,i=(127&t[r])>>>0;if(t[r++]<128||(i=(i|(127&t[r])<<7)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<14)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<21)>>>0,t[r++]<128)||(i=(i|(15&t[r])<<28)>>>0,t[r++]<128))return this.pos=r,i;for(var e=0;e<5;++e){if(r>=this.len)throw this.pos=r,indexOutOfRange(this);if(t[r++]<128)return this.pos=r,i}throw this.pos=r,Error("invalid varint encoding")},Reader.prototype.tag=function(){var t=this.buf,r=this.pos,i=(127&t[r])>>>0;if(t[r++]<128||(i=(i|(127&t[r])<<7)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<14)>>>0,t[r++]<128)||(i=(i|(127&t[r])<<21)>>>0,t[r++]<128))return this.pos=r,i;if(i=(i|(15&t[r])<<28)>>>0,t[r]<128&&(112&t[r])==0)return this.pos=r+1,i;throw this.pos=r+1,Error("invalid tag encoding")},Reader.prototype.int32=function(){return 0|this.uint32()},Reader.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)},Reader.prototype.bool=function(){for(var t,r=!1,i=0;i<10;++i){if(this.pos>=this.len)throw indexOutOfRange(this);if(127&(t=this.buf[this.pos++])&&(r=!0),t<128)return r}throw Error("invalid varint encoding")},Reader.prototype.fixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)},Reader.prototype.sfixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return 0|readFixed32_end(this.buf,this.pos+=4)},Reader.prototype.float=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);var t=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},Reader.prototype.double=function(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);var t=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},Reader.prototype.uint32s=function(t){void 0===t&&(t=[]);for(var r,i=this.uint32()+this.pos,e=this.buf,o=this.pos;o<i;)(r=e[o++])<128?t.push(r):(this.pos=o-1,t.push(this.uint32()),o=this.pos);return this.pos=o,t},Reader.prototype.int32s=function(t){void 0===t&&(t=[]);for(var r,i=this.uint32()+this.pos,e=this.buf,o=this.pos;o<i;)(r=e[o++])<128?t.push(r):(this.pos=o-1,t.push(this.int32()),o=this.pos);return this.pos=o,t},Reader.prototype.sint32s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.sint32());return t},Reader.prototype.bools=function(t){void 0===t&&(t=[]);for(var r,i=this.uint32()+this.pos,e=this.buf,o=this.pos;o<i;)(r=e[o++])<128?t.push(0!==r):(this.pos=o-1,t.push(this.bool()),o=this.pos);return this.pos=o,t},Reader.prototype.fixed32s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>2,o=t.length,s=this.pos;t.length=o+e;var n=getLazyView(this,e,128);if(n)for(var u=0;u<e;++u,s+=4)t[o++]=n.getUint32(s,!0);else for(var h=this.buf,f=0;f<e;++f,s+=4)t[o++]=readFixed32_end(h,s+4);if(this.pos=s,s!==i)throw indexOutOfRange(this,4);return t},Reader.prototype.sfixed32s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>2,o=t.length,s=this.pos;t.length=o+e;var n=getLazyView(this,e,128);if(n)for(var u=0;u<e;++u,s+=4)t[o++]=n.getInt32(s,!0);else for(var h=this.buf,f=0;f<e;++f,s+=4)t[o++]=0|readFixed32_end(h,s+4);if(this.pos=s,s!==i)throw indexOutOfRange(this,4);return t},Reader.prototype.floats=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>2,s=t.length,n=this.pos;t.length=s+e;var u=getLazyView(this,e,8);if(u)for(var h=0;h<e;++h,n+=4)t[s++]=u.getFloat32(n,!0);else for(var f=this.buf,a=0;a<e;++a,n+=4)t[s++]=o.float.readFloatLE(f,n);if(this.pos=n,n!==i)throw indexOutOfRange(this,4);return t},Reader.prototype.doubles=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r;if(i>this.len)throw indexOutOfRange(this,r);var e=r>>>3,s=t.length,n=this.pos;t.length=s+e;var u=getLazyView(this,e,8);if(u)for(var h=0;h<e;++h,n+=8)t[s++]=u.getFloat64(n,!0);else for(var f=this.buf,a=0;a<e;++a,n+=8)t[s++]=o.float.readDoubleLE(f,n);if(this.pos=n,n!==i)throw indexOutOfRange(this,8);return t},Reader.prototype.uint64s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.uint64());return t},Reader.prototype.int64s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.int64());return t},Reader.prototype.sint64s=function(t){void 0===t&&(t=[]);for(var r=this.uint32()+this.pos;this.pos<r;)t.push(this.sint64());return t},Reader.prototype.fixed64s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r,e=t.length;if(i>this.len)throw indexOutOfRange(this,r);var o=r>>>3;t.length=e+o;for(var s=0;s<o;++s)t[e++]=this.fixed64();if(this.pos!==i)throw indexOutOfRange(this,8);return t},Reader.prototype.sfixed64s=function(t){void 0===t&&(t=[]);var r=this.uint32(),i=this.pos+r,e=t.length;if(i>this.len)throw indexOutOfRange(this,r);var o=r>>>3;t.length=e+o;for(var s=0;s<o;++s)t[e++]=this.sfixed64();if(this.pos!==i)throw indexOutOfRange(this,8);return t},Reader.prototype.bytes=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);return this.pos=i,this.raw(r,i)},Reader.prototype.string=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);return this.pos=i,n.read(this.buf,r,i)},Reader.prototype.stringVerify=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw indexOutOfRange(this,t);return this.pos=i,n.readStrict(this.buf,r,i)},Reader.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw indexOutOfRange(this,t);this.pos+=t}else do if(this.pos>=this.len)throw indexOutOfRange(this);while(128&this.buf[this.pos++]);return this},Reader.recursionLimit=o.recursionLimit,Reader.discardUnknown=!0,Reader.prototype.skipType=function(t,r,i){if(void 0===r&&(r=0),r>Reader.recursionLimit)throw Error("max depth exceeded");if(0===i)throw Error("illegal tag: field number 0");switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var e=this.tag(),o=e>>>3;if(t=7&e,!o)throw Error("illegal tag: field number 0");if(4===t){if(void 0!==i&&o!==i)throw Error("invalid end group tag");break}this.skipType(t,r+1,o)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},Reader._configure=function(t){e=t,Reader.create=create(),e._configure();var r=o.Long?"toLong":"toNumber";o.merge(Reader.prototype,{int64:function(){return readLongVarint.call(this)[r](!1)},uint64:function(){return readLongVarint.call(this)[r](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[r](!1)},fixed64:function(){return readFixed64.call(this)[r](!0)},sfixed64:function(){return readFixed64.call(this)[r](!1)}})}},"./protobufjs/src/reader_buffer.js"(t,r,i){"use strict";t.exports=BufferReader;var e=i("./protobufjs/src/reader.js");BufferReader.prototype=Object.create(e.prototype,{constructor:{value:BufferReader,writable:!0,enumerable:!1,configurable:!0}});var o=i("./protobufjs/src/util/minimal.js");function BufferReader(t){e.call(this,t)}BufferReader._configure=function(){o.Buffer&&(BufferReader.prototype._slice=o.Buffer.prototype.slice)},BufferReader.prototype.raw=function(t,r){return this._slice.call(this.buf,t,r)},BufferReader.prototype.string=function(){var t=this.uint32(),r=this.pos,i=this.pos+t;if(i>this.len)throw RangeError("index out of range: "+this.pos+" + "+t+" > "+this.len);return this.pos=i,this.buf.utf8Slice?this.buf.utf8Slice(r,i):this.buf.toString("utf-8",r,i)},BufferReader._configure()},"./protobufjs/src/roots.js"(t){"use strict";t.exports=Object.create(null)},"./protobufjs/src/rpc.js"(t,r,i){"use strict";r.Service=i("./protobufjs/src/rpc/service.js")},"./protobufjs/src/rpc/service.js"(t,r,i){"use strict";t.exports=Service;var e=i("./protobufjs/src/util/minimal.js");function Service(t,r,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!r,this.responseDelimited=!!i}Service.prototype=Object.create(e.EventEmitter.prototype,{constructor:{value:Service,writable:!0,enumerable:!1,configurable:!0}}),Service.prototype.rpcCall=function rpcCall(t,r,i,o,s){if(!o)throw TypeError("request must be specified");var n=this;if(!s)return e.asPromise(rpcCall,n,t,r,i,o);if(!n.rpcImpl)return void setTimeout(function(){s(Error("already ended"))},0);try{return n.rpcImpl(t,r[n.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(r,e){if(r)return n.emit("error",r,t),s(r);if(null===e)return void n.end(!0);if(!(e instanceof i))try{e=i[n.responseDelimited?"decodeDelimited":"decode"](e)}catch(r){return n.emit("error",r,t),s(r)}return n.emit("data",e,t),s(null,e)})}catch(r){n.emit("error",r,t),setTimeout(function(){s(r)},0);return}},Service.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},"./protobufjs/src/util/aspromise.js"(t){"use strict";t.exports=function asPromise(t,r){for(var i=Array(arguments.length-1),e=0,o=2,s=!0;o<arguments.length;)i[e++]=arguments[o++];return new Promise(function(o,n){i[e]=function(t){if(s)if(s=!1,t)n(t);else{for(var r=Array(arguments.length-1),i=0;i<r.length;)r[i++]=arguments[i];o.apply(null,r)}};try{t.apply(r||null,i)}catch(t){s&&(s=!1,n(t))}})}},"./protobufjs/src/util/base64.js"(t,r){"use strict";r.length=function(t){var r=t.length;if(!r)return 0;for(;r>0&&"="===t.charAt(r-1);)--r;return Math.floor(3*r/4)};for(var i=Array(64),e=Array(123),o=0;o<64;)e[i[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;e[45]=62,e[95]=63,r.encode=function(t,r,e){for(var o,s=null,n=[],u=0,h=0;r<e;){var f=t[r++];switch(h){case 0:n[u++]=i[f>>2],o=(3&f)<<4,h=1;break;case 1:n[u++]=i[o|f>>4],o=(15&f)<<2,h=2;break;case 2:n[u++]=i[o|f>>6],n[u++]=i[63&f],h=0}u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,n)),u=0)}return(h&&(n[u++]=i[o],n[u++]=61,1===h&&(n[u++]=61)),s)?(u&&s.push(String.fromCharCode.apply(String,n.slice(0,u))),s.join("")):String.fromCharCode.apply(String,n.slice(0,u))};var s="invalid encoding";r.decode=function(t,r,i){for(var o,n=i,u=0,h=0;h<t.length;){var f=t.charCodeAt(h++);if(61===f&&u>1)break;if(void 0===(f=e[f]))throw Error(s);switch(u){case 0:o=f,u=1;break;case 1:r[i++]=o<<2|(48&f)>>4,o=f,u=2;break;case 2:r[i++]=(15&o)<<4|(60&f)>>2,o=f,u=3;break;case 3:r[i++]=(3&o)<<6|f,u=0}}if(1===u)throw Error(s);return i-n};var n=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,u=/[-_]/,h=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;r.test=function(t){return n.test(t)||u.test(t)&&h.test(t)}},"./protobufjs/src/util/eventemitter.js"(t){"use strict";function EventEmitter(){this._listeners=Object.create(null)}t.exports=EventEmitter,EventEmitter.prototype.on=function(t,r,i){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:r,ctx:i||this}),this},EventEmitter.prototype.off=function(t,r){if(void 0===t)this._listeners=Object.create(null);else if(void 0===r)this._listeners[t]=[];else{var i=this._listeners[t];if(!i)return this;for(var e=0;e<i.length;)i[e].fn===r?i.splice(e,1):++e}return this},EventEmitter.prototype.emit=function(t){var r=this._listeners[t];if(r){for(var i=[],e=1;e<arguments.length;)i.push(arguments[e++]);for(e=0;e<r.length;)r[e].fn.apply(r[e++].ctx,i)}return this}},"./protobufjs/src/util/float.js"(t){"use strict";function factory(t){if("u">typeof Float32Array)!function(){var r=new Float32Array([-0]),i=new Uint8Array(r.buffer),e=128===i[3];function writeFloat_f32_cpy(t,e,o){r[0]=t,e[o]=i[0],e[o+1]=i[1],e[o+2]=i[2],e[o+3]=i[3]}function writeFloat_f32_rev(t,e,o){r[0]=t,e[o]=i[3],e[o+1]=i[2],e[o+2]=i[1],e[o+3]=i[0]}function readFloat_f32_cpy(t,e){return i[0]=t[e],i[1]=t[e+1],i[2]=t[e+2],i[3]=t[e+3],r[0]}function readFloat_f32_rev(t,e){return i[3]=t[e],i[2]=t[e+1],i[1]=t[e+2],i[0]=t[e+3],r[0]}t.writeFloatLE=e?writeFloat_f32_cpy:writeFloat_f32_rev,t.writeFloatBE=e?writeFloat_f32_rev:writeFloat_f32_cpy,t.readFloatLE=e?readFloat_f32_cpy:readFloat_f32_rev,t.readFloatBE=e?readFloat_f32_rev:readFloat_f32_cpy}();else{function writeFloat_ieee754(t,r,i,e){var o=+(r<0);if(o&&(r=-r),0===r)t(1/r>0?0:0x80000000,i,e);else if(isNaN(r))t(0x7fc00000,i,e);else if(r>34028234663852886e22)t((o<<31|0x7f800000)>>>0,i,e);else if(r<11754943508222875e-54)t((o<<31|Math.round(r/1401298464324817e-60))>>>0,i,e);else{var s=Math.floor(Math.log(r)/Math.LN2),n=8388607&Math.round(r*Math.pow(2,-s)*8388608);t((o<<31|s+127<<23|n)>>>0,i,e)}}function readFloat_ieee754(t,r,i){var e=t(r,i),o=(e>>31)*2+1,s=e>>>23&255,n=8388607&e;return 255===s?n?NaN:1/0*o:0===s?1401298464324817e-60*o*n:o*Math.pow(2,s-150)*(n+8388608)}t.writeFloatLE=writeFloat_ieee754.bind(null,writeUintLE),t.writeFloatBE=writeFloat_ieee754.bind(null,writeUintBE),t.readFloatLE=readFloat_ieee754.bind(null,readUintLE),t.readFloatBE=readFloat_ieee754.bind(null,readUintBE)}if("u">typeof Float64Array)!function(){var r=new Float64Array([-0]),i=new Uint8Array(r.buffer),e=128===i[7];function writeDouble_f64_cpy(t,e,o){r[0]=t,e[o]=i[0],e[o+1]=i[1],e[o+2]=i[2],e[o+3]=i[3],e[o+4]=i[4],e[o+5]=i[5],e[o+6]=i[6],e[o+7]=i[7]}function writeDouble_f64_rev(t,e,o){r[0]=t,e[o]=i[7],e[o+1]=i[6],e[o+2]=i[5],e[o+3]=i[4],e[o+4]=i[3],e[o+5]=i[2],e[o+6]=i[1],e[o+7]=i[0]}function readDouble_f64_cpy(t,e){return i[0]=t[e],i[1]=t[e+1],i[2]=t[e+2],i[3]=t[e+3],i[4]=t[e+4],i[5]=t[e+5],i[6]=t[e+6],i[7]=t[e+7],r[0]}function readDouble_f64_rev(t,e){return i[7]=t[e],i[6]=t[e+1],i[5]=t[e+2],i[4]=t[e+3],i[3]=t[e+4],i[2]=t[e+5],i[1]=t[e+6],i[0]=t[e+7],r[0]}t.writeDoubleLE=e?writeDouble_f64_cpy:writeDouble_f64_rev,t.writeDoubleBE=e?writeDouble_f64_rev:writeDouble_f64_cpy,t.readDoubleLE=e?readDouble_f64_cpy:readDouble_f64_rev,t.readDoubleBE=e?readDouble_f64_rev:readDouble_f64_cpy}();else{function writeDouble_ieee754(t,r,i,e,o,s){var n,u=+(e<0);if(u&&(e=-e),0===e)t(0,o,s+r),t(1/e>0?0:0x80000000,o,s+i);else if(isNaN(e))t(0,o,s+r),t(0x7ff80000,o,s+i);else if(e>17976931348623157e292)t(0,o,s+r),t((u<<31|0x7ff00000)>>>0,o,s+i);else if(e<22250738585072014e-324)t((n=e/5e-324)>>>0,o,s+r),t((u<<31|n/0x100000000)>>>0,o,s+i);else{var h=Math.floor(Math.log(e)/Math.LN2);1024===h&&(h=1023),t(0x10000000000000*(n=e*Math.pow(2,-h))>>>0,o,s+r),t((u<<31|h+1023<<20|1048576*n&1048575)>>>0,o,s+i)}}function readDouble_ieee754(t,r,i,e,o){var s=t(e,o+r),n=t(e,o+i),u=(n>>31)*2+1,h=n>>>20&2047,f=0x100000000*(1048575&n)+s;return 2047===h?f?NaN:1/0*u:0===h?5e-324*u*f:u*Math.pow(2,h-1075)*(f+0x10000000000000)}t.writeDoubleLE=writeDouble_ieee754.bind(null,writeUintLE,0,4),t.writeDoubleBE=writeDouble_ieee754.bind(null,writeUintBE,4,0),t.readDoubleLE=readDouble_ieee754.bind(null,readUintLE,0,4),t.readDoubleBE=readDouble_ieee754.bind(null,readUintBE,4,0)}return t}function writeUintLE(t,r,i){r[i]=255&t,r[i+1]=t>>>8&255,r[i+2]=t>>>16&255,r[i+3]=t>>>24}function writeUintBE(t,r,i){r[i]=t>>>24,r[i+1]=t>>>16&255,r[i+2]=t>>>8&255,r[i+3]=255&t}function readUintLE(t,r){return(t[r]|t[r+1]<<8|t[r+2]<<16|t[r+3]<<24)>>>0}function readUintBE(t,r){return(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0}t.exports=factory(factory)},"./protobufjs/src/util/longbits.js"(t){"use strict";function LongBits(t,r){this.lo=t>>>0,this.hi=r>>>0}t.exports=LongBits;var r,i=LongBits.zero=new LongBits(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var e=LongBits.zeroHash="\0\0\0\0\0\0\0\0";LongBits.fromNumber=function(t){if(0===t)return i;var r=t<0;r&&(t=-t);var e=t>>>0,o=(t-e)/0x100000000>>>0;return r&&(o=~o>>>0,e=~e>>>0,++e>0xffffffff&&(e=0,++o>0xffffffff&&(o=0))),new LongBits(e,o)},LongBits.from=function(t){if("number"==typeof t)return LongBits.fromNumber(t);if("string"==typeof t||t instanceof String)if(!r)return LongBits.fromNumber(parseInt(t,10));else t=r.fromString(t);return t.low||t.high?new LongBits(t.low>>>0,t.high>>>0):i},LongBits.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var r=~this.lo+1>>>0,i=~this.hi>>>0;return r||(i=i+1>>>0),-(r+0x100000000*i)}return this.lo+0x100000000*this.hi},LongBits.prototype.toLong=function(t){return r?new r(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var o=String.prototype.charCodeAt;LongBits.fromHash=function(t){return t===e?i:new LongBits((o.call(t,0)|o.call(t,1)<<8|o.call(t,2)<<16|o.call(t,3)<<24)>>>0,(o.call(t,4)|o.call(t,5)<<8|o.call(t,6)<<16|o.call(t,7)<<24)>>>0)},LongBits.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},LongBits.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},LongBits.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},LongBits.prototype.length=function(){var t=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===r?t<16384?t<128?1:2:t<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:i<128?9:10},LongBits._configure=function(t){r=t}},"./protobufjs/src/util/minimal.js"(t,r,i){"use strict";function isUnsafeProperty(t){return"__proto__"===t||"prototype"===t||"constructor"===t}function merge(t){var r="boolean"==typeof arguments[arguments.length-1],i=r?arguments.length-1:arguments.length;r=r&&arguments[arguments.length-1];for(var e=1;e<i;++e){var o=arguments[e];if(o)for(var s=Object.keys(o),n=0;n<s.length;++n)isUnsafeProperty(s[n])||r&&Object.prototype.hasOwnProperty.call(t,s[n])&&void 0!==t[s[n]]||(t[s[n]]=o[s[n]])}return t}function newError(t){function CustomError(t,r){if(!(this instanceof CustomError))return new CustomError(t,r);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,CustomError):Object.defineProperty(this,"stack",{value:Error().stack||""}),r&&merge(this,r)}return CustomError.prototype=Object.create(Error.prototype,{constructor:{value:CustomError,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),CustomError}r.asPromise=i("./protobufjs/src/util/aspromise.js"),r.base64=i("./protobufjs/src/util/base64.js"),r.EventEmitter=i("./protobufjs/src/util/eventemitter.js"),r.float=i("./protobufjs/src/util/float.js"),r.utf8=i("./protobufjs/src/util/utf8.js"),r.pool=i("./protobufjs/src/util/pool.js"),r.LongBits=i("./protobufjs/src/util/longbits.js"),r.isUnsafeProperty=isUnsafeProperty,r.isNode=!!("u">typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),r.global=r.isNode&&global||"u">typeof window&&window||"u">typeof self&&self||"u">typeof globalThis&&globalThis||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,r){var i=t[r];return!!(null!=i&&Object.hasOwnProperty.call(t,r))&&("object"!=typeof i||(Array.isArray(i)?i.length:Object.keys(i).length)>0)},r.Buffer=function(){try{var t=r.global.Buffer;return t.prototype.utf8Write||r.isNode?t:null}catch(t){return null}}(),r.newBuffer=function(t){var i=r.Buffer;return"number"==typeof t?i?i.allocUnsafe(t):new Uint8Array(t):i?i.from(t):new Uint8Array(t)},r.rawField=function(t,i,e){var o=[],s=t<<3|i;for(s>>>=0;s>127;)o.push(127&s|128),s>>>=7;o.push(s);for(var n=0;n<e.length;++n)o.push(e[n]);return r.newBuffer(o)},r.Array=Uint8Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||function(){try{var t=i("./long/umd/index.js");return t&&t.isLong?t:null}catch(t){return null}}(),r.key2Re=/^(?:true|false|0|1)$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,i){var e=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(e.lo,e.hi,i):e.toNumber(!!i)},r.longFromKey=function(t,i){return r.key64Re.test(t)&&!r.key32Re.test(t)?r.longFromHash(t,i):t},r.boolFromKey=function(t){return"true"===t||"1"===t},r.merge=merge,r.nestingLimit=32,r.recursionLimit=100,r.makeProp=function(t,r,i){Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:void 0===i||i,configurable:!0,writable:!0})},r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=newError,r.ProtocolError=newError("ProtocolError"),r.oneOfGetter=function(t){for(var r={},i=0;i<t.length;++i)r[t[i]]=1;return function(){for(var t=Object.keys(this),i=t.length-1;i>-1;--i)if(1===r[t[i]]&&void 0!==this[t[i]]&&null!==this[t[i]])return t[i]}},r.oneOfSetter=function(t){return function(r){for(var i=0;i<t.length;++i)t[i]!==r&&delete this[t[i]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0}},"./protobufjs/src/util/pool.js"(t){"use strict";t.exports=function pool(t,r,i){var e=i||8192,o=e>>>1,s=null,n=e;return function(i){if(i<1||i>o)return t(i);n+i>e&&(s=t(e),n=0);var u=r.call(s,n,n+=i);return 7&n&&(n=(7|n)+1),u}}},"./protobufjs/src/util/utf8.js"(t,r){"use strict";var i,e=new TextDecoder("utf-8",{ignoreBOM:!0});try{i=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}catch(t){i=e}function utf8_read_decoder(t,r,i,e){var o=0===i&&e===r.length?r:r.subarray(i,e);return t.decode(o)}r.length=function(t){for(var r=0,i=0,e=0;e<t.length;++e)(i=t.charCodeAt(e))<128?r+=1:i<2048?r+=2:(64512&i)==55296&&(64512&t.charCodeAt(e+1))==56320?(++e,r+=4):r+=3;return r},r.read=function(t,r,i){if(i-r<1)return"";if(i-r>=64)return utf8_read_decoder(e,t,r,i);for(var o,s,n,u,h,f,a,l,p="",c=r;c+7<i;c+=8){if(o=t[c],s=t[c+1],n=t[c+2],u=t[c+3],h=t[c+4],f=t[c+5],(o|s|n|u|h|f|(a=t[c+6])|(l=t[c+7]))&128)return p+utf8_read_decoder(e,t,c,i);p+=String.fromCharCode(o,s,n,u,h,f,a,l)}for(;c<i;++c){if(128&(o=t[c]))return p+utf8_read_decoder(e,t,c,i);p+=String.fromCharCode(o)}return p},r.readStrict=function(t,r,e){if(e-r<1)return"";if(e-r>=64)return utf8_read_decoder(i,t,r,e);for(var o,s,n,u,h,f,a,l,p="",c=r;c+7<e;c+=8){if(o=t[c],s=t[c+1],n=t[c+2],u=t[c+3],h=t[c+4],f=t[c+5],(o|s|n|u|h|f|(a=t[c+6])|(l=t[c+7]))&128)return p+utf8_read_decoder(i,t,c,e);p+=String.fromCharCode(o,s,n,u,h,f,a,l)}for(;c<e;++c){if(128&(o=t[c]))return p+utf8_read_decoder(i,t,c,e);p+=String.fromCharCode(o)}return p},r.write=function(t,r,i){for(var e,o,s=i,n=0;n<t.length;++n)(e=t.charCodeAt(n))<128?r[i++]=e:(e<2048?r[i++]=e>>6|192:((64512&e)==55296&&(64512&(o=t.charCodeAt(n+1)))==56320?(e=65536+((1023&e)<<10)+(1023&o),++n,r[i++]=e>>18|240,r[i++]=e>>12&63|128):r[i++]=e>>12|224,r[i++]=e>>6&63|128),r[i++]=63&e|128);return i-s}},"./protobufjs/src/writer.js"(t,r,i){"use strict";t.exports=Writer;var e,o=i("./protobufjs/src/util/minimal.js"),s=o.LongBits,n=o.base64,u=o.utf8;function Writer(){this.pos=0,this.buf=this.constructor.alloc(Writer.initialBufferSize),this.view=null,this.states=null}Writer.initialBufferSize=128,Object.defineProperty(Writer.prototype,"len",{configurable:!0,enumerable:!0,get:function(){return this.pos}});var create=function(){return o.Buffer?function(){return(Writer.create=function(){return new e})()}:function(){return new Writer}};function sizeVarint32(t){return t<128?1:t<16384?2:t<2097152?3:t<0x10000000?4:5}function writeStringAscii(t,r,i){for(var e=0;e<t.length;)r[i++]=t.charCodeAt(e++)}function writeVarint32(t,r,i){for(;t>127;)r[i++]=127&t|128,t>>>=7;return r[i]=t,i+1}function writeVarint64(t,r,i){for(var e=t.lo,o=t.hi;o;)r[i++]=127&e|128,e=(e>>>7|o<<25)>>>0,o>>>=7;for(;e>127;)r[i++]=127&e|128,e>>>=7;return r[i]=e,i+1}function writeFixed32(t,r,i){r[i]=255&t,r[i+1]=t>>>8&255,r[i+2]=t>>>16&255,r[i+3]=t>>>24}function getLazyView(t,r,i){var e=t.view;if(e||r<i)return e;var o=t.buf;return t.view=new DataView(o.buffer,o.byteOffset,o.byteLength)}Writer.create=create(),Writer.alloc=function(t){return new Uint8Array(t)},Writer.alloc=o.pool(Writer.alloc,Uint8Array.prototype.subarray),Writer.prototype._reserve=function(t){var r=this.pos+t;if(r>this.buf.length){var i=this.buf.length<<1;i<r&&(i=r);var e=this.constructor.alloc(i);e.set(this.buf.subarray(0,this.pos),0),this.buf=e,this.view=null}},Writer.prototype.uint32=function(t){t>>>=0,this._reserve(5);var r=this.pos;return this.pos=writeVarint32(t,this.buf,r),this},Writer.prototype.int32=function(t){return(t|=0)<0?(this._reserve(10),writeVarint64(s.fromNumber(t),this.buf,this.pos),this.pos+=10,this):this.uint32(t)},Writer.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},Writer.prototype.uint64=function(t){var r=s.from(t);this._reserve(10);var i=this.pos;return this.pos=writeVarint64(r,this.buf,i),this},Writer.prototype.int64=Writer.prototype.uint64,Writer.prototype.sint64=function(t){var r=s.from(t).zzEncode();this._reserve(10);var i=this.pos;return this.pos=writeVarint64(r,this.buf,i),this},Writer.prototype.bool=function(t){return this._reserve(1),this.buf[this.pos++]=+!!t,this},Writer.prototype.fixed32=function(t){return this._reserve(4),writeFixed32(t>>>0,this.buf,this.pos),this.pos+=4,this},Writer.prototype.sfixed32=Writer.prototype.fixed32,Writer.prototype.fixed64=function(t){var r=s.from(t);return this._reserve(8),writeFixed32(r.lo,this.buf,this.pos),writeFixed32(r.hi,this.buf,this.pos+4),this.pos+=8,this},Writer.prototype.sfixed64=Writer.prototype.fixed64,Writer.prototype.float=function(t){return this._reserve(4),o.float.writeFloatLE(t,this.buf,this.pos),this.pos+=4,this},Writer.prototype.double=function(t){return this._reserve(8),o.float.writeDoubleLE(t,this.buf,this.pos),this.pos+=8,this},Writer.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this._reserve(1),this.buf[this.pos++]=0,this;if(o.isString(t)){var i=Writer.alloc(r=n.length(t));n.decode(t,i,0),t=i}return this.uint32(r),this._reserve(r),this.buf.set(t,this.pos),this.pos+=r,this},Writer.prototype.raw=function(t){var r=t.length>>>0;return r&&(this._reserve(r),this.buf.set(t,this.pos),this.pos+=r),this},Writer.prototype._delim=function(t,r){var i=sizeVarint32(r);return i>1&&this.buf.copyWithin(t+i,t+1,t+1+r),writeVarint32(r,this.buf,t),this.pos=t+i+r,this},Writer.prototype.string=function(t){var r=t.length;if(!r)return this._reserve(1),this.buf[this.pos++]=0,this;if(r<128){this._reserve(3*r+5);var i=this.pos;return this._delim(i,u.write(t,this.buf,i+1))}var e=u.length(t);return this.uint32(e),this._reserve(e),e===t.length?writeStringAscii(t,this.buf,this.pos):u.write(t,this.buf,this.pos),this.pos+=e,this},Writer.prototype.uint32s=function(t){var r=t.length;this._reserve(5*r+5);for(var i=this.buf,e=this.pos,o=e+1,s=0;s<r;++s)o=writeVarint32(t[s]>>>0,i,o);return this._delim(e,o-e-1)},Writer.prototype.int32s=function(t){var r=t.length;this._reserve(10*r+5);for(var i,e=this.buf,o=this.pos,n=o+1,u=0;u<r;++u)n=(i=0|t[u])<0?writeVarint64(s.fromNumber(i),e,n):writeVarint32(i,e,n);return this._delim(o,n-o-1)},Writer.prototype.sint32s=function(t){var r=t.length;this._reserve(5*r+5);for(var i=this.buf,e=this.pos,o=e+1,s=0;s<r;++s)o=writeVarint32((t[s]<<1^t[s]>>31)>>>0,i,o);return this._delim(e,o-e-1)},Writer.prototype.uint64s=function(t){var r=t.length;this._reserve(10*r+5);for(var i=this.buf,e=this.pos,o=e+1,n=0;n<r;++n)o=writeVarint64(s.from(t[n]),i,o);return this._delim(e,o-e-1)},Writer.prototype.int64s=Writer.prototype.uint64s,Writer.prototype.sint64s=function(t){var r=t.length;this._reserve(10*r+5);for(var i=this.buf,e=this.pos,o=e+1,n=0;n<r;++n)o=writeVarint64(s.from(t[n]).zzEncode(),i,o);return this._delim(e,o-e-1)},Writer.prototype.bools=function(t){var r=t.length;this.uint32(r),this._reserve(r);for(var i=this.buf,e=this.pos,o=0;o<r;++o)i[e++]=+!!t[o];return this.pos+=r,this},Writer.prototype.fixed32s=function(t){var r=t.length,i=4*r;this.uint32(i),this._reserve(i);var e,o=this.pos,s=getLazyView(this,r,128);if(s)for(e=0;e<r;++e)s.setUint32(o,t[e]>>>0,!0),o+=4;else{var n=this.buf;for(e=0;e<r;++e)writeFixed32(t[e]>>>0,n,o),o+=4}return this.pos+=i,this},Writer.prototype.sfixed32s=Writer.prototype.fixed32s,Writer.prototype.fixed64s=function(t){var r=t.length,i=8*r;this.uint32(i),this._reserve(i);var e,o,n=this.pos,u=getLazyView(this,r,128);if(u)for(e=0;e<r;++e)o=s.from(t[e]),u.setUint32(n,o.lo,!0),u.setUint32(n+4,o.hi,!0),n+=8;else{var h=this.buf;for(e=0;e<r;++e)writeFixed32((o=s.from(t[e])).lo,h,n),writeFixed32(o.hi,h,n+4),n+=8}return this.pos+=i,this},Writer.prototype.sfixed64s=Writer.prototype.fixed64s,Writer.prototype.floats=function(t){var r=t.length,i=4*r;this.uint32(i),this._reserve(i);var e,s=this.pos,n=getLazyView(this,r,16);if(n)for(e=0;e<r;++e)n.setFloat32(s,t[e],!0),s+=4;else{var u=this.buf;for(e=0;e<r;++e)o.float.writeFloatLE(t[e],u,s),s+=4}return this.pos+=i,this},Writer.prototype.doubles=function(t){var r=t.length,i=8*r;this.uint32(i),this._reserve(i);var e,s=this.pos,n=getLazyView(this,r,16);if(n)for(e=0;e<r;++e)n.setFloat64(s,t[e],!0),s+=8;else{var u=this.buf;for(e=0;e<r;++e)o.float.writeDoubleLE(t[e],u,s),s+=8}return this.pos+=i,this},Writer.prototype.fork=function(){return this._reserve(1),(this.states||(this.states=[])).push(this.pos),this.pos+=1,this},Writer.prototype.reset=function(){var t=this.states;return t&&t.length?this.pos=t.pop():this.pos=0,this},Writer.prototype.ldelim=function(){var t,r,i=this.states;if(i&&i.length){var e=i.pop();(r=sizeVarint32(t=this.pos-e-1))>1?(this._reserve(r-1),this.buf.copyWithin(e+r,e+1,e+1+t),this.pos+=r-1,writeVarint32(t,this.buf,e)):this.buf[e]=t}else r=sizeVarint32(t=this.pos),this._reserve(r),this.buf.copyWithin(r,0,t),writeVarint32(t,this.buf,0),this.pos+=r;return this},Writer.prototype.finish=function(t){if(t)return this.buf.subarray(0,this.pos);var r=this.constructor.alloc(this.pos);return r.set(this.buf.subarray(0,this.pos),0),r},Writer.prototype.finishInto=function(t,r){return void 0===r&&(r=0),t.set(this.buf.subarray(0,this.pos),r),t},Writer._configure=function(t){e=t,Writer.create=create(),e._configure()}},"./protobufjs/src/writer_buffer.js"(t,r,i){"use strict";t.exports=BufferWriter;var e,o=i("./protobufjs/src/writer.js");BufferWriter.prototype=Object.create(o.prototype,{constructor:{value:BufferWriter,writable:!0,enumerable:!1,configurable:!0}});var s=i("./protobufjs/src/util/minimal.js");function BufferWriter(){o.call(this)}BufferWriter._configure=function(){BufferWriter.alloc=s.Buffer&&s.Buffer.allocUnsafe,e=s.Buffer&&s.Buffer.prototype.utf8Write?function(t,r,i){return r.utf8Write(t,i)}:function(t,r,i){return r.write(t,i)}},BufferWriter.prototype.bytes=function(t){s.isString(t)&&(t=s.Buffer.from(t,"base64"));var r=t.length>>>0;return this.uint32(r),r&&(this._reserve(r),this.buf.set(t,this.pos),this.pos+=r),this},BufferWriter.prototype.string=function(t){var r=t.length;if(!r)return this._reserve(1),this.buf[this.pos++]=0,this;if(r<128){this._reserve(3*r+5);var i=this.pos,o=this.buf;return this._delim(i,r<40?s.utf8.write(t,o,i+1):e(t,o,i+1))}var n=s.Buffer.byteLength(t);return this.uint32(n),this._reserve(n),e(t,this.buf,this.pos),this.pos+=n,this},BufferWriter._configure()}},r={};function __webpack_require__(i){var e=r[i];if(void 0!==e)return e.exports;var o=r[i]={exports:{}};return t[i].call(o.exports,o,o.exports,__webpack_require__),o.exports}var i=__webpack_require__("./protobufjs/minimal.js");module.exports=i})();
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (C) 2016-2018 Rob Wu <rob@robwu.nl>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
9
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
10
|
+
so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var r={};r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),r.r=r=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var e={};r.r(e),r.d(e,{getProxyForUrl:()=>getProxyForUrl});var t={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function parseUrl(r){try{return new URL(r)}catch{return null}}function getProxyForUrl(r){var e=("string"==typeof r?parseUrl(r):r)||{},o=e.protocol,n=e.host,s=e.port;if("string"!=typeof n||!n||"string"!=typeof o||(o=o.split(":",1)[0],!shouldProxy(n=n.replace(/:\d*$/,""),s=parseInt(s)||t[o]||0)))return"";var p=getEnv(o+"_proxy")||getEnv("all_proxy");return p&&-1===p.indexOf("://")&&(p=o+"://"+p),p}function shouldProxy(r,e){var t=getEnv("no_proxy").toLowerCase();return!t||"*"!==t&&t.split(/[,\s]/).every(function(t){if(!t)return!0;var o=t.match(/^(.+):(\d+)$/),n=o?o[1]:t,s=o?parseInt(o[2]):0;return!!s&&s!==e||(/^[.*]/.test(n)?("*"===n.charAt(0)&&(n=n.slice(1)),!r.endsWith(n)):r!==n)})}function getEnv(r){return process.env[r.toLowerCase()]||process.env[r.toUpperCase()]||""}module.exports=e})();
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const path = require('node:path')
|
|
4
|
-
|
|
5
|
-
// Build-time half of the optional-peer mechanism shared by the webpack and esbuild plugins.
|
|
6
|
-
//
|
|
7
|
-
// Runtime files load an optional peer through a local `requireOptionalPeer('name')` wrapper.
|
|
8
|
-
// File tracers recognize its bound-require shape, while bundlers cannot follow the dynamic
|
|
9
|
-
// argument, so a build that does not opt into the feature never pulls in the peer's dependency
|
|
10
|
-
// chain (#8635). When the peer is installed at build time the user has opted in, so the plugins
|
|
11
|
-
// rewrite the call into a literal `require('name')` and let the bundler inline the peer, which
|
|
12
|
-
// keeps it working after the bundle is relocated without the peer on disk (#8980). Peers that
|
|
13
|
-
// are absent at build time stay opaque, so the rewrite is a no-op and the #8635 guarantee holds.
|
|
14
|
-
|
|
15
|
-
// Files that load an optional peer this way, as suffixes of the resolved module path. The same
|
|
16
|
-
// suffix matches the repo layout and `node_modules/dd-trace`. Add a file here to extend the
|
|
17
|
-
// mechanism to a new optional peer; no plugin change is needed.
|
|
18
|
-
const OPTIONAL_PEER_FILES = [
|
|
19
|
-
'packages/dd-trace/src/openfeature/require-provider.js',
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
// Captures the peer name from `requireOptionalPeer('name')` / `requireOptionalPeer("name")`.
|
|
23
|
-
const OPTIONAL_PEER_LOAD = /requireOptionalPeer\((['"])(.+?)\1\)/g
|
|
24
|
-
|
|
25
|
-
// esbuild's `onLoad` needs a path filter; match the basenames so the callback only fires for
|
|
26
|
-
// the candidate files, then `matchesOptionalPeerFile` confirms the full suffix on a normalized
|
|
27
|
-
// path (basenames carry no separators, so the filter is OS-agnostic).
|
|
28
|
-
const OPTIONAL_PEER_FILTER = new RegExp(
|
|
29
|
-
`(?:${OPTIONAL_PEER_FILES.map((file) => path.basename(file).replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`)).join('|')})$`
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @param {string} normalizedResource - Resolved module path with forward slashes
|
|
34
|
-
* @returns {boolean} Whether the module is one of the optional-peer loader files
|
|
35
|
-
*/
|
|
36
|
-
function matchesOptionalPeerFile (normalizedResource) {
|
|
37
|
-
return OPTIONAL_PEER_FILES.some((suffix) => normalizedResource.endsWith(suffix))
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Rewrites each `requireOptionalPeer('name')` whose peer resolves from `fromDir` into a literal
|
|
42
|
-
* `require('name')` so the bundler inlines it. Peers that do not resolve stay opaque, so a build
|
|
43
|
-
* without the peer keeps the #8635 guarantee.
|
|
44
|
-
*
|
|
45
|
-
* @param {string} source - Source of an optional-peer loader file
|
|
46
|
-
* @param {string} fromDir - Directory to resolve the optional peers from
|
|
47
|
-
* @returns {string} Source with installed optional peers turned into literal requires
|
|
48
|
-
*/
|
|
49
|
-
function rewriteOptionalPeerLoads (source, fromDir) {
|
|
50
|
-
return source.replaceAll(OPTIONAL_PEER_LOAD, (match, _quote, request) => {
|
|
51
|
-
try {
|
|
52
|
-
require.resolve(request, { paths: [fromDir] })
|
|
53
|
-
} catch {
|
|
54
|
-
return match
|
|
55
|
-
}
|
|
56
|
-
return `require('${request}')`
|
|
57
|
-
})
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
module.exports = {
|
|
61
|
-
OPTIONAL_PEER_FILES,
|
|
62
|
-
OPTIONAL_PEER_FILTER,
|
|
63
|
-
matchesOptionalPeerFile,
|
|
64
|
-
rewriteOptionalPeerLoads,
|
|
65
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { rewriteOptionalPeerLoads } = require('../../datadog-instrumentations/src/helpers/optional-peer-bundler')
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Webpack loader applied to the optional-peer loader files. Rewrites each
|
|
7
|
-
* `requireOptionalPeer('name')` whose peer is installed at build time into a literal
|
|
8
|
-
* `require('name')` so webpack bundles the peer (#8980). Peers that are absent stay opaque, so
|
|
9
|
-
* builds that do not opt into the feature keep the #8635 guarantee.
|
|
10
|
-
*
|
|
11
|
-
* @param {string} source
|
|
12
|
-
* @returns {string}
|
|
13
|
-
*/
|
|
14
|
-
module.exports = function optionalPeerLoader (source) {
|
|
15
|
-
this.cacheable(false)
|
|
16
|
-
return rewriteOptionalPeerLoads(source, this.context)
|
|
17
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @typedef {{ enable: (config: import('./config/config-base')) => void, disable: () => void }} FeatureModule
|
|
5
|
-
* @typedef {new (tracer: import('./tracer'), config: import('./config/config-base')) => object} FeatureProvider
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @typedef {object} Feature
|
|
10
|
-
* @property {string} name
|
|
11
|
-
* @property {object} noop
|
|
12
|
-
* @property {() => FeatureModule} factory
|
|
13
|
-
* @property {(config: import('./config/config-base')) => boolean} isEnabled
|
|
14
|
-
* @property {() => FeatureProvider} provider
|
|
15
|
-
* @property {(rc: import('./remote_config'), config: import('./config/config-base'),
|
|
16
|
-
* proxy: import('./proxy')) => void} [remoteConfig]
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/** @type {{ [name: string]: Feature }} */
|
|
20
|
-
const features = {}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @param {Feature} feature
|
|
24
|
-
*/
|
|
25
|
-
function registerFeature (feature) {
|
|
26
|
-
features[feature.name] = feature
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
module.exports = { features, registerFeature }
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { registerFeature } = require('../feature-registry')
|
|
4
|
-
|
|
5
|
-
const noop = new (require('./noop'))()
|
|
6
|
-
|
|
7
|
-
/** @typedef {import('../proxy') & { openfeature: object }} OpenFeatureProxy */
|
|
8
|
-
|
|
9
|
-
registerFeature({
|
|
10
|
-
name: 'openfeature',
|
|
11
|
-
noop,
|
|
12
|
-
factory: () => require('./index'),
|
|
13
|
-
provider: () => require('./flagging_provider'),
|
|
14
|
-
|
|
15
|
-
/** @param {import('../config/config-base')} config */
|
|
16
|
-
isEnabled (config) {
|
|
17
|
-
return config.featureFlags.DD_FEATURE_FLAGS_ENABLED
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @param {import('../remote_config')} rc - RemoteConfig instance
|
|
22
|
-
* @param {import('../config/config-base')} config
|
|
23
|
-
* @param {OpenFeatureProxy} proxy
|
|
24
|
-
*/
|
|
25
|
-
remoteConfig (rc, config, proxy) {
|
|
26
|
-
const openfeatureRemoteConfig = require('./remote_config')
|
|
27
|
-
const subscribe = config.featureFlags.DD_FEATURE_FLAGS_ENABLED &&
|
|
28
|
-
config.featureFlags.DD_FEATURE_FLAGS_CONFIGURATION_SOURCE === 'remote_config'
|
|
29
|
-
openfeatureRemoteConfig.enable(
|
|
30
|
-
rc,
|
|
31
|
-
() => proxy.openfeature,
|
|
32
|
-
subscribe
|
|
33
|
-
)
|
|
34
|
-
},
|
|
35
|
-
})
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
/** @type {(request: string) => typeof import('@datadog/openfeature-node-server')} */
|
|
4
|
-
let requireOptionalPeer
|
|
5
|
-
|
|
6
|
-
// @ts-expect-error webpack exposes this escape hatch as a free variable.
|
|
7
|
-
// eslint-disable-next-line camelcase
|
|
8
|
-
if (typeof __non_webpack_require__ === 'function') {
|
|
9
|
-
// eslint-disable-next-line camelcase, no-undef
|
|
10
|
-
requireOptionalPeer = __non_webpack_require__
|
|
11
|
-
} else {
|
|
12
|
-
// nft recognizes createRequire through a binding named `module`.
|
|
13
|
-
const module = require('node:module')
|
|
14
|
-
const runtimeRequire = module.createRequire(__filename)
|
|
15
|
-
requireOptionalPeer = runtimeRequire
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
module.exports = requireOptionalPeer('@datadog/openfeature-node-server')
|