@cline/core 0.0.95 → 0.2.0-nightly.1793312794
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/dist/ClineCore.d.ts +6 -1
- package/dist/account/rpc.d.ts +3 -1
- package/dist/account/types.d.ts +2 -0
- package/dist/artifacts/cloud/fetch.d.ts +8 -0
- package/dist/artifacts/cloud/publish.d.ts +6 -0
- package/dist/artifacts/publish.d.ts +30 -0
- package/dist/cline-core/runtime-services.d.ts +4 -2
- package/dist/cloud/computer-use-prompt.d.ts +9 -0
- package/dist/cloud/controller.d.ts +26 -4
- package/dist/cloud/hub-client.d.ts +53 -0
- package/dist/cloud/hub-protocol.d.ts +32 -0
- package/dist/cloud/index.d.ts +5 -0
- package/dist/cloud/index.js +34 -17
- package/dist/cloud/types.d.ts +4 -1
- package/dist/extensions/context/compaction-shared.d.ts +1 -0
- package/dist/extensions/context/compaction.d.ts +7 -0
- package/dist/extensions/context/summarize-conversation.d.ts +7 -0
- package/dist/extensions/context/summary-generation.d.ts +14 -0
- package/dist/extensions/mcp/apps.d.ts +16 -0
- package/dist/extensions/mcp/client.d.ts +1 -0
- package/dist/extensions/mcp/index.d.ts +5 -1
- package/dist/extensions/mcp/manager.d.ts +2 -1
- package/dist/extensions/mcp/session-apps.d.ts +28 -0
- package/dist/extensions/mcp/types.d.ts +22 -0
- package/dist/extensions/plugin/plugin-command-origin.d.ts +8 -0
- package/dist/extensions/plugin/plugin-registry.d.ts +1 -0
- package/dist/extensions/plugin/plugin-runtime.d.ts +7 -0
- package/dist/hub/client/index.d.ts +6 -0
- package/dist/hub/client/managed-hub-build-watcher.d.ts +2 -0
- package/dist/hub/client/plugin-commands.d.ts +4 -0
- package/dist/hub/client/session-client.d.ts +2 -0
- package/dist/hub/daemon/entry.js +248 -229
- package/dist/hub/daemon/index.d.ts +2 -0
- package/dist/hub/index.d.ts +1 -0
- package/dist/hub/index.js +238 -219
- package/dist/hub/runtime-host/hub-runtime-host.d.ts +6 -0
- package/dist/hub/server/cloud-session-service.d.ts +52 -0
- package/dist/hub/server/handlers/capability-handlers.d.ts +18 -1
- package/dist/hub/server/handlers/context.d.ts +13 -2
- package/dist/hub/server/handlers/mcp-apps-handlers.d.ts +5 -0
- package/dist/hub/server/handlers/session-handlers.d.ts +4 -0
- package/dist/hub/server/hub-server-options.d.ts +3 -0
- package/dist/hub/server/hub-server-transport.d.ts +2 -0
- package/dist/index.d.ts +10 -5
- package/dist/index.js +284 -258
- package/dist/plugin-runtime/node_modules/@cline/agents/dist/index.js +76 -0
- package/dist/plugin-runtime/node_modules/@cline/agents/package.json +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/ai-sdk-bdvd54cj.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/anthropic-d88t4w67.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/bedrock-4rh6dw0e.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/cline-dex049wz.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/cloud/index.js +38 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/community-adrseffv.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-embedding-model-strategy-SAVQFBF4-vf44v1q1.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-language-model-strategy-BPQO66W7-np6pavev.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-1xg0n8py.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-2h2811k3.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-918h9zb6.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-9g9qz8kw.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-8p52y0t4.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-cr4wnstr.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-aa72jh2v.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-k2y10eep.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-1hvm2h6v.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-7nqbajdc.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/google-nqn5r579.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/daemon/entry.js +1166 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/index.js +1153 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-0ahmqye5.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-1jwj53tz.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-3qy7846d.js +14 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-418gvd4a.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4etvmc8g.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4pm9q9we.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4tgv599k.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-5hwscy9s.js +15 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-6dpcn5cw.js +9 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-7ycwqbm0.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-8qjtgvqw.js +9 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-8zb5grad.js +1210 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-94jdgxt6.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-9g67p34k.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-a9d2sjh0.js +85 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-agemt17a.js +3 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bhf7enwn.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bnwxdgvg.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-brjxtvsh.js +4 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bvb7f701.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bwet95hr.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-cadyf2yp.js +14 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-cxfnnrmh.js +9 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-cyyvppz9.js +6 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-d4pbedxj.js +137 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ddwn220p.js +12 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-edf1hmcw.js +62 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ejyd73x5.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-f25bf131.js +4 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-f4rfmj6q.js +3 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-fet3kwk6.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ffna8yzn.js +121 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-g2y6ptdc.js +213 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ge184xvn.js +6 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-gevnedsc.js +13 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-hkmarmve.js +190 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-kqacxn3s.js +39 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m3gtj35r.js +14 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-neczvge6.js +21 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-p5k5hnam.js +75 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-sdvqs19c.js +20 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-t75m2pgm.js +146 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v4-qqb2kabr.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v6mehmme.js +12 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v80fh3x3.js +16 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-vd605jwp.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-vryppqt1.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-w55v4n1n.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-w9n2kgjk.js +140 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-yjbp9r76.js +142 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ztb3cjfh.js +3 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-static-kj4rdeey.js +473 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-y9tt7gmq.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-stream-telemetry-bg81k3qh.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-telemetry-tkbfbx5w.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/mistral-mkw95amh.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/multipart-parser-9z19cm6q.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/ollama-sjp09b7p.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-1eyn4hw0.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-compatible-f99c7syq.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-embedding-model-strategy-GT27AFII-19936r1a.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-language-model-strategy-YEQPUCOT-eavx3zc3.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/services/feature-flags/posthog.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/services/telemetry/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/token-04d0mwe8.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/token-util-mt7pvm61.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/vertex-6armtc3s.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/package.json +1 -0
- package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.browser.js +16 -0
- package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/llms/package.json +1 -0
- package/dist/plugin-runtime/node_modules/@cline/sdk/dist/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/sdk/package.json +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/automation/index.js +57 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/db/index.js +127 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.browser.js +110 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/node.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/remote-config/index.js +68 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/storage/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/types/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/package.json +1 -0
- package/dist/plugin-runtime/package.json +1 -0
- package/dist/{extensions → plugin-runtime}/plugin-sandbox-bootstrap.js +129 -129
- package/dist/remote/remote-environments.d.ts +1 -0
- package/dist/runtime/config/agent-runtime-config-builder.d.ts +2 -0
- package/dist/runtime/host/local-runtime-host.d.ts +10 -0
- package/dist/runtime/host/runtime-host.d.ts +6 -0
- package/dist/runtime/orchestration/runtime-oauth-token-manager.d.ts +3 -0
- package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +10 -1
- package/dist/runtime/orchestration/session-runtime.d.ts +2 -0
- package/dist/runtime/tools/subprocess-sandbox.d.ts +22 -0
- package/dist/services/cloud-handoff/git-preparation.d.ts +22 -0
- package/dist/services/global-settings.d.ts +6 -0
- package/dist/services/llms/cline-recommended-models.d.ts +2 -0
- package/dist/services/local-runtime-bootstrap.d.ts +1 -0
- package/dist/services/plugin-command-api.d.ts +47 -0
- package/dist/services/plugin-commands.d.ts +25 -27
- package/dist/services/skills-cli.d.ts +2 -0
- package/dist/services/telemetry/core-events.d.ts +26 -0
- package/dist/services/telemetry/index.js +1 -1
- package/dist/services/telemetry/run-health.d.ts +40 -0
- package/dist/services/telemetry/stall-signals.d.ts +12 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/session.d.ts +7 -0
- package/package.json +6 -5
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{fa}from"./index-bwet95hr.js";import{A}from"./index-4etvmc8g.js";import{v,i,c}from"./index-edf1hmcw.js";var Qn=i(function(Xn){Object.defineProperty(Xn,"__esModule",{value:!0});Xn.OTLPExporterBase=void 0;class Yn{_delegate;constructor(n){this._delegate=n}export(n,o){this._delegate.export(n,o)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}Xn.OTLPExporterBase=Yn});var At=i(function(to){Object.defineProperty(to,"__esModule",{value:!0});to.OTLPExporterError=void 0;class eo extends Error{code;name="OTLPExporterError";data;constructor(n,o,l){super(n);this.data=l,this.code=o}}to.OTLPExporterError=eo});var Xe=i(function(oo){Object.defineProperty(oo,"__esModule",{value:!0});oo.getSharedConfigurationDefaults=oo.mergeOtlpSharedConfigurationWithDefaults=oo.wrapStaticHeadersInFunction=oo.validateTimeoutMillis=void 0;function no(n){if(Number.isFinite(n)&&n>0)return n;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${n}')`)}oo.validateTimeoutMillis=no;function wh(n){if(n==null)return;return async()=>n}oo.wrapStaticHeadersInFunction=wh;function Ih(n,o,l){return{timeoutMillis:no(n.timeoutMillis??o.timeoutMillis??l.timeoutMillis),concurrencyLimit:n.concurrencyLimit??o.concurrencyLimit??l.concurrencyLimit,compression:n.compression??o.compression??l.compression}}oo.mergeOtlpSharedConfigurationWithDefaults=Ih;function Rh(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}oo.getSharedConfigurationDefaults=Rh});var ao=i(function(uo){Object.defineProperty(uo,"__esModule",{value:!0});uo.CompressionAlgorithm=void 0;var Ch;(function(n){n.NONE="none",n.GZIP="gzip"})(Ch=uo.CompressionAlgorithm||(uo.CompressionAlgorithm={}))});var yr=i(function(so){Object.defineProperty(so,"__esModule",{value:!0});so.createBoundedQueueExportPromiseHandler=void 0;class co{_concurrencyLimit;_sendingPromises=[];constructor(n){this._concurrencyLimit=n}pushPromise(n){if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(n);let o=()=>{let l=this._sendingPromises.indexOf(n);this._sendingPromises.splice(l,1)};n.then(o,o)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function Dh(n){return new co(n.concurrencyLimit)}so.createBoundedQueueExportPromiseHandler=Dh});var Ze=i(function(po){Object.defineProperty(po,"__esModule",{value:!0});po.isTracingSuppressed=po.unsuppressTracing=po.suppressTracing=void 0;var kh=A(),mr=kh.createContextKey("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Vh(n){return n.setValue(mr,!0)}po.suppressTracing=Vh;function Bh(n){return n.deleteValue(mr)}po.unsuppressTracing=Bh;function qh(n){return n.getValue(mr)===!0}po.isTracingSuppressed=qh});var _r=i(function(yo){Object.defineProperty(yo,"__esModule",{value:!0});yo.BAGGAGE_MAX_TOTAL_LENGTH=yo.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=yo.BAGGAGE_MAX_NAME_VALUE_PAIRS=yo.BAGGAGE_HEADER=yo.BAGGAGE_ITEMS_SEPARATOR=yo.BAGGAGE_PROPERTIES_SEPARATOR=yo.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;yo.BAGGAGE_KEY_PAIR_SEPARATOR="=";yo.BAGGAGE_PROPERTIES_SEPARATOR=";";yo.BAGGAGE_ITEMS_SEPARATOR=",";yo.BAGGAGE_HEADER="baggage";yo.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;yo.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;yo.BAGGAGE_MAX_TOTAL_LENGTH=8192});var gr=i(function(go){Object.defineProperty(go,"__esModule",{value:!0});go.parseKeyPairsIntoRecord=go.parsePairKeyValue=go.getKeyPairs=go.serializeKeyPairs=void 0;var Wh=A(),ke=_r();function Yh(n){return n.reduce((o,l)=>{let p=`${o}${o!==""?ke.BAGGAGE_ITEMS_SEPARATOR:""}${l}`;return p.length>ke.BAGGAGE_MAX_TOTAL_LENGTH?o:p},"")}go.serializeKeyPairs=Yh;function Xh(n){return n.getAllEntries().map(([o,l])=>{let p=`${encodeURIComponent(o)}=${encodeURIComponent(l.value)}`;if(l.metadata!==void 0)p+=ke.BAGGAGE_PROPERTIES_SEPARATOR+l.metadata.toString();return p})}go.getKeyPairs=Xh;function _o(n){if(!n)return;let o=n.indexOf(ke.BAGGAGE_PROPERTIES_SEPARATOR),l=o===-1?n:n.substring(0,o),p=l.indexOf(ke.BAGGAGE_KEY_PAIR_SEPARATOR);if(p<=0)return;let u=l.substring(0,p).trim(),s=l.substring(p+1).trim();if(!u||!s)return;let t,e;try{t=decodeURIComponent(u),e=decodeURIComponent(s)}catch{return}let r;if(o!==-1&&o<n.length-1){let a=n.substring(o+1);r=Wh.baggageEntryMetadataFromString(a)}return{key:t,value:e,metadata:r}}go.parsePairKeyValue=_o;function Zh(n){let o={};if(typeof n==="string"&&n.length>0)n.split(ke.BAGGAGE_ITEMS_SEPARATOR).forEach((l)=>{let p=_o(l);if(p!==void 0&&p.value.length>0)o[p.key]=p.value});return o}go.parseKeyPairsIntoRecord=Zh});var To=i(function(Oo){Object.defineProperty(Oo,"__esModule",{value:!0});Oo.W3CBaggagePropagator=void 0;var vr=A(),ry=Ze(),ve=_r(),br=gr();class bo{inject(n,o,l){let p=vr.propagation.getBaggage(n);if(!p||ry.isTracingSuppressed(n))return;let u=br.getKeyPairs(p).filter((t)=>t.length<=ve.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,ve.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=br.serializeKeyPairs(u);if(s.length>0)l.set(o,ve.BAGGAGE_HEADER,s)}extract(n,o,l){let p=l.get(o,ve.BAGGAGE_HEADER),u=Array.isArray(p)?p.join(ve.BAGGAGE_ITEMS_SEPARATOR):p;if(!u)return n;let s={};if(u.length===0)return n;if(u.split(ve.BAGGAGE_ITEMS_SEPARATOR).forEach((e)=>{let r=br.parsePairKeyValue(e);if(r){let a={value:r.value};if(r.metadata)a.metadata=r.metadata;s[r.key]=a}}),Object.entries(s).length===0)return n;return vr.propagation.setBaggage(n,vr.propagation.createBaggage(s))}fields(){return[ve.BAGGAGE_HEADER]}}Oo.W3CBaggagePropagator=bo});var No=i(function(Eo){Object.defineProperty(Eo,"__esModule",{value:!0});Eo.AnchoredClock=void 0;class xo{_monotonicClock;_epochMillis;_performanceMillis;constructor(n,o){this._monotonicClock=o,this._epochMillis=n.now(),this._performanceMillis=o.now()}now(){let n=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+n}}Eo.AnchoredClock=xo});var Lo=i(function(Mo){Object.defineProperty(Mo,"__esModule",{value:!0});Mo.isAttributeValue=Mo.isAttributeKey=Mo.sanitizeAttributes=void 0;var Po=A();function ny(n){let o={};if(typeof n!=="object"||n==null)return o;for(let l in n){if(!Object.prototype.hasOwnProperty.call(n,l))continue;if(!wo(l)){Po.diag.warn(`Invalid attribute key: ${l}`);continue}let p=n[l];if(!Io(p)){Po.diag.warn(`Invalid attribute value set for key: ${l}`);continue}if(Array.isArray(p))o[l]=p.slice();else o[l]=p}return o}Mo.sanitizeAttributes=ny;function wo(n){return typeof n==="string"&&n!==""}Mo.isAttributeKey=wo;function Io(n){if(n==null)return!0;if(Array.isArray(n))return oy(n);return Ro(typeof n)}Mo.isAttributeValue=Io;function oy(n){let o;for(let l of n){if(l==null)continue;let p=typeof l;if(p===o)continue;if(!o){if(Ro(p)){o=p;continue}return!1}return!1}return!0}function Ro(n){switch(n){case"number":case"boolean":case"string":return!0}return!1}});var Or=i(function(Co){Object.defineProperty(Co,"__esModule",{value:!0});Co.loggingErrorHandler=void 0;var ay=A();function cy(){return(n)=>{ay.diag.error(sy(n))}}Co.loggingErrorHandler=cy;function sy(n){if(typeof n==="string")return n;else return JSON.stringify(ly(n))}function ly(n){let o={},l=n;while(l!==null)Object.getOwnPropertyNames(l).forEach((p)=>{if(o[p])return;let u=l[p];if(u)o[p]=String(u)}),l=Object.getPrototypeOf(l);return o}});var qo=i(function(Vo){Object.defineProperty(Vo,"__esModule",{value:!0});Vo.globalErrorHandler=Vo.setGlobalErrorHandler=void 0;var py=Or(),ko=py.loggingErrorHandler();function fy(n){ko=n}Vo.setGlobalErrorHandler=fy;function dy(n){try{ko(n)}catch{}}Vo.globalErrorHandler=dy});var zo=i(function(Fo){Object.defineProperty(Fo,"__esModule",{value:!0});Fo.getStringListFromEnv=Fo.getBooleanFromEnv=Fo.getStringFromEnv=Fo.getNumberFromEnv=void 0;var jo=A(),Go=c("util");function yy(n){let o=process.env[n];if(o==null||o.trim()==="")return;let l=Number(o);if(isNaN(l)){jo.diag.warn(`Unknown value ${Go.inspect(o)} for ${n}, expected a number, using defaults`);return}return l}Fo.getNumberFromEnv=yy;function Ho(n){let o=process.env[n];if(o==null||o.trim()==="")return;return o}Fo.getStringFromEnv=Ho;function my(n){let o=process.env[n]?.trim().toLowerCase();if(o==null||o==="")return!1;if(o==="true")return!0;else if(o==="false")return!1;else return jo.diag.warn(`Unknown value ${Go.inspect(o)} for ${n}, expected 'true' or 'false', falling back to 'false' (default)`),!1}Fo.getBooleanFromEnv=my;function _y(n){return Ho(n)?.split(",").map((o)=>o.trim()).filter((o)=>o!=="")}Fo.getStringListFromEnv=_y});var Wo=i(function(Jo){Object.defineProperty(Jo,"__esModule",{value:!0});Jo._globalThis=void 0;Jo._globalThis=globalThis});var Zo=i(function(Yo){Object.defineProperty(Yo,"__esModule",{value:!0});Yo.VERSION=void 0;Yo.VERSION="2.6.1"});var ti=i(function(Qo){Object.defineProperty(Qo,"__esModule",{value:!0});Qo.ATTR_PROCESS_RUNTIME_NAME=void 0;Qo.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var oi=i(function(ri){Object.defineProperty(ri,"__esModule",{value:!0});ri.SDK_INFO=void 0;var Oy=Zo(),Nt=fa(),Sy=ti();ri.SDK_INFO={[Nt.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[Sy.ATTR_PROCESS_RUNTIME_NAME]:"node",[Nt.ATTR_TELEMETRY_SDK_LANGUAGE]:Nt.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[Nt.ATTR_TELEMETRY_SDK_VERSION]:Oy.VERSION}});var ui=i(function(pe){Object.defineProperty(pe,"__esModule",{value:!0});pe.otperformance=pe.SDK_INFO=pe._globalThis=pe.getStringListFromEnv=pe.getNumberFromEnv=pe.getBooleanFromEnv=pe.getStringFromEnv=void 0;var Pt=zo();Object.defineProperty(pe,"getStringFromEnv",{enumerable:!0,get:function(){return Pt.getStringFromEnv}});Object.defineProperty(pe,"getBooleanFromEnv",{enumerable:!0,get:function(){return Pt.getBooleanFromEnv}});Object.defineProperty(pe,"getNumberFromEnv",{enumerable:!0,get:function(){return Pt.getNumberFromEnv}});Object.defineProperty(pe,"getStringListFromEnv",{enumerable:!0,get:function(){return Pt.getStringListFromEnv}});var Ty=Wo();Object.defineProperty(pe,"_globalThis",{enumerable:!0,get:function(){return Ty._globalThis}});var xy=oi();Object.defineProperty(pe,"SDK_INFO",{enumerable:!0,get:function(){return xy.SDK_INFO}});pe.otperformance=performance});var Sr=i(function(ae){Object.defineProperty(ae,"__esModule",{value:!0});ae.getStringListFromEnv=ae.getNumberFromEnv=ae.getStringFromEnv=ae.getBooleanFromEnv=ae.otperformance=ae._globalThis=ae.SDK_INFO=void 0;var be=ui();Object.defineProperty(ae,"SDK_INFO",{enumerable:!0,get:function(){return be.SDK_INFO}});Object.defineProperty(ae,"_globalThis",{enumerable:!0,get:function(){return be._globalThis}});Object.defineProperty(ae,"otperformance",{enumerable:!0,get:function(){return be.otperformance}});Object.defineProperty(ae,"getBooleanFromEnv",{enumerable:!0,get:function(){return be.getBooleanFromEnv}});Object.defineProperty(ae,"getStringFromEnv",{enumerable:!0,get:function(){return be.getStringFromEnv}});Object.defineProperty(ae,"getNumberFromEnv",{enumerable:!0,get:function(){return be.getNumberFromEnv}});Object.defineProperty(ae,"getStringListFromEnv",{enumerable:!0,get:function(){return be.getStringListFromEnv}})});var fi=i(function(li){Object.defineProperty(li,"__esModule",{value:!0});li.addHrTimes=li.isTimeInput=li.isTimeInputHrTime=li.hrTimeToMicroseconds=li.hrTimeToMilliseconds=li.hrTimeToNanoseconds=li.hrTimeToTimeStamp=li.hrTimeDuration=li.timeInputToHrTime=li.hrTime=li.getTimeOrigin=li.millisToHrTime=void 0;var wt=Sr(),ai=9,Ay=6,Ny=Math.pow(10,Ay),It=Math.pow(10,ai);function Qe(n){let o=n/1000,l=Math.trunc(o),p=Math.round(n%1000*Ny);return[l,p]}li.millisToHrTime=Qe;function Py(){return wt.otperformance.timeOrigin}li.getTimeOrigin=Py;function ci(n){let o=Qe(wt.otperformance.timeOrigin),l=Qe(typeof n==="number"?n:wt.otperformance.now());return si(o,l)}li.hrTime=ci;function wy(n){if(Tr(n))return n;else if(typeof n==="number")if(n<wt.otperformance.timeOrigin)return ci(n);else return Qe(n);else if(n instanceof Date)return Qe(n.getTime());else throw TypeError("Invalid input type")}li.timeInputToHrTime=wy;function Iy(n,o){let l=o[0]-n[0],p=o[1]-n[1];if(p<0)l-=1,p+=It;return[l,p]}li.hrTimeDuration=Iy;function Ry(n){let o=ai,l=`${"0".repeat(o)}${n[1]}Z`,p=l.substring(l.length-o-1);return new Date(n[0]*1000).toISOString().replace("000Z",p)}li.hrTimeToTimeStamp=Ry;function My(n){return n[0]*It+n[1]}li.hrTimeToNanoseconds=My;function Uy(n){return n[0]*1000+n[1]/1e6}li.hrTimeToMilliseconds=Uy;function Ly(n){return n[0]*1e6+n[1]/1000}li.hrTimeToMicroseconds=Ly;function Tr(n){return Array.isArray(n)&&n.length===2&&typeof n[0]==="number"&&typeof n[1]==="number"}li.isTimeInputHrTime=Tr;function Cy(n){return Tr(n)||typeof n==="number"||n instanceof Date}li.isTimeInput=Cy;function si(n,o){let l=[n[0]+o[0],n[1]+o[1]];if(l[1]>=It)l[1]-=It,l[0]+=1;return l}li.addHrTimes=si});var yi=i(function(di){Object.defineProperty(di,"__esModule",{value:!0});di.unrefTimer=void 0;function Jy(n){if(typeof n!=="number")n.unref()}di.unrefTimer=Jy});var _i=i(function(mi){Object.defineProperty(mi,"__esModule",{value:!0});mi.ExportResultCode=void 0;var $y;(function(n){n[n.SUCCESS=0]="SUCCESS",n[n.FAILED=1]="FAILED"})($y=mi.ExportResultCode||(mi.ExportResultCode={}))});var Si=i(function(bi){Object.defineProperty(bi,"__esModule",{value:!0});bi.CompositePropagator=void 0;var gi=A();class vi{_propagators;_fields;constructor(n={}){this._propagators=n.propagators??[],this._fields=Array.from(new Set(this._propagators.map((o)=>typeof o.fields==="function"?o.fields():[]).reduce((o,l)=>o.concat(l),[])))}inject(n,o,l){for(let p of this._propagators)try{p.inject(n,o,l)}catch(u){gi.diag.warn(`Failed to inject with ${p.constructor.name}. Err: ${u.message}`)}}extract(n,o,l){return this._propagators.reduce((p,u)=>{try{return u.extract(p,o,l)}catch(s){gi.diag.warn(`Failed to extract with ${u.constructor.name}. Err: ${s.message}`)}return p},n)}fields(){return this._fields.slice()}}bi.CompositePropagator=vi});var Ei=i(function(Ti){Object.defineProperty(Ti,"__esModule",{value:!0});Ti.validateValue=Ti.validateKey=void 0;var Er="[_0-9a-z-*/]",Wy=`[a-z]${Er}{0,255}`,Yy=`[a-z0-9]${Er}{0,240}@[a-z]${Er}{0,13}`,Xy=new RegExp(`^(?:${Wy}|${Yy})$`),Zy=/^[ -~]{0,255}[!-~]$/,Qy=/,|=/;function em(n){return Xy.test(n)}Ti.validateKey=em;function tm(n){return Zy.test(n)&&!Qy.test(n)}Ti.validateValue=tm});var Nr=i(function(Ii){Object.defineProperty(Ii,"__esModule",{value:!0});Ii.TraceState=void 0;var wi=Ei(),Ai=32,nm=512,Ni=",",Pi="=";class Ar{_internalState=new Map;constructor(n){if(n)this._parse(n)}set(n,o){let l=this._clone();if(l._internalState.has(n))l._internalState.delete(n);return l._internalState.set(n,o),l}unset(n){let o=this._clone();return o._internalState.delete(n),o}get(n){return this._internalState.get(n)}serialize(){return this._keys().reduce((n,o)=>(n.push(o+Pi+this.get(o)),n),[]).join(Ni)}_parse(n){if(n.length>nm)return;if(this._internalState=n.split(Ni).reverse().reduce((o,l)=>{let p=l.trim(),u=p.indexOf(Pi);if(u!==-1){let s=p.slice(0,u),t=p.slice(u+1,l.length);if(wi.validateKey(s)&&wi.validateValue(t))o.set(s,t)}return o},new Map),this._internalState.size>Ai)this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Ai))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let n=new Ar;return n._internalState=new Map(this._internalState),n}}Ii.TraceState=Ar});var Di=i(function(Li){Object.defineProperty(Li,"__esModule",{value:!0});Li.W3CTraceContextPropagator=Li.parseTraceParent=Li.TRACE_STATE_HEADER=Li.TRACE_PARENT_HEADER=void 0;var Ut=A(),om=Ze(),im=Nr();Li.TRACE_PARENT_HEADER="traceparent";Li.TRACE_STATE_HEADER="tracestate";var um="00",am="(?!ff)[\\da-f]{2}",cm="(?![0]{32})[\\da-f]{32}",sm="(?![0]{16})[\\da-f]{16}",lm="[\\da-f]{2}",fm=new RegExp(`^\\s?(${am})-(${cm})-(${sm})-(${lm})(-.*)?\\s?$`);function Mi(n){let o=fm.exec(n);if(!o)return null;if(o[1]==="00"&&o[5])return null;return{traceId:o[2],spanId:o[3],traceFlags:parseInt(o[4],16)}}Li.parseTraceParent=Mi;class Ui{inject(n,o,l){let p=Ut.trace.getSpanContext(n);if(!p||om.isTracingSuppressed(n)||!Ut.isSpanContextValid(p))return;let u=`${um}-${p.traceId}-${p.spanId}-0${Number(p.traceFlags||Ut.TraceFlags.NONE).toString(16)}`;if(l.set(o,Li.TRACE_PARENT_HEADER,u),p.traceState)l.set(o,Li.TRACE_STATE_HEADER,p.traceState.serialize())}extract(n,o,l){let p=l.get(o,Li.TRACE_PARENT_HEADER);if(!p)return n;let u=Array.isArray(p)?p[0]:p;if(typeof u!=="string")return n;let s=Mi(u);if(!s)return n;s.isRemote=!0;let t=l.get(o,Li.TRACE_STATE_HEADER);if(t){let e=Array.isArray(t)?t.join(","):t;s.traceState=new im.TraceState(typeof e==="string"?e:void 0)}return Ut.trace.setSpanContext(n,s)}fields(){return[Li.TRACE_PARENT_HEADER,Li.TRACE_STATE_HEADER]}}Li.W3CTraceContextPropagator=Ui});var qi=i(function(Vi){Object.defineProperty(Vi,"__esModule",{value:!0});Vi.getRPCMetadata=Vi.deleteRPCMetadata=Vi.setRPCMetadata=Vi.RPCType=void 0;var ym=A(),Pr=ym.createContextKey("OpenTelemetry SDK Context Key RPC_METADATA"),mm;(function(n){n.HTTP="http"})(mm=Vi.RPCType||(Vi.RPCType={}));function _m(n,o){return n.setValue(Pr,o)}Vi.setRPCMetadata=_m;function gm(n){return n.deleteValue(Pr)}Vi.deleteRPCMetadata=gm;function vm(n){return n.getValue(Pr)}Vi.getRPCMetadata=vm});var Ji=i(function(Ki){Object.defineProperty(Ki,"__esModule",{value:!0});Ki.isPlainObject=void 0;var Sm="[object Object]",Tm="[object Null]",xm="[object Undefined]",Em=Function.prototype,ji=Em.toString,Am=ji.call(Object),{getPrototypeOf:Nm,prototype:Gi}=Object,Hi=Gi.hasOwnProperty,Oe=Symbol?Symbol.toStringTag:void 0,Fi=Gi.toString;function Pm(n){if(!wm(n)||Im(n)!==Sm)return!1;let o=Nm(n);if(o===null)return!0;let l=Hi.call(o,"constructor")&&o.constructor;return typeof l=="function"&&l instanceof l&&ji.call(l)===Am}Ki.isPlainObject=Pm;function wm(n){return n!=null&&typeof n=="object"}function Im(n){if(n==null)return n===void 0?xm:Tm;return Oe&&Oe in Object(n)?Rm(n):Mm(n)}function Rm(n){let o=Hi.call(n,Oe),l=n[Oe],p=!1;try{n[Oe]=void 0,p=!0}catch{}let u=Fi.call(n);if(p)if(o)n[Oe]=l;else delete n[Oe];return u}function Mm(n){return Fi.call(n)}});var eu=i(function(Zi){Object.defineProperty(Zi,"__esModule",{value:!0});Zi.merge=void 0;var $i=Ji(),Um=20;function Lm(...n){let o=n.shift(),l=new WeakMap;while(n.length>0)o=Yi(o,n.shift(),0,l);return o}Zi.merge=Lm;function wr(n){if(Ct(n))return n.slice();return n}function Yi(n,o,l=0,p){let u;if(l>Um)return;if(l++,Lt(n)||Lt(o)||Xi(o))u=wr(o);else if(Ct(n)){if(u=n.slice(),Ct(o))for(let s=0,t=o.length;s<t;s++)u.push(wr(o[s]));else if(et(o)){let s=Object.keys(o);for(let t=0,e=s.length;t<e;t++){let r=s[t];u[r]=wr(o[r])}}}else if(et(n))if(et(o)){if(!Cm(n,o))return o;u=Object.assign({},n);let s=Object.keys(o);for(let t=0,e=s.length;t<e;t++){let r=s[t],a=o[r];if(Lt(a))if(typeof a>"u")delete u[r];else u[r]=a;else{let f=u[r],y=a;if(Wi(n,r,p)||Wi(o,r,p))delete u[r];else{if(et(f)&&et(y)){let g=p.get(f)||[],M=p.get(y)||[];g.push({obj:n,key:r}),M.push({obj:o,key:r}),p.set(f,g),p.set(y,M)}u[r]=Yi(u[r],a,l,p)}}}}else u=o;return u}function Wi(n,o,l){let p=l.get(n[o])||[];for(let u=0,s=p.length;u<s;u++){let t=p[u];if(t.key===o&&t.obj===n)return!0}return!1}function Ct(n){return Array.isArray(n)}function Xi(n){return typeof n==="function"}function et(n){return!Lt(n)&&!Ct(n)&&!Xi(n)&&typeof n==="object"}function Lt(n){return typeof n==="string"||typeof n==="number"||typeof n==="boolean"||typeof n>"u"||n instanceof Date||n instanceof RegExp||n===null}function Cm(n,o){if(!$i.isPlainObject(n)||!$i.isPlainObject(o))return!1;return!0}});var nu=i(function(tu){Object.defineProperty(tu,"__esModule",{value:!0});tu.callWithTimeout=tu.TimeoutError=void 0;class Dt extends Error{constructor(n){super(n);Object.setPrototypeOf(this,Dt.prototype)}}tu.TimeoutError=Dt;function Dm(n,o){let l,p=new Promise(function(s,t){l=setTimeout(function(){t(new Dt("Operation timed out."))},o)});return Promise.race([n,p]).then((u)=>(clearTimeout(l),u),(u)=>{throw clearTimeout(l),u})}tu.callWithTimeout=Dm});var au=i(function(iu){Object.defineProperty(iu,"__esModule",{value:!0});iu.isUrlIgnored=iu.urlMatches=void 0;function ou(n,o){if(typeof o==="string")return n===o;else return!!n.match(o)}iu.urlMatches=ou;function Vm(n,o){if(!o)return!1;for(let l of o)if(ou(n,l))return!0;return!1}iu.isUrlIgnored=Vm});var pu=i(function(su){Object.defineProperty(su,"__esModule",{value:!0});su.Deferred=void 0;class cu{_promise;_resolve;_reject;constructor(){this._promise=new Promise((n,o)=>{this._resolve=n,this._reject=o})}get promise(){return this._promise}resolve(n){this._resolve(n)}reject(n){this._reject(n)}}su.Deferred=cu});var yu=i(function(du){Object.defineProperty(du,"__esModule",{value:!0});du.BindOnceFuture=void 0;var qm=pu();class fu{_isCalled=!1;_deferred=new qm.Deferred;_callback;_that;constructor(n,o){this._callback=n,this._that=o}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...n){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...n)).then((o)=>this._deferred.resolve(o),(o)=>this._deferred.reject(o))}catch(o){this._deferred.reject(o)}}return this._deferred.promise}}du.BindOnceFuture=fu});var vu=i(function(_u){Object.defineProperty(_u,"__esModule",{value:!0});_u.diagLogLevelFromString=void 0;var ce=A(),mu={ALL:ce.DiagLogLevel.ALL,VERBOSE:ce.DiagLogLevel.VERBOSE,DEBUG:ce.DiagLogLevel.DEBUG,INFO:ce.DiagLogLevel.INFO,WARN:ce.DiagLogLevel.WARN,ERROR:ce.DiagLogLevel.ERROR,NONE:ce.DiagLogLevel.NONE};function jm(n){if(n==null)return;let o=mu[n.toUpperCase()];if(o==null)return ce.diag.warn(`Unknown log level "${n}", expected one of ${Object.keys(mu)}, using default`),ce.DiagLogLevel.INFO;return o}_u.diagLogLevelFromString=jm});var Tu=i(function(Ou){Object.defineProperty(Ou,"__esModule",{value:!0});Ou._export=void 0;var bu=A(),Gm=Ze();function Hm(n,o){return new Promise((l)=>{bu.context.with(Gm.suppressTracing(bu.context.active()),()=>{n.export(o,l)})})}Ou._export=Hm});var Tt=i(function(E){Object.defineProperty(E,"__esModule",{value:!0});E.internal=E.diagLogLevelFromString=E.BindOnceFuture=E.urlMatches=E.isUrlIgnored=E.callWithTimeout=E.TimeoutError=E.merge=E.TraceState=E.unsuppressTracing=E.suppressTracing=E.isTracingSuppressed=E.setRPCMetadata=E.getRPCMetadata=E.deleteRPCMetadata=E.RPCType=E.parseTraceParent=E.W3CTraceContextPropagator=E.TRACE_STATE_HEADER=E.TRACE_PARENT_HEADER=E.CompositePropagator=E.otperformance=E.getStringListFromEnv=E.getNumberFromEnv=E.getBooleanFromEnv=E.getStringFromEnv=E._globalThis=E.SDK_INFO=E.parseKeyPairsIntoRecord=E.ExportResultCode=E.unrefTimer=E.timeInputToHrTime=E.millisToHrTime=E.isTimeInputHrTime=E.isTimeInput=E.hrTimeToTimeStamp=E.hrTimeToNanoseconds=E.hrTimeToMilliseconds=E.hrTimeToMicroseconds=E.hrTimeDuration=E.hrTime=E.getTimeOrigin=E.addHrTimes=E.loggingErrorHandler=E.setGlobalErrorHandler=E.globalErrorHandler=E.sanitizeAttributes=E.isAttributeValue=E.AnchoredClock=E.W3CBaggagePropagator=void 0;var Fm=To();Object.defineProperty(E,"W3CBaggagePropagator",{enumerable:!0,get:function(){return Fm.W3CBaggagePropagator}});var Km=No();Object.defineProperty(E,"AnchoredClock",{enumerable:!0,get:function(){return Km.AnchoredClock}});var xu=Lo();Object.defineProperty(E,"isAttributeValue",{enumerable:!0,get:function(){return xu.isAttributeValue}});Object.defineProperty(E,"sanitizeAttributes",{enumerable:!0,get:function(){return xu.sanitizeAttributes}});var Eu=qo();Object.defineProperty(E,"globalErrorHandler",{enumerable:!0,get:function(){return Eu.globalErrorHandler}});Object.defineProperty(E,"setGlobalErrorHandler",{enumerable:!0,get:function(){return Eu.setGlobalErrorHandler}});var zm=Or();Object.defineProperty(E,"loggingErrorHandler",{enumerable:!0,get:function(){return zm.loggingErrorHandler}});var J=fi();Object.defineProperty(E,"addHrTimes",{enumerable:!0,get:function(){return J.addHrTimes}});Object.defineProperty(E,"getTimeOrigin",{enumerable:!0,get:function(){return J.getTimeOrigin}});Object.defineProperty(E,"hrTime",{enumerable:!0,get:function(){return J.hrTime}});Object.defineProperty(E,"hrTimeDuration",{enumerable:!0,get:function(){return J.hrTimeDuration}});Object.defineProperty(E,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return J.hrTimeToMicroseconds}});Object.defineProperty(E,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return J.hrTimeToMilliseconds}});Object.defineProperty(E,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return J.hrTimeToNanoseconds}});Object.defineProperty(E,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return J.hrTimeToTimeStamp}});Object.defineProperty(E,"isTimeInput",{enumerable:!0,get:function(){return J.isTimeInput}});Object.defineProperty(E,"isTimeInputHrTime",{enumerable:!0,get:function(){return J.isTimeInputHrTime}});Object.defineProperty(E,"millisToHrTime",{enumerable:!0,get:function(){return J.millisToHrTime}});Object.defineProperty(E,"timeInputToHrTime",{enumerable:!0,get:function(){return J.timeInputToHrTime}});var Jm=yi();Object.defineProperty(E,"unrefTimer",{enumerable:!0,get:function(){return Jm.unrefTimer}});var $m=_i();Object.defineProperty(E,"ExportResultCode",{enumerable:!0,get:function(){return $m.ExportResultCode}});var Wm=gr();Object.defineProperty(E,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Wm.parseKeyPairsIntoRecord}});var Se=Sr();Object.defineProperty(E,"SDK_INFO",{enumerable:!0,get:function(){return Se.SDK_INFO}});Object.defineProperty(E,"_globalThis",{enumerable:!0,get:function(){return Se._globalThis}});Object.defineProperty(E,"getStringFromEnv",{enumerable:!0,get:function(){return Se.getStringFromEnv}});Object.defineProperty(E,"getBooleanFromEnv",{enumerable:!0,get:function(){return Se.getBooleanFromEnv}});Object.defineProperty(E,"getNumberFromEnv",{enumerable:!0,get:function(){return Se.getNumberFromEnv}});Object.defineProperty(E,"getStringListFromEnv",{enumerable:!0,get:function(){return Se.getStringListFromEnv}});Object.defineProperty(E,"otperformance",{enumerable:!0,get:function(){return Se.otperformance}});var Ym=Si();Object.defineProperty(E,"CompositePropagator",{enumerable:!0,get:function(){return Ym.CompositePropagator}});var kt=Di();Object.defineProperty(E,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return kt.TRACE_PARENT_HEADER}});Object.defineProperty(E,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return kt.TRACE_STATE_HEADER}});Object.defineProperty(E,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return kt.W3CTraceContextPropagator}});Object.defineProperty(E,"parseTraceParent",{enumerable:!0,get:function(){return kt.parseTraceParent}});var Vt=qi();Object.defineProperty(E,"RPCType",{enumerable:!0,get:function(){return Vt.RPCType}});Object.defineProperty(E,"deleteRPCMetadata",{enumerable:!0,get:function(){return Vt.deleteRPCMetadata}});Object.defineProperty(E,"getRPCMetadata",{enumerable:!0,get:function(){return Vt.getRPCMetadata}});Object.defineProperty(E,"setRPCMetadata",{enumerable:!0,get:function(){return Vt.setRPCMetadata}});var Ir=Ze();Object.defineProperty(E,"isTracingSuppressed",{enumerable:!0,get:function(){return Ir.isTracingSuppressed}});Object.defineProperty(E,"suppressTracing",{enumerable:!0,get:function(){return Ir.suppressTracing}});Object.defineProperty(E,"unsuppressTracing",{enumerable:!0,get:function(){return Ir.unsuppressTracing}});var Xm=Nr();Object.defineProperty(E,"TraceState",{enumerable:!0,get:function(){return Xm.TraceState}});var Zm=eu();Object.defineProperty(E,"merge",{enumerable:!0,get:function(){return Zm.merge}});var Au=nu();Object.defineProperty(E,"TimeoutError",{enumerable:!0,get:function(){return Au.TimeoutError}});Object.defineProperty(E,"callWithTimeout",{enumerable:!0,get:function(){return Au.callWithTimeout}});var Nu=au();Object.defineProperty(E,"isUrlIgnored",{enumerable:!0,get:function(){return Nu.isUrlIgnored}});Object.defineProperty(E,"urlMatches",{enumerable:!0,get:function(){return Nu.urlMatches}});var Qm=yu();Object.defineProperty(E,"BindOnceFuture",{enumerable:!0,get:function(){return Qm.BindOnceFuture}});var e_=vu();Object.defineProperty(E,"diagLogLevelFromString",{enumerable:!0,get:function(){return e_.diagLogLevelFromString}});var t_=Tu();E.internal={_export:t_._export}});var Ru=i(function(wu){Object.defineProperty(wu,"__esModule",{value:!0});wu.createLoggingPartialSuccessResponseHandler=void 0;var r_=A();function n_(n){return Object.prototype.hasOwnProperty.call(n,"partialSuccess")}function o_(){return{handleResponse(n){if(n==null||!n_(n)||n.partialSuccess==null||Object.keys(n.partialSuccess).length===0)return;r_.diag.warn("Received Partial Success response:",JSON.stringify(n.partialSuccess))}}}wu.createLoggingPartialSuccessResponseHandler=o_});var Rr=i(function(Lu){Object.defineProperty(Lu,"__esModule",{value:!0});Lu.createOtlpExportDelegate=void 0;var Te=Tt(),Mu=At(),i_=Ru(),u_=A();class Uu{_diagLogger;_transport;_serializer;_responseHandler;_promiseQueue;_timeout;constructor(n,o,l,p,u){this._transport=n,this._serializer=o,this._responseHandler=l,this._promiseQueue=p,this._timeout=u,this._diagLogger=u_.diag.createComponentLogger({namespace:"OTLPExportDelegate"})}export(n,o){if(this._diagLogger.debug("items to be sent",n),this._promiseQueue.hasReachedLimit()){o({code:Te.ExportResultCode.FAILED,error:Error("Concurrent export limit reached")});return}let l=this._serializer.serializeRequest(n);if(l==null){o({code:Te.ExportResultCode.FAILED,error:Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(l,this._timeout).then((p)=>{if(p.status==="success"){if(p.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(p.data))}catch(u){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",u,p.data)}o({code:Te.ExportResultCode.SUCCESS});return}else if(p.status==="failure"&&p.error){o({code:Te.ExportResultCode.FAILED,error:p.error});return}else if(p.status==="retryable")o({code:Te.ExportResultCode.FAILED,error:p.error??new Mu.OTLPExporterError("Export failed with retryable status")});else o({code:Te.ExportResultCode.FAILED,error:new Mu.OTLPExporterError("Export failed with unknown error")})},(p)=>o({code:Te.ExportResultCode.FAILED,error:p})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function a_(n,o){return new Uu(n.transport,n.serializer,i_.createLoggingPartialSuccessResponseHandler(),n.promiseHandler,o.timeout)}Lu.createOtlpExportDelegate=a_});var Vu=i(function(Du){Object.defineProperty(Du,"__esModule",{value:!0});Du.createOtlpNetworkExportDelegate=void 0;var c_=yr(),s_=Rr();function l_(n,o,l){return s_.createOtlpExportDelegate({transport:l,serializer:o,promiseHandler:c_.createBoundedQueueExportPromiseHandler(n)},{timeout:n.timeoutMillis})}Du.createOtlpNetworkExportDelegate=l_});var pm=i(function(fe){Object.defineProperty(fe,"__esModule",{value:!0});fe.createOtlpNetworkExportDelegate=fe.CompressionAlgorithm=fe.getSharedConfigurationDefaults=fe.mergeOtlpSharedConfigurationWithDefaults=fe.OTLPExporterError=fe.OTLPExporterBase=void 0;var p_=Qn();Object.defineProperty(fe,"OTLPExporterBase",{enumerable:!0,get:function(){return p_.OTLPExporterBase}});var f_=At();Object.defineProperty(fe,"OTLPExporterError",{enumerable:!0,get:function(){return f_.OTLPExporterError}});var Bu=Xe();Object.defineProperty(fe,"mergeOtlpSharedConfigurationWithDefaults",{enumerable:!0,get:function(){return Bu.mergeOtlpSharedConfigurationWithDefaults}});Object.defineProperty(fe,"getSharedConfigurationDefaults",{enumerable:!0,get:function(){return Bu.getSharedConfigurationDefaults}});var d_=ao();Object.defineProperty(fe,"CompressionAlgorithm",{enumerable:!0,get:function(){return d_.CompressionAlgorithm}});var h_=Vu();Object.defineProperty(fe,"createOtlpNetworkExportDelegate",{enumerable:!0,get:function(){return h_.createOtlpNetworkExportDelegate}})});var Gu=i(function(PE,qu){qu.exports=m_;function m_(n,o){var l=Array(arguments.length-1),p=0,u=2,s=!0;while(u<arguments.length)l[p++]=arguments[u++];return new Promise(function(e,r){l[p]=function(f){if(s)if(s=!1,f)r(f);else{var y=Array(arguments.length-1),g=0;while(g<y.length)y[g++]=arguments[g];e.apply(null,y)}};try{n.apply(o||null,l)}catch(a){if(s)s=!1,r(a)}})}});var zu=i(function(Ku){var Bt=Ku;Bt.length=function(o){var l=o.length;if(!l)return 0;var p=0;while(--l%4>1&&o.charAt(l)==="=")++p;return Math.ceil(o.length*3)/4-p};var Ve=Array(64),Fu=Array(123);for(W=0;W<64;)Fu[Ve[W]=W<26?W+65:W<52?W+71:W<62?W-4:W-59|43]=W++;var W;Bt.encode=function(o,l,p){var u=null,s=[],t=0,e=0,r;while(l<p){var a=o[l++];switch(e){case 0:s[t++]=Ve[a>>2],r=(a&3)<<4,e=1;break;case 1:s[t++]=Ve[r|a>>4],r=(a&15)<<2,e=2;break;case 2:s[t++]=Ve[r|a>>6],s[t++]=Ve[a&63],e=0;break}if(t>8191)(u||(u=[])).push(String.fromCharCode.apply(String,s)),t=0}if(e){if(s[t++]=Ve[r],s[t++]=61,e===1)s[t++]=61}if(u){if(t)u.push(String.fromCharCode.apply(String,s.slice(0,t)));return u.join("")}return String.fromCharCode.apply(String,s.slice(0,t))};var Hu="invalid encoding";Bt.decode=function(o,l,p){var u=p,s=0,t;for(var e=0;e<o.length;){var r=o.charCodeAt(e++);if(r===61&&s>1)break;if((r=Fu[r])===void 0)throw Error(Hu);switch(s){case 0:t=r,s=1;break;case 1:l[p++]=t<<2|(r&48)>>4,t=r,s=2;break;case 2:l[p++]=(t&15)<<4|(r&60)>>2,t=r,s=3;break;case 3:l[p++]=(t&3)<<6|r,s=0;break}}if(s===1)throw Error(Hu);return p-u};Bt.test=function(o){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(o)}});var $u=i(function(IE,Ju){Ju.exports=qt;function qt(){this._listeners=Object.create(null)}qt.prototype.on=function(o,l,p){return(this._listeners[o]||(this._listeners[o]=[])).push({fn:l,ctx:p||this}),this};qt.prototype.off=function(o,l){if(o===void 0)this._listeners=Object.create(null);else if(l===void 0)this._listeners[o]=[];else{var p=this._listeners[o];if(!p)return this;for(var u=0;u<p.length;)if(p[u].fn===l)p.splice(u,1);else++u}return this};qt.prototype.emit=function(o){var l=this._listeners[o];if(l){var p=[],u=1;for(;u<arguments.length;)p.push(arguments[u++]);for(u=0;u<l.length;)l[u].fn.apply(l[u++].ctx,p)}return this}});var ta=i(function(RE,ea){ea.exports=Wu(Wu);function Wu(n){if(typeof Float32Array<"u")(function(){var o=new Float32Array([-0]),l=new Uint8Array(o.buffer),p=l[3]===128;function u(r,a,f){o[0]=r,a[f]=l[0],a[f+1]=l[1],a[f+2]=l[2],a[f+3]=l[3]}function s(r,a,f){o[0]=r,a[f]=l[3],a[f+1]=l[2],a[f+2]=l[1],a[f+3]=l[0]}n.writeFloatLE=p?u:s,n.writeFloatBE=p?s:u;function t(r,a){return l[0]=r[a],l[1]=r[a+1],l[2]=r[a+2],l[3]=r[a+3],o[0]}function e(r,a){return l[3]=r[a],l[2]=r[a+1],l[1]=r[a+2],l[0]=r[a+3],o[0]}n.readFloatLE=p?t:e,n.readFloatBE=p?e:t})();else(function(){function o(p,u,s,t){var e=u<0?1:0;if(e)u=-u;if(u===0)p(1/u>0?0:2147483648,s,t);else if(isNaN(u))p(2143289344,s,t);else if(u>340282346638528860000000000000000000000)p((e<<31|2139095040)>>>0,s,t);else if(u<0.000000000000000000000000000000000000011754943508222875)p((e<<31|Math.round(u/0.000000000000000000000000000000000000000000001401298464324817))>>>0,s,t);else{var r=Math.floor(Math.log(u)/Math.LN2),a=Math.round(u*Math.pow(2,-r)*8388608)&8388607;p((e<<31|r+127<<23|a)>>>0,s,t)}}n.writeFloatLE=o.bind(null,Yu),n.writeFloatBE=o.bind(null,Xu);function l(p,u,s){var t=p(u,s),e=(t>>31)*2+1,r=t>>>23&255,a=t&8388607;return r===255?a?NaN:e*(1/0):r===0?e*0.000000000000000000000000000000000000000000001401298464324817*a:e*Math.pow(2,r-150)*(a+8388608)}n.readFloatLE=l.bind(null,Zu),n.readFloatBE=l.bind(null,Qu)})();if(typeof Float64Array<"u")(function(){var o=new Float64Array([-0]),l=new Uint8Array(o.buffer),p=l[7]===128;function u(r,a,f){o[0]=r,a[f]=l[0],a[f+1]=l[1],a[f+2]=l[2],a[f+3]=l[3],a[f+4]=l[4],a[f+5]=l[5],a[f+6]=l[6],a[f+7]=l[7]}function s(r,a,f){o[0]=r,a[f]=l[7],a[f+1]=l[6],a[f+2]=l[5],a[f+3]=l[4],a[f+4]=l[3],a[f+5]=l[2],a[f+6]=l[1],a[f+7]=l[0]}n.writeDoubleLE=p?u:s,n.writeDoubleBE=p?s:u;function t(r,a){return l[0]=r[a],l[1]=r[a+1],l[2]=r[a+2],l[3]=r[a+3],l[4]=r[a+4],l[5]=r[a+5],l[6]=r[a+6],l[7]=r[a+7],o[0]}function e(r,a){return l[7]=r[a],l[6]=r[a+1],l[5]=r[a+2],l[4]=r[a+3],l[3]=r[a+4],l[2]=r[a+5],l[1]=r[a+6],l[0]=r[a+7],o[0]}n.readDoubleLE=p?t:e,n.readDoubleBE=p?e:t})();else(function(){function o(p,u,s,t,e,r){var a=t<0?1:0;if(a)t=-t;if(t===0)p(0,e,r+u),p(1/t>0?0:2147483648,e,r+s);else if(isNaN(t))p(0,e,r+u),p(2146959360,e,r+s);else if(t>179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)p(0,e,r+u),p((a<<31|2146435072)>>>0,e,r+s);else{var f;if(t<0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014)f=t/0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005,p(f>>>0,e,r+u),p((a<<31|f/4294967296)>>>0,e,r+s);else{var y=Math.floor(Math.log(t)/Math.LN2);if(y===1024)y=1023;f=t*Math.pow(2,-y),p(f*4503599627370496>>>0,e,r+u),p((a<<31|y+1023<<20|f*1048576&1048575)>>>0,e,r+s)}}}n.writeDoubleLE=o.bind(null,Yu,0,4),n.writeDoubleBE=o.bind(null,Xu,4,0);function l(p,u,s,t,e){var r=p(t,e+u),a=p(t,e+s),f=(a>>31)*2+1,y=a>>>20&2047,g=4294967296*(a&1048575)+r;return y===2047?g?NaN:f*(1/0):y===0?f*0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005*g:f*Math.pow(2,y-1075)*(g+4503599627370496)}n.readDoubleLE=l.bind(null,Zu,0,4),n.readDoubleBE=l.bind(null,Qu,4,0)})();return n}function Yu(n,o,l){o[l]=n&255,o[l+1]=n>>>8&255,o[l+2]=n>>>16&255,o[l+3]=n>>>24}function Xu(n,o,l){o[l]=n>>>24,o[l+1]=n>>>16&255,o[l+2]=n>>>8&255,o[l+3]=n&255}function Zu(n,o){return(n[o]|n[o+1]<<8|n[o+2]<<16|n[o+3]<<24)>>>0}function Qu(n,o){return(n[o]<<24|n[o+1]<<16|n[o+2]<<8|n[o+3])>>>0}});var na=i(function(ra){var Ur=ra,Mr=65533;Ur.length=function(o){var l=0,p=0;for(var u=0;u<o.length;++u)if(p=o.charCodeAt(u),p<128)l+=1;else if(p<2048)l+=2;else if((p&64512)===55296&&(o.charCodeAt(u+1)&64512)===56320)++u,l+=4;else l+=3;return l};Ur.read=function(o,l,p){if(p-l<1)return"";var u=null,s=[],t=0,e,r,a,f;while(l<p){if(e=o[l++],e<=127)s[t++]=e;else if(e>=192&&e<224)a=(e&31)<<6|o[l++]&63,s[t++]=a>=128?a:Mr;else if(e>=224&&e<240)f=(e&15)<<12|(o[l++]&63)<<6|o[l++]&63,s[t++]=f>=2048?f:Mr;else if(e>=240)if(r=(e&7)<<18|(o[l++]&63)<<12|(o[l++]&63)<<6|o[l++]&63,r<65536||r>1114111)s[t++]=Mr;else r-=65536,s[t++]=55296+(r>>10),s[t++]=56320+(r&1023);if(t>8191)(u||(u=[])).push(String.fromCharCode.apply(String,s.slice(0,t))),t=0}if(u){if(t)u.push(String.fromCharCode.apply(String,s.slice(0,t)));return u.join("")}return String.fromCharCode.apply(String,s.slice(0,t))};Ur.write=function(o,l,p){var u=p,s,t;for(var e=0;e<o.length;++e)if(s=o.charCodeAt(e),s<128)l[p++]=s;else if(s<2048)l[p++]=s>>6|192,l[p++]=s&63|128;else if((s&64512)===55296&&((t=o.charCodeAt(e+1))&64512)===56320)s=65536+((s&1023)<<10)+(t&1023),++e,l[p++]=s>>18|240,l[p++]=s>>12&63|128,l[p++]=s>>6&63|128,l[p++]=s&63|128;else l[p++]=s>>12|224,l[p++]=s>>6&63|128,l[p++]=s&63|128;return p-u}});var ia=i(function(UE,oa){oa.exports=__;function __(n,o,l){var p=l||8192,u=p>>>1,s=null,t=p;return function(r){if(r<1||r>u)return n(r);if(t+r>p)s=n(p),t=0;var a=o.call(s,t,t+=r);if(t&7)t=(t|7)+1;return a}}});var aa=i(function(LE,ua){ua.exports=k;var tt=he();function k(n,o){this.lo=n>>>0,this.hi=o>>>0}var xe=k.zero=new k(0,0);xe.toNumber=function(){return 0};xe.zzEncode=xe.zzDecode=function(){return this};xe.length=function(){return 1};var g_=k.zeroHash="\x00\x00\x00\x00\x00\x00\x00\x00";k.fromNumber=function(o){if(o===0)return xe;var l=o<0;if(l)o=-o;var p=o>>>0,u=(o-p)/4294967296>>>0;if(l){if(u=~u>>>0,p=~p>>>0,++p>4294967295){if(p=0,++u>4294967295)u=0}}return new k(p,u)};k.from=function(o){if(typeof o==="number")return k.fromNumber(o);if(tt.isString(o))if(tt.Long)o=tt.Long.fromString(o);else return k.fromNumber(parseInt(o,10));return o.low||o.high?new k(o.low>>>0,o.high>>>0):xe};k.prototype.toNumber=function(o){if(!o&&this.hi>>>31){var l=~this.lo+1>>>0,p=~this.hi>>>0;if(!l)p=p+1>>>0;return-(l+p*4294967296)}return this.lo+this.hi*4294967296};k.prototype.toLong=function(o){return tt.Long?new tt.Long(this.lo|0,this.hi|0,Boolean(o)):{low:this.lo|0,high:this.hi|0,unsigned:Boolean(o)}};var de=String.prototype.charCodeAt;k.fromHash=function(o){if(o===g_)return xe;return new k((de.call(o,0)|de.call(o,1)<<8|de.call(o,2)<<16|de.call(o,3)<<24)>>>0,(de.call(o,4)|de.call(o,5)<<8|de.call(o,6)<<16|de.call(o,7)<<24)>>>0)};k.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};k.prototype.zzEncode=function(){var o=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^o)>>>0,this.lo=(this.lo<<1^o)>>>0,this};k.prototype.zzDecode=function(){var o=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^o)>>>0,this.hi=(this.hi>>>1^o)>>>0,this};k.prototype.length=function(){var o=this.lo,l=(this.lo>>>28|this.hi<<4)>>>0,p=this.hi>>>24;return p===0?l===0?o<16384?o<128?1:2:o<2097152?3:4:l<16384?l<128?5:6:l<2097152?7:8:p<128?9:10}});var ca=i(function(rt,Lr){(function(n,o){function l(p){return p.default||p}if(typeof define==="function"&&define.amd)define([],function(){var p={};return o(p),l(p)});else if(typeof rt==="object"){if(o(rt),typeof Lr==="object")Lr.exports=l(rt)}else(function(){var p={};o(p),n.Long=l(p)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:rt,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=null;try{o=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 l(b,m,S){this.low=b|0,this.high=m|0,this.unsigned=!!S}l.prototype.__isLong__,Object.defineProperty(l.prototype,"__isLong__",{value:!0});function p(b){return(b&&b.__isLong__)===!0}function u(b){var m=Math.clz32(b&-b);return b?31-m:m}l.isLong=p;var s={},t={};function e(b,m){var S,P,R;if(m){if(b>>>=0,R=0<=b&&b<256){if(P=t[b],P)return P}if(S=a(b,0,!0),R)t[b]=S;return S}else{if(b|=0,R=-128<=b&&b<128){if(P=s[b],P)return P}if(S=a(b,b<0?-1:0,!1),R)s[b]=S;return S}}l.fromInt=e;function r(b,m){if(isNaN(b))return m?ue:Q;if(m){if(b<0)return ue;if(b>=Fn)return Wn}else{if(b<=-Kn)return B;if(b+1>=Kn)return $n}if(b<0)return r(-b,m).neg();return a(b%le|0,b/le|0,m)}l.fromNumber=r;function a(b,m,S){return new l(b,m,S)}l.fromBits=a;var f=Math.pow;function y(b,m,S){if(b.length===0)throw Error("empty string");if(typeof m==="number")S=m,m=!1;else m=!!m;if(b==="NaN"||b==="Infinity"||b==="+Infinity"||b==="-Infinity")return m?ue:Q;if(S=S||10,S<2||36<S)throw RangeError("radix");var P;if((P=b.indexOf("-"))>0)throw Error("interior hyphen");else if(P===0)return y(b.substring(1),m,S).neg();var R=r(f(S,8)),I=Q;for(var C=0;C<b.length;C+=8){var q=Math.min(8,b.length-C),K=parseInt(b.substring(C,C+q),S);if(q<8){var V=r(f(S,q));I=I.mul(V).add(r(K))}else I=I.mul(R),I=I.add(r(K))}return I.unsigned=m,I}l.fromString=y;function g(b,m){if(typeof b==="number")return r(b,m);if(typeof b==="string")return y(b,m);return a(b.low,b.high,typeof m==="boolean"?m:b.unsigned)}l.fromValue=g;var M=65536,F=16777216,le=M*M,Fn=le*le,Kn=Fn/2,zn=e(F),Q=e(0);l.ZERO=Q;var ue=e(0,!0);l.UZERO=ue;var De=e(1);l.ONE=De;var Jn=e(1,!0);l.UONE=Jn;var dr=e(-1);l.NEG_ONE=dr;var $n=a(-1,2147483647,!1);l.MAX_VALUE=$n;var Wn=a(-1,-1,!0);l.MAX_UNSIGNED_VALUE=Wn;var B=a(0,-2147483648,!1);l.MIN_VALUE=B;var O=l.prototype;if(O.toInt=function(){return this.unsigned?this.low>>>0:this.low},O.toNumber=function(){if(this.unsigned)return(this.high>>>0)*le+(this.low>>>0);return this.high*le+(this.low>>>0)},O.toString=function(m){if(m=m||10,m<2||36<m)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(B)){var S=r(m),P=this.div(S),R=P.mul(S).sub(this);return P.toString(m)+R.toInt().toString(m)}else return"-"+this.neg().toString(m);var I=r(f(m,6),this.unsigned),C=this,q="";while(!0){var K=C.div(I),V=C.sub(K.mul(I)).toInt()>>>0,L=V.toString(m);if(C=K,C.isZero())return L+q;else{while(L.length<6)L="0"+L;q=""+L+q}}},O.getHighBits=function(){return this.high},O.getHighBitsUnsigned=function(){return this.high>>>0},O.getLowBits=function(){return this.low},O.getLowBitsUnsigned=function(){return this.low>>>0},O.getNumBitsAbs=function(){if(this.isNegative())return this.eq(B)?64:this.neg().getNumBitsAbs();var m=this.high!=0?this.high:this.low;for(var S=31;S>0;S--)if((m&1<<S)!=0)break;return this.high!=0?S+33:S+1},O.isSafeInteger=function(){var m=this.high>>21;if(!m)return!0;if(this.unsigned)return!1;return m===-1&&!(this.low===0&&this.high===-2097152)},O.isZero=function(){return this.high===0&&this.low===0},O.eqz=O.isZero,O.isNegative=function(){return!this.unsigned&&this.high<0},O.isPositive=function(){return this.unsigned||this.high>=0},O.isOdd=function(){return(this.low&1)===1},O.isEven=function(){return(this.low&1)===0},O.equals=function(m){if(!p(m))m=g(m);if(this.unsigned!==m.unsigned&&this.high>>>31===1&&m.high>>>31===1)return!1;return this.high===m.high&&this.low===m.low},O.eq=O.equals,O.notEquals=function(m){return!this.eq(m)},O.neq=O.notEquals,O.ne=O.notEquals,O.lessThan=function(m){return this.comp(m)<0},O.lt=O.lessThan,O.lessThanOrEqual=function(m){return this.comp(m)<=0},O.lte=O.lessThanOrEqual,O.le=O.lessThanOrEqual,O.greaterThan=function(m){return this.comp(m)>0},O.gt=O.greaterThan,O.greaterThanOrEqual=function(m){return this.comp(m)>=0},O.gte=O.greaterThanOrEqual,O.ge=O.greaterThanOrEqual,O.compare=function(m){if(!p(m))m=g(m);if(this.eq(m))return 0;var S=this.isNegative(),P=m.isNegative();if(S&&!P)return-1;if(!S&&P)return 1;if(!this.unsigned)return this.sub(m).isNegative()?-1:1;return m.high>>>0>this.high>>>0||m.high===this.high&&m.low>>>0>this.low>>>0?-1:1},O.comp=O.compare,O.negate=function(){if(!this.unsigned&&this.eq(B))return B;return this.not().add(De)},O.neg=O.negate,O.add=function(m){if(!p(m))m=g(m);var S=this.high>>>16,P=this.high&65535,R=this.low>>>16,I=this.low&65535,C=m.high>>>16,q=m.high&65535,K=m.low>>>16,V=m.low&65535,L=0,z=0,D=0,H=0;return H+=I+V,D+=H>>>16,H&=65535,D+=R+K,z+=D>>>16,D&=65535,z+=P+q,L+=z>>>16,z&=65535,L+=S+C,L&=65535,a(D<<16|H,L<<16|z,this.unsigned)},O.subtract=function(m){if(!p(m))m=g(m);return this.add(m.neg())},O.sub=O.subtract,O.multiply=function(m){if(this.isZero())return this;if(!p(m))m=g(m);if(o){var S=o.mul(this.low,this.high,m.low,m.high);return a(S,o.get_high(),this.unsigned)}if(m.isZero())return this.unsigned?ue:Q;if(this.eq(B))return m.isOdd()?B:Q;if(m.eq(B))return this.isOdd()?B:Q;if(this.isNegative())if(m.isNegative())return this.neg().mul(m.neg());else return this.neg().mul(m).neg();else if(m.isNegative())return this.mul(m.neg()).neg();if(this.lt(zn)&&m.lt(zn))return r(this.toNumber()*m.toNumber(),this.unsigned);var P=this.high>>>16,R=this.high&65535,I=this.low>>>16,C=this.low&65535,q=m.high>>>16,K=m.high&65535,V=m.low>>>16,L=m.low&65535,z=0,D=0,H=0,Et=0;return Et+=C*L,H+=Et>>>16,Et&=65535,H+=I*L,D+=H>>>16,H&=65535,H+=C*V,D+=H>>>16,H&=65535,D+=R*L,z+=D>>>16,D&=65535,D+=I*V,z+=D>>>16,D&=65535,D+=C*K,z+=D>>>16,D&=65535,z+=P*L+R*V+I*K+C*q,z&=65535,a(H<<16|Et,z<<16|D,this.unsigned)},O.mul=O.multiply,O.divide=function(m){if(!p(m))m=g(m);if(m.isZero())throw Error("division by zero");if(o){if(!this.unsigned&&this.high===-2147483648&&m.low===-1&&m.high===-1)return this;var S=(this.unsigned?o.div_u:o.div_s)(this.low,this.high,m.low,m.high);return a(S,o.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?ue:Q;var P,R,I;if(!this.unsigned){if(this.eq(B))if(m.eq(De)||m.eq(dr))return B;else if(m.eq(B))return De;else{var C=this.shr(1);if(P=C.div(m).shl(1),P.eq(Q))return m.isNegative()?De:dr;else return R=this.sub(m.mul(P)),I=P.add(R.div(m)),I}else if(m.eq(B))return this.unsigned?ue:Q;if(this.isNegative()){if(m.isNegative())return this.neg().div(m.neg());return this.neg().div(m).neg()}else if(m.isNegative())return this.div(m.neg()).neg();I=Q}else{if(!m.unsigned)m=m.toUnsigned();if(m.gt(this))return ue;if(m.gt(this.shru(1)))return Jn;I=ue}R=this;while(R.gte(m)){P=Math.max(1,Math.floor(R.toNumber()/m.toNumber()));var q=Math.ceil(Math.log(P)/Math.LN2),K=q<=48?1:f(2,q-48),V=r(P),L=V.mul(m);while(L.isNegative()||L.gt(R))P-=K,V=r(P,this.unsigned),L=V.mul(m);if(V.isZero())V=De;I=I.add(V),R=R.sub(L)}return I},O.div=O.divide,O.modulo=function(m){if(!p(m))m=g(m);if(o){var S=(this.unsigned?o.rem_u:o.rem_s)(this.low,this.high,m.low,m.high);return a(S,o.get_high(),this.unsigned)}return this.sub(this.div(m).mul(m))},O.mod=O.modulo,O.rem=O.modulo,O.not=function(){return a(~this.low,~this.high,this.unsigned)},O.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},O.clz=O.countLeadingZeros,O.countTrailingZeros=function(){return this.low?u(this.low):u(this.high)+32},O.ctz=O.countTrailingZeros,O.and=function(m){if(!p(m))m=g(m);return a(this.low&m.low,this.high&m.high,this.unsigned)},O.or=function(m){if(!p(m))m=g(m);return a(this.low|m.low,this.high|m.high,this.unsigned)},O.xor=function(m){if(!p(m))m=g(m);return a(this.low^m.low,this.high^m.high,this.unsigned)},O.shiftLeft=function(m){if(p(m))m=m.toInt();if((m&=63)===0)return this;else if(m<32)return a(this.low<<m,this.high<<m|this.low>>>32-m,this.unsigned);else return a(0,this.low<<m-32,this.unsigned)},O.shl=O.shiftLeft,O.shiftRight=function(m){if(p(m))m=m.toInt();if((m&=63)===0)return this;else if(m<32)return a(this.low>>>m|this.high<<32-m,this.high>>m,this.unsigned);else return a(this.high>>m-32,this.high>=0?0:-1,this.unsigned)},O.shr=O.shiftRight,O.shiftRightUnsigned=function(m){if(p(m))m=m.toInt();if((m&=63)===0)return this;if(m<32)return a(this.low>>>m|this.high<<32-m,this.high>>>m,this.unsigned);if(m===32)return a(this.high,0,this.unsigned);return a(this.high>>>m-32,0,this.unsigned)},O.shru=O.shiftRightUnsigned,O.shr_u=O.shiftRightUnsigned,O.rotateLeft=function(m){var S;if(p(m))m=m.toInt();if((m&=63)===0)return this;if(m===32)return a(this.high,this.low,this.unsigned);if(m<32)return S=32-m,a(this.low<<m|this.high>>>S,this.high<<m|this.low>>>S,this.unsigned);return m-=32,S=32-m,a(this.high<<m|this.low>>>S,this.low<<m|this.high>>>S,this.unsigned)},O.rotl=O.rotateLeft,O.rotateRight=function(m){var S;if(p(m))m=m.toInt();if((m&=63)===0)return this;if(m===32)return a(this.high,this.low,this.unsigned);if(m<32)return S=32-m,a(this.high<<S|this.low>>>m,this.low<<S|this.high>>>m,this.unsigned);return m-=32,S=32-m,a(this.low<<S|this.high>>>m,this.high<<S|this.low>>>m,this.unsigned)},O.rotr=O.rotateRight,O.toSigned=function(){if(!this.unsigned)return this;return a(this.low,this.high,!1)},O.toUnsigned=function(){if(this.unsigned)return this;return a(this.low,this.high,!0)},O.toBytes=function(m){return m?this.toBytesLE():this.toBytesBE()},O.toBytesLE=function(){var m=this.high,S=this.low;return[S&255,S>>>8&255,S>>>16&255,S>>>24,m&255,m>>>8&255,m>>>16&255,m>>>24]},O.toBytesBE=function(){var m=this.high,S=this.low;return[m>>>24,m>>>16&255,m>>>8&255,m&255,S>>>24,S>>>16&255,S>>>8&255,S&255]},l.fromBytes=function(m,S,P){return P?l.fromBytesLE(m,S):l.fromBytesBE(m,S)},l.fromBytesLE=function(m,S){return new l(m[0]|m[1]<<8|m[2]<<16|m[3]<<24,m[4]|m[5]<<8|m[6]<<16|m[7]<<24,S)},l.fromBytesBE=function(m,S){return new l(m[4]<<24|m[5]<<16|m[6]<<8|m[7],m[0]<<24|m[1]<<16|m[2]<<8|m[3],S)},typeof BigInt==="function")l.fromBigInt=function(m,S){var P=Number(BigInt.asIntN(32,m)),R=Number(BigInt.asIntN(32,m>>BigInt(32)));return a(P,R,S)},l.fromValue=function(m,S){if(typeof m==="bigint")return l.fromBigInt(m,S);return g(m,S)},O.toBigInt=function(){var m=BigInt(this.low>>>0),S=BigInt(this.unsigned?this.high>>>0:this.high);return S<<BigInt(32)|m};var Px=n.default=l})});var he=i(function(Cr){var T=Cr;T.asPromise=Gu();T.base64=zu();T.EventEmitter=$u();T.float=ta();T.utf8=na();T.pool=ia();T.LongBits=aa();function sa(n){return n==="__proto__"||n==="prototype"||n==="constructor"}T.isUnsafeProperty=sa;T.isNode=Boolean(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);T.global=T.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||Cr;T.emptyArray=Object.freeze?Object.freeze([]):[];T.emptyObject=Object.freeze?Object.freeze({}):{};T.isInteger=Number.isInteger||function(o){return typeof o==="number"&&isFinite(o)&&Math.floor(o)===o};T.isString=function(o){return typeof o==="string"||o instanceof String};T.isObject=function(o){return o&&typeof o==="object"};T.isset=T.isSet=function(o,l){var p=o[l];if(p!=null&&Object.hasOwnProperty.call(o,l))return typeof p!=="object"||(Array.isArray(p)?p.length:Object.keys(p).length)>0;return!1};T.Buffer=function(){try{var n=T.global.Buffer;return n.prototype.utf8Write?n:null}catch(o){return null}}();T._Buffer_from=null;T._Buffer_allocUnsafe=null;T.newBuffer=function(o){return typeof o==="number"?T.Buffer?T._Buffer_allocUnsafe(o):new T.Array(o):T.Buffer?T._Buffer_from(o):typeof Uint8Array>"u"?o:new Uint8Array(o)};T.Array=typeof Uint8Array<"u"?Uint8Array:Array;T.Long=T.global.dcodeIO&&T.global.dcodeIO.Long||T.global.Long||function(){try{var n=ca();return n&&n.isLong?n:null}catch(o){return null}}();T.key2Re=/^true|false|0|1$/;T.key32Re=/^-?(?:0|[1-9][0-9]*)$/;T.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;T.longToHash=function(o){return o?T.LongBits.from(o).toHash():T.LongBits.zeroHash};T.longFromHash=function(o,l){var p=T.LongBits.fromHash(o);if(T.Long)return T.Long.fromBits(p.lo,p.hi,l);return p.toNumber(Boolean(l))};function la(n){var o=typeof arguments[arguments.length-1]==="boolean",l=o?arguments.length-1:arguments.length;o=o&&arguments[arguments.length-1];for(var p=1;p<l;++p){var u=arguments[p];if(!u)continue;for(var s=Object.keys(u),t=0;t<s.length;++t)if(!sa(s[t])&&(n[s[t]]===void 0||!o))n[s[t]]=u[s[t]]}return n}T.merge=la;T.nestingLimit=32;T.recursionLimit=100;T.makeProp=function(o,l){Object.defineProperty(o,l,{enumerable:!0,configurable:!0,writable:!0})};T.lcFirst=function(o){return o.charAt(0).toLowerCase()+o.substring(1)};function pa(n){function o(l,p){if(!(this instanceof o))return new o(l,p);if(Object.defineProperty(this,"message",{get:function(){return l}}),Error.captureStackTrace)Error.captureStackTrace(this,o);else Object.defineProperty(this,"stack",{value:Error().stack||""});if(p)la(this,p)}return o.prototype=Object.create(Error.prototype,{constructor:{value:o,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return n},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),o}T.newError=pa;T.ProtocolError=pa("ProtocolError");T.oneOfGetter=function(o){var l={};for(var p=0;p<o.length;++p)l[o[p]]=1;return function(){for(var u=Object.keys(this),s=u.length-1;s>-1;--s)if(l[u[s]]===1&&this[u[s]]!==void 0&&this[u[s]]!==null)return u[s]}};T.oneOfSetter=function(o){return function(l){for(var p=0;p<o.length;++p)if(o[p]!==l)delete this[o[p]]}};T.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};T._configure=function(){var n=T.Buffer;if(!n){T._Buffer_from=T._Buffer_allocUnsafe=null;return}T._Buffer_from=n.from!==Uint8Array.from&&n.from||function(l,p){return new n(l,p)},T._Buffer_allocUnsafe=n.allocUnsafe||function(l){return new n(l)}}});var Gr=i(function(DE,ma){ma.exports=w;var Y=he(),Dr,{LongBits:jt,base64:da,utf8:ha}=Y;function nt(n,o,l){this.fn=n,this.len=o,this.next=void 0,this.val=l}function Vr(){}function v_(n){this.head=n.head,this.tail=n.tail,this.len=n.len,this.next=n.states}function w(){this.len=0,this.head=new nt(Vr,0,0),this.tail=this.head,this.states=null}var ya=function(){return Y.Buffer?function(){return(w.create=function(){return new Dr})()}:function(){return new w}};w.create=ya();w.alloc=function(o){return new Y.Array(o)};if(Y.Array!==Array)w.alloc=Y.pool(w.alloc,Y.Array.prototype.subarray);w.prototype._push=function(o,l,p){return this.tail=this.tail.next=new nt(o,l,p),this.len+=l,this};function Br(n,o,l){o[l]=n&255}function b_(n,o,l){while(n>127)o[l++]=n&127|128,n>>>=7;o[l]=n}function qr(n,o){this.len=n,this.next=void 0,this.val=o}qr.prototype=Object.create(nt.prototype);qr.prototype.fn=b_;w.prototype.uint32=function(o){return this.len+=(this.tail=this.tail.next=new qr((o=o>>>0)<128?1:o<16384?2:o<2097152?3:o<268435456?4:5,o)).len,this};w.prototype.int32=function(o){return(o|=0)<0?this._push(jr,10,jt.fromNumber(o)):this.uint32(o)};w.prototype.sint32=function(o){return this.uint32((o<<1^o>>31)>>>0)};function jr(n,o,l){var{lo:p,hi:u}=n;while(u)o[l++]=p&127|128,p=(p>>>7|u<<25)>>>0,u>>>=7;while(p>127)o[l++]=p&127|128,p=p>>>7;o[l++]=p}w.prototype.uint64=function(o){var l=jt.from(o);return this._push(jr,l.length(),l)};w.prototype.int64=w.prototype.uint64;w.prototype.sint64=function(o){var l=jt.from(o).zzEncode();return this._push(jr,l.length(),l)};w.prototype.bool=function(o){return this._push(Br,1,o?1:0)};function kr(n,o,l){o[l]=n&255,o[l+1]=n>>>8&255,o[l+2]=n>>>16&255,o[l+3]=n>>>24}w.prototype.fixed32=function(o){return this._push(kr,4,o>>>0)};w.prototype.sfixed32=w.prototype.fixed32;w.prototype.fixed64=function(o){var l=jt.from(o);return this._push(kr,4,l.lo)._push(kr,4,l.hi)};w.prototype.sfixed64=w.prototype.fixed64;w.prototype.float=function(o){return this._push(Y.float.writeFloatLE,4,o)};w.prototype.double=function(o){return this._push(Y.float.writeDoubleLE,8,o)};var O_=Y.Array.prototype.set?function(o,l,p){l.set(o,p)}:function(o,l,p){for(var u=0;u<o.length;++u)l[p+u]=o[u]};w.prototype.bytes=function(o){var l=o.length>>>0;if(!l)return this._push(Br,1,0);if(Y.isString(o)){var p=w.alloc(l=da.length(o));da.decode(o,p,0),o=p}return this.uint32(l)._push(O_,l,o)};w.prototype.string=function(o){var l=ha.length(o);return l?this.uint32(l)._push(ha.write,l,o):this._push(Br,1,0)};w.prototype.fork=function(){return this.states=new v_(this),this.head=this.tail=new nt(Vr,0,0),this.len=0,this};w.prototype.reset=function(){if(this.states)this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next;else this.head=this.tail=new nt(Vr,0,0),this.len=0;return this};w.prototype.ldelim=function(){var o=this.head,l=this.tail,p=this.len;if(this.reset().uint32(p),p)this.tail.next=o.next,this.tail=l,this.len+=p;return this};w.prototype.finish=function(){var o=this.head.next,l=this.constructor.alloc(this.len),p=0;while(o)o.fn(o.val,l,p),p+=o.len,o=o.next;return l};w._configure=function(n){Dr=n,w.create=ya(),Dr._configure()}});var va=i(function(kE,ga){ga.exports=re;var _a=Gr();(re.prototype=Object.create(_a.prototype)).constructor=re;var ye=he();function re(){_a.call(this)}re._configure=function(){re.alloc=ye._Buffer_allocUnsafe,re.writeBytesBuffer=ye.Buffer&&ye.Buffer.prototype instanceof Uint8Array&&ye.Buffer.prototype.set.name==="set"?function(o,l,p){l.set(o,p)}:function(o,l,p){if(o.copy)o.copy(l,p,0,o.length);else for(var u=0;u<o.length;)l[p++]=o[u++]}};re.prototype.bytes=function(o){if(ye.isString(o))o=ye._Buffer_from(o,"base64");var l=o.length>>>0;if(this.uint32(l),l)this._push(re.writeBytesBuffer,l,o);return this};function S_(n,o,l){if(n.length<40)ye.utf8.write(n,o,l);else if(o.utf8Write)o.utf8Write(n,l);else o.write(n,l)}re.prototype.string=function(o){var l=ye.Buffer.byteLength(o);if(this.uint32(l),l)this._push(S_,l,o);return this};re._configure()});var Kr=i(function(VE,xa){xa.exports=U;var X=he(),Fr,{LongBits:Sa,utf8:T_}=X;function ee(n,o){return RangeError("index out of range: "+n.pos+" + "+(o||1)+" > "+n.len)}function U(n){this.buf=n,this.pos=0,this.len=n.length}var ba=typeof Uint8Array<"u"?function(o){if(o instanceof Uint8Array||Array.isArray(o))return new U(o);throw Error("illegal buffer")}:function(o){if(Array.isArray(o))return new U(o);throw Error("illegal buffer")},Ta=function(){return X.Buffer?function(l){return(U.create=function(u){return X.Buffer.isBuffer(u)?new Fr(u):ba(u)})(l)}:ba};U.create=Ta();U.prototype._slice=X.Array.prototype.subarray||X.Array.prototype.slice;U.prototype.uint32=function(){var o=4294967295;return function(){if(o=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128)return o;if(o=(o|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)return o;if(o=(o|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)return o;if(o=(o|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)return o;if(o=(o|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128)return o;if((this.pos+=5)>this.len)throw this.pos=this.len,ee(this,10);return o}}();U.prototype.int32=function(){return this.uint32()|0};U.prototype.sint32=function(){var o=this.uint32();return o>>>1^-(o&1)|0};function Hr(){var n=new Sa(0,0),o=0;if(this.len-this.pos>4){for(;o<4;++o)if(n.lo=(n.lo|(this.buf[this.pos]&127)<<o*7)>>>0,this.buf[this.pos++]<128)return n;if(n.lo=(n.lo|(this.buf[this.pos]&127)<<28)>>>0,n.hi=(n.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return n;o=0}else{for(;o<3;++o){if(this.pos>=this.len)throw ee(this);if(n.lo=(n.lo|(this.buf[this.pos]&127)<<o*7)>>>0,this.buf[this.pos++]<128)return n}return n.lo=(n.lo|(this.buf[this.pos++]&127)<<o*7)>>>0,n}if(this.len-this.pos>4){for(;o<5;++o)if(n.hi=(n.hi|(this.buf[this.pos]&127)<<o*7+3)>>>0,this.buf[this.pos++]<128)return n}else for(;o<5;++o){if(this.pos>=this.len)throw ee(this);if(n.hi=(n.hi|(this.buf[this.pos]&127)<<o*7+3)>>>0,this.buf[this.pos++]<128)return n}throw Error("invalid varint encoding")}U.prototype.bool=function(){return this.uint32()!==0};function Gt(n,o){return(n[o-4]|n[o-3]<<8|n[o-2]<<16|n[o-1]<<24)>>>0}U.prototype.fixed32=function(){if(this.pos+4>this.len)throw ee(this,4);return Gt(this.buf,this.pos+=4)};U.prototype.sfixed32=function(){if(this.pos+4>this.len)throw ee(this,4);return Gt(this.buf,this.pos+=4)|0};function Oa(){if(this.pos+8>this.len)throw ee(this,8);return new Sa(Gt(this.buf,this.pos+=4),Gt(this.buf,this.pos+=4))}U.prototype.float=function(){if(this.pos+4>this.len)throw ee(this,4);var o=X.float.readFloatLE(this.buf,this.pos);return this.pos+=4,o};U.prototype.double=function(){if(this.pos+8>this.len)throw ee(this,4);var o=X.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,o};U.prototype.bytes=function(){var o=this.uint32(),l=this.pos,p=this.pos+o;if(p>this.len)throw ee(this,o);if(this.pos+=o,Array.isArray(this.buf))return this.buf.slice(l,p);if(l===p){var u=X.Buffer;return u?u.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,l,p)};U.prototype.string=function(){var o=this.bytes();return T_.read(o,0,o.length)};U.prototype.skip=function(o){if(typeof o==="number"){if(this.pos+o>this.len)throw ee(this,o);this.pos+=o}else do if(this.pos>=this.len)throw ee(this);while(this.buf[this.pos++]&128);return this};U.recursionLimit=X.recursionLimit;U.prototype.skipType=function(n,o){if(o===void 0)o=0;if(o>U.recursionLimit)throw Error("maximum nesting depth exceeded");switch(n){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:while((n=this.uint32()&7)!==4)this.skipType(n,o+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+n+" at offset "+this.pos)}return this};U._configure=function(n){Fr=n,U.create=Ta(),Fr._configure();var o=X.Long?"toLong":"toNumber";X.merge(U.prototype,{int64:function(){return Hr.call(this)[o](!1)},uint64:function(){return Hr.call(this)[o](!0)},sint64:function(){return Hr.call(this).zzDecode()[o](!1)},fixed64:function(){return Oa.call(this)[o](!0)},sfixed64:function(){return Oa.call(this)[o](!1)}})}});var Pa=i(function(BE,Na){Na.exports=Ee;var Aa=Kr();(Ee.prototype=Object.create(Aa.prototype)).constructor=Ee;var Ea=he();function Ee(n){Aa.call(this,n)}Ee._configure=function(){if(Ea.Buffer)Ee.prototype._slice=Ea.Buffer.prototype.slice};Ee.prototype.string=function(){var o=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+o,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+o,this.len))};Ee._configure()});var Ia=i(function(qE,wa){wa.exports=ot;var zr=he();(ot.prototype=Object.create(zr.EventEmitter.prototype)).constructor=ot;function ot(n,o,l){if(typeof n!=="function")throw TypeError("rpcImpl must be a function");zr.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=Boolean(o),this.responseDelimited=Boolean(l)}ot.prototype.rpcCall=function n(o,l,p,u,s){if(!u)throw TypeError("request must be specified");var t=this;if(!s)return zr.asPromise(n,t,o,l,p,u);if(!t.rpcImpl){setTimeout(function(){s(Error("already ended"))},0);return}try{return t.rpcImpl(o,l[t.requestDelimited?"encodeDelimited":"encode"](u).finish(),function(r,a){if(r)return t.emit("error",r,o),s(r);if(a===null){t.end(!0);return}if(!(a instanceof p))try{a=p[t.responseDelimited?"decodeDelimited":"decode"](a)}catch(f){return t.emit("error",f,o),s(f)}return t.emit("data",a,o),s(null,a)})}catch(e){t.emit("error",e,o),setTimeout(function(){s(e)},0);return}};ot.prototype.end=function(o){if(this.rpcImpl){if(!o)this.rpcImpl(null,null,null);this.rpcImpl=null,this.emit("end").off()}return this}});var Ma=i(function(Ra){var x_=Ra;x_.Service=Ia()});var La=i(function(GE,Ua){Ua.exports=Object.create(null)});var ka=i(function(Da){var j=Da;j.build="minimal";j.Writer=Gr();j.BufferWriter=va();j.Reader=Kr();j.BufferReader=Pa();j.util=he();j.rpc=Ma();j.roots=La();j.configure=Ca;function Ca(){j.util._configure(),j.Writer._configure(j.BufferWriter),j.Reader._configure(j.BufferReader)}Ca()});var Ht=i(function(Va,Ba){Object.defineProperty(Va,"__esModule",{value:!0});var x=ka(),{Reader:_,Writer:N,util:h}=x,d=x.roots.default||(x.roots.default={});d.opentelemetry=function(){var n={};return n.proto=function(){var o={};return o.common=function(){var l={};return l.v1=function(){var p={};return p.AnyValue=function(){function u(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}u.prototype.stringValue=null,u.prototype.boolValue=null,u.prototype.intValue=null,u.prototype.doubleValue=null,u.prototype.arrayValue=null,u.prototype.kvlistValue=null,u.prototype.bytesValue=null;var s;return Object.defineProperty(u.prototype,"value",{get:h.oneOfGetter(s=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:h.oneOfSetter(s)}),u.create=function(e){return new u(e)},u.encode=function(e,r){if(!r)r=N.create();if(e.stringValue!=null&&Object.hasOwnProperty.call(e,"stringValue"))r.uint32(10).string(e.stringValue);if(e.boolValue!=null&&Object.hasOwnProperty.call(e,"boolValue"))r.uint32(16).bool(e.boolValue);if(e.intValue!=null&&Object.hasOwnProperty.call(e,"intValue"))r.uint32(24).int64(e.intValue);if(e.doubleValue!=null&&Object.hasOwnProperty.call(e,"doubleValue"))r.uint32(33).double(e.doubleValue);if(e.arrayValue!=null&&Object.hasOwnProperty.call(e,"arrayValue"))d.opentelemetry.proto.common.v1.ArrayValue.encode(e.arrayValue,r.uint32(42).fork()).ldelim();if(e.kvlistValue!=null&&Object.hasOwnProperty.call(e,"kvlistValue"))d.opentelemetry.proto.common.v1.KeyValueList.encode(e.kvlistValue,r.uint32(50).fork()).ldelim();if(e.bytesValue!=null&&Object.hasOwnProperty.call(e,"bytesValue"))r.uint32(58).bytes(e.bytesValue);return r},u.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},u.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.common.v1.AnyValue;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.stringValue=e.string();break}case 2:{y.boolValue=e.bool();break}case 3:{y.intValue=e.int64();break}case 4:{y.doubleValue=e.double();break}case 5:{y.arrayValue=d.opentelemetry.proto.common.v1.ArrayValue.decode(e,e.uint32());break}case 6:{y.kvlistValue=d.opentelemetry.proto.common.v1.KeyValueList.decode(e,e.uint32());break}case 7:{y.bytesValue=e.bytes();break}default:e.skipType(g&7);break}}return y},u.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";var r={};if(e.stringValue!=null&&e.hasOwnProperty("stringValue")){if(r.value=1,!h.isString(e.stringValue))return"stringValue: string expected"}if(e.boolValue!=null&&e.hasOwnProperty("boolValue")){if(r.value===1)return"value: multiple values";if(r.value=1,typeof e.boolValue!=="boolean")return"boolValue: boolean expected"}if(e.intValue!=null&&e.hasOwnProperty("intValue")){if(r.value===1)return"value: multiple values";if(r.value=1,!h.isInteger(e.intValue)&&!(e.intValue&&h.isInteger(e.intValue.low)&&h.isInteger(e.intValue.high)))return"intValue: integer|Long expected"}if(e.doubleValue!=null&&e.hasOwnProperty("doubleValue")){if(r.value===1)return"value: multiple values";if(r.value=1,typeof e.doubleValue!=="number")return"doubleValue: number expected"}if(e.arrayValue!=null&&e.hasOwnProperty("arrayValue")){if(r.value===1)return"value: multiple values";r.value=1;{var a=d.opentelemetry.proto.common.v1.ArrayValue.verify(e.arrayValue);if(a)return"arrayValue."+a}}if(e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")){if(r.value===1)return"value: multiple values";r.value=1;{var a=d.opentelemetry.proto.common.v1.KeyValueList.verify(e.kvlistValue);if(a)return"kvlistValue."+a}}if(e.bytesValue!=null&&e.hasOwnProperty("bytesValue")){if(r.value===1)return"value: multiple values";if(r.value=1,!(e.bytesValue&&typeof e.bytesValue.length==="number"||h.isString(e.bytesValue)))return"bytesValue: buffer expected"}return null},u.fromObject=function(e){if(e instanceof d.opentelemetry.proto.common.v1.AnyValue)return e;var r=new d.opentelemetry.proto.common.v1.AnyValue;if(e.stringValue!=null)r.stringValue=String(e.stringValue);if(e.boolValue!=null)r.boolValue=Boolean(e.boolValue);if(e.intValue!=null){if(h.Long)(r.intValue=h.Long.fromValue(e.intValue)).unsigned=!1;else if(typeof e.intValue==="string")r.intValue=parseInt(e.intValue,10);else if(typeof e.intValue==="number")r.intValue=e.intValue;else if(typeof e.intValue==="object")r.intValue=new h.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber()}if(e.doubleValue!=null)r.doubleValue=Number(e.doubleValue);if(e.arrayValue!=null){if(typeof e.arrayValue!=="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");r.arrayValue=d.opentelemetry.proto.common.v1.ArrayValue.fromObject(e.arrayValue)}if(e.kvlistValue!=null){if(typeof e.kvlistValue!=="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");r.kvlistValue=d.opentelemetry.proto.common.v1.KeyValueList.fromObject(e.kvlistValue)}if(e.bytesValue!=null){if(typeof e.bytesValue==="string")h.base64.decode(e.bytesValue,r.bytesValue=h.newBuffer(h.base64.length(e.bytesValue)),0);else if(e.bytesValue.length>=0)r.bytesValue=e.bytesValue}return r},u.toObject=function(e,r){if(!r)r={};var a={};if(e.stringValue!=null&&e.hasOwnProperty("stringValue")){if(a.stringValue=e.stringValue,r.oneofs)a.value="stringValue"}if(e.boolValue!=null&&e.hasOwnProperty("boolValue")){if(a.boolValue=e.boolValue,r.oneofs)a.value="boolValue"}if(e.intValue!=null&&e.hasOwnProperty("intValue")){if(typeof e.intValue==="number")a.intValue=r.longs===String?String(e.intValue):e.intValue;else a.intValue=r.longs===String?h.Long.prototype.toString.call(e.intValue):r.longs===Number?new h.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber():e.intValue;if(r.oneofs)a.value="intValue"}if(e.doubleValue!=null&&e.hasOwnProperty("doubleValue")){if(a.doubleValue=r.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue,r.oneofs)a.value="doubleValue"}if(e.arrayValue!=null&&e.hasOwnProperty("arrayValue")){if(a.arrayValue=d.opentelemetry.proto.common.v1.ArrayValue.toObject(e.arrayValue,r),r.oneofs)a.value="arrayValue"}if(e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")){if(a.kvlistValue=d.opentelemetry.proto.common.v1.KeyValueList.toObject(e.kvlistValue,r),r.oneofs)a.value="kvlistValue"}if(e.bytesValue!=null&&e.hasOwnProperty("bytesValue")){if(a.bytesValue=r.bytes===String?h.base64.encode(e.bytesValue,0,e.bytesValue.length):r.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue,r.oneofs)a.value="bytesValue"}return a},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.common.v1.AnyValue"},u}(),p.ArrayValue=function(){function u(s){if(this.values=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.values=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.values!=null&&t.values.length)for(var r=0;r<t.values.length;++r)d.opentelemetry.proto.common.v1.AnyValue.encode(t.values[r],e.uint32(10).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.common.v1.ArrayValue;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.values&&f.values.length))f.values=[];f.values.push(d.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.values!=null&&t.hasOwnProperty("values")){if(!Array.isArray(t.values))return"values: array expected";for(var e=0;e<t.values.length;++e){var r=d.opentelemetry.proto.common.v1.AnyValue.verify(t.values[e]);if(r)return"values."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.common.v1.ArrayValue)return t;var e=new d.opentelemetry.proto.common.v1.ArrayValue;if(t.values){if(!Array.isArray(t.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");e.values=[];for(var r=0;r<t.values.length;++r){if(typeof t.values[r]!=="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");e.values[r]=d.opentelemetry.proto.common.v1.AnyValue.fromObject(t.values[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.values=[];if(t.values&&t.values.length){r.values=[];for(var a=0;a<t.values.length;++a)r.values[a]=d.opentelemetry.proto.common.v1.AnyValue.toObject(t.values[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.common.v1.ArrayValue"},u}(),p.KeyValueList=function(){function u(s){if(this.values=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.values=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.values!=null&&t.values.length)for(var r=0;r<t.values.length;++r)d.opentelemetry.proto.common.v1.KeyValue.encode(t.values[r],e.uint32(10).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.common.v1.KeyValueList;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.values&&f.values.length))f.values=[];f.values.push(d.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.values!=null&&t.hasOwnProperty("values")){if(!Array.isArray(t.values))return"values: array expected";for(var e=0;e<t.values.length;++e){var r=d.opentelemetry.proto.common.v1.KeyValue.verify(t.values[e]);if(r)return"values."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.common.v1.KeyValueList)return t;var e=new d.opentelemetry.proto.common.v1.KeyValueList;if(t.values){if(!Array.isArray(t.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");e.values=[];for(var r=0;r<t.values.length;++r){if(typeof t.values[r]!=="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");e.values[r]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(t.values[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.values=[];if(t.values&&t.values.length){r.values=[];for(var a=0;a<t.values.length;++a)r.values[a]=d.opentelemetry.proto.common.v1.KeyValue.toObject(t.values[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.common.v1.KeyValueList"},u}(),p.KeyValue=function(){function u(s){if(s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.key=null,u.prototype.value=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.key!=null&&Object.hasOwnProperty.call(t,"key"))e.uint32(10).string(t.key);if(t.value!=null&&Object.hasOwnProperty.call(t,"value"))d.opentelemetry.proto.common.v1.AnyValue.encode(t.value,e.uint32(18).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.common.v1.KeyValue;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.key=t.string();break}case 2:{f.value=d.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.key!=null&&t.hasOwnProperty("key")){if(!h.isString(t.key))return"key: string expected"}if(t.value!=null&&t.hasOwnProperty("value")){var e=d.opentelemetry.proto.common.v1.AnyValue.verify(t.value);if(e)return"value."+e}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.common.v1.KeyValue)return t;var e=new d.opentelemetry.proto.common.v1.KeyValue;if(t.key!=null)e.key=String(t.key);if(t.value!=null){if(typeof t.value!=="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");e.value=d.opentelemetry.proto.common.v1.AnyValue.fromObject(t.value)}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.defaults)r.key="",r.value=null;if(t.key!=null&&t.hasOwnProperty("key"))r.key=t.key;if(t.value!=null&&t.hasOwnProperty("value"))r.value=d.opentelemetry.proto.common.v1.AnyValue.toObject(t.value,e);return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.common.v1.KeyValue"},u}(),p.InstrumentationScope=function(){function u(s){if(this.attributes=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.name=null,u.prototype.version=null,u.prototype.attributes=h.emptyArray,u.prototype.droppedAttributesCount=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.name!=null&&Object.hasOwnProperty.call(t,"name"))e.uint32(10).string(t.name);if(t.version!=null&&Object.hasOwnProperty.call(t,"version"))e.uint32(18).string(t.version);if(t.attributes!=null&&t.attributes.length)for(var r=0;r<t.attributes.length;++r)d.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[r],e.uint32(26).fork()).ldelim();if(t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount"))e.uint32(32).uint32(t.droppedAttributesCount);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.common.v1.InstrumentationScope;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.name=t.string();break}case 2:{f.version=t.string();break}case 3:{if(!(f.attributes&&f.attributes.length))f.attributes=[];f.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{f.droppedAttributesCount=t.uint32();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.name!=null&&t.hasOwnProperty("name")){if(!h.isString(t.name))return"name: string expected"}if(t.version!=null&&t.hasOwnProperty("version")){if(!h.isString(t.version))return"version: string expected"}if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var r=d.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(r)return"attributes."+r}}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(t.droppedAttributesCount))return"droppedAttributesCount: integer expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.common.v1.InstrumentationScope)return t;var e=new d.opentelemetry.proto.common.v1.InstrumentationScope;if(t.name!=null)e.name=String(t.name);if(t.version!=null)e.version=String(t.version);if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");e.attributes=[];for(var r=0;r<t.attributes.length;++r){if(typeof t.attributes[r]!=="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");e.attributes[r]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[r])}}if(t.droppedAttributesCount!=null)e.droppedAttributesCount=t.droppedAttributesCount>>>0;return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.attributes=[];if(e.defaults)r.name="",r.version="",r.droppedAttributesCount=0;if(t.name!=null&&t.hasOwnProperty("name"))r.name=t.name;if(t.version!=null&&t.hasOwnProperty("version"))r.version=t.version;if(t.attributes&&t.attributes.length){r.attributes=[];for(var a=0;a<t.attributes.length;++a)r.attributes[a]=d.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[a],e)}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount"))r.droppedAttributesCount=t.droppedAttributesCount;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.common.v1.InstrumentationScope"},u}(),p.EntityRef=function(){function u(s){if(this.idKeys=[],this.descriptionKeys=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.schemaUrl=null,u.prototype.type=null,u.prototype.idKeys=h.emptyArray,u.prototype.descriptionKeys=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl"))e.uint32(10).string(t.schemaUrl);if(t.type!=null&&Object.hasOwnProperty.call(t,"type"))e.uint32(18).string(t.type);if(t.idKeys!=null&&t.idKeys.length)for(var r=0;r<t.idKeys.length;++r)e.uint32(26).string(t.idKeys[r]);if(t.descriptionKeys!=null&&t.descriptionKeys.length)for(var r=0;r<t.descriptionKeys.length;++r)e.uint32(34).string(t.descriptionKeys[r]);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.common.v1.EntityRef;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.schemaUrl=t.string();break}case 2:{f.type=t.string();break}case 3:{if(!(f.idKeys&&f.idKeys.length))f.idKeys=[];f.idKeys.push(t.string());break}case 4:{if(!(f.descriptionKeys&&f.descriptionKeys.length))f.descriptionKeys=[];f.descriptionKeys.push(t.string());break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")){if(!h.isString(t.schemaUrl))return"schemaUrl: string expected"}if(t.type!=null&&t.hasOwnProperty("type")){if(!h.isString(t.type))return"type: string expected"}if(t.idKeys!=null&&t.hasOwnProperty("idKeys")){if(!Array.isArray(t.idKeys))return"idKeys: array expected";for(var e=0;e<t.idKeys.length;++e)if(!h.isString(t.idKeys[e]))return"idKeys: string[] expected"}if(t.descriptionKeys!=null&&t.hasOwnProperty("descriptionKeys")){if(!Array.isArray(t.descriptionKeys))return"descriptionKeys: array expected";for(var e=0;e<t.descriptionKeys.length;++e)if(!h.isString(t.descriptionKeys[e]))return"descriptionKeys: string[] expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.common.v1.EntityRef)return t;var e=new d.opentelemetry.proto.common.v1.EntityRef;if(t.schemaUrl!=null)e.schemaUrl=String(t.schemaUrl);if(t.type!=null)e.type=String(t.type);if(t.idKeys){if(!Array.isArray(t.idKeys))throw TypeError(".opentelemetry.proto.common.v1.EntityRef.idKeys: array expected");e.idKeys=[];for(var r=0;r<t.idKeys.length;++r)e.idKeys[r]=String(t.idKeys[r])}if(t.descriptionKeys){if(!Array.isArray(t.descriptionKeys))throw TypeError(".opentelemetry.proto.common.v1.EntityRef.descriptionKeys: array expected");e.descriptionKeys=[];for(var r=0;r<t.descriptionKeys.length;++r)e.descriptionKeys[r]=String(t.descriptionKeys[r])}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.idKeys=[],r.descriptionKeys=[];if(e.defaults)r.schemaUrl="",r.type="";if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl"))r.schemaUrl=t.schemaUrl;if(t.type!=null&&t.hasOwnProperty("type"))r.type=t.type;if(t.idKeys&&t.idKeys.length){r.idKeys=[];for(var a=0;a<t.idKeys.length;++a)r.idKeys[a]=t.idKeys[a]}if(t.descriptionKeys&&t.descriptionKeys.length){r.descriptionKeys=[];for(var a=0;a<t.descriptionKeys.length;++a)r.descriptionKeys[a]=t.descriptionKeys[a]}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.common.v1.EntityRef"},u}(),p}(),l}(),o.resource=function(){var l={};return l.v1=function(){var p={};return p.Resource=function(){function u(s){if(this.attributes=[],this.entityRefs=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.attributes=h.emptyArray,u.prototype.droppedAttributesCount=null,u.prototype.entityRefs=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.attributes!=null&&t.attributes.length)for(var r=0;r<t.attributes.length;++r)d.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[r],e.uint32(10).fork()).ldelim();if(t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount"))e.uint32(16).uint32(t.droppedAttributesCount);if(t.entityRefs!=null&&t.entityRefs.length)for(var r=0;r<t.entityRefs.length;++r)d.opentelemetry.proto.common.v1.EntityRef.encode(t.entityRefs[r],e.uint32(26).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.resource.v1.Resource;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.attributes&&f.attributes.length))f.attributes=[];f.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{f.droppedAttributesCount=t.uint32();break}case 3:{if(!(f.entityRefs&&f.entityRefs.length))f.entityRefs=[];f.entityRefs.push(d.opentelemetry.proto.common.v1.EntityRef.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var r=d.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(r)return"attributes."+r}}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(t.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(t.entityRefs!=null&&t.hasOwnProperty("entityRefs")){if(!Array.isArray(t.entityRefs))return"entityRefs: array expected";for(var e=0;e<t.entityRefs.length;++e){var r=d.opentelemetry.proto.common.v1.EntityRef.verify(t.entityRefs[e]);if(r)return"entityRefs."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.resource.v1.Resource)return t;var e=new d.opentelemetry.proto.resource.v1.Resource;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");e.attributes=[];for(var r=0;r<t.attributes.length;++r){if(typeof t.attributes[r]!=="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");e.attributes[r]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[r])}}if(t.droppedAttributesCount!=null)e.droppedAttributesCount=t.droppedAttributesCount>>>0;if(t.entityRefs){if(!Array.isArray(t.entityRefs))throw TypeError(".opentelemetry.proto.resource.v1.Resource.entityRefs: array expected");e.entityRefs=[];for(var r=0;r<t.entityRefs.length;++r){if(typeof t.entityRefs[r]!=="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.entityRefs: object expected");e.entityRefs[r]=d.opentelemetry.proto.common.v1.EntityRef.fromObject(t.entityRefs[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.attributes=[],r.entityRefs=[];if(e.defaults)r.droppedAttributesCount=0;if(t.attributes&&t.attributes.length){r.attributes=[];for(var a=0;a<t.attributes.length;++a)r.attributes[a]=d.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[a],e)}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount"))r.droppedAttributesCount=t.droppedAttributesCount;if(t.entityRefs&&t.entityRefs.length){r.entityRefs=[];for(var a=0;a<t.entityRefs.length;++a)r.entityRefs[a]=d.opentelemetry.proto.common.v1.EntityRef.toObject(t.entityRefs[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.resource.v1.Resource"},u}(),p}(),l}(),o.trace=function(){var l={};return l.v1=function(){var p={};return p.TracesData=function(){function u(s){if(this.resourceSpans=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.resourceSpans=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.resourceSpans!=null&&t.resourceSpans.length)for(var r=0;r<t.resourceSpans.length;++r)d.opentelemetry.proto.trace.v1.ResourceSpans.encode(t.resourceSpans[r],e.uint32(10).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.trace.v1.TracesData;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.resourceSpans&&f.resourceSpans.length))f.resourceSpans=[];f.resourceSpans.push(d.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.resourceSpans!=null&&t.hasOwnProperty("resourceSpans")){if(!Array.isArray(t.resourceSpans))return"resourceSpans: array expected";for(var e=0;e<t.resourceSpans.length;++e){var r=d.opentelemetry.proto.trace.v1.ResourceSpans.verify(t.resourceSpans[e]);if(r)return"resourceSpans."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.trace.v1.TracesData)return t;var e=new d.opentelemetry.proto.trace.v1.TracesData;if(t.resourceSpans){if(!Array.isArray(t.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");e.resourceSpans=[];for(var r=0;r<t.resourceSpans.length;++r){if(typeof t.resourceSpans[r]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");e.resourceSpans[r]=d.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(t.resourceSpans[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.resourceSpans=[];if(t.resourceSpans&&t.resourceSpans.length){r.resourceSpans=[];for(var a=0;a<t.resourceSpans.length;++a)r.resourceSpans[a]=d.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.trace.v1.TracesData"},u}(),p.ResourceSpans=function(){function u(s){if(this.scopeSpans=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.resource=null,u.prototype.scopeSpans=h.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.resource!=null&&Object.hasOwnProperty.call(t,"resource"))d.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim();if(t.scopeSpans!=null&&t.scopeSpans.length)for(var r=0;r<t.scopeSpans.length;++r)d.opentelemetry.proto.trace.v1.ScopeSpans.encode(t.scopeSpans[r],e.uint32(18).fork()).ldelim();if(t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl"))e.uint32(26).string(t.schemaUrl);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.trace.v1.ResourceSpans;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.resource=d.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{if(!(f.scopeSpans&&f.scopeSpans.length))f.scopeSpans=[];f.scopeSpans.push(d.opentelemetry.proto.trace.v1.ScopeSpans.decode(t,t.uint32()));break}case 3:{f.schemaUrl=t.string();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=d.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeSpans!=null&&t.hasOwnProperty("scopeSpans")){if(!Array.isArray(t.scopeSpans))return"scopeSpans: array expected";for(var r=0;r<t.scopeSpans.length;++r){var e=d.opentelemetry.proto.trace.v1.ScopeSpans.verify(t.scopeSpans[r]);if(e)return"scopeSpans."+e}}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")){if(!h.isString(t.schemaUrl))return"schemaUrl: string expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.trace.v1.ResourceSpans)return t;var e=new d.opentelemetry.proto.trace.v1.ResourceSpans;if(t.resource!=null){if(typeof t.resource!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");e.resource=d.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeSpans){if(!Array.isArray(t.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");e.scopeSpans=[];for(var r=0;r<t.scopeSpans.length;++r){if(typeof t.scopeSpans[r]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");e.scopeSpans[r]=d.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(t.scopeSpans[r])}}if(t.schemaUrl!=null)e.schemaUrl=String(t.schemaUrl);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.scopeSpans=[];if(e.defaults)r.resource=null,r.schemaUrl="";if(t.resource!=null&&t.hasOwnProperty("resource"))r.resource=d.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e);if(t.scopeSpans&&t.scopeSpans.length){r.scopeSpans=[];for(var a=0;a<t.scopeSpans.length;++a)r.scopeSpans[a]=d.opentelemetry.proto.trace.v1.ScopeSpans.toObject(t.scopeSpans[a],e)}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl"))r.schemaUrl=t.schemaUrl;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.trace.v1.ResourceSpans"},u}(),p.ScopeSpans=function(){function u(s){if(this.spans=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.scope=null,u.prototype.spans=h.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.scope!=null&&Object.hasOwnProperty.call(t,"scope"))d.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim();if(t.spans!=null&&t.spans.length)for(var r=0;r<t.spans.length;++r)d.opentelemetry.proto.trace.v1.Span.encode(t.spans[r],e.uint32(18).fork()).ldelim();if(t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl"))e.uint32(26).string(t.schemaUrl);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.trace.v1.ScopeSpans;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{if(!(f.spans&&f.spans.length))f.spans=[];f.spans.push(d.opentelemetry.proto.trace.v1.Span.decode(t,t.uint32()));break}case 3:{f.schemaUrl=t.string();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=d.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.spans!=null&&t.hasOwnProperty("spans")){if(!Array.isArray(t.spans))return"spans: array expected";for(var r=0;r<t.spans.length;++r){var e=d.opentelemetry.proto.trace.v1.Span.verify(t.spans[r]);if(e)return"spans."+e}}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")){if(!h.isString(t.schemaUrl))return"schemaUrl: string expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.trace.v1.ScopeSpans)return t;var e=new d.opentelemetry.proto.trace.v1.ScopeSpans;if(t.scope!=null){if(typeof t.scope!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");e.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.spans){if(!Array.isArray(t.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");e.spans=[];for(var r=0;r<t.spans.length;++r){if(typeof t.spans[r]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");e.spans[r]=d.opentelemetry.proto.trace.v1.Span.fromObject(t.spans[r])}}if(t.schemaUrl!=null)e.schemaUrl=String(t.schemaUrl);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.spans=[];if(e.defaults)r.scope=null,r.schemaUrl="";if(t.scope!=null&&t.hasOwnProperty("scope"))r.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e);if(t.spans&&t.spans.length){r.spans=[];for(var a=0;a<t.spans.length;++a)r.spans[a]=d.opentelemetry.proto.trace.v1.Span.toObject(t.spans[a],e)}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl"))r.schemaUrl=t.schemaUrl;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.trace.v1.ScopeSpans"},u}(),p.Span=function(){function u(s){if(this.attributes=[],this.events=[],this.links=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.traceId=null,u.prototype.spanId=null,u.prototype.traceState=null,u.prototype.parentSpanId=null,u.prototype.flags=null,u.prototype.name=null,u.prototype.kind=null,u.prototype.startTimeUnixNano=null,u.prototype.endTimeUnixNano=null,u.prototype.attributes=h.emptyArray,u.prototype.droppedAttributesCount=null,u.prototype.events=h.emptyArray,u.prototype.droppedEventsCount=null,u.prototype.links=h.emptyArray,u.prototype.droppedLinksCount=null,u.prototype.status=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId"))e.uint32(10).bytes(t.traceId);if(t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId"))e.uint32(18).bytes(t.spanId);if(t.traceState!=null&&Object.hasOwnProperty.call(t,"traceState"))e.uint32(26).string(t.traceState);if(t.parentSpanId!=null&&Object.hasOwnProperty.call(t,"parentSpanId"))e.uint32(34).bytes(t.parentSpanId);if(t.name!=null&&Object.hasOwnProperty.call(t,"name"))e.uint32(42).string(t.name);if(t.kind!=null&&Object.hasOwnProperty.call(t,"kind"))e.uint32(48).int32(t.kind);if(t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano"))e.uint32(57).fixed64(t.startTimeUnixNano);if(t.endTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"endTimeUnixNano"))e.uint32(65).fixed64(t.endTimeUnixNano);if(t.attributes!=null&&t.attributes.length)for(var r=0;r<t.attributes.length;++r)d.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[r],e.uint32(74).fork()).ldelim();if(t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount"))e.uint32(80).uint32(t.droppedAttributesCount);if(t.events!=null&&t.events.length)for(var r=0;r<t.events.length;++r)d.opentelemetry.proto.trace.v1.Span.Event.encode(t.events[r],e.uint32(90).fork()).ldelim();if(t.droppedEventsCount!=null&&Object.hasOwnProperty.call(t,"droppedEventsCount"))e.uint32(96).uint32(t.droppedEventsCount);if(t.links!=null&&t.links.length)for(var r=0;r<t.links.length;++r)d.opentelemetry.proto.trace.v1.Span.Link.encode(t.links[r],e.uint32(106).fork()).ldelim();if(t.droppedLinksCount!=null&&Object.hasOwnProperty.call(t,"droppedLinksCount"))e.uint32(112).uint32(t.droppedLinksCount);if(t.status!=null&&Object.hasOwnProperty.call(t,"status"))d.opentelemetry.proto.trace.v1.Status.encode(t.status,e.uint32(122).fork()).ldelim();if(t.flags!=null&&Object.hasOwnProperty.call(t,"flags"))e.uint32(133).fixed32(t.flags);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.trace.v1.Span;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.traceId=t.bytes();break}case 2:{f.spanId=t.bytes();break}case 3:{f.traceState=t.string();break}case 4:{f.parentSpanId=t.bytes();break}case 16:{f.flags=t.fixed32();break}case 5:{f.name=t.string();break}case 6:{f.kind=t.int32();break}case 7:{f.startTimeUnixNano=t.fixed64();break}case 8:{f.endTimeUnixNano=t.fixed64();break}case 9:{if(!(f.attributes&&f.attributes.length))f.attributes=[];f.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 10:{f.droppedAttributesCount=t.uint32();break}case 11:{if(!(f.events&&f.events.length))f.events=[];f.events.push(d.opentelemetry.proto.trace.v1.Span.Event.decode(t,t.uint32()));break}case 12:{f.droppedEventsCount=t.uint32();break}case 13:{if(!(f.links&&f.links.length))f.links=[];f.links.push(d.opentelemetry.proto.trace.v1.Span.Link.decode(t,t.uint32()));break}case 14:{f.droppedLinksCount=t.uint32();break}case 15:{f.status=d.opentelemetry.proto.trace.v1.Status.decode(t,t.uint32());break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.traceId!=null&&t.hasOwnProperty("traceId")){if(!(t.traceId&&typeof t.traceId.length==="number"||h.isString(t.traceId)))return"traceId: buffer expected"}if(t.spanId!=null&&t.hasOwnProperty("spanId")){if(!(t.spanId&&typeof t.spanId.length==="number"||h.isString(t.spanId)))return"spanId: buffer expected"}if(t.traceState!=null&&t.hasOwnProperty("traceState")){if(!h.isString(t.traceState))return"traceState: string expected"}if(t.parentSpanId!=null&&t.hasOwnProperty("parentSpanId")){if(!(t.parentSpanId&&typeof t.parentSpanId.length==="number"||h.isString(t.parentSpanId)))return"parentSpanId: buffer expected"}if(t.flags!=null&&t.hasOwnProperty("flags")){if(!h.isInteger(t.flags))return"flags: integer expected"}if(t.name!=null&&t.hasOwnProperty("name")){if(!h.isString(t.name))return"name: string expected"}if(t.kind!=null&&t.hasOwnProperty("kind"))switch(t.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&h.isInteger(t.startTimeUnixNano.low)&&h.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(t.endTimeUnixNano!=null&&t.hasOwnProperty("endTimeUnixNano")){if(!h.isInteger(t.endTimeUnixNano)&&!(t.endTimeUnixNano&&h.isInteger(t.endTimeUnixNano.low)&&h.isInteger(t.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected"}if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var r=d.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(r)return"attributes."+r}}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(t.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(t.events!=null&&t.hasOwnProperty("events")){if(!Array.isArray(t.events))return"events: array expected";for(var e=0;e<t.events.length;++e){var r=d.opentelemetry.proto.trace.v1.Span.Event.verify(t.events[e]);if(r)return"events."+r}}if(t.droppedEventsCount!=null&&t.hasOwnProperty("droppedEventsCount")){if(!h.isInteger(t.droppedEventsCount))return"droppedEventsCount: integer expected"}if(t.links!=null&&t.hasOwnProperty("links")){if(!Array.isArray(t.links))return"links: array expected";for(var e=0;e<t.links.length;++e){var r=d.opentelemetry.proto.trace.v1.Span.Link.verify(t.links[e]);if(r)return"links."+r}}if(t.droppedLinksCount!=null&&t.hasOwnProperty("droppedLinksCount")){if(!h.isInteger(t.droppedLinksCount))return"droppedLinksCount: integer expected"}if(t.status!=null&&t.hasOwnProperty("status")){var r=d.opentelemetry.proto.trace.v1.Status.verify(t.status);if(r)return"status."+r}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.trace.v1.Span)return t;var e=new d.opentelemetry.proto.trace.v1.Span;if(t.traceId!=null){if(typeof t.traceId==="string")h.base64.decode(t.traceId,e.traceId=h.newBuffer(h.base64.length(t.traceId)),0);else if(t.traceId.length>=0)e.traceId=t.traceId}if(t.spanId!=null){if(typeof t.spanId==="string")h.base64.decode(t.spanId,e.spanId=h.newBuffer(h.base64.length(t.spanId)),0);else if(t.spanId.length>=0)e.spanId=t.spanId}if(t.traceState!=null)e.traceState=String(t.traceState);if(t.parentSpanId!=null){if(typeof t.parentSpanId==="string")h.base64.decode(t.parentSpanId,e.parentSpanId=h.newBuffer(h.base64.length(t.parentSpanId)),0);else if(t.parentSpanId.length>=0)e.parentSpanId=t.parentSpanId}if(t.flags!=null)e.flags=t.flags>>>0;if(t.name!=null)e.name=String(t.name);switch(t.kind){default:if(typeof t.kind==="number"){e.kind=t.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:e.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:e.kind=1;break;case"SPAN_KIND_SERVER":case 2:e.kind=2;break;case"SPAN_KIND_CLIENT":case 3:e.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:e.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:e.kind=5;break}if(t.startTimeUnixNano!=null){if(h.Long)(e.startTimeUnixNano=h.Long.fromValue(t.startTimeUnixNano)).unsigned=!1;else if(typeof t.startTimeUnixNano==="string")e.startTimeUnixNano=parseInt(t.startTimeUnixNano,10);else if(typeof t.startTimeUnixNano==="number")e.startTimeUnixNano=t.startTimeUnixNano;else if(typeof t.startTimeUnixNano==="object")e.startTimeUnixNano=new h.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber()}if(t.endTimeUnixNano!=null){if(h.Long)(e.endTimeUnixNano=h.Long.fromValue(t.endTimeUnixNano)).unsigned=!1;else if(typeof t.endTimeUnixNano==="string")e.endTimeUnixNano=parseInt(t.endTimeUnixNano,10);else if(typeof t.endTimeUnixNano==="number")e.endTimeUnixNano=t.endTimeUnixNano;else if(typeof t.endTimeUnixNano==="object")e.endTimeUnixNano=new h.LongBits(t.endTimeUnixNano.low>>>0,t.endTimeUnixNano.high>>>0).toNumber()}if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");e.attributes=[];for(var r=0;r<t.attributes.length;++r){if(typeof t.attributes[r]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");e.attributes[r]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[r])}}if(t.droppedAttributesCount!=null)e.droppedAttributesCount=t.droppedAttributesCount>>>0;if(t.events){if(!Array.isArray(t.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");e.events=[];for(var r=0;r<t.events.length;++r){if(typeof t.events[r]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");e.events[r]=d.opentelemetry.proto.trace.v1.Span.Event.fromObject(t.events[r])}}if(t.droppedEventsCount!=null)e.droppedEventsCount=t.droppedEventsCount>>>0;if(t.links){if(!Array.isArray(t.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");e.links=[];for(var r=0;r<t.links.length;++r){if(typeof t.links[r]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");e.links[r]=d.opentelemetry.proto.trace.v1.Span.Link.fromObject(t.links[r])}}if(t.droppedLinksCount!=null)e.droppedLinksCount=t.droppedLinksCount>>>0;if(t.status!=null){if(typeof t.status!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");e.status=d.opentelemetry.proto.trace.v1.Status.fromObject(t.status)}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.attributes=[],r.events=[],r.links=[];if(e.defaults){if(e.bytes===String)r.traceId="";else if(r.traceId=[],e.bytes!==Array)r.traceId=h.newBuffer(r.traceId);if(e.bytes===String)r.spanId="";else if(r.spanId=[],e.bytes!==Array)r.spanId=h.newBuffer(r.spanId);if(r.traceState="",e.bytes===String)r.parentSpanId="";else if(r.parentSpanId=[],e.bytes!==Array)r.parentSpanId=h.newBuffer(r.parentSpanId);if(r.name="",r.kind=e.enums===String?"SPAN_KIND_UNSPECIFIED":0,h.Long){var a=new h.Long(0,0,!1);r.startTimeUnixNano=e.longs===String?a.toString():e.longs===Number?a.toNumber():a}else r.startTimeUnixNano=e.longs===String?"0":0;if(h.Long){var a=new h.Long(0,0,!1);r.endTimeUnixNano=e.longs===String?a.toString():e.longs===Number?a.toNumber():a}else r.endTimeUnixNano=e.longs===String?"0":0;r.droppedAttributesCount=0,r.droppedEventsCount=0,r.droppedLinksCount=0,r.status=null,r.flags=0}if(t.traceId!=null&&t.hasOwnProperty("traceId"))r.traceId=e.bytes===String?h.base64.encode(t.traceId,0,t.traceId.length):e.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId;if(t.spanId!=null&&t.hasOwnProperty("spanId"))r.spanId=e.bytes===String?h.base64.encode(t.spanId,0,t.spanId.length):e.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId;if(t.traceState!=null&&t.hasOwnProperty("traceState"))r.traceState=t.traceState;if(t.parentSpanId!=null&&t.hasOwnProperty("parentSpanId"))r.parentSpanId=e.bytes===String?h.base64.encode(t.parentSpanId,0,t.parentSpanId.length):e.bytes===Array?Array.prototype.slice.call(t.parentSpanId):t.parentSpanId;if(t.name!=null&&t.hasOwnProperty("name"))r.name=t.name;if(t.kind!=null&&t.hasOwnProperty("kind"))r.kind=e.enums===String?d.opentelemetry.proto.trace.v1.Span.SpanKind[t.kind]===void 0?t.kind:d.opentelemetry.proto.trace.v1.Span.SpanKind[t.kind]:t.kind;if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano"))if(typeof t.startTimeUnixNano==="number")r.startTimeUnixNano=e.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano;else r.startTimeUnixNano=e.longs===String?h.Long.prototype.toString.call(t.startTimeUnixNano):e.longs===Number?new h.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano;if(t.endTimeUnixNano!=null&&t.hasOwnProperty("endTimeUnixNano"))if(typeof t.endTimeUnixNano==="number")r.endTimeUnixNano=e.longs===String?String(t.endTimeUnixNano):t.endTimeUnixNano;else r.endTimeUnixNano=e.longs===String?h.Long.prototype.toString.call(t.endTimeUnixNano):e.longs===Number?new h.LongBits(t.endTimeUnixNano.low>>>0,t.endTimeUnixNano.high>>>0).toNumber():t.endTimeUnixNano;if(t.attributes&&t.attributes.length){r.attributes=[];for(var f=0;f<t.attributes.length;++f)r.attributes[f]=d.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[f],e)}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount"))r.droppedAttributesCount=t.droppedAttributesCount;if(t.events&&t.events.length){r.events=[];for(var f=0;f<t.events.length;++f)r.events[f]=d.opentelemetry.proto.trace.v1.Span.Event.toObject(t.events[f],e)}if(t.droppedEventsCount!=null&&t.hasOwnProperty("droppedEventsCount"))r.droppedEventsCount=t.droppedEventsCount;if(t.links&&t.links.length){r.links=[];for(var f=0;f<t.links.length;++f)r.links[f]=d.opentelemetry.proto.trace.v1.Span.Link.toObject(t.links[f],e)}if(t.droppedLinksCount!=null&&t.hasOwnProperty("droppedLinksCount"))r.droppedLinksCount=t.droppedLinksCount;if(t.status!=null&&t.hasOwnProperty("status"))r.status=d.opentelemetry.proto.trace.v1.Status.toObject(t.status,e);if(t.flags!=null&&t.hasOwnProperty("flags"))r.flags=t.flags;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.trace.v1.Span"},u.SpanKind=function(){var s={},t=Object.create(s);return t[s[0]="SPAN_KIND_UNSPECIFIED"]=0,t[s[1]="SPAN_KIND_INTERNAL"]=1,t[s[2]="SPAN_KIND_SERVER"]=2,t[s[3]="SPAN_KIND_CLIENT"]=3,t[s[4]="SPAN_KIND_PRODUCER"]=4,t[s[5]="SPAN_KIND_CONSUMER"]=5,t}(),u.Event=function(){function s(t){if(this.attributes=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.timeUnixNano=null,s.prototype.name=null,s.prototype.attributes=h.emptyArray,s.prototype.droppedAttributesCount=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano"))r.uint32(9).fixed64(e.timeUnixNano);if(e.name!=null&&Object.hasOwnProperty.call(e,"name"))r.uint32(18).string(e.name);if(e.attributes!=null&&e.attributes.length)for(var a=0;a<e.attributes.length;++a)d.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[a],r.uint32(26).fork()).ldelim();if(e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount"))r.uint32(32).uint32(e.droppedAttributesCount);return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.trace.v1.Span.Event;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.timeUnixNano=e.fixed64();break}case 2:{y.name=e.string();break}case 3:{if(!(y.attributes&&y.attributes.length))y.attributes=[];y.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 4:{y.droppedAttributesCount=e.uint32();break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")){if(!h.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&h.isInteger(e.timeUnixNano.low)&&h.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(e.name!=null&&e.hasOwnProperty("name")){if(!h.isString(e.name))return"name: string expected"}if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var r=0;r<e.attributes.length;++r){var a=d.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[r]);if(a)return"attributes."+a}}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(e.droppedAttributesCount))return"droppedAttributesCount: integer expected"}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.trace.v1.Span.Event)return e;var r=new d.opentelemetry.proto.trace.v1.Span.Event;if(e.timeUnixNano!=null){if(h.Long)(r.timeUnixNano=h.Long.fromValue(e.timeUnixNano)).unsigned=!1;else if(typeof e.timeUnixNano==="string")r.timeUnixNano=parseInt(e.timeUnixNano,10);else if(typeof e.timeUnixNano==="number")r.timeUnixNano=e.timeUnixNano;else if(typeof e.timeUnixNano==="object")r.timeUnixNano=new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber()}if(e.name!=null)r.name=String(e.name);if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");r.attributes=[];for(var a=0;a<e.attributes.length;++a){if(typeof e.attributes[a]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");r.attributes[a]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[a])}}if(e.droppedAttributesCount!=null)r.droppedAttributesCount=e.droppedAttributesCount>>>0;return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.attributes=[];if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.timeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.timeUnixNano=r.longs===String?"0":0;a.name="",a.droppedAttributesCount=0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano"))if(typeof e.timeUnixNano==="number")a.timeUnixNano=r.longs===String?String(e.timeUnixNano):e.timeUnixNano;else a.timeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.timeUnixNano):r.longs===Number?new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano;if(e.name!=null&&e.hasOwnProperty("name"))a.name=e.name;if(e.attributes&&e.attributes.length){a.attributes=[];for(var y=0;y<e.attributes.length;++y)a.attributes[y]=d.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[y],r)}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount"))a.droppedAttributesCount=e.droppedAttributesCount;return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.trace.v1.Span.Event"},s}(),u.Link=function(){function s(t){if(this.attributes=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.traceId=null,s.prototype.spanId=null,s.prototype.traceState=null,s.prototype.attributes=h.emptyArray,s.prototype.droppedAttributesCount=null,s.prototype.flags=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId"))r.uint32(10).bytes(e.traceId);if(e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId"))r.uint32(18).bytes(e.spanId);if(e.traceState!=null&&Object.hasOwnProperty.call(e,"traceState"))r.uint32(26).string(e.traceState);if(e.attributes!=null&&e.attributes.length)for(var a=0;a<e.attributes.length;++a)d.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[a],r.uint32(34).fork()).ldelim();if(e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount"))r.uint32(40).uint32(e.droppedAttributesCount);if(e.flags!=null&&Object.hasOwnProperty.call(e,"flags"))r.uint32(53).fixed32(e.flags);return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.trace.v1.Span.Link;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.traceId=e.bytes();break}case 2:{y.spanId=e.bytes();break}case 3:{y.traceState=e.string();break}case 4:{if(!(y.attributes&&y.attributes.length))y.attributes=[];y.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 5:{y.droppedAttributesCount=e.uint32();break}case 6:{y.flags=e.fixed32();break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.traceId!=null&&e.hasOwnProperty("traceId")){if(!(e.traceId&&typeof e.traceId.length==="number"||h.isString(e.traceId)))return"traceId: buffer expected"}if(e.spanId!=null&&e.hasOwnProperty("spanId")){if(!(e.spanId&&typeof e.spanId.length==="number"||h.isString(e.spanId)))return"spanId: buffer expected"}if(e.traceState!=null&&e.hasOwnProperty("traceState")){if(!h.isString(e.traceState))return"traceState: string expected"}if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var r=0;r<e.attributes.length;++r){var a=d.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[r]);if(a)return"attributes."+a}}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(e.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(e.flags!=null&&e.hasOwnProperty("flags")){if(!h.isInteger(e.flags))return"flags: integer expected"}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.trace.v1.Span.Link)return e;var r=new d.opentelemetry.proto.trace.v1.Span.Link;if(e.traceId!=null){if(typeof e.traceId==="string")h.base64.decode(e.traceId,r.traceId=h.newBuffer(h.base64.length(e.traceId)),0);else if(e.traceId.length>=0)r.traceId=e.traceId}if(e.spanId!=null){if(typeof e.spanId==="string")h.base64.decode(e.spanId,r.spanId=h.newBuffer(h.base64.length(e.spanId)),0);else if(e.spanId.length>=0)r.spanId=e.spanId}if(e.traceState!=null)r.traceState=String(e.traceState);if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");r.attributes=[];for(var a=0;a<e.attributes.length;++a){if(typeof e.attributes[a]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");r.attributes[a]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[a])}}if(e.droppedAttributesCount!=null)r.droppedAttributesCount=e.droppedAttributesCount>>>0;if(e.flags!=null)r.flags=e.flags>>>0;return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.attributes=[];if(r.defaults){if(r.bytes===String)a.traceId="";else if(a.traceId=[],r.bytes!==Array)a.traceId=h.newBuffer(a.traceId);if(r.bytes===String)a.spanId="";else if(a.spanId=[],r.bytes!==Array)a.spanId=h.newBuffer(a.spanId);a.traceState="",a.droppedAttributesCount=0,a.flags=0}if(e.traceId!=null&&e.hasOwnProperty("traceId"))a.traceId=r.bytes===String?h.base64.encode(e.traceId,0,e.traceId.length):r.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId;if(e.spanId!=null&&e.hasOwnProperty("spanId"))a.spanId=r.bytes===String?h.base64.encode(e.spanId,0,e.spanId.length):r.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId;if(e.traceState!=null&&e.hasOwnProperty("traceState"))a.traceState=e.traceState;if(e.attributes&&e.attributes.length){a.attributes=[];for(var f=0;f<e.attributes.length;++f)a.attributes[f]=d.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[f],r)}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount"))a.droppedAttributesCount=e.droppedAttributesCount;if(e.flags!=null&&e.hasOwnProperty("flags"))a.flags=e.flags;return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.trace.v1.Span.Link"},s}(),u}(),p.Status=function(){function u(s){if(s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.message=null,u.prototype.code=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.message!=null&&Object.hasOwnProperty.call(t,"message"))e.uint32(18).string(t.message);if(t.code!=null&&Object.hasOwnProperty.call(t,"code"))e.uint32(24).int32(t.code);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.trace.v1.Status;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 2:{f.message=t.string();break}case 3:{f.code=t.int32();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.message!=null&&t.hasOwnProperty("message")){if(!h.isString(t.message))return"message: string expected"}if(t.code!=null&&t.hasOwnProperty("code"))switch(t.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.trace.v1.Status)return t;var e=new d.opentelemetry.proto.trace.v1.Status;if(t.message!=null)e.message=String(t.message);switch(t.code){default:if(typeof t.code==="number"){e.code=t.code;break}break;case"STATUS_CODE_UNSET":case 0:e.code=0;break;case"STATUS_CODE_OK":case 1:e.code=1;break;case"STATUS_CODE_ERROR":case 2:e.code=2;break}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.defaults)r.message="",r.code=e.enums===String?"STATUS_CODE_UNSET":0;if(t.message!=null&&t.hasOwnProperty("message"))r.message=t.message;if(t.code!=null&&t.hasOwnProperty("code"))r.code=e.enums===String?d.opentelemetry.proto.trace.v1.Status.StatusCode[t.code]===void 0?t.code:d.opentelemetry.proto.trace.v1.Status.StatusCode[t.code]:t.code;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.trace.v1.Status"},u.StatusCode=function(){var s={},t=Object.create(s);return t[s[0]="STATUS_CODE_UNSET"]=0,t[s[1]="STATUS_CODE_OK"]=1,t[s[2]="STATUS_CODE_ERROR"]=2,t}(),u}(),p.SpanFlags=function(){var u={},s=Object.create(u);return s[u[0]="SPAN_FLAGS_DO_NOT_USE"]=0,s[u[255]="SPAN_FLAGS_TRACE_FLAGS_MASK"]=255,s[u[256]="SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK"]=256,s[u[512]="SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK"]=512,s}(),p}(),l}(),o.collector=function(){var l={};return l.trace=function(){var p={};return p.v1=function(){var u={};return u.TraceService=function(){function s(t,e,r){x.rpc.Service.call(this,t,e,r)}return(s.prototype=Object.create(x.rpc.Service.prototype)).constructor=s,s.create=function(e,r,a){return new this(e,r,a)},Object.defineProperty(s.prototype.export=function t(e,r){return this.rpcCall(t,d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,e,r)},"name",{value:"Export"}),s}(),u.ExportTraceServiceRequest=function(){function s(t){if(this.resourceSpans=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.resourceSpans=h.emptyArray,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.resourceSpans!=null&&e.resourceSpans.length)for(var a=0;a<e.resourceSpans.length;++a)d.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[a],r.uint32(10).fork()).ldelim();return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{if(!(y.resourceSpans&&y.resourceSpans.length))y.resourceSpans=[];y.resourceSpans.push(d.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()));break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.resourceSpans!=null&&e.hasOwnProperty("resourceSpans")){if(!Array.isArray(e.resourceSpans))return"resourceSpans: array expected";for(var r=0;r<e.resourceSpans.length;++r){var a=d.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[r]);if(a)return"resourceSpans."+a}}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return e;var r=new d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");r.resourceSpans=[];for(var a=0;a<e.resourceSpans.length;++a){if(typeof e.resourceSpans[a]!=="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");r.resourceSpans[a]=d.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[a])}}return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.resourceSpans=[];if(e.resourceSpans&&e.resourceSpans.length){a.resourceSpans=[];for(var f=0;f<e.resourceSpans.length;++f)a.resourceSpans[f]=d.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[f],r)}return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},s}(),u.ExportTraceServiceResponse=function(){function s(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.partialSuccess=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess"))d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(e.partialSuccess,r.uint32(10).fork()).ldelim();return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.partialSuccess=d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(e,e.uint32());break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var r=d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(e.partialSuccess);if(r)return"partialSuccess."+r}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return e;var r=new d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");r.partialSuccess=d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(e.partialSuccess)}return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.defaults)a.partialSuccess=null;if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess"))a.partialSuccess=d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(e.partialSuccess,r);return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},s}(),u.ExportTracePartialSuccess=function(){function s(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.rejectedSpans=null,s.prototype.errorMessage=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.rejectedSpans!=null&&Object.hasOwnProperty.call(e,"rejectedSpans"))r.uint32(8).int64(e.rejectedSpans);if(e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage"))r.uint32(18).string(e.errorMessage);return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.rejectedSpans=e.int64();break}case 2:{y.errorMessage=e.string();break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")){if(!h.isInteger(e.rejectedSpans)&&!(e.rejectedSpans&&h.isInteger(e.rejectedSpans.low)&&h.isInteger(e.rejectedSpans.high)))return"rejectedSpans: integer|Long expected"}if(e.errorMessage!=null&&e.hasOwnProperty("errorMessage")){if(!h.isString(e.errorMessage))return"errorMessage: string expected"}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return e;var r=new d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;if(e.rejectedSpans!=null){if(h.Long)(r.rejectedSpans=h.Long.fromValue(e.rejectedSpans)).unsigned=!1;else if(typeof e.rejectedSpans==="string")r.rejectedSpans=parseInt(e.rejectedSpans,10);else if(typeof e.rejectedSpans==="number")r.rejectedSpans=e.rejectedSpans;else if(typeof e.rejectedSpans==="object")r.rejectedSpans=new h.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber()}if(e.errorMessage!=null)r.errorMessage=String(e.errorMessage);return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.rejectedSpans=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.rejectedSpans=r.longs===String?"0":0;a.errorMessage=""}if(e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans"))if(typeof e.rejectedSpans==="number")a.rejectedSpans=r.longs===String?String(e.rejectedSpans):e.rejectedSpans;else a.rejectedSpans=r.longs===String?h.Long.prototype.toString.call(e.rejectedSpans):r.longs===Number?new h.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber():e.rejectedSpans;if(e.errorMessage!=null&&e.hasOwnProperty("errorMessage"))a.errorMessage=e.errorMessage;return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},s}(),u}(),p}(),l.metrics=function(){var p={};return p.v1=function(){var u={};return u.MetricsService=function(){function s(t,e,r){x.rpc.Service.call(this,t,e,r)}return(s.prototype=Object.create(x.rpc.Service.prototype)).constructor=s,s.create=function(e,r,a){return new this(e,r,a)},Object.defineProperty(s.prototype.export=function t(e,r){return this.rpcCall(t,d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,e,r)},"name",{value:"Export"}),s}(),u.ExportMetricsServiceRequest=function(){function s(t){if(this.resourceMetrics=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.resourceMetrics=h.emptyArray,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.resourceMetrics!=null&&e.resourceMetrics.length)for(var a=0;a<e.resourceMetrics.length;++a)d.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[a],r.uint32(10).fork()).ldelim();return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{if(!(y.resourceMetrics&&y.resourceMetrics.length))y.resourceMetrics=[];y.resourceMetrics.push(d.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()));break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.resourceMetrics!=null&&e.hasOwnProperty("resourceMetrics")){if(!Array.isArray(e.resourceMetrics))return"resourceMetrics: array expected";for(var r=0;r<e.resourceMetrics.length;++r){var a=d.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[r]);if(a)return"resourceMetrics."+a}}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return e;var r=new d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");r.resourceMetrics=[];for(var a=0;a<e.resourceMetrics.length;++a){if(typeof e.resourceMetrics[a]!=="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");r.resourceMetrics[a]=d.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[a])}}return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.resourceMetrics=[];if(e.resourceMetrics&&e.resourceMetrics.length){a.resourceMetrics=[];for(var f=0;f<e.resourceMetrics.length;++f)a.resourceMetrics[f]=d.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[f],r)}return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},s}(),u.ExportMetricsServiceResponse=function(){function s(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.partialSuccess=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess"))d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(e.partialSuccess,r.uint32(10).fork()).ldelim();return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.partialSuccess=d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var r=d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(e.partialSuccess);if(r)return"partialSuccess."+r}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return e;var r=new d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");r.partialSuccess=d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(e.partialSuccess)}return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.defaults)a.partialSuccess=null;if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess"))a.partialSuccess=d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(e.partialSuccess,r);return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},s}(),u.ExportMetricsPartialSuccess=function(){function s(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.rejectedDataPoints=null,s.prototype.errorMessage=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.rejectedDataPoints!=null&&Object.hasOwnProperty.call(e,"rejectedDataPoints"))r.uint32(8).int64(e.rejectedDataPoints);if(e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage"))r.uint32(18).string(e.errorMessage);return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.rejectedDataPoints=e.int64();break}case 2:{y.errorMessage=e.string();break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")){if(!h.isInteger(e.rejectedDataPoints)&&!(e.rejectedDataPoints&&h.isInteger(e.rejectedDataPoints.low)&&h.isInteger(e.rejectedDataPoints.high)))return"rejectedDataPoints: integer|Long expected"}if(e.errorMessage!=null&&e.hasOwnProperty("errorMessage")){if(!h.isString(e.errorMessage))return"errorMessage: string expected"}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return e;var r=new d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;if(e.rejectedDataPoints!=null){if(h.Long)(r.rejectedDataPoints=h.Long.fromValue(e.rejectedDataPoints)).unsigned=!1;else if(typeof e.rejectedDataPoints==="string")r.rejectedDataPoints=parseInt(e.rejectedDataPoints,10);else if(typeof e.rejectedDataPoints==="number")r.rejectedDataPoints=e.rejectedDataPoints;else if(typeof e.rejectedDataPoints==="object")r.rejectedDataPoints=new h.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber()}if(e.errorMessage!=null)r.errorMessage=String(e.errorMessage);return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.rejectedDataPoints=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.rejectedDataPoints=r.longs===String?"0":0;a.errorMessage=""}if(e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints"))if(typeof e.rejectedDataPoints==="number")a.rejectedDataPoints=r.longs===String?String(e.rejectedDataPoints):e.rejectedDataPoints;else a.rejectedDataPoints=r.longs===String?h.Long.prototype.toString.call(e.rejectedDataPoints):r.longs===Number?new h.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber():e.rejectedDataPoints;if(e.errorMessage!=null&&e.hasOwnProperty("errorMessage"))a.errorMessage=e.errorMessage;return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},s}(),u}(),p}(),l.logs=function(){var p={};return p.v1=function(){var u={};return u.LogsService=function(){function s(t,e,r){x.rpc.Service.call(this,t,e,r)}return(s.prototype=Object.create(x.rpc.Service.prototype)).constructor=s,s.create=function(e,r,a){return new this(e,r,a)},Object.defineProperty(s.prototype.export=function t(e,r){return this.rpcCall(t,d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,e,r)},"name",{value:"Export"}),s}(),u.ExportLogsServiceRequest=function(){function s(t){if(this.resourceLogs=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.resourceLogs=h.emptyArray,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.resourceLogs!=null&&e.resourceLogs.length)for(var a=0;a<e.resourceLogs.length;++a)d.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[a],r.uint32(10).fork()).ldelim();return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{if(!(y.resourceLogs&&y.resourceLogs.length))y.resourceLogs=[];y.resourceLogs.push(d.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()));break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.resourceLogs!=null&&e.hasOwnProperty("resourceLogs")){if(!Array.isArray(e.resourceLogs))return"resourceLogs: array expected";for(var r=0;r<e.resourceLogs.length;++r){var a=d.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[r]);if(a)return"resourceLogs."+a}}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return e;var r=new d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");r.resourceLogs=[];for(var a=0;a<e.resourceLogs.length;++a){if(typeof e.resourceLogs[a]!=="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");r.resourceLogs[a]=d.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[a])}}return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.resourceLogs=[];if(e.resourceLogs&&e.resourceLogs.length){a.resourceLogs=[];for(var f=0;f<e.resourceLogs.length;++f)a.resourceLogs[f]=d.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[f],r)}return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},s}(),u.ExportLogsServiceResponse=function(){function s(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.partialSuccess=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess"))d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(e.partialSuccess,r.uint32(10).fork()).ldelim();return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.partialSuccess=d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var r=d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(e.partialSuccess);if(r)return"partialSuccess."+r}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return e;var r=new d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");r.partialSuccess=d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(e.partialSuccess)}return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.defaults)a.partialSuccess=null;if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess"))a.partialSuccess=d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(e.partialSuccess,r);return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},s}(),u.ExportLogsPartialSuccess=function(){function s(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.rejectedLogRecords=null,s.prototype.errorMessage=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.rejectedLogRecords!=null&&Object.hasOwnProperty.call(e,"rejectedLogRecords"))r.uint32(8).int64(e.rejectedLogRecords);if(e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage"))r.uint32(18).string(e.errorMessage);return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.rejectedLogRecords=e.int64();break}case 2:{y.errorMessage=e.string();break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")){if(!h.isInteger(e.rejectedLogRecords)&&!(e.rejectedLogRecords&&h.isInteger(e.rejectedLogRecords.low)&&h.isInteger(e.rejectedLogRecords.high)))return"rejectedLogRecords: integer|Long expected"}if(e.errorMessage!=null&&e.hasOwnProperty("errorMessage")){if(!h.isString(e.errorMessage))return"errorMessage: string expected"}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return e;var r=new d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;if(e.rejectedLogRecords!=null){if(h.Long)(r.rejectedLogRecords=h.Long.fromValue(e.rejectedLogRecords)).unsigned=!1;else if(typeof e.rejectedLogRecords==="string")r.rejectedLogRecords=parseInt(e.rejectedLogRecords,10);else if(typeof e.rejectedLogRecords==="number")r.rejectedLogRecords=e.rejectedLogRecords;else if(typeof e.rejectedLogRecords==="object")r.rejectedLogRecords=new h.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber()}if(e.errorMessage!=null)r.errorMessage=String(e.errorMessage);return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.rejectedLogRecords=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.rejectedLogRecords=r.longs===String?"0":0;a.errorMessage=""}if(e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords"))if(typeof e.rejectedLogRecords==="number")a.rejectedLogRecords=r.longs===String?String(e.rejectedLogRecords):e.rejectedLogRecords;else a.rejectedLogRecords=r.longs===String?h.Long.prototype.toString.call(e.rejectedLogRecords):r.longs===Number?new h.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber():e.rejectedLogRecords;if(e.errorMessage!=null&&e.hasOwnProperty("errorMessage"))a.errorMessage=e.errorMessage;return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},s}(),u}(),p}(),l}(),o.metrics=function(){var l={};return l.v1=function(){var p={};return p.MetricsData=function(){function u(s){if(this.resourceMetrics=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.resourceMetrics=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.resourceMetrics!=null&&t.resourceMetrics.length)for(var r=0;r<t.resourceMetrics.length;++r)d.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(t.resourceMetrics[r],e.uint32(10).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.MetricsData;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.resourceMetrics&&f.resourceMetrics.length))f.resourceMetrics=[];f.resourceMetrics.push(d.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.resourceMetrics!=null&&t.hasOwnProperty("resourceMetrics")){if(!Array.isArray(t.resourceMetrics))return"resourceMetrics: array expected";for(var e=0;e<t.resourceMetrics.length;++e){var r=d.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(t.resourceMetrics[e]);if(r)return"resourceMetrics."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.MetricsData)return t;var e=new d.opentelemetry.proto.metrics.v1.MetricsData;if(t.resourceMetrics){if(!Array.isArray(t.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");e.resourceMetrics=[];for(var r=0;r<t.resourceMetrics.length;++r){if(typeof t.resourceMetrics[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");e.resourceMetrics[r]=d.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(t.resourceMetrics[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.resourceMetrics=[];if(t.resourceMetrics&&t.resourceMetrics.length){r.resourceMetrics=[];for(var a=0;a<t.resourceMetrics.length;++a)r.resourceMetrics[a]=d.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.MetricsData"},u}(),p.ResourceMetrics=function(){function u(s){if(this.scopeMetrics=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.resource=null,u.prototype.scopeMetrics=h.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.resource!=null&&Object.hasOwnProperty.call(t,"resource"))d.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim();if(t.scopeMetrics!=null&&t.scopeMetrics.length)for(var r=0;r<t.scopeMetrics.length;++r)d.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(t.scopeMetrics[r],e.uint32(18).fork()).ldelim();if(t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl"))e.uint32(26).string(t.schemaUrl);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.ResourceMetrics;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.resource=d.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{if(!(f.scopeMetrics&&f.scopeMetrics.length))f.scopeMetrics=[];f.scopeMetrics.push(d.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(t,t.uint32()));break}case 3:{f.schemaUrl=t.string();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=d.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeMetrics!=null&&t.hasOwnProperty("scopeMetrics")){if(!Array.isArray(t.scopeMetrics))return"scopeMetrics: array expected";for(var r=0;r<t.scopeMetrics.length;++r){var e=d.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(t.scopeMetrics[r]);if(e)return"scopeMetrics."+e}}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")){if(!h.isString(t.schemaUrl))return"schemaUrl: string expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.ResourceMetrics)return t;var e=new d.opentelemetry.proto.metrics.v1.ResourceMetrics;if(t.resource!=null){if(typeof t.resource!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");e.resource=d.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeMetrics){if(!Array.isArray(t.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");e.scopeMetrics=[];for(var r=0;r<t.scopeMetrics.length;++r){if(typeof t.scopeMetrics[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");e.scopeMetrics[r]=d.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(t.scopeMetrics[r])}}if(t.schemaUrl!=null)e.schemaUrl=String(t.schemaUrl);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.scopeMetrics=[];if(e.defaults)r.resource=null,r.schemaUrl="";if(t.resource!=null&&t.hasOwnProperty("resource"))r.resource=d.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e);if(t.scopeMetrics&&t.scopeMetrics.length){r.scopeMetrics=[];for(var a=0;a<t.scopeMetrics.length;++a)r.scopeMetrics[a]=d.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(t.scopeMetrics[a],e)}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl"))r.schemaUrl=t.schemaUrl;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},u}(),p.ScopeMetrics=function(){function u(s){if(this.metrics=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.scope=null,u.prototype.metrics=h.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.scope!=null&&Object.hasOwnProperty.call(t,"scope"))d.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim();if(t.metrics!=null&&t.metrics.length)for(var r=0;r<t.metrics.length;++r)d.opentelemetry.proto.metrics.v1.Metric.encode(t.metrics[r],e.uint32(18).fork()).ldelim();if(t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl"))e.uint32(26).string(t.schemaUrl);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.ScopeMetrics;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{if(!(f.metrics&&f.metrics.length))f.metrics=[];f.metrics.push(d.opentelemetry.proto.metrics.v1.Metric.decode(t,t.uint32()));break}case 3:{f.schemaUrl=t.string();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=d.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.metrics!=null&&t.hasOwnProperty("metrics")){if(!Array.isArray(t.metrics))return"metrics: array expected";for(var r=0;r<t.metrics.length;++r){var e=d.opentelemetry.proto.metrics.v1.Metric.verify(t.metrics[r]);if(e)return"metrics."+e}}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")){if(!h.isString(t.schemaUrl))return"schemaUrl: string expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.ScopeMetrics)return t;var e=new d.opentelemetry.proto.metrics.v1.ScopeMetrics;if(t.scope!=null){if(typeof t.scope!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");e.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.metrics){if(!Array.isArray(t.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");e.metrics=[];for(var r=0;r<t.metrics.length;++r){if(typeof t.metrics[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");e.metrics[r]=d.opentelemetry.proto.metrics.v1.Metric.fromObject(t.metrics[r])}}if(t.schemaUrl!=null)e.schemaUrl=String(t.schemaUrl);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.metrics=[];if(e.defaults)r.scope=null,r.schemaUrl="";if(t.scope!=null&&t.hasOwnProperty("scope"))r.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e);if(t.metrics&&t.metrics.length){r.metrics=[];for(var a=0;a<t.metrics.length;++a)r.metrics[a]=d.opentelemetry.proto.metrics.v1.Metric.toObject(t.metrics[a],e)}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl"))r.schemaUrl=t.schemaUrl;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},u}(),p.Metric=function(){function u(t){if(this.metadata=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}u.prototype.name=null,u.prototype.description=null,u.prototype.unit=null,u.prototype.gauge=null,u.prototype.sum=null,u.prototype.histogram=null,u.prototype.exponentialHistogram=null,u.prototype.summary=null,u.prototype.metadata=h.emptyArray;var s;return Object.defineProperty(u.prototype,"data",{get:h.oneOfGetter(s=["gauge","sum","histogram","exponentialHistogram","summary"]),set:h.oneOfSetter(s)}),u.create=function(e){return new u(e)},u.encode=function(e,r){if(!r)r=N.create();if(e.name!=null&&Object.hasOwnProperty.call(e,"name"))r.uint32(10).string(e.name);if(e.description!=null&&Object.hasOwnProperty.call(e,"description"))r.uint32(18).string(e.description);if(e.unit!=null&&Object.hasOwnProperty.call(e,"unit"))r.uint32(26).string(e.unit);if(e.gauge!=null&&Object.hasOwnProperty.call(e,"gauge"))d.opentelemetry.proto.metrics.v1.Gauge.encode(e.gauge,r.uint32(42).fork()).ldelim();if(e.sum!=null&&Object.hasOwnProperty.call(e,"sum"))d.opentelemetry.proto.metrics.v1.Sum.encode(e.sum,r.uint32(58).fork()).ldelim();if(e.histogram!=null&&Object.hasOwnProperty.call(e,"histogram"))d.opentelemetry.proto.metrics.v1.Histogram.encode(e.histogram,r.uint32(74).fork()).ldelim();if(e.exponentialHistogram!=null&&Object.hasOwnProperty.call(e,"exponentialHistogram"))d.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(e.exponentialHistogram,r.uint32(82).fork()).ldelim();if(e.summary!=null&&Object.hasOwnProperty.call(e,"summary"))d.opentelemetry.proto.metrics.v1.Summary.encode(e.summary,r.uint32(90).fork()).ldelim();if(e.metadata!=null&&e.metadata.length)for(var a=0;a<e.metadata.length;++a)d.opentelemetry.proto.common.v1.KeyValue.encode(e.metadata[a],r.uint32(98).fork()).ldelim();return r},u.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},u.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.metrics.v1.Metric;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.name=e.string();break}case 2:{y.description=e.string();break}case 3:{y.unit=e.string();break}case 5:{y.gauge=d.opentelemetry.proto.metrics.v1.Gauge.decode(e,e.uint32());break}case 7:{y.sum=d.opentelemetry.proto.metrics.v1.Sum.decode(e,e.uint32());break}case 9:{y.histogram=d.opentelemetry.proto.metrics.v1.Histogram.decode(e,e.uint32());break}case 10:{y.exponentialHistogram=d.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(e,e.uint32());break}case 11:{y.summary=d.opentelemetry.proto.metrics.v1.Summary.decode(e,e.uint32());break}case 12:{if(!(y.metadata&&y.metadata.length))y.metadata=[];y.metadata.push(d.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}default:e.skipType(g&7);break}}return y},u.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";var r={};if(e.name!=null&&e.hasOwnProperty("name")){if(!h.isString(e.name))return"name: string expected"}if(e.description!=null&&e.hasOwnProperty("description")){if(!h.isString(e.description))return"description: string expected"}if(e.unit!=null&&e.hasOwnProperty("unit")){if(!h.isString(e.unit))return"unit: string expected"}if(e.gauge!=null&&e.hasOwnProperty("gauge")){r.data=1;{var a=d.opentelemetry.proto.metrics.v1.Gauge.verify(e.gauge);if(a)return"gauge."+a}}if(e.sum!=null&&e.hasOwnProperty("sum")){if(r.data===1)return"data: multiple values";r.data=1;{var a=d.opentelemetry.proto.metrics.v1.Sum.verify(e.sum);if(a)return"sum."+a}}if(e.histogram!=null&&e.hasOwnProperty("histogram")){if(r.data===1)return"data: multiple values";r.data=1;{var a=d.opentelemetry.proto.metrics.v1.Histogram.verify(e.histogram);if(a)return"histogram."+a}}if(e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")){if(r.data===1)return"data: multiple values";r.data=1;{var a=d.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(e.exponentialHistogram);if(a)return"exponentialHistogram."+a}}if(e.summary!=null&&e.hasOwnProperty("summary")){if(r.data===1)return"data: multiple values";r.data=1;{var a=d.opentelemetry.proto.metrics.v1.Summary.verify(e.summary);if(a)return"summary."+a}}if(e.metadata!=null&&e.hasOwnProperty("metadata")){if(!Array.isArray(e.metadata))return"metadata: array expected";for(var f=0;f<e.metadata.length;++f){var a=d.opentelemetry.proto.common.v1.KeyValue.verify(e.metadata[f]);if(a)return"metadata."+a}}return null},u.fromObject=function(e){if(e instanceof d.opentelemetry.proto.metrics.v1.Metric)return e;var r=new d.opentelemetry.proto.metrics.v1.Metric;if(e.name!=null)r.name=String(e.name);if(e.description!=null)r.description=String(e.description);if(e.unit!=null)r.unit=String(e.unit);if(e.gauge!=null){if(typeof e.gauge!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");r.gauge=d.opentelemetry.proto.metrics.v1.Gauge.fromObject(e.gauge)}if(e.sum!=null){if(typeof e.sum!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");r.sum=d.opentelemetry.proto.metrics.v1.Sum.fromObject(e.sum)}if(e.histogram!=null){if(typeof e.histogram!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");r.histogram=d.opentelemetry.proto.metrics.v1.Histogram.fromObject(e.histogram)}if(e.exponentialHistogram!=null){if(typeof e.exponentialHistogram!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");r.exponentialHistogram=d.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(e.exponentialHistogram)}if(e.summary!=null){if(typeof e.summary!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");r.summary=d.opentelemetry.proto.metrics.v1.Summary.fromObject(e.summary)}if(e.metadata){if(!Array.isArray(e.metadata))throw TypeError(".opentelemetry.proto.metrics.v1.Metric.metadata: array expected");r.metadata=[];for(var a=0;a<e.metadata.length;++a){if(typeof e.metadata[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.metadata: object expected");r.metadata[a]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(e.metadata[a])}}return r},u.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.metadata=[];if(r.defaults)a.name="",a.description="",a.unit="";if(e.name!=null&&e.hasOwnProperty("name"))a.name=e.name;if(e.description!=null&&e.hasOwnProperty("description"))a.description=e.description;if(e.unit!=null&&e.hasOwnProperty("unit"))a.unit=e.unit;if(e.gauge!=null&&e.hasOwnProperty("gauge")){if(a.gauge=d.opentelemetry.proto.metrics.v1.Gauge.toObject(e.gauge,r),r.oneofs)a.data="gauge"}if(e.sum!=null&&e.hasOwnProperty("sum")){if(a.sum=d.opentelemetry.proto.metrics.v1.Sum.toObject(e.sum,r),r.oneofs)a.data="sum"}if(e.histogram!=null&&e.hasOwnProperty("histogram")){if(a.histogram=d.opentelemetry.proto.metrics.v1.Histogram.toObject(e.histogram,r),r.oneofs)a.data="histogram"}if(e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")){if(a.exponentialHistogram=d.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(e.exponentialHistogram,r),r.oneofs)a.data="exponentialHistogram"}if(e.summary!=null&&e.hasOwnProperty("summary")){if(a.summary=d.opentelemetry.proto.metrics.v1.Summary.toObject(e.summary,r),r.oneofs)a.data="summary"}if(e.metadata&&e.metadata.length){a.metadata=[];for(var f=0;f<e.metadata.length;++f)a.metadata[f]=d.opentelemetry.proto.common.v1.KeyValue.toObject(e.metadata[f],r)}return a},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.metrics.v1.Metric"},u}(),p.Gauge=function(){function u(s){if(this.dataPoints=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.dataPoints=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.dataPoints!=null&&t.dataPoints.length)for(var r=0;r<t.dataPoints.length;++r)d.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(t.dataPoints[r],e.uint32(10).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.Gauge;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.dataPoints&&f.dataPoints.length))f.dataPoints=[];f.dataPoints.push(d.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var r=d.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(t.dataPoints[e]);if(r)return"dataPoints."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.Gauge)return t;var e=new d.opentelemetry.proto.metrics.v1.Gauge;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");e.dataPoints=[];for(var r=0;r<t.dataPoints.length;++r){if(typeof t.dataPoints[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");e.dataPoints[r]=d.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(t.dataPoints[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.dataPoints=[];if(t.dataPoints&&t.dataPoints.length){r.dataPoints=[];for(var a=0;a<t.dataPoints.length;++a)r.dataPoints[a]=d.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.Gauge"},u}(),p.Sum=function(){function u(s){if(this.dataPoints=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.dataPoints=h.emptyArray,u.prototype.aggregationTemporality=null,u.prototype.isMonotonic=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.dataPoints!=null&&t.dataPoints.length)for(var r=0;r<t.dataPoints.length;++r)d.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(t.dataPoints[r],e.uint32(10).fork()).ldelim();if(t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality"))e.uint32(16).int32(t.aggregationTemporality);if(t.isMonotonic!=null&&Object.hasOwnProperty.call(t,"isMonotonic"))e.uint32(24).bool(t.isMonotonic);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.Sum;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.dataPoints&&f.dataPoints.length))f.dataPoints=[];f.dataPoints.push(d.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}case 2:{f.aggregationTemporality=t.int32();break}case 3:{f.isMonotonic=t.bool();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var r=d.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(t.dataPoints[e]);if(r)return"dataPoints."+r}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}if(t.isMonotonic!=null&&t.hasOwnProperty("isMonotonic")){if(typeof t.isMonotonic!=="boolean")return"isMonotonic: boolean expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.Sum)return t;var e=new d.opentelemetry.proto.metrics.v1.Sum;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");e.dataPoints=[];for(var r=0;r<t.dataPoints.length;++r){if(typeof t.dataPoints[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");e.dataPoints[r]=d.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(t.dataPoints[r])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality==="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}if(t.isMonotonic!=null)e.isMonotonic=Boolean(t.isMonotonic);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.dataPoints=[];if(e.defaults)r.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,r.isMonotonic=!1;if(t.dataPoints&&t.dataPoints.length){r.dataPoints=[];for(var a=0;a<t.dataPoints.length;++a)r.dataPoints[a]=d.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[a],e)}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))r.aggregationTemporality=e.enums===String?d.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:d.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality;if(t.isMonotonic!=null&&t.hasOwnProperty("isMonotonic"))r.isMonotonic=t.isMonotonic;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.Sum"},u}(),p.Histogram=function(){function u(s){if(this.dataPoints=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.dataPoints=h.emptyArray,u.prototype.aggregationTemporality=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.dataPoints!=null&&t.dataPoints.length)for(var r=0;r<t.dataPoints.length;++r)d.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(t.dataPoints[r],e.uint32(10).fork()).ldelim();if(t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality"))e.uint32(16).int32(t.aggregationTemporality);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.Histogram;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.dataPoints&&f.dataPoints.length))f.dataPoints=[];f.dataPoints.push(d.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(t,t.uint32()));break}case 2:{f.aggregationTemporality=t.int32();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var r=d.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(t.dataPoints[e]);if(r)return"dataPoints."+r}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.Histogram)return t;var e=new d.opentelemetry.proto.metrics.v1.Histogram;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");e.dataPoints=[];for(var r=0;r<t.dataPoints.length;++r){if(typeof t.dataPoints[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");e.dataPoints[r]=d.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(t.dataPoints[r])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality==="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.dataPoints=[];if(e.defaults)r.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0;if(t.dataPoints&&t.dataPoints.length){r.dataPoints=[];for(var a=0;a<t.dataPoints.length;++a)r.dataPoints[a]=d.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(t.dataPoints[a],e)}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))r.aggregationTemporality=e.enums===String?d.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:d.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.Histogram"},u}(),p.ExponentialHistogram=function(){function u(s){if(this.dataPoints=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.dataPoints=h.emptyArray,u.prototype.aggregationTemporality=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.dataPoints!=null&&t.dataPoints.length)for(var r=0;r<t.dataPoints.length;++r)d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(t.dataPoints[r],e.uint32(10).fork()).ldelim();if(t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality"))e.uint32(16).int32(t.aggregationTemporality);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.ExponentialHistogram;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.dataPoints&&f.dataPoints.length))f.dataPoints=[];f.dataPoints.push(d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(t,t.uint32()));break}case 2:{f.aggregationTemporality=t.int32();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var r=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(t.dataPoints[e]);if(r)return"dataPoints."+r}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.ExponentialHistogram)return t;var e=new d.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");e.dataPoints=[];for(var r=0;r<t.dataPoints.length;++r){if(typeof t.dataPoints[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");e.dataPoints[r]=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(t.dataPoints[r])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality==="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.dataPoints=[];if(e.defaults)r.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0;if(t.dataPoints&&t.dataPoints.length){r.dataPoints=[];for(var a=0;a<t.dataPoints.length;++a)r.dataPoints[a]=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(t.dataPoints[a],e)}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))r.aggregationTemporality=e.enums===String?d.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:d.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},u}(),p.Summary=function(){function u(s){if(this.dataPoints=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.dataPoints=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.dataPoints!=null&&t.dataPoints.length)for(var r=0;r<t.dataPoints.length;++r)d.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(t.dataPoints[r],e.uint32(10).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.Summary;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.dataPoints&&f.dataPoints.length))f.dataPoints=[];f.dataPoints.push(d.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var r=d.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(t.dataPoints[e]);if(r)return"dataPoints."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.Summary)return t;var e=new d.opentelemetry.proto.metrics.v1.Summary;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");e.dataPoints=[];for(var r=0;r<t.dataPoints.length;++r){if(typeof t.dataPoints[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");e.dataPoints[r]=d.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(t.dataPoints[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.dataPoints=[];if(t.dataPoints&&t.dataPoints.length){r.dataPoints=[];for(var a=0;a<t.dataPoints.length;++a)r.dataPoints[a]=d.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(t.dataPoints[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.Summary"},u}(),p.AggregationTemporality=function(){var u={},s=Object.create(u);return s[u[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,s[u[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,s[u[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,s}(),p.DataPointFlags=function(){var u={},s=Object.create(u);return s[u[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,s[u[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,s}(),p.NumberDataPoint=function(){function u(t){if(this.attributes=[],this.exemplars=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}u.prototype.attributes=h.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.asDouble=null,u.prototype.asInt=null,u.prototype.exemplars=h.emptyArray,u.prototype.flags=null;var s;return Object.defineProperty(u.prototype,"value",{get:h.oneOfGetter(s=["asDouble","asInt"]),set:h.oneOfSetter(s)}),u.create=function(e){return new u(e)},u.encode=function(e,r){if(!r)r=N.create();if(e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano"))r.uint32(17).fixed64(e.startTimeUnixNano);if(e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano"))r.uint32(25).fixed64(e.timeUnixNano);if(e.asDouble!=null&&Object.hasOwnProperty.call(e,"asDouble"))r.uint32(33).double(e.asDouble);if(e.exemplars!=null&&e.exemplars.length)for(var a=0;a<e.exemplars.length;++a)d.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[a],r.uint32(42).fork()).ldelim();if(e.asInt!=null&&Object.hasOwnProperty.call(e,"asInt"))r.uint32(49).sfixed64(e.asInt);if(e.attributes!=null&&e.attributes.length)for(var a=0;a<e.attributes.length;++a)d.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[a],r.uint32(58).fork()).ldelim();if(e.flags!=null&&Object.hasOwnProperty.call(e,"flags"))r.uint32(64).uint32(e.flags);return r},u.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},u.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.metrics.v1.NumberDataPoint;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 7:{if(!(y.attributes&&y.attributes.length))y.attributes=[];y.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{y.startTimeUnixNano=e.fixed64();break}case 3:{y.timeUnixNano=e.fixed64();break}case 4:{y.asDouble=e.double();break}case 6:{y.asInt=e.sfixed64();break}case 5:{if(!(y.exemplars&&y.exemplars.length))y.exemplars=[];y.exemplars.push(d.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 8:{y.flags=e.uint32();break}default:e.skipType(g&7);break}}return y},u.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";var r={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var a=0;a<e.attributes.length;++a){var f=d.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[a]);if(f)return"attributes."+f}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&h.isInteger(e.startTimeUnixNano.low)&&h.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")){if(!h.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&h.isInteger(e.timeUnixNano.low)&&h.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(e.asDouble!=null&&e.hasOwnProperty("asDouble")){if(r.value=1,typeof e.asDouble!=="number")return"asDouble: number expected"}if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(r.value===1)return"value: multiple values";if(r.value=1,!h.isInteger(e.asInt)&&!(e.asInt&&h.isInteger(e.asInt.low)&&h.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var a=0;a<e.exemplars.length;++a){var f=d.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[a]);if(f)return"exemplars."+f}}if(e.flags!=null&&e.hasOwnProperty("flags")){if(!h.isInteger(e.flags))return"flags: integer expected"}return null},u.fromObject=function(e){if(e instanceof d.opentelemetry.proto.metrics.v1.NumberDataPoint)return e;var r=new d.opentelemetry.proto.metrics.v1.NumberDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<e.attributes.length;++a){if(typeof e.attributes[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");r.attributes[a]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[a])}}if(e.startTimeUnixNano!=null){if(h.Long)(r.startTimeUnixNano=h.Long.fromValue(e.startTimeUnixNano)).unsigned=!1;else if(typeof e.startTimeUnixNano==="string")r.startTimeUnixNano=parseInt(e.startTimeUnixNano,10);else if(typeof e.startTimeUnixNano==="number")r.startTimeUnixNano=e.startTimeUnixNano;else if(typeof e.startTimeUnixNano==="object")r.startTimeUnixNano=new h.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber()}if(e.timeUnixNano!=null){if(h.Long)(r.timeUnixNano=h.Long.fromValue(e.timeUnixNano)).unsigned=!1;else if(typeof e.timeUnixNano==="string")r.timeUnixNano=parseInt(e.timeUnixNano,10);else if(typeof e.timeUnixNano==="number")r.timeUnixNano=e.timeUnixNano;else if(typeof e.timeUnixNano==="object")r.timeUnixNano=new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber()}if(e.asDouble!=null)r.asDouble=Number(e.asDouble);if(e.asInt!=null){if(h.Long)(r.asInt=h.Long.fromValue(e.asInt)).unsigned=!1;else if(typeof e.asInt==="string")r.asInt=parseInt(e.asInt,10);else if(typeof e.asInt==="number")r.asInt=e.asInt;else if(typeof e.asInt==="object")r.asInt=new h.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber()}if(e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<e.exemplars.length;++a){if(typeof e.exemplars[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");r.exemplars[a]=d.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[a])}}if(e.flags!=null)r.flags=e.flags>>>0;return r},u.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.exemplars=[],a.attributes=[];if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.startTimeUnixNano=r.longs===String?"0":0;if(h.Long){var f=new h.Long(0,0,!1);a.timeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.timeUnixNano=r.longs===String?"0":0;a.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano"))if(typeof e.startTimeUnixNano==="number")a.startTimeUnixNano=r.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano;else a.startTimeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.startTimeUnixNano):r.longs===Number?new h.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano;if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano"))if(typeof e.timeUnixNano==="number")a.timeUnixNano=r.longs===String?String(e.timeUnixNano):e.timeUnixNano;else a.timeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.timeUnixNano):r.longs===Number?new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano;if(e.asDouble!=null&&e.hasOwnProperty("asDouble")){if(a.asDouble=r.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,r.oneofs)a.value="asDouble"}if(e.exemplars&&e.exemplars.length){a.exemplars=[];for(var y=0;y<e.exemplars.length;++y)a.exemplars[y]=d.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[y],r)}if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(typeof e.asInt==="number")a.asInt=r.longs===String?String(e.asInt):e.asInt;else a.asInt=r.longs===String?h.Long.prototype.toString.call(e.asInt):r.longs===Number?new h.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt;if(r.oneofs)a.value="asInt"}if(e.attributes&&e.attributes.length){a.attributes=[];for(var y=0;y<e.attributes.length;++y)a.attributes[y]=d.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[y],r)}if(e.flags!=null&&e.hasOwnProperty("flags"))a.flags=e.flags;return a},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},u}(),p.HistogramDataPoint=function(){function u(t){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}u.prototype.attributes=h.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.count=null,u.prototype.sum=null,u.prototype.bucketCounts=h.emptyArray,u.prototype.explicitBounds=h.emptyArray,u.prototype.exemplars=h.emptyArray,u.prototype.flags=null,u.prototype.min=null,u.prototype.max=null;var s;return Object.defineProperty(u.prototype,"_sum",{get:h.oneOfGetter(s=["sum"]),set:h.oneOfSetter(s)}),Object.defineProperty(u.prototype,"_min",{get:h.oneOfGetter(s=["min"]),set:h.oneOfSetter(s)}),Object.defineProperty(u.prototype,"_max",{get:h.oneOfGetter(s=["max"]),set:h.oneOfSetter(s)}),u.create=function(e){return new u(e)},u.encode=function(e,r){if(!r)r=N.create();if(e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano"))r.uint32(17).fixed64(e.startTimeUnixNano);if(e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano"))r.uint32(25).fixed64(e.timeUnixNano);if(e.count!=null&&Object.hasOwnProperty.call(e,"count"))r.uint32(33).fixed64(e.count);if(e.sum!=null&&Object.hasOwnProperty.call(e,"sum"))r.uint32(41).double(e.sum);if(e.bucketCounts!=null&&e.bucketCounts.length){r.uint32(50).fork();for(var a=0;a<e.bucketCounts.length;++a)r.fixed64(e.bucketCounts[a]);r.ldelim()}if(e.explicitBounds!=null&&e.explicitBounds.length){r.uint32(58).fork();for(var a=0;a<e.explicitBounds.length;++a)r.double(e.explicitBounds[a]);r.ldelim()}if(e.exemplars!=null&&e.exemplars.length)for(var a=0;a<e.exemplars.length;++a)d.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[a],r.uint32(66).fork()).ldelim();if(e.attributes!=null&&e.attributes.length)for(var a=0;a<e.attributes.length;++a)d.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[a],r.uint32(74).fork()).ldelim();if(e.flags!=null&&Object.hasOwnProperty.call(e,"flags"))r.uint32(80).uint32(e.flags);if(e.min!=null&&Object.hasOwnProperty.call(e,"min"))r.uint32(89).double(e.min);if(e.max!=null&&Object.hasOwnProperty.call(e,"max"))r.uint32(97).double(e.max);return r},u.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},u.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.metrics.v1.HistogramDataPoint;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 9:{if(!(y.attributes&&y.attributes.length))y.attributes=[];y.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{y.startTimeUnixNano=e.fixed64();break}case 3:{y.timeUnixNano=e.fixed64();break}case 4:{y.count=e.fixed64();break}case 5:{y.sum=e.double();break}case 6:{if(!(y.bucketCounts&&y.bucketCounts.length))y.bucketCounts=[];if((g&7)===2){var M=e.uint32()+e.pos;while(e.pos<M)y.bucketCounts.push(e.fixed64())}else y.bucketCounts.push(e.fixed64());break}case 7:{if(!(y.explicitBounds&&y.explicitBounds.length))y.explicitBounds=[];if((g&7)===2){var M=e.uint32()+e.pos;while(e.pos<M)y.explicitBounds.push(e.double())}else y.explicitBounds.push(e.double());break}case 8:{if(!(y.exemplars&&y.exemplars.length))y.exemplars=[];y.exemplars.push(d.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 10:{y.flags=e.uint32();break}case 11:{y.min=e.double();break}case 12:{y.max=e.double();break}default:e.skipType(g&7);break}}return y},u.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";var r={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var a=0;a<e.attributes.length;++a){var f=d.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[a]);if(f)return"attributes."+f}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&h.isInteger(e.startTimeUnixNano.low)&&h.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")){if(!h.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&h.isInteger(e.timeUnixNano.low)&&h.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(e.count!=null&&e.hasOwnProperty("count")){if(!h.isInteger(e.count)&&!(e.count&&h.isInteger(e.count.low)&&h.isInteger(e.count.high)))return"count: integer|Long expected"}if(e.sum!=null&&e.hasOwnProperty("sum")){if(r._sum=1,typeof e.sum!=="number")return"sum: number expected"}if(e.bucketCounts!=null&&e.hasOwnProperty("bucketCounts")){if(!Array.isArray(e.bucketCounts))return"bucketCounts: array expected";for(var a=0;a<e.bucketCounts.length;++a)if(!h.isInteger(e.bucketCounts[a])&&!(e.bucketCounts[a]&&h.isInteger(e.bucketCounts[a].low)&&h.isInteger(e.bucketCounts[a].high)))return"bucketCounts: integer|Long[] expected"}if(e.explicitBounds!=null&&e.hasOwnProperty("explicitBounds")){if(!Array.isArray(e.explicitBounds))return"explicitBounds: array expected";for(var a=0;a<e.explicitBounds.length;++a)if(typeof e.explicitBounds[a]!=="number")return"explicitBounds: number[] expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var a=0;a<e.exemplars.length;++a){var f=d.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[a]);if(f)return"exemplars."+f}}if(e.flags!=null&&e.hasOwnProperty("flags")){if(!h.isInteger(e.flags))return"flags: integer expected"}if(e.min!=null&&e.hasOwnProperty("min")){if(r._min=1,typeof e.min!=="number")return"min: number expected"}if(e.max!=null&&e.hasOwnProperty("max")){if(r._max=1,typeof e.max!=="number")return"max: number expected"}return null},u.fromObject=function(e){if(e instanceof d.opentelemetry.proto.metrics.v1.HistogramDataPoint)return e;var r=new d.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<e.attributes.length;++a){if(typeof e.attributes[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");r.attributes[a]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[a])}}if(e.startTimeUnixNano!=null){if(h.Long)(r.startTimeUnixNano=h.Long.fromValue(e.startTimeUnixNano)).unsigned=!1;else if(typeof e.startTimeUnixNano==="string")r.startTimeUnixNano=parseInt(e.startTimeUnixNano,10);else if(typeof e.startTimeUnixNano==="number")r.startTimeUnixNano=e.startTimeUnixNano;else if(typeof e.startTimeUnixNano==="object")r.startTimeUnixNano=new h.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber()}if(e.timeUnixNano!=null){if(h.Long)(r.timeUnixNano=h.Long.fromValue(e.timeUnixNano)).unsigned=!1;else if(typeof e.timeUnixNano==="string")r.timeUnixNano=parseInt(e.timeUnixNano,10);else if(typeof e.timeUnixNano==="number")r.timeUnixNano=e.timeUnixNano;else if(typeof e.timeUnixNano==="object")r.timeUnixNano=new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber()}if(e.count!=null){if(h.Long)(r.count=h.Long.fromValue(e.count)).unsigned=!1;else if(typeof e.count==="string")r.count=parseInt(e.count,10);else if(typeof e.count==="number")r.count=e.count;else if(typeof e.count==="object")r.count=new h.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber()}if(e.sum!=null)r.sum=Number(e.sum);if(e.bucketCounts){if(!Array.isArray(e.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");r.bucketCounts=[];for(var a=0;a<e.bucketCounts.length;++a)if(h.Long)(r.bucketCounts[a]=h.Long.fromValue(e.bucketCounts[a])).unsigned=!1;else if(typeof e.bucketCounts[a]==="string")r.bucketCounts[a]=parseInt(e.bucketCounts[a],10);else if(typeof e.bucketCounts[a]==="number")r.bucketCounts[a]=e.bucketCounts[a];else if(typeof e.bucketCounts[a]==="object")r.bucketCounts[a]=new h.LongBits(e.bucketCounts[a].low>>>0,e.bucketCounts[a].high>>>0).toNumber()}if(e.explicitBounds){if(!Array.isArray(e.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");r.explicitBounds=[];for(var a=0;a<e.explicitBounds.length;++a)r.explicitBounds[a]=Number(e.explicitBounds[a])}if(e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<e.exemplars.length;++a){if(typeof e.exemplars[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");r.exemplars[a]=d.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[a])}}if(e.flags!=null)r.flags=e.flags>>>0;if(e.min!=null)r.min=Number(e.min);if(e.max!=null)r.max=Number(e.max);return r},u.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.bucketCounts=[],a.explicitBounds=[],a.exemplars=[],a.attributes=[];if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.startTimeUnixNano=r.longs===String?"0":0;if(h.Long){var f=new h.Long(0,0,!1);a.timeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.timeUnixNano=r.longs===String?"0":0;if(h.Long){var f=new h.Long(0,0,!1);a.count=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.count=r.longs===String?"0":0;a.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano"))if(typeof e.startTimeUnixNano==="number")a.startTimeUnixNano=r.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano;else a.startTimeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.startTimeUnixNano):r.longs===Number?new h.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano;if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano"))if(typeof e.timeUnixNano==="number")a.timeUnixNano=r.longs===String?String(e.timeUnixNano):e.timeUnixNano;else a.timeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.timeUnixNano):r.longs===Number?new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano;if(e.count!=null&&e.hasOwnProperty("count"))if(typeof e.count==="number")a.count=r.longs===String?String(e.count):e.count;else a.count=r.longs===String?h.Long.prototype.toString.call(e.count):r.longs===Number?new h.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count;if(e.sum!=null&&e.hasOwnProperty("sum")){if(a.sum=r.json&&!isFinite(e.sum)?String(e.sum):e.sum,r.oneofs)a._sum="sum"}if(e.bucketCounts&&e.bucketCounts.length){a.bucketCounts=[];for(var y=0;y<e.bucketCounts.length;++y)if(typeof e.bucketCounts[y]==="number")a.bucketCounts[y]=r.longs===String?String(e.bucketCounts[y]):e.bucketCounts[y];else a.bucketCounts[y]=r.longs===String?h.Long.prototype.toString.call(e.bucketCounts[y]):r.longs===Number?new h.LongBits(e.bucketCounts[y].low>>>0,e.bucketCounts[y].high>>>0).toNumber():e.bucketCounts[y]}if(e.explicitBounds&&e.explicitBounds.length){a.explicitBounds=[];for(var y=0;y<e.explicitBounds.length;++y)a.explicitBounds[y]=r.json&&!isFinite(e.explicitBounds[y])?String(e.explicitBounds[y]):e.explicitBounds[y]}if(e.exemplars&&e.exemplars.length){a.exemplars=[];for(var y=0;y<e.exemplars.length;++y)a.exemplars[y]=d.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[y],r)}if(e.attributes&&e.attributes.length){a.attributes=[];for(var y=0;y<e.attributes.length;++y)a.attributes[y]=d.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[y],r)}if(e.flags!=null&&e.hasOwnProperty("flags"))a.flags=e.flags;if(e.min!=null&&e.hasOwnProperty("min")){if(a.min=r.json&&!isFinite(e.min)?String(e.min):e.min,r.oneofs)a._min="min"}if(e.max!=null&&e.hasOwnProperty("max")){if(a.max=r.json&&!isFinite(e.max)?String(e.max):e.max,r.oneofs)a._max="max"}return a},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},u}(),p.ExponentialHistogramDataPoint=function(){function u(t){if(this.attributes=[],this.exemplars=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}u.prototype.attributes=h.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.count=null,u.prototype.sum=null,u.prototype.scale=null,u.prototype.zeroCount=null,u.prototype.positive=null,u.prototype.negative=null,u.prototype.flags=null,u.prototype.exemplars=h.emptyArray,u.prototype.min=null,u.prototype.max=null,u.prototype.zeroThreshold=null;var s;return Object.defineProperty(u.prototype,"_sum",{get:h.oneOfGetter(s=["sum"]),set:h.oneOfSetter(s)}),Object.defineProperty(u.prototype,"_min",{get:h.oneOfGetter(s=["min"]),set:h.oneOfSetter(s)}),Object.defineProperty(u.prototype,"_max",{get:h.oneOfGetter(s=["max"]),set:h.oneOfSetter(s)}),u.create=function(e){return new u(e)},u.encode=function(e,r){if(!r)r=N.create();if(e.attributes!=null&&e.attributes.length)for(var a=0;a<e.attributes.length;++a)d.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[a],r.uint32(10).fork()).ldelim();if(e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano"))r.uint32(17).fixed64(e.startTimeUnixNano);if(e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano"))r.uint32(25).fixed64(e.timeUnixNano);if(e.count!=null&&Object.hasOwnProperty.call(e,"count"))r.uint32(33).fixed64(e.count);if(e.sum!=null&&Object.hasOwnProperty.call(e,"sum"))r.uint32(41).double(e.sum);if(e.scale!=null&&Object.hasOwnProperty.call(e,"scale"))r.uint32(48).sint32(e.scale);if(e.zeroCount!=null&&Object.hasOwnProperty.call(e,"zeroCount"))r.uint32(57).fixed64(e.zeroCount);if(e.positive!=null&&Object.hasOwnProperty.call(e,"positive"))d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.positive,r.uint32(66).fork()).ldelim();if(e.negative!=null&&Object.hasOwnProperty.call(e,"negative"))d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.negative,r.uint32(74).fork()).ldelim();if(e.flags!=null&&Object.hasOwnProperty.call(e,"flags"))r.uint32(80).uint32(e.flags);if(e.exemplars!=null&&e.exemplars.length)for(var a=0;a<e.exemplars.length;++a)d.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[a],r.uint32(90).fork()).ldelim();if(e.min!=null&&Object.hasOwnProperty.call(e,"min"))r.uint32(97).double(e.min);if(e.max!=null&&Object.hasOwnProperty.call(e,"max"))r.uint32(105).double(e.max);if(e.zeroThreshold!=null&&Object.hasOwnProperty.call(e,"zeroThreshold"))r.uint32(113).double(e.zeroThreshold);return r},u.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},u.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{if(!(y.attributes&&y.attributes.length))y.attributes=[];y.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{y.startTimeUnixNano=e.fixed64();break}case 3:{y.timeUnixNano=e.fixed64();break}case 4:{y.count=e.fixed64();break}case 5:{y.sum=e.double();break}case 6:{y.scale=e.sint32();break}case 7:{y.zeroCount=e.fixed64();break}case 8:{y.positive=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 9:{y.negative=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 10:{y.flags=e.uint32();break}case 11:{if(!(y.exemplars&&y.exemplars.length))y.exemplars=[];y.exemplars.push(d.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 12:{y.min=e.double();break}case 13:{y.max=e.double();break}case 14:{y.zeroThreshold=e.double();break}default:e.skipType(g&7);break}}return y},u.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";var r={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var a=0;a<e.attributes.length;++a){var f=d.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[a]);if(f)return"attributes."+f}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&h.isInteger(e.startTimeUnixNano.low)&&h.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")){if(!h.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&h.isInteger(e.timeUnixNano.low)&&h.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(e.count!=null&&e.hasOwnProperty("count")){if(!h.isInteger(e.count)&&!(e.count&&h.isInteger(e.count.low)&&h.isInteger(e.count.high)))return"count: integer|Long expected"}if(e.sum!=null&&e.hasOwnProperty("sum")){if(r._sum=1,typeof e.sum!=="number")return"sum: number expected"}if(e.scale!=null&&e.hasOwnProperty("scale")){if(!h.isInteger(e.scale))return"scale: integer expected"}if(e.zeroCount!=null&&e.hasOwnProperty("zeroCount")){if(!h.isInteger(e.zeroCount)&&!(e.zeroCount&&h.isInteger(e.zeroCount.low)&&h.isInteger(e.zeroCount.high)))return"zeroCount: integer|Long expected"}if(e.positive!=null&&e.hasOwnProperty("positive")){var f=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.positive);if(f)return"positive."+f}if(e.negative!=null&&e.hasOwnProperty("negative")){var f=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.negative);if(f)return"negative."+f}if(e.flags!=null&&e.hasOwnProperty("flags")){if(!h.isInteger(e.flags))return"flags: integer expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var a=0;a<e.exemplars.length;++a){var f=d.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[a]);if(f)return"exemplars."+f}}if(e.min!=null&&e.hasOwnProperty("min")){if(r._min=1,typeof e.min!=="number")return"min: number expected"}if(e.max!=null&&e.hasOwnProperty("max")){if(r._max=1,typeof e.max!=="number")return"max: number expected"}if(e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold")){if(typeof e.zeroThreshold!=="number")return"zeroThreshold: number expected"}return null},u.fromObject=function(e){if(e instanceof d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return e;var r=new d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<e.attributes.length;++a){if(typeof e.attributes[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");r.attributes[a]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[a])}}if(e.startTimeUnixNano!=null){if(h.Long)(r.startTimeUnixNano=h.Long.fromValue(e.startTimeUnixNano)).unsigned=!1;else if(typeof e.startTimeUnixNano==="string")r.startTimeUnixNano=parseInt(e.startTimeUnixNano,10);else if(typeof e.startTimeUnixNano==="number")r.startTimeUnixNano=e.startTimeUnixNano;else if(typeof e.startTimeUnixNano==="object")r.startTimeUnixNano=new h.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber()}if(e.timeUnixNano!=null){if(h.Long)(r.timeUnixNano=h.Long.fromValue(e.timeUnixNano)).unsigned=!1;else if(typeof e.timeUnixNano==="string")r.timeUnixNano=parseInt(e.timeUnixNano,10);else if(typeof e.timeUnixNano==="number")r.timeUnixNano=e.timeUnixNano;else if(typeof e.timeUnixNano==="object")r.timeUnixNano=new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber()}if(e.count!=null){if(h.Long)(r.count=h.Long.fromValue(e.count)).unsigned=!1;else if(typeof e.count==="string")r.count=parseInt(e.count,10);else if(typeof e.count==="number")r.count=e.count;else if(typeof e.count==="object")r.count=new h.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber()}if(e.sum!=null)r.sum=Number(e.sum);if(e.scale!=null)r.scale=e.scale|0;if(e.zeroCount!=null){if(h.Long)(r.zeroCount=h.Long.fromValue(e.zeroCount)).unsigned=!1;else if(typeof e.zeroCount==="string")r.zeroCount=parseInt(e.zeroCount,10);else if(typeof e.zeroCount==="number")r.zeroCount=e.zeroCount;else if(typeof e.zeroCount==="object")r.zeroCount=new h.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber()}if(e.positive!=null){if(typeof e.positive!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");r.positive=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.positive)}if(e.negative!=null){if(typeof e.negative!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");r.negative=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.negative)}if(e.flags!=null)r.flags=e.flags>>>0;if(e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<e.exemplars.length;++a){if(typeof e.exemplars[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");r.exemplars[a]=d.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[a])}}if(e.min!=null)r.min=Number(e.min);if(e.max!=null)r.max=Number(e.max);if(e.zeroThreshold!=null)r.zeroThreshold=Number(e.zeroThreshold);return r},u.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.attributes=[],a.exemplars=[];if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.startTimeUnixNano=r.longs===String?"0":0;if(h.Long){var f=new h.Long(0,0,!1);a.timeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.timeUnixNano=r.longs===String?"0":0;if(h.Long){var f=new h.Long(0,0,!1);a.count=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.count=r.longs===String?"0":0;if(a.scale=0,h.Long){var f=new h.Long(0,0,!1);a.zeroCount=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.zeroCount=r.longs===String?"0":0;a.positive=null,a.negative=null,a.flags=0,a.zeroThreshold=0}if(e.attributes&&e.attributes.length){a.attributes=[];for(var y=0;y<e.attributes.length;++y)a.attributes[y]=d.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[y],r)}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano"))if(typeof e.startTimeUnixNano==="number")a.startTimeUnixNano=r.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano;else a.startTimeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.startTimeUnixNano):r.longs===Number?new h.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano;if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano"))if(typeof e.timeUnixNano==="number")a.timeUnixNano=r.longs===String?String(e.timeUnixNano):e.timeUnixNano;else a.timeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.timeUnixNano):r.longs===Number?new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano;if(e.count!=null&&e.hasOwnProperty("count"))if(typeof e.count==="number")a.count=r.longs===String?String(e.count):e.count;else a.count=r.longs===String?h.Long.prototype.toString.call(e.count):r.longs===Number?new h.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count;if(e.sum!=null&&e.hasOwnProperty("sum")){if(a.sum=r.json&&!isFinite(e.sum)?String(e.sum):e.sum,r.oneofs)a._sum="sum"}if(e.scale!=null&&e.hasOwnProperty("scale"))a.scale=e.scale;if(e.zeroCount!=null&&e.hasOwnProperty("zeroCount"))if(typeof e.zeroCount==="number")a.zeroCount=r.longs===String?String(e.zeroCount):e.zeroCount;else a.zeroCount=r.longs===String?h.Long.prototype.toString.call(e.zeroCount):r.longs===Number?new h.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber():e.zeroCount;if(e.positive!=null&&e.hasOwnProperty("positive"))a.positive=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.positive,r);if(e.negative!=null&&e.hasOwnProperty("negative"))a.negative=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.negative,r);if(e.flags!=null&&e.hasOwnProperty("flags"))a.flags=e.flags;if(e.exemplars&&e.exemplars.length){a.exemplars=[];for(var y=0;y<e.exemplars.length;++y)a.exemplars[y]=d.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[y],r)}if(e.min!=null&&e.hasOwnProperty("min")){if(a.min=r.json&&!isFinite(e.min)?String(e.min):e.min,r.oneofs)a._min="min"}if(e.max!=null&&e.hasOwnProperty("max")){if(a.max=r.json&&!isFinite(e.max)?String(e.max):e.max,r.oneofs)a._max="max"}if(e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold"))a.zeroThreshold=r.json&&!isFinite(e.zeroThreshold)?String(e.zeroThreshold):e.zeroThreshold;return a},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},u.Buckets=function(){function t(e){if(this.bucketCounts=[],e){for(var r=Object.keys(e),a=0;a<r.length;++a)if(e[r[a]]!=null)this[r[a]]=e[r[a]]}}return t.prototype.offset=null,t.prototype.bucketCounts=h.emptyArray,t.create=function(r){return new t(r)},t.encode=function(r,a){if(!a)a=N.create();if(r.offset!=null&&Object.hasOwnProperty.call(r,"offset"))a.uint32(8).sint32(r.offset);if(r.bucketCounts!=null&&r.bucketCounts.length){a.uint32(18).fork();for(var f=0;f<r.bucketCounts.length;++f)a.uint64(r.bucketCounts[f]);a.ldelim()}return a},t.encodeDelimited=function(r,a){return this.encode(r,a).ldelim()},t.decode=function(r,a,f){if(!(r instanceof _))r=_.create(r);var y=a===void 0?r.len:r.pos+a,g=new d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;while(r.pos<y){var M=r.uint32();if(M===f)break;switch(M>>>3){case 1:{g.offset=r.sint32();break}case 2:{if(!(g.bucketCounts&&g.bucketCounts.length))g.bucketCounts=[];if((M&7)===2){var F=r.uint32()+r.pos;while(r.pos<F)g.bucketCounts.push(r.uint64())}else g.bucketCounts.push(r.uint64());break}default:r.skipType(M&7);break}}return g},t.decodeDelimited=function(r){if(!(r instanceof _))r=new _(r);return this.decode(r,r.uint32())},t.verify=function(r){if(typeof r!=="object"||r===null)return"object expected";if(r.offset!=null&&r.hasOwnProperty("offset")){if(!h.isInteger(r.offset))return"offset: integer expected"}if(r.bucketCounts!=null&&r.hasOwnProperty("bucketCounts")){if(!Array.isArray(r.bucketCounts))return"bucketCounts: array expected";for(var a=0;a<r.bucketCounts.length;++a)if(!h.isInteger(r.bucketCounts[a])&&!(r.bucketCounts[a]&&h.isInteger(r.bucketCounts[a].low)&&h.isInteger(r.bucketCounts[a].high)))return"bucketCounts: integer|Long[] expected"}return null},t.fromObject=function(r){if(r instanceof d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return r;var a=new d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(r.offset!=null)a.offset=r.offset|0;if(r.bucketCounts){if(!Array.isArray(r.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");a.bucketCounts=[];for(var f=0;f<r.bucketCounts.length;++f)if(h.Long)(a.bucketCounts[f]=h.Long.fromValue(r.bucketCounts[f])).unsigned=!0;else if(typeof r.bucketCounts[f]==="string")a.bucketCounts[f]=parseInt(r.bucketCounts[f],10);else if(typeof r.bucketCounts[f]==="number")a.bucketCounts[f]=r.bucketCounts[f];else if(typeof r.bucketCounts[f]==="object")a.bucketCounts[f]=new h.LongBits(r.bucketCounts[f].low>>>0,r.bucketCounts[f].high>>>0).toNumber(!0)}return a},t.toObject=function(r,a){if(!a)a={};var f={};if(a.arrays||a.defaults)f.bucketCounts=[];if(a.defaults)f.offset=0;if(r.offset!=null&&r.hasOwnProperty("offset"))f.offset=r.offset;if(r.bucketCounts&&r.bucketCounts.length){f.bucketCounts=[];for(var y=0;y<r.bucketCounts.length;++y)if(typeof r.bucketCounts[y]==="number")f.bucketCounts[y]=a.longs===String?String(r.bucketCounts[y]):r.bucketCounts[y];else f.bucketCounts[y]=a.longs===String?h.Long.prototype.toString.call(r.bucketCounts[y]):a.longs===Number?new h.LongBits(r.bucketCounts[y].low>>>0,r.bucketCounts[y].high>>>0).toNumber(!0):r.bucketCounts[y]}return f},t.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},t.getTypeUrl=function(r){if(r===void 0)r="type.googleapis.com";return r+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},t}(),u}(),p.SummaryDataPoint=function(){function u(s){if(this.attributes=[],this.quantileValues=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.attributes=h.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.count=null,u.prototype.sum=null,u.prototype.quantileValues=h.emptyArray,u.prototype.flags=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano"))e.uint32(17).fixed64(t.startTimeUnixNano);if(t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano"))e.uint32(25).fixed64(t.timeUnixNano);if(t.count!=null&&Object.hasOwnProperty.call(t,"count"))e.uint32(33).fixed64(t.count);if(t.sum!=null&&Object.hasOwnProperty.call(t,"sum"))e.uint32(41).double(t.sum);if(t.quantileValues!=null&&t.quantileValues.length)for(var r=0;r<t.quantileValues.length;++r)d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(t.quantileValues[r],e.uint32(50).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var r=0;r<t.attributes.length;++r)d.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[r],e.uint32(58).fork()).ldelim();if(t.flags!=null&&Object.hasOwnProperty.call(t,"flags"))e.uint32(64).uint32(t.flags);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.SummaryDataPoint;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 7:{if(!(f.attributes&&f.attributes.length))f.attributes=[];f.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{f.startTimeUnixNano=t.fixed64();break}case 3:{f.timeUnixNano=t.fixed64();break}case 4:{f.count=t.fixed64();break}case 5:{f.sum=t.double();break}case 6:{if(!(f.quantileValues&&f.quantileValues.length))f.quantileValues=[];f.quantileValues.push(d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(t,t.uint32()));break}case 8:{f.flags=t.uint32();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var r=d.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(r)return"attributes."+r}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&h.isInteger(t.startTimeUnixNano.low)&&h.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")){if(!h.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&h.isInteger(t.timeUnixNano.low)&&h.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(t.count!=null&&t.hasOwnProperty("count")){if(!h.isInteger(t.count)&&!(t.count&&h.isInteger(t.count.low)&&h.isInteger(t.count.high)))return"count: integer|Long expected"}if(t.sum!=null&&t.hasOwnProperty("sum")){if(typeof t.sum!=="number")return"sum: number expected"}if(t.quantileValues!=null&&t.hasOwnProperty("quantileValues")){if(!Array.isArray(t.quantileValues))return"quantileValues: array expected";for(var e=0;e<t.quantileValues.length;++e){var r=d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(t.quantileValues[e]);if(r)return"quantileValues."+r}}if(t.flags!=null&&t.hasOwnProperty("flags")){if(!h.isInteger(t.flags))return"flags: integer expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.SummaryDataPoint)return t;var e=new d.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");e.attributes=[];for(var r=0;r<t.attributes.length;++r){if(typeof t.attributes[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");e.attributes[r]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[r])}}if(t.startTimeUnixNano!=null){if(h.Long)(e.startTimeUnixNano=h.Long.fromValue(t.startTimeUnixNano)).unsigned=!1;else if(typeof t.startTimeUnixNano==="string")e.startTimeUnixNano=parseInt(t.startTimeUnixNano,10);else if(typeof t.startTimeUnixNano==="number")e.startTimeUnixNano=t.startTimeUnixNano;else if(typeof t.startTimeUnixNano==="object")e.startTimeUnixNano=new h.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber()}if(t.timeUnixNano!=null){if(h.Long)(e.timeUnixNano=h.Long.fromValue(t.timeUnixNano)).unsigned=!1;else if(typeof t.timeUnixNano==="string")e.timeUnixNano=parseInt(t.timeUnixNano,10);else if(typeof t.timeUnixNano==="number")e.timeUnixNano=t.timeUnixNano;else if(typeof t.timeUnixNano==="object")e.timeUnixNano=new h.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber()}if(t.count!=null){if(h.Long)(e.count=h.Long.fromValue(t.count)).unsigned=!1;else if(typeof t.count==="string")e.count=parseInt(t.count,10);else if(typeof t.count==="number")e.count=t.count;else if(typeof t.count==="object")e.count=new h.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber()}if(t.sum!=null)e.sum=Number(t.sum);if(t.quantileValues){if(!Array.isArray(t.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");e.quantileValues=[];for(var r=0;r<t.quantileValues.length;++r){if(typeof t.quantileValues[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");e.quantileValues[r]=d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(t.quantileValues[r])}}if(t.flags!=null)e.flags=t.flags>>>0;return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.quantileValues=[],r.attributes=[];if(e.defaults){if(h.Long){var a=new h.Long(0,0,!1);r.startTimeUnixNano=e.longs===String?a.toString():e.longs===Number?a.toNumber():a}else r.startTimeUnixNano=e.longs===String?"0":0;if(h.Long){var a=new h.Long(0,0,!1);r.timeUnixNano=e.longs===String?a.toString():e.longs===Number?a.toNumber():a}else r.timeUnixNano=e.longs===String?"0":0;if(h.Long){var a=new h.Long(0,0,!1);r.count=e.longs===String?a.toString():e.longs===Number?a.toNumber():a}else r.count=e.longs===String?"0":0;r.sum=0,r.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano"))if(typeof t.startTimeUnixNano==="number")r.startTimeUnixNano=e.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano;else r.startTimeUnixNano=e.longs===String?h.Long.prototype.toString.call(t.startTimeUnixNano):e.longs===Number?new h.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano;if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano"))if(typeof t.timeUnixNano==="number")r.timeUnixNano=e.longs===String?String(t.timeUnixNano):t.timeUnixNano;else r.timeUnixNano=e.longs===String?h.Long.prototype.toString.call(t.timeUnixNano):e.longs===Number?new h.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano;if(t.count!=null&&t.hasOwnProperty("count"))if(typeof t.count==="number")r.count=e.longs===String?String(t.count):t.count;else r.count=e.longs===String?h.Long.prototype.toString.call(t.count):e.longs===Number?new h.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count;if(t.sum!=null&&t.hasOwnProperty("sum"))r.sum=e.json&&!isFinite(t.sum)?String(t.sum):t.sum;if(t.quantileValues&&t.quantileValues.length){r.quantileValues=[];for(var f=0;f<t.quantileValues.length;++f)r.quantileValues[f]=d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(t.quantileValues[f],e)}if(t.attributes&&t.attributes.length){r.attributes=[];for(var f=0;f<t.attributes.length;++f)r.attributes[f]=d.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[f],e)}if(t.flags!=null&&t.hasOwnProperty("flags"))r.flags=t.flags;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},u.ValueAtQuantile=function(){function s(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.quantile=null,s.prototype.value=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.quantile!=null&&Object.hasOwnProperty.call(e,"quantile"))r.uint32(9).double(e.quantile);if(e.value!=null&&Object.hasOwnProperty.call(e,"value"))r.uint32(17).double(e.value);return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.quantile=e.double();break}case 2:{y.value=e.double();break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.quantile!=null&&e.hasOwnProperty("quantile")){if(typeof e.quantile!=="number")return"quantile: number expected"}if(e.value!=null&&e.hasOwnProperty("value")){if(typeof e.value!=="number")return"value: number expected"}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return e;var r=new d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;if(e.quantile!=null)r.quantile=Number(e.quantile);if(e.value!=null)r.value=Number(e.value);return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.defaults)a.quantile=0,a.value=0;if(e.quantile!=null&&e.hasOwnProperty("quantile"))a.quantile=r.json&&!isFinite(e.quantile)?String(e.quantile):e.quantile;if(e.value!=null&&e.hasOwnProperty("value"))a.value=r.json&&!isFinite(e.value)?String(e.value):e.value;return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},s}(),u}(),p.Exemplar=function(){function u(t){if(this.filteredAttributes=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}u.prototype.filteredAttributes=h.emptyArray,u.prototype.timeUnixNano=null,u.prototype.asDouble=null,u.prototype.asInt=null,u.prototype.spanId=null,u.prototype.traceId=null;var s;return Object.defineProperty(u.prototype,"value",{get:h.oneOfGetter(s=["asDouble","asInt"]),set:h.oneOfSetter(s)}),u.create=function(e){return new u(e)},u.encode=function(e,r){if(!r)r=N.create();if(e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano"))r.uint32(17).fixed64(e.timeUnixNano);if(e.asDouble!=null&&Object.hasOwnProperty.call(e,"asDouble"))r.uint32(25).double(e.asDouble);if(e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId"))r.uint32(34).bytes(e.spanId);if(e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId"))r.uint32(42).bytes(e.traceId);if(e.asInt!=null&&Object.hasOwnProperty.call(e,"asInt"))r.uint32(49).sfixed64(e.asInt);if(e.filteredAttributes!=null&&e.filteredAttributes.length)for(var a=0;a<e.filteredAttributes.length;++a)d.opentelemetry.proto.common.v1.KeyValue.encode(e.filteredAttributes[a],r.uint32(58).fork()).ldelim();return r},u.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},u.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.metrics.v1.Exemplar;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 7:{if(!(y.filteredAttributes&&y.filteredAttributes.length))y.filteredAttributes=[];y.filteredAttributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{y.timeUnixNano=e.fixed64();break}case 3:{y.asDouble=e.double();break}case 6:{y.asInt=e.sfixed64();break}case 4:{y.spanId=e.bytes();break}case 5:{y.traceId=e.bytes();break}default:e.skipType(g&7);break}}return y},u.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";var r={};if(e.filteredAttributes!=null&&e.hasOwnProperty("filteredAttributes")){if(!Array.isArray(e.filteredAttributes))return"filteredAttributes: array expected";for(var a=0;a<e.filteredAttributes.length;++a){var f=d.opentelemetry.proto.common.v1.KeyValue.verify(e.filteredAttributes[a]);if(f)return"filteredAttributes."+f}}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")){if(!h.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&h.isInteger(e.timeUnixNano.low)&&h.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(e.asDouble!=null&&e.hasOwnProperty("asDouble")){if(r.value=1,typeof e.asDouble!=="number")return"asDouble: number expected"}if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(r.value===1)return"value: multiple values";if(r.value=1,!h.isInteger(e.asInt)&&!(e.asInt&&h.isInteger(e.asInt.low)&&h.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}if(e.spanId!=null&&e.hasOwnProperty("spanId")){if(!(e.spanId&&typeof e.spanId.length==="number"||h.isString(e.spanId)))return"spanId: buffer expected"}if(e.traceId!=null&&e.hasOwnProperty("traceId")){if(!(e.traceId&&typeof e.traceId.length==="number"||h.isString(e.traceId)))return"traceId: buffer expected"}return null},u.fromObject=function(e){if(e instanceof d.opentelemetry.proto.metrics.v1.Exemplar)return e;var r=new d.opentelemetry.proto.metrics.v1.Exemplar;if(e.filteredAttributes){if(!Array.isArray(e.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");r.filteredAttributes=[];for(var a=0;a<e.filteredAttributes.length;++a){if(typeof e.filteredAttributes[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");r.filteredAttributes[a]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(e.filteredAttributes[a])}}if(e.timeUnixNano!=null){if(h.Long)(r.timeUnixNano=h.Long.fromValue(e.timeUnixNano)).unsigned=!1;else if(typeof e.timeUnixNano==="string")r.timeUnixNano=parseInt(e.timeUnixNano,10);else if(typeof e.timeUnixNano==="number")r.timeUnixNano=e.timeUnixNano;else if(typeof e.timeUnixNano==="object")r.timeUnixNano=new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber()}if(e.asDouble!=null)r.asDouble=Number(e.asDouble);if(e.asInt!=null){if(h.Long)(r.asInt=h.Long.fromValue(e.asInt)).unsigned=!1;else if(typeof e.asInt==="string")r.asInt=parseInt(e.asInt,10);else if(typeof e.asInt==="number")r.asInt=e.asInt;else if(typeof e.asInt==="object")r.asInt=new h.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber()}if(e.spanId!=null){if(typeof e.spanId==="string")h.base64.decode(e.spanId,r.spanId=h.newBuffer(h.base64.length(e.spanId)),0);else if(e.spanId.length>=0)r.spanId=e.spanId}if(e.traceId!=null){if(typeof e.traceId==="string")h.base64.decode(e.traceId,r.traceId=h.newBuffer(h.base64.length(e.traceId)),0);else if(e.traceId.length>=0)r.traceId=e.traceId}return r},u.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.filteredAttributes=[];if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.timeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.timeUnixNano=r.longs===String?"0":0;if(r.bytes===String)a.spanId="";else if(a.spanId=[],r.bytes!==Array)a.spanId=h.newBuffer(a.spanId);if(r.bytes===String)a.traceId="";else if(a.traceId=[],r.bytes!==Array)a.traceId=h.newBuffer(a.traceId)}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano"))if(typeof e.timeUnixNano==="number")a.timeUnixNano=r.longs===String?String(e.timeUnixNano):e.timeUnixNano;else a.timeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.timeUnixNano):r.longs===Number?new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano;if(e.asDouble!=null&&e.hasOwnProperty("asDouble")){if(a.asDouble=r.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,r.oneofs)a.value="asDouble"}if(e.spanId!=null&&e.hasOwnProperty("spanId"))a.spanId=r.bytes===String?h.base64.encode(e.spanId,0,e.spanId.length):r.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId;if(e.traceId!=null&&e.hasOwnProperty("traceId"))a.traceId=r.bytes===String?h.base64.encode(e.traceId,0,e.traceId.length):r.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId;if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(typeof e.asInt==="number")a.asInt=r.longs===String?String(e.asInt):e.asInt;else a.asInt=r.longs===String?h.Long.prototype.toString.call(e.asInt):r.longs===Number?new h.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt;if(r.oneofs)a.value="asInt"}if(e.filteredAttributes&&e.filteredAttributes.length){a.filteredAttributes=[];for(var y=0;y<e.filteredAttributes.length;++y)a.filteredAttributes[y]=d.opentelemetry.proto.common.v1.KeyValue.toObject(e.filteredAttributes[y],r)}return a},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.metrics.v1.Exemplar"},u}(),p}(),l}(),o.logs=function(){var l={};return l.v1=function(){var p={};return p.LogsData=function(){function u(s){if(this.resourceLogs=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.resourceLogs=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.resourceLogs!=null&&t.resourceLogs.length)for(var r=0;r<t.resourceLogs.length;++r)d.opentelemetry.proto.logs.v1.ResourceLogs.encode(t.resourceLogs[r],e.uint32(10).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.logs.v1.LogsData;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.resourceLogs&&f.resourceLogs.length))f.resourceLogs=[];f.resourceLogs.push(d.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.resourceLogs!=null&&t.hasOwnProperty("resourceLogs")){if(!Array.isArray(t.resourceLogs))return"resourceLogs: array expected";for(var e=0;e<t.resourceLogs.length;++e){var r=d.opentelemetry.proto.logs.v1.ResourceLogs.verify(t.resourceLogs[e]);if(r)return"resourceLogs."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.logs.v1.LogsData)return t;var e=new d.opentelemetry.proto.logs.v1.LogsData;if(t.resourceLogs){if(!Array.isArray(t.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");e.resourceLogs=[];for(var r=0;r<t.resourceLogs.length;++r){if(typeof t.resourceLogs[r]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");e.resourceLogs[r]=d.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(t.resourceLogs[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.resourceLogs=[];if(t.resourceLogs&&t.resourceLogs.length){r.resourceLogs=[];for(var a=0;a<t.resourceLogs.length;++a)r.resourceLogs[a]=d.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.logs.v1.LogsData"},u}(),p.ResourceLogs=function(){function u(s){if(this.scopeLogs=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.resource=null,u.prototype.scopeLogs=h.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.resource!=null&&Object.hasOwnProperty.call(t,"resource"))d.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim();if(t.scopeLogs!=null&&t.scopeLogs.length)for(var r=0;r<t.scopeLogs.length;++r)d.opentelemetry.proto.logs.v1.ScopeLogs.encode(t.scopeLogs[r],e.uint32(18).fork()).ldelim();if(t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl"))e.uint32(26).string(t.schemaUrl);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.logs.v1.ResourceLogs;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.resource=d.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{if(!(f.scopeLogs&&f.scopeLogs.length))f.scopeLogs=[];f.scopeLogs.push(d.opentelemetry.proto.logs.v1.ScopeLogs.decode(t,t.uint32()));break}case 3:{f.schemaUrl=t.string();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=d.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeLogs!=null&&t.hasOwnProperty("scopeLogs")){if(!Array.isArray(t.scopeLogs))return"scopeLogs: array expected";for(var r=0;r<t.scopeLogs.length;++r){var e=d.opentelemetry.proto.logs.v1.ScopeLogs.verify(t.scopeLogs[r]);if(e)return"scopeLogs."+e}}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")){if(!h.isString(t.schemaUrl))return"schemaUrl: string expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.logs.v1.ResourceLogs)return t;var e=new d.opentelemetry.proto.logs.v1.ResourceLogs;if(t.resource!=null){if(typeof t.resource!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");e.resource=d.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeLogs){if(!Array.isArray(t.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");e.scopeLogs=[];for(var r=0;r<t.scopeLogs.length;++r){if(typeof t.scopeLogs[r]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");e.scopeLogs[r]=d.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(t.scopeLogs[r])}}if(t.schemaUrl!=null)e.schemaUrl=String(t.schemaUrl);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.scopeLogs=[];if(e.defaults)r.resource=null,r.schemaUrl="";if(t.resource!=null&&t.hasOwnProperty("resource"))r.resource=d.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e);if(t.scopeLogs&&t.scopeLogs.length){r.scopeLogs=[];for(var a=0;a<t.scopeLogs.length;++a)r.scopeLogs[a]=d.opentelemetry.proto.logs.v1.ScopeLogs.toObject(t.scopeLogs[a],e)}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl"))r.schemaUrl=t.schemaUrl;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.logs.v1.ResourceLogs"},u}(),p.ScopeLogs=function(){function u(s){if(this.logRecords=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.scope=null,u.prototype.logRecords=h.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.scope!=null&&Object.hasOwnProperty.call(t,"scope"))d.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim();if(t.logRecords!=null&&t.logRecords.length)for(var r=0;r<t.logRecords.length;++r)d.opentelemetry.proto.logs.v1.LogRecord.encode(t.logRecords[r],e.uint32(18).fork()).ldelim();if(t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl"))e.uint32(26).string(t.schemaUrl);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.logs.v1.ScopeLogs;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{if(!(f.logRecords&&f.logRecords.length))f.logRecords=[];f.logRecords.push(d.opentelemetry.proto.logs.v1.LogRecord.decode(t,t.uint32()));break}case 3:{f.schemaUrl=t.string();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=d.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.logRecords!=null&&t.hasOwnProperty("logRecords")){if(!Array.isArray(t.logRecords))return"logRecords: array expected";for(var r=0;r<t.logRecords.length;++r){var e=d.opentelemetry.proto.logs.v1.LogRecord.verify(t.logRecords[r]);if(e)return"logRecords."+e}}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")){if(!h.isString(t.schemaUrl))return"schemaUrl: string expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.logs.v1.ScopeLogs)return t;var e=new d.opentelemetry.proto.logs.v1.ScopeLogs;if(t.scope!=null){if(typeof t.scope!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");e.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.logRecords){if(!Array.isArray(t.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");e.logRecords=[];for(var r=0;r<t.logRecords.length;++r){if(typeof t.logRecords[r]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");e.logRecords[r]=d.opentelemetry.proto.logs.v1.LogRecord.fromObject(t.logRecords[r])}}if(t.schemaUrl!=null)e.schemaUrl=String(t.schemaUrl);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.logRecords=[];if(e.defaults)r.scope=null,r.schemaUrl="";if(t.scope!=null&&t.hasOwnProperty("scope"))r.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e);if(t.logRecords&&t.logRecords.length){r.logRecords=[];for(var a=0;a<t.logRecords.length;++a)r.logRecords[a]=d.opentelemetry.proto.logs.v1.LogRecord.toObject(t.logRecords[a],e)}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl"))r.schemaUrl=t.schemaUrl;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.logs.v1.ScopeLogs"},u}(),p.SeverityNumber=function(){var u={},s=Object.create(u);return s[u[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,s[u[1]="SEVERITY_NUMBER_TRACE"]=1,s[u[2]="SEVERITY_NUMBER_TRACE2"]=2,s[u[3]="SEVERITY_NUMBER_TRACE3"]=3,s[u[4]="SEVERITY_NUMBER_TRACE4"]=4,s[u[5]="SEVERITY_NUMBER_DEBUG"]=5,s[u[6]="SEVERITY_NUMBER_DEBUG2"]=6,s[u[7]="SEVERITY_NUMBER_DEBUG3"]=7,s[u[8]="SEVERITY_NUMBER_DEBUG4"]=8,s[u[9]="SEVERITY_NUMBER_INFO"]=9,s[u[10]="SEVERITY_NUMBER_INFO2"]=10,s[u[11]="SEVERITY_NUMBER_INFO3"]=11,s[u[12]="SEVERITY_NUMBER_INFO4"]=12,s[u[13]="SEVERITY_NUMBER_WARN"]=13,s[u[14]="SEVERITY_NUMBER_WARN2"]=14,s[u[15]="SEVERITY_NUMBER_WARN3"]=15,s[u[16]="SEVERITY_NUMBER_WARN4"]=16,s[u[17]="SEVERITY_NUMBER_ERROR"]=17,s[u[18]="SEVERITY_NUMBER_ERROR2"]=18,s[u[19]="SEVERITY_NUMBER_ERROR3"]=19,s[u[20]="SEVERITY_NUMBER_ERROR4"]=20,s[u[21]="SEVERITY_NUMBER_FATAL"]=21,s[u[22]="SEVERITY_NUMBER_FATAL2"]=22,s[u[23]="SEVERITY_NUMBER_FATAL3"]=23,s[u[24]="SEVERITY_NUMBER_FATAL4"]=24,s}(),p.LogRecordFlags=function(){var u={},s=Object.create(u);return s[u[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,s[u[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,s}(),p.LogRecord=function(){function u(s){if(this.attributes=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.timeUnixNano=null,u.prototype.observedTimeUnixNano=null,u.prototype.severityNumber=null,u.prototype.severityText=null,u.prototype.body=null,u.prototype.attributes=h.emptyArray,u.prototype.droppedAttributesCount=null,u.prototype.flags=null,u.prototype.traceId=null,u.prototype.spanId=null,u.prototype.eventName=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano"))e.uint32(9).fixed64(t.timeUnixNano);if(t.severityNumber!=null&&Object.hasOwnProperty.call(t,"severityNumber"))e.uint32(16).int32(t.severityNumber);if(t.severityText!=null&&Object.hasOwnProperty.call(t,"severityText"))e.uint32(26).string(t.severityText);if(t.body!=null&&Object.hasOwnProperty.call(t,"body"))d.opentelemetry.proto.common.v1.AnyValue.encode(t.body,e.uint32(42).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var r=0;r<t.attributes.length;++r)d.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[r],e.uint32(50).fork()).ldelim();if(t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount"))e.uint32(56).uint32(t.droppedAttributesCount);if(t.flags!=null&&Object.hasOwnProperty.call(t,"flags"))e.uint32(69).fixed32(t.flags);if(t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId"))e.uint32(74).bytes(t.traceId);if(t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId"))e.uint32(82).bytes(t.spanId);if(t.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"observedTimeUnixNano"))e.uint32(89).fixed64(t.observedTimeUnixNano);if(t.eventName!=null&&Object.hasOwnProperty.call(t,"eventName"))e.uint32(98).string(t.eventName);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.logs.v1.LogRecord;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.timeUnixNano=t.fixed64();break}case 11:{f.observedTimeUnixNano=t.fixed64();break}case 2:{f.severityNumber=t.int32();break}case 3:{f.severityText=t.string();break}case 5:{f.body=d.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}case 6:{if(!(f.attributes&&f.attributes.length))f.attributes=[];f.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 7:{f.droppedAttributesCount=t.uint32();break}case 8:{f.flags=t.fixed32();break}case 9:{f.traceId=t.bytes();break}case 10:{f.spanId=t.bytes();break}case 12:{f.eventName=t.string();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")){if(!h.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&h.isInteger(t.timeUnixNano.low)&&h.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(t.observedTimeUnixNano!=null&&t.hasOwnProperty("observedTimeUnixNano")){if(!h.isInteger(t.observedTimeUnixNano)&&!(t.observedTimeUnixNano&&h.isInteger(t.observedTimeUnixNano.low)&&h.isInteger(t.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected"}if(t.severityNumber!=null&&t.hasOwnProperty("severityNumber"))switch(t.severityNumber){default:return"severityNumber: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:break}if(t.severityText!=null&&t.hasOwnProperty("severityText")){if(!h.isString(t.severityText))return"severityText: string expected"}if(t.body!=null&&t.hasOwnProperty("body")){var e=d.opentelemetry.proto.common.v1.AnyValue.verify(t.body);if(e)return"body."+e}if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var r=0;r<t.attributes.length;++r){var e=d.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[r]);if(e)return"attributes."+e}}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(t.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(t.flags!=null&&t.hasOwnProperty("flags")){if(!h.isInteger(t.flags))return"flags: integer expected"}if(t.traceId!=null&&t.hasOwnProperty("traceId")){if(!(t.traceId&&typeof t.traceId.length==="number"||h.isString(t.traceId)))return"traceId: buffer expected"}if(t.spanId!=null&&t.hasOwnProperty("spanId")){if(!(t.spanId&&typeof t.spanId.length==="number"||h.isString(t.spanId)))return"spanId: buffer expected"}if(t.eventName!=null&&t.hasOwnProperty("eventName")){if(!h.isString(t.eventName))return"eventName: string expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.logs.v1.LogRecord)return t;var e=new d.opentelemetry.proto.logs.v1.LogRecord;if(t.timeUnixNano!=null){if(h.Long)(e.timeUnixNano=h.Long.fromValue(t.timeUnixNano)).unsigned=!1;else if(typeof t.timeUnixNano==="string")e.timeUnixNano=parseInt(t.timeUnixNano,10);else if(typeof t.timeUnixNano==="number")e.timeUnixNano=t.timeUnixNano;else if(typeof t.timeUnixNano==="object")e.timeUnixNano=new h.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber()}if(t.observedTimeUnixNano!=null){if(h.Long)(e.observedTimeUnixNano=h.Long.fromValue(t.observedTimeUnixNano)).unsigned=!1;else if(typeof t.observedTimeUnixNano==="string")e.observedTimeUnixNano=parseInt(t.observedTimeUnixNano,10);else if(typeof t.observedTimeUnixNano==="number")e.observedTimeUnixNano=t.observedTimeUnixNano;else if(typeof t.observedTimeUnixNano==="object")e.observedTimeUnixNano=new h.LongBits(t.observedTimeUnixNano.low>>>0,t.observedTimeUnixNano.high>>>0).toNumber()}switch(t.severityNumber){default:if(typeof t.severityNumber==="number"){e.severityNumber=t.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:e.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:e.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:e.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:e.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:e.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:e.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:e.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:e.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:e.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:e.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:e.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:e.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:e.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:e.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:e.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:e.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:e.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:e.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:e.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:e.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:e.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:e.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:e.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:e.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:e.severityNumber=24;break}if(t.severityText!=null)e.severityText=String(t.severityText);if(t.body!=null){if(typeof t.body!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");e.body=d.opentelemetry.proto.common.v1.AnyValue.fromObject(t.body)}if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");e.attributes=[];for(var r=0;r<t.attributes.length;++r){if(typeof t.attributes[r]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");e.attributes[r]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[r])}}if(t.droppedAttributesCount!=null)e.droppedAttributesCount=t.droppedAttributesCount>>>0;if(t.flags!=null)e.flags=t.flags>>>0;if(t.traceId!=null){if(typeof t.traceId==="string")h.base64.decode(t.traceId,e.traceId=h.newBuffer(h.base64.length(t.traceId)),0);else if(t.traceId.length>=0)e.traceId=t.traceId}if(t.spanId!=null){if(typeof t.spanId==="string")h.base64.decode(t.spanId,e.spanId=h.newBuffer(h.base64.length(t.spanId)),0);else if(t.spanId.length>=0)e.spanId=t.spanId}if(t.eventName!=null)e.eventName=String(t.eventName);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.attributes=[];if(e.defaults){if(h.Long){var a=new h.Long(0,0,!1);r.timeUnixNano=e.longs===String?a.toString():e.longs===Number?a.toNumber():a}else r.timeUnixNano=e.longs===String?"0":0;if(r.severityNumber=e.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,r.severityText="",r.body=null,r.droppedAttributesCount=0,r.flags=0,e.bytes===String)r.traceId="";else if(r.traceId=[],e.bytes!==Array)r.traceId=h.newBuffer(r.traceId);if(e.bytes===String)r.spanId="";else if(r.spanId=[],e.bytes!==Array)r.spanId=h.newBuffer(r.spanId);if(h.Long){var a=new h.Long(0,0,!1);r.observedTimeUnixNano=e.longs===String?a.toString():e.longs===Number?a.toNumber():a}else r.observedTimeUnixNano=e.longs===String?"0":0;r.eventName=""}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano"))if(typeof t.timeUnixNano==="number")r.timeUnixNano=e.longs===String?String(t.timeUnixNano):t.timeUnixNano;else r.timeUnixNano=e.longs===String?h.Long.prototype.toString.call(t.timeUnixNano):e.longs===Number?new h.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano;if(t.severityNumber!=null&&t.hasOwnProperty("severityNumber"))r.severityNumber=e.enums===String?d.opentelemetry.proto.logs.v1.SeverityNumber[t.severityNumber]===void 0?t.severityNumber:d.opentelemetry.proto.logs.v1.SeverityNumber[t.severityNumber]:t.severityNumber;if(t.severityText!=null&&t.hasOwnProperty("severityText"))r.severityText=t.severityText;if(t.body!=null&&t.hasOwnProperty("body"))r.body=d.opentelemetry.proto.common.v1.AnyValue.toObject(t.body,e);if(t.attributes&&t.attributes.length){r.attributes=[];for(var f=0;f<t.attributes.length;++f)r.attributes[f]=d.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[f],e)}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount"))r.droppedAttributesCount=t.droppedAttributesCount;if(t.flags!=null&&t.hasOwnProperty("flags"))r.flags=t.flags;if(t.traceId!=null&&t.hasOwnProperty("traceId"))r.traceId=e.bytes===String?h.base64.encode(t.traceId,0,t.traceId.length):e.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId;if(t.spanId!=null&&t.hasOwnProperty("spanId"))r.spanId=e.bytes===String?h.base64.encode(t.spanId,0,t.spanId.length):e.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId;if(t.observedTimeUnixNano!=null&&t.hasOwnProperty("observedTimeUnixNano"))if(typeof t.observedTimeUnixNano==="number")r.observedTimeUnixNano=e.longs===String?String(t.observedTimeUnixNano):t.observedTimeUnixNano;else r.observedTimeUnixNano=e.longs===String?h.Long.prototype.toString.call(t.observedTimeUnixNano):e.longs===Number?new h.LongBits(t.observedTimeUnixNano.low>>>0,t.observedTimeUnixNano.high>>>0).toNumber():t.observedTimeUnixNano;if(t.eventName!=null&&t.hasOwnProperty("eventName"))r.eventName=t.eventName;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,x.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.logs.v1.LogRecord"},u}(),p}(),l}(),o}(),n}();Ba.exports=d});var Kt=i(function(Ga){Object.defineProperty(Ga,"__esModule",{value:!0});Ga.toAnyValue=Ga.toKeyValue=Ga.toAttributes=Ga.createInstrumentationScope=Ga.createResource=void 0;function E_(n,o){let l={attributes:qa(n.attributes,o),droppedAttributesCount:0},p=n.schemaUrl;if(p&&p!=="")l.schemaUrl=p;return l}Ga.createResource=E_;function A_(n){return{name:n.name,version:n.version}}Ga.createInstrumentationScope=A_;function qa(n,o){return Object.keys(n).map((l)=>ja(l,n[l],o))}Ga.toAttributes=qa;function ja(n,o,l){return{key:n,value:Ft(o,l)}}Ga.toKeyValue=ja;function Ft(n,o){let l=typeof n;if(l==="string")return{stringValue:n};if(l==="number"){if(!Number.isInteger(n))return{doubleValue:n};return{intValue:n}}if(l==="boolean")return{boolValue:n};if(n instanceof Uint8Array)return{bytesValue:o.encodeUint8Array(n)};if(Array.isArray(n)){let p=Array(n.length);for(let u=0;u<n.length;u++)p[u]=Ft(n[u],o);return{arrayValue:{values:p}}}if(l==="object"&&n!=null){let p=Object.keys(n),u=Array(p.length);for(let s=0;s<p.length;s++)u[s]={key:p[s],value:Ft(n[p[s]],o)};return{kvlistValue:{values:u}}}return{}}Ga.toAnyValue=Ft});var Jr=i(function(Ka){Object.defineProperty(Ka,"__esModule",{value:!0});Ka.toLogAttributes=Ka.createExportLogsServiceRequest=void 0;var zt=Kt();function R_(n,o){return{resourceLogs:U_(n,o)}}Ka.createExportLogsServiceRequest=R_;function M_(n){let o=new Map;for(let l of n){let{resource:p,instrumentationScope:{name:u,version:s="",schemaUrl:t=""}}=l,e=o.get(p);if(!e)e=new Map,o.set(p,e);let r=`${u}@${s}:${t}`,a=e.get(r);if(!a)a=[],e.set(r,a);a.push(l)}return o}function U_(n,o){let l=M_(n);return Array.from(l,([p,u])=>{let s=zt.createResource(p,o);return{resource:s,scopeLogs:Array.from(u,([,t])=>({scope:zt.createInstrumentationScope(t[0].instrumentationScope),logRecords:t.map((e)=>L_(e,o)),schemaUrl:t[0].instrumentationScope.schemaUrl})),schemaUrl:s.schemaUrl}})}function L_(n,o){return{timeUnixNano:o.encodeHrTime(n.hrTime),observedTimeUnixNano:o.encodeHrTime(n.hrTimeObserved),severityNumber:C_(n.severityNumber),severityText:n.severityText,body:zt.toAnyValue(n.body,o),eventName:n.eventName,attributes:Fa(n.attributes,o),droppedAttributesCount:n.droppedAttributesCount,flags:n.spanContext?.traceFlags,traceId:o.encodeOptionalSpanContext(n.spanContext?.traceId),spanId:o.encodeOptionalSpanContext(n.spanContext?.spanId)}}function C_(n){return n}function Fa(n,o){return Object.keys(n).map((l)=>zt.toKeyValue(l,n[l],o))}Ka.toLogAttributes=Fa});var Ya=i(function($a){Object.defineProperty($a,"__esModule",{value:!0});$a.hexToBinary=void 0;function Ja(n){if(n>=48&&n<=57)return n-48;if(n>=97&&n<=102)return n-87;return n-55}function k_(n){let o=new Uint8Array(n.length/2),l=0;for(let p=0;p<n.length;p+=2){let u=Ja(n.charCodeAt(p)),s=Ja(n.charCodeAt(p+1));o[l++]=u<<4|s}return o}$a.hexToBinary=k_});var Ae=i(function(tc){Object.defineProperty(tc,"__esModule",{value:!0});tc.JSON_ENCODER=tc.PROTOBUF_ENCODER=tc.encodeAsString=tc.encodeAsLongBits=tc.toLongBits=tc.hrTimeToNanos=void 0;var V_=Tt(),Xa=Ya();function Wr(n){let o=BigInt(1e9);return BigInt(Math.trunc(n[0]))*o+BigInt(Math.trunc(n[1]))}tc.hrTimeToNanos=Wr;function Za(n){let o=Number(BigInt.asUintN(32,n)),l=Number(BigInt.asUintN(32,n>>BigInt(32)));return{low:o,high:l}}tc.toLongBits=Za;function Qa(n){let o=Wr(n);return Za(o)}tc.encodeAsLongBits=Qa;function ec(n){return Wr(n).toString()}tc.encodeAsString=ec;var B_=typeof BigInt<"u"?ec:V_.hrTimeToNanoseconds;function $r(n){return n}function q_(n){if(n===void 0)return;return Xa.hexToBinary(n)}tc.PROTOBUF_ENCODER={encodeHrTime:Qa,encodeSpanContext:Xa.hexToBinary,encodeOptionalSpanContext:q_,encodeUint8Array:$r};tc.JSON_ENCODER={encodeHrTime:B_,encodeSpanContext:$r,encodeOptionalSpanContext:$r,encodeUint8Array:(n)=>{if(typeof Buffer<"u")return Buffer.from(n).toString("base64");let o=Array(n.length);for(let l=0;l<n.length;l++)o[l]=String.fromCharCode(n[l]);return btoa(o.join(""))}}});var uc=i(function(oc){Object.defineProperty(oc,"__esModule",{value:!0});oc.ProtobufLogsSerializer=void 0;var nc=Ht(),z_=Jr(),J_=Ae(),$_=nc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,W_=nc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;oc.ProtobufLogsSerializer={serializeRequest:(n)=>{let o=z_.createExportLogsServiceRequest(n,J_.PROTOBUF_ENCODER);return W_.encode(o).finish()},deserializeResponse:(n)=>$_.decode(n)}});var ac=i(function(Yr){Object.defineProperty(Yr,"__esModule",{value:!0});Yr.ProtobufLogsSerializer=void 0;var Y_=uc();Object.defineProperty(Yr,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return Y_.ProtobufLogsSerializer}})});var Jt=i(function(cc){Object.defineProperty(cc,"__esModule",{value:!0});cc.AggregationTemporality=void 0;var Z_;(function(n){n[n.DELTA=0]="DELTA",n[n.CUMULATIVE=1]="CUMULATIVE"})(Z_=cc.AggregationTemporality||(cc.AggregationTemporality={}))});var me=i(function(lc){Object.defineProperty(lc,"__esModule",{value:!0});lc.DataPointType=lc.InstrumentType=void 0;var Q_;(function(n){n.COUNTER="COUNTER",n.GAUGE="GAUGE",n.HISTOGRAM="HISTOGRAM",n.UP_DOWN_COUNTER="UP_DOWN_COUNTER",n.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",n.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",n.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(Q_=lc.InstrumentType||(lc.InstrumentType={}));var eg;(function(n){n[n.HISTOGRAM=0]="HISTOGRAM",n[n.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",n[n.GAUGE=2]="GAUGE",n[n.SUM=3]="SUM"})(eg=lc.DataPointType||(lc.DataPointType={}))});var ne=i(function(pc){Object.defineProperty(pc,"__esModule",{value:!0});pc.equalsCaseInsensitive=pc.binarySearchUB=pc.setEquals=pc.callWithTimeout=pc.TimeoutError=pc.instrumentationScopeId=pc.hashAttributes=void 0;function tg(n){let o=Object.keys(n);if(o.length===0)return"";return o=o.sort(),JSON.stringify(o.map((l)=>[l,n[l]]))}pc.hashAttributes=tg;function rg(n){return`${n.name}:${n.version??""}:${n.schemaUrl??""}`}pc.instrumentationScopeId=rg;class $t extends Error{constructor(n){super(n);Object.setPrototypeOf(this,$t.prototype)}}pc.TimeoutError=$t;function ng(n,o){let l,p=new Promise(function(s,t){l=setTimeout(function(){t(new $t("Operation timed out."))},o)});return Promise.race([n,p]).then((u)=>(clearTimeout(l),u),(u)=>{throw clearTimeout(l),u})}pc.callWithTimeout=ng;function og(n,o){if(n.size!==o.size)return!1;for(let l of n)if(!o.has(l))return!1;return!0}pc.setEquals=og;function ig(n,o){let l=0,p=n.length-1,u=n.length;while(p>=l){let s=l+Math.trunc((p-l)/2);if(n[s]<o)l=s+1;else u=s,p=s-1}return u}pc.binarySearchUB=ig;function ug(n,o){return n.toLowerCase()===o.toLowerCase()}pc.equalsCaseInsensitive=ug});var Be=i(function(dc){Object.defineProperty(dc,"__esModule",{value:!0});dc.AggregatorKind=void 0;var dg;(function(n){n[n.DROP=0]="DROP",n[n.SUM=1]="SUM",n[n.LAST_VALUE=2]="LAST_VALUE",n[n.HISTOGRAM=3]="HISTOGRAM",n[n.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(dg=dc.AggregatorKind||(dc.AggregatorKind={}))});var _c=i(function(yc){Object.defineProperty(yc,"__esModule",{value:!0});yc.DropAggregator=void 0;var hg=Be();class hc{kind=hg.AggregatorKind.DROP;createAccumulation(){return}merge(n,o){return}diff(n,o){return}toMetricData(n,o,l,p){return}}yc.DropAggregator=hc});var Oc=i(function(vc){Object.defineProperty(vc,"__esModule",{value:!0});vc.HistogramAggregator=vc.HistogramAccumulation=void 0;var yg=Be(),it=me(),mg=ne();function _g(n){let o=n.map(()=>0);return o.push(0),{buckets:{boundaries:n,counts:o},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}class ut{startTime;_boundaries;_recordMinMax;_current;constructor(n,o,l=!0,p=_g(o)){this.startTime=n,this._boundaries=o,this._recordMinMax=l,this._current=p}record(n){if(Number.isNaN(n))return;if(this._current.count+=1,this._current.sum+=n,this._recordMinMax)this._current.min=Math.min(n,this._current.min),this._current.max=Math.max(n,this._current.max),this._current.hasMinMax=!0;let o=mg.binarySearchUB(this._boundaries,n);this._current.buckets.counts[o]+=1}setStartTime(n){this.startTime=n}toPointValue(){return this._current}}vc.HistogramAccumulation=ut;class gc{kind=yg.AggregatorKind.HISTOGRAM;_boundaries;_recordMinMax;constructor(n,o){this._boundaries=n,this._recordMinMax=o}createAccumulation(n){return new ut(n,this._boundaries,this._recordMinMax)}merge(n,o){let l=n.toPointValue(),p=o.toPointValue(),u=l.buckets.counts,s=p.buckets.counts,t=Array(u.length);for(let a=0;a<u.length;a++)t[a]=u[a]+s[a];let e=1/0,r=-1/0;if(this._recordMinMax){if(l.hasMinMax&&p.hasMinMax)e=Math.min(l.min,p.min),r=Math.max(l.max,p.max);else if(l.hasMinMax)e=l.min,r=l.max;else if(p.hasMinMax)e=p.min,r=p.max}return new ut(n.startTime,l.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:l.buckets.boundaries,counts:t},count:l.count+p.count,sum:l.sum+p.sum,hasMinMax:this._recordMinMax&&(l.hasMinMax||p.hasMinMax),min:e,max:r})}diff(n,o){let l=n.toPointValue(),p=o.toPointValue(),u=l.buckets.counts,s=p.buckets.counts,t=Array(u.length);for(let e=0;e<u.length;e++)t[e]=s[e]-u[e];return new ut(o.startTime,l.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:l.buckets.boundaries,counts:t},count:p.count-l.count,sum:p.sum-l.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(n,o,l,p){return{descriptor:n,aggregationTemporality:o,dataPointType:it.DataPointType.HISTOGRAM,dataPoints:l.map(([u,s])=>{let t=s.toPointValue(),e=n.type===it.InstrumentType.GAUGE||n.type===it.InstrumentType.UP_DOWN_COUNTER||n.type===it.InstrumentType.OBSERVABLE_GAUGE||n.type===it.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:s.startTime,endTime:p,value:{min:t.hasMinMax?t.min:void 0,max:t.hasMinMax?t.max:void 0,sum:!e?t.sum:void 0,buckets:t.buckets,count:t.count}}})}}}vc.HistogramAggregator=gc});var xc=i(function(Sc){Object.defineProperty(Sc,"__esModule",{value:!0});Sc.Buckets=void 0;class en{backing;indexBase;indexStart;indexEnd;constructor(n=new tn,o=0,l=0,p=0){this.backing=n,this.indexBase=o,this.indexStart=l,this.indexEnd=p}get offset(){return this.indexStart}get length(){if(this.backing.length===0)return 0;if(this.indexEnd===this.indexStart&&this.at(0)===0)return 0;return this.indexEnd-this.indexStart+1}counts(){return Array.from({length:this.length},(n,o)=>this.at(o))}at(n){let o=this.indexBase-this.indexStart;if(n<o)n+=this.backing.length;return n-=o,this.backing.countAt(n)}incrementBucket(n,o){this.backing.increment(n,o)}decrementBucket(n,o){this.backing.decrement(n,o)}trim(){for(let n=0;n<this.length;n++)if(this.at(n)!==0){this.indexStart+=n;break}else if(n===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(let n=this.length-1;n>=0;n--)if(this.at(n)!==0){this.indexEnd-=this.length-n-1;break}this._rotate()}downscale(n){this._rotate();let o=1+this.indexEnd-this.indexStart,l=1<<n,p=0,u=0;for(let s=this.indexStart;s<=this.indexEnd;){let t=s%l;if(t<0)t+=l;for(let e=t;e<l&&p<o;e++)this._relocateBucket(u,p),p++,s++;u++}this.indexStart>>=n,this.indexEnd>>=n,this.indexBase=this.indexStart}clone(){return new en(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)}_rotate(){let n=this.indexBase-this.indexStart;if(n===0)return;else if(n>0)this.backing.reverse(0,this.backing.length),this.backing.reverse(0,n),this.backing.reverse(n,this.backing.length);else this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+n);this.indexBase=this.indexStart}_relocateBucket(n,o){if(n===o)return;this.incrementBucket(n,this.backing.emptyBucket(o))}}Sc.Buckets=en;class tn{_counts;constructor(n=[0]){this._counts=n}get length(){return this._counts.length}countAt(n){return this._counts[n]}growTo(n,o,l){let p=Array(n).fill(0);p.splice(l,this._counts.length-o,...this._counts.slice(o)),p.splice(0,o,...this._counts.slice(0,o)),this._counts=p}reverse(n,o){let l=Math.floor((n+o)/2)-n;for(let p=0;p<l;p++){let u=this._counts[n+p];this._counts[n+p]=this._counts[o-p-1],this._counts[o-p-1]=u}}emptyBucket(n){let o=this._counts[n];return this._counts[n]=0,o}increment(n,o){this._counts[n]+=o}decrement(n,o){if(this._counts[n]>=o)this._counts[n]-=o;else this._counts[n]=0}clone(){return new tn([...this._counts])}}});var nn=i(function(Ec){Object.defineProperty(Ec,"__esModule",{value:!0});Ec.getSignificand=Ec.getNormalBase2=Ec.MIN_VALUE=Ec.MAX_NORMAL_EXPONENT=Ec.MIN_NORMAL_EXPONENT=Ec.SIGNIFICAND_WIDTH=void 0;Ec.SIGNIFICAND_WIDTH=52;var vg=2146435072,bg=1048575,rn=1023;Ec.MIN_NORMAL_EXPONENT=-rn+1;Ec.MAX_NORMAL_EXPONENT=rn;Ec.MIN_VALUE=Math.pow(2,-1022);function Og(n){let o=new DataView(new ArrayBuffer(8));return o.setFloat64(0,n),((o.getUint32(0)&vg)>>20)-rn}Ec.getNormalBase2=Og;function Sg(n){let o=new DataView(new ArrayBuffer(8));o.setFloat64(0,n);let l=o.getUint32(0),p=o.getUint32(4);return(l&bg)*Math.pow(2,32)+p}Ec.getSignificand=Sg});var Wt=i(function(Nc){Object.defineProperty(Nc,"__esModule",{value:!0});Nc.nextGreaterSquare=Nc.ldexp=void 0;function Pg(n,o){if(n===0||n===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY||Number.isNaN(n))return n;return n*Math.pow(2,o)}Nc.ldexp=Pg;function wg(n){return n--,n|=n>>1,n|=n>>2,n|=n>>4,n|=n>>8,n|=n>>16,n++,n}Nc.nextGreaterSquare=wg});var Yt=i(function(Ic){Object.defineProperty(Ic,"__esModule",{value:!0});Ic.MappingError=void 0;class wc extends Error{}Ic.MappingError=wc});var Dc=i(function(Lc){Object.defineProperty(Lc,"__esModule",{value:!0});Lc.ExponentMapping=void 0;var qe=nn(),Rg=Wt(),Mc=Yt();class Uc{_shift;constructor(n){this._shift=-n}mapToIndex(n){if(n<qe.MIN_VALUE)return this._minNormalLowerBoundaryIndex();let o=qe.getNormalBase2(n),l=this._rightShift(qe.getSignificand(n)-1,qe.SIGNIFICAND_WIDTH);return o+l>>this._shift}lowerBoundary(n){let o=this._minNormalLowerBoundaryIndex();if(n<o)throw new Mc.MappingError(`underflow: ${n} is < minimum lower boundary: ${o}`);let l=this._maxNormalLowerBoundaryIndex();if(n>l)throw new Mc.MappingError(`overflow: ${n} is > maximum lower boundary: ${l}`);return Rg.ldexp(1,n<<this._shift)}get scale(){if(this._shift===0)return 0;return-this._shift}_minNormalLowerBoundaryIndex(){let n=qe.MIN_NORMAL_EXPONENT>>this._shift;if(this._shift<2)n--;return n}_maxNormalLowerBoundaryIndex(){return qe.MAX_NORMAL_EXPONENT>>this._shift}_rightShift(n,o){return Math.floor(n*Math.pow(2,-o))}}Lc.ExponentMapping=Uc});var Gc=i(function(qc){Object.defineProperty(qc,"__esModule",{value:!0});qc.LogarithmMapping=void 0;var je=nn(),kc=Wt(),Vc=Yt();class Bc{_scale;_scaleFactor;_inverseFactor;constructor(n){this._scale=n,this._scaleFactor=kc.ldexp(Math.LOG2E,n),this._inverseFactor=kc.ldexp(Math.LN2,-n)}mapToIndex(n){if(n<=je.MIN_VALUE)return this._minNormalLowerBoundaryIndex()-1;if(je.getSignificand(n)===0)return(je.getNormalBase2(n)<<this._scale)-1;let o=Math.floor(Math.log(n)*this._scaleFactor),l=this._maxNormalLowerBoundaryIndex();if(o>=l)return l;return o}lowerBoundary(n){let o=this._maxNormalLowerBoundaryIndex();if(n>=o){if(n===o)return 2*Math.exp((n-(1<<this._scale))/this._scaleFactor);throw new Vc.MappingError(`overflow: ${n} is > maximum lower boundary: ${o}`)}let l=this._minNormalLowerBoundaryIndex();if(n<=l){if(n===l)return je.MIN_VALUE;else if(n===l-1)return Math.exp((n+(1<<this._scale))/this._scaleFactor)/2;throw new Vc.MappingError(`overflow: ${n} is < minimum lower boundary: ${l}`)}return Math.exp(n*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return je.MIN_NORMAL_EXPONENT<<this._scale}_maxNormalLowerBoundaryIndex(){return(je.MAX_NORMAL_EXPONENT+1<<this._scale)-1}}qc.LogarithmMapping=Bc});var Jc=i(function(Kc){Object.defineProperty(Kc,"__esModule",{value:!0});Kc.getMapping=void 0;var Mg=Dc(),Ug=Gc(),Lg=Yt(),Hc=-10,Fc=20,Cg=Array.from({length:31},(n,o)=>{if(o>10)return new Ug.LogarithmMapping(o-10);return new Mg.ExponentMapping(o-10)});function Dg(n){if(n>Fc||n<Hc)throw new Lg.MappingError(`expected scale >= ${Hc} && <= ${Fc}, got: ${n}`);return Cg[n+10]}Kc.getMapping=Dg});var Qc=i(function(Xc){Object.defineProperty(Xc,"__esModule",{value:!0});Xc.ExponentialHistogramAggregator=Xc.ExponentialHistogramAccumulation=void 0;var kg=Be(),at=me(),Vg=A(),$c=xc(),Wc=Jc(),Bg=Wt();class Ge{static combine(n,o){return new Ge(Math.min(n.low,o.low),Math.max(n.high,o.high))}low;high;constructor(n,o){this.low=n,this.high=o}}var qg=20,jg=160,on=2;class Xt{startTime;_maxSize;_recordMinMax;_sum;_count;_zeroCount;_min;_max;_positive;_negative;_mapping;constructor(n,o=jg,l=!0,p=0,u=0,s=0,t=Number.POSITIVE_INFINITY,e=Number.NEGATIVE_INFINITY,r=new $c.Buckets,a=new $c.Buckets,f=Wc.getMapping(qg)){if(this.startTime=n,this._maxSize=o,this._recordMinMax=l,this._sum=p,this._count=u,this._zeroCount=s,this._min=t,this._max=e,this._positive=r,this._negative=a,this._mapping=f,this._maxSize<on)Vg.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${on}`),this._maxSize=on}record(n){this.updateByIncrement(n,1)}setStartTime(n){this.startTime=n}toPointValue(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}}get sum(){return this._sum}get min(){return this._min}get max(){return this._max}get count(){return this._count}get zeroCount(){return this._zeroCount}get scale(){if(this._count===this._zeroCount)return 0;return this._mapping.scale}get positive(){return this._positive}get negative(){return this._negative}updateByIncrement(n,o){if(Number.isNaN(n))return;if(n>this._max)this._max=n;if(n<this._min)this._min=n;if(this._count+=o,n===0){this._zeroCount+=o;return}if(this._sum+=n*o,n>0)this._updateBuckets(this._positive,n,o);else this._updateBuckets(this._negative,-n,o)}merge(n){if(this._count===0)this._min=n.min,this._max=n.max;else if(n.count!==0){if(n.min<this.min)this._min=n.min;if(n.max>this.max)this._max=n.max}this.startTime=n.startTime,this._sum+=n.sum,this._count+=n.count,this._zeroCount+=n.zeroCount;let o=this._minScale(n);this._downscale(this.scale-o),this._mergeBuckets(this.positive,n,n.positive,o),this._mergeBuckets(this.negative,n,n.negative,o)}diff(n){this._min=1/0,this._max=-1/0,this._sum-=n.sum,this._count-=n.count,this._zeroCount-=n.zeroCount;let o=this._minScale(n);this._downscale(this.scale-o),this._diffBuckets(this.positive,n,n.positive,o),this._diffBuckets(this.negative,n,n.negative,o)}clone(){return new Xt(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)}_updateBuckets(n,o,l){let p=this._mapping.mapToIndex(o),u=!1,s=0,t=0;if(n.length===0)n.indexStart=p,n.indexEnd=n.indexStart,n.indexBase=n.indexStart;else if(p<n.indexStart&&n.indexEnd-p>=this._maxSize)u=!0,t=p,s=n.indexEnd;else if(p>n.indexEnd&&p-n.indexStart>=this._maxSize)u=!0,t=n.indexStart,s=p;if(u){let e=this._changeScale(s,t);this._downscale(e),p=this._mapping.mapToIndex(o)}this._incrementIndexBy(n,p,l)}_incrementIndexBy(n,o,l){if(l===0)return;if(n.length===0)n.indexStart=n.indexEnd=n.indexBase=o;if(o<n.indexStart){let u=n.indexEnd-o;if(u>=n.backing.length)this._grow(n,u+1);n.indexStart=o}else if(o>n.indexEnd){let u=o-n.indexStart;if(u>=n.backing.length)this._grow(n,u+1);n.indexEnd=o}let p=o-n.indexBase;if(p<0)p+=n.backing.length;n.incrementBucket(p,l)}_grow(n,o){let l=n.backing.length,p=n.indexBase-n.indexStart,u=l-p,s=Bg.nextGreaterSquare(o);if(s>this._maxSize)s=this._maxSize;let t=s-p;n.backing.growTo(s,u,t)}_changeScale(n,o){let l=0;while(n-o>=this._maxSize)n>>=1,o>>=1,l++;return l}_downscale(n){if(n===0)return;if(n<0)throw Error(`impossible change of scale: ${this.scale}`);let o=this._mapping.scale-n;this._positive.downscale(n),this._negative.downscale(n),this._mapping=Wc.getMapping(o)}_minScale(n){let o=Math.min(this.scale,n.scale),l=Ge.combine(this._highLowAtScale(this.positive,this.scale,o),this._highLowAtScale(n.positive,n.scale,o)),p=Ge.combine(this._highLowAtScale(this.negative,this.scale,o),this._highLowAtScale(n.negative,n.scale,o));return Math.min(o-this._changeScale(l.high,l.low),o-this._changeScale(p.high,p.low))}_highLowAtScale(n,o,l){if(n.length===0)return new Ge(0,-1);let p=o-l;return new Ge(n.indexStart>>p,n.indexEnd>>p)}_mergeBuckets(n,o,l,p){let u=l.offset,s=o.scale-p;for(let t=0;t<l.length;t++)this._incrementIndexBy(n,u+t>>s,l.at(t))}_diffBuckets(n,o,l,p){let u=l.offset,s=o.scale-p;for(let t=0;t<l.length;t++){let r=(u+t>>s)-n.indexBase;if(r<0)r+=n.backing.length;n.decrementBucket(r,l.at(t))}n.trim()}}Xc.ExponentialHistogramAccumulation=Xt;class Yc{kind=kg.AggregatorKind.EXPONENTIAL_HISTOGRAM;_maxSize;_recordMinMax;constructor(n,o){this._maxSize=n,this._recordMinMax=o}createAccumulation(n){return new Xt(n,this._maxSize,this._recordMinMax)}merge(n,o){let l=o.clone();return l.merge(n),l}diff(n,o){let l=o.clone();return l.diff(n),l}toMetricData(n,o,l,p){return{descriptor:n,aggregationTemporality:o,dataPointType:at.DataPointType.EXPONENTIAL_HISTOGRAM,dataPoints:l.map(([u,s])=>{let t=s.toPointValue(),e=n.type===at.InstrumentType.GAUGE||n.type===at.InstrumentType.UP_DOWN_COUNTER||n.type===at.InstrumentType.OBSERVABLE_GAUGE||n.type===at.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:s.startTime,endTime:p,value:{min:t.hasMinMax?t.min:void 0,max:t.hasMinMax?t.max:void 0,sum:!e?t.sum:void 0,positive:{offset:t.positive.offset,bucketCounts:t.positive.bucketCounts},negative:{offset:t.negative.offset,bucketCounts:t.negative.bucketCounts},count:t.count,scale:t.scale,zeroCount:t.zeroCount}}})}}}Xc.ExponentialHistogramAggregator=Yc});var ns=i(function(ts){Object.defineProperty(ts,"__esModule",{value:!0});ts.LastValueAggregator=ts.LastValueAccumulation=void 0;var Hg=Be(),ct=Tt(),Fg=me();class st{startTime;_current;sampleTime;constructor(n,o=0,l=[0,0]){this.startTime=n,this._current=o,this.sampleTime=l}record(n){this._current=n,this.sampleTime=ct.millisToHrTime(Date.now())}setStartTime(n){this.startTime=n}toPointValue(){return this._current}}ts.LastValueAccumulation=st;class es{kind=Hg.AggregatorKind.LAST_VALUE;createAccumulation(n){return new st(n)}merge(n,o){let l=ct.hrTimeToMicroseconds(o.sampleTime)>=ct.hrTimeToMicroseconds(n.sampleTime)?o:n;return new st(n.startTime,l.toPointValue(),l.sampleTime)}diff(n,o){let l=ct.hrTimeToMicroseconds(o.sampleTime)>=ct.hrTimeToMicroseconds(n.sampleTime)?o:n;return new st(o.startTime,l.toPointValue(),l.sampleTime)}toMetricData(n,o,l,p){return{descriptor:n,aggregationTemporality:o,dataPointType:Fg.DataPointType.GAUGE,dataPoints:l.map(([u,s])=>({attributes:u,startTime:s.startTime,endTime:p,value:s.toPointValue()}))}}}ts.LastValueAggregator=es});var as=i(function(is){Object.defineProperty(is,"__esModule",{value:!0});is.SumAggregator=is.SumAccumulation=void 0;var zg=Be(),$g=me();class Ne{startTime;monotonic;_current;reset;constructor(n,o,l=0,p=!1){this.startTime=n,this.monotonic=o,this._current=l,this.reset=p}record(n){if(this.monotonic&&n<0)return;this._current+=n}setStartTime(n){this.startTime=n}toPointValue(){return this._current}}is.SumAccumulation=Ne;class os{kind=zg.AggregatorKind.SUM;monotonic;constructor(n){this.monotonic=n}createAccumulation(n){return new Ne(n,this.monotonic)}merge(n,o){let l=n.toPointValue(),p=o.toPointValue();if(o.reset)return new Ne(o.startTime,this.monotonic,p,o.reset);return new Ne(n.startTime,this.monotonic,l+p)}diff(n,o){let l=n.toPointValue(),p=o.toPointValue();if(this.monotonic&&l>p)return new Ne(o.startTime,this.monotonic,p,!0);return new Ne(o.startTime,this.monotonic,p-l)}toMetricData(n,o,l,p){return{descriptor:n,aggregationTemporality:o,dataPointType:$g.DataPointType.SUM,dataPoints:l.map(([u,s])=>({attributes:u,startTime:s.startTime,endTime:p,value:s.toPointValue()})),isMonotonic:this.monotonic}}}is.SumAggregator=os});var fs=i(function(te){Object.defineProperty(te,"__esModule",{value:!0});te.SumAggregator=te.SumAccumulation=te.LastValueAggregator=te.LastValueAccumulation=te.ExponentialHistogramAggregator=te.ExponentialHistogramAccumulation=te.HistogramAggregator=te.HistogramAccumulation=te.DropAggregator=void 0;var Yg=_c();Object.defineProperty(te,"DropAggregator",{enumerable:!0,get:function(){return Yg.DropAggregator}});var cs=Oc();Object.defineProperty(te,"HistogramAccumulation",{enumerable:!0,get:function(){return cs.HistogramAccumulation}});Object.defineProperty(te,"HistogramAggregator",{enumerable:!0,get:function(){return cs.HistogramAggregator}});var ss=Qc();Object.defineProperty(te,"ExponentialHistogramAccumulation",{enumerable:!0,get:function(){return ss.ExponentialHistogramAccumulation}});Object.defineProperty(te,"ExponentialHistogramAggregator",{enumerable:!0,get:function(){return ss.ExponentialHistogramAggregator}});var ls=ns();Object.defineProperty(te,"LastValueAccumulation",{enumerable:!0,get:function(){return ls.LastValueAccumulation}});Object.defineProperty(te,"LastValueAggregator",{enumerable:!0,get:function(){return ls.LastValueAggregator}});var ps=as();Object.defineProperty(te,"SumAccumulation",{enumerable:!0,get:function(){return ps.SumAccumulation}});Object.defineProperty(te,"SumAggregator",{enumerable:!0,get:function(){return ps.SumAggregator}})});var vs=i(function(ds){Object.defineProperty(ds,"__esModule",{value:!0});ds.DEFAULT_AGGREGATION=ds.EXPONENTIAL_HISTOGRAM_AGGREGATION=ds.HISTOGRAM_AGGREGATION=ds.LAST_VALUE_AGGREGATION=ds.SUM_AGGREGATION=ds.DROP_AGGREGATION=ds.DefaultAggregation=ds.ExponentialHistogramAggregation=ds.ExplicitBucketHistogramAggregation=ds.HistogramAggregation=ds.LastValueAggregation=ds.SumAggregation=ds.DropAggregation=void 0;var Qg=A(),Pe=fs(),oe=me();class Zt{static DEFAULT_INSTANCE=new Pe.DropAggregator;createAggregator(n){return Zt.DEFAULT_INSTANCE}}ds.DropAggregation=Zt;class lt{static MONOTONIC_INSTANCE=new Pe.SumAggregator(!0);static NON_MONOTONIC_INSTANCE=new Pe.SumAggregator(!1);createAggregator(n){switch(n.type){case oe.InstrumentType.COUNTER:case oe.InstrumentType.OBSERVABLE_COUNTER:case oe.InstrumentType.HISTOGRAM:return lt.MONOTONIC_INSTANCE;default:return lt.NON_MONOTONIC_INSTANCE}}}ds.SumAggregation=lt;class Qt{static DEFAULT_INSTANCE=new Pe.LastValueAggregator;createAggregator(n){return Qt.DEFAULT_INSTANCE}}ds.LastValueAggregation=Qt;class er{static DEFAULT_INSTANCE=new Pe.HistogramAggregator([0,5,10,25,50,75,100,250,500,750,1000,2500,5000,7500,1e4],!0);createAggregator(n){return er.DEFAULT_INSTANCE}}ds.HistogramAggregation=er;class un{_boundaries;_recordMinMax;constructor(n,o=!0){if(n==null)throw Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");n=n.concat(),n=n.sort((u,s)=>u-s);let l=n.lastIndexOf(-1/0),p=n.indexOf(1/0);if(p===-1)p=void 0;this._boundaries=n.slice(l+1,p),this._recordMinMax=o}createAggregator(n){return new Pe.HistogramAggregator(this._boundaries,this._recordMinMax)}}ds.ExplicitBucketHistogramAggregation=un;class an{_maxSize;_recordMinMax;constructor(n=160,o=!0){this._maxSize=n,this._recordMinMax=o}createAggregator(n){return new Pe.ExponentialHistogramAggregator(this._maxSize,this._recordMinMax)}}ds.ExponentialHistogramAggregation=an;class cn{_resolve(n){switch(n.type){case oe.InstrumentType.COUNTER:case oe.InstrumentType.UP_DOWN_COUNTER:case oe.InstrumentType.OBSERVABLE_COUNTER:case oe.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return ds.SUM_AGGREGATION;case oe.InstrumentType.GAUGE:case oe.InstrumentType.OBSERVABLE_GAUGE:return ds.LAST_VALUE_AGGREGATION;case oe.InstrumentType.HISTOGRAM:{if(n.advice.explicitBucketBoundaries)return new un(n.advice.explicitBucketBoundaries);return ds.HISTOGRAM_AGGREGATION}}return Qg.diag.warn(`Unable to recognize instrument type: ${n.type}`),ds.DROP_AGGREGATION}createAggregator(n){return this._resolve(n).createAggregator(n)}}ds.DefaultAggregation=cn;ds.DROP_AGGREGATION=new Zt;ds.SUM_AGGREGATION=new lt;ds.LAST_VALUE_AGGREGATION=new Qt;ds.HISTOGRAM_AGGREGATION=new er;ds.EXPONENTIAL_HISTOGRAM_AGGREGATION=new an;ds.DEFAULT_AGGREGATION=new cn});var pt=i(function(Os){Object.defineProperty(Os,"__esModule",{value:!0});Os.toAggregation=Os.AggregationType=void 0;var Ie=vs(),we;(function(n){n[n.DEFAULT=0]="DEFAULT",n[n.DROP=1]="DROP",n[n.SUM=2]="SUM",n[n.LAST_VALUE=3]="LAST_VALUE",n[n.EXPLICIT_BUCKET_HISTOGRAM=4]="EXPLICIT_BUCKET_HISTOGRAM",n[n.EXPONENTIAL_HISTOGRAM=5]="EXPONENTIAL_HISTOGRAM"})(we=Os.AggregationType||(Os.AggregationType={}));function cv(n){switch(n.type){case we.DEFAULT:return Ie.DEFAULT_AGGREGATION;case we.DROP:return Ie.DROP_AGGREGATION;case we.SUM:return Ie.SUM_AGGREGATION;case we.LAST_VALUE:return Ie.LAST_VALUE_AGGREGATION;case we.EXPONENTIAL_HISTOGRAM:{let o=n;return new Ie.ExponentialHistogramAggregation(o.options?.maxSize,o.options?.recordMinMax)}case we.EXPLICIT_BUCKET_HISTOGRAM:{let o=n;if(o.options==null)return Ie.HISTOGRAM_AGGREGATION;else return new Ie.ExplicitBucketHistogramAggregation(o.options?.boundaries,o.options?.recordMinMax)}default:throw Error("Unsupported Aggregation")}}Os.toAggregation=cv});var sn=i(function(Ts){Object.defineProperty(Ts,"__esModule",{value:!0});Ts.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=Ts.DEFAULT_AGGREGATION_SELECTOR=void 0;var sv=Jt(),lv=pt(),pv=(n)=>({type:lv.AggregationType.DEFAULT});Ts.DEFAULT_AGGREGATION_SELECTOR=pv;var fv=(n)=>sv.AggregationTemporality.CUMULATIVE;Ts.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=fv});var ln=i(function(ws){Object.defineProperty(ws,"__esModule",{value:!0});ws.MetricReader=void 0;var Es=A(),As=ne(),Ns=sn();class Ps{_shutdown=!1;_metricProducers;_sdkMetricProducer;_aggregationTemporalitySelector;_aggregationSelector;_cardinalitySelector;constructor(n){this._aggregationSelector=n?.aggregationSelector??Ns.DEFAULT_AGGREGATION_SELECTOR,this._aggregationTemporalitySelector=n?.aggregationTemporalitySelector??Ns.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,this._metricProducers=n?.metricProducers??[],this._cardinalitySelector=n?.cardinalitySelector}setMetricProducer(n){if(this._sdkMetricProducer)throw Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=n,this.onInitialized()}selectAggregation(n){return this._aggregationSelector(n)}selectAggregationTemporality(n){return this._aggregationTemporalitySelector(n)}selectCardinalityLimit(n){return this._cardinalitySelector?this._cardinalitySelector(n):2000}onInitialized(){}async collect(n){if(this._sdkMetricProducer===void 0)throw Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw Error("MetricReader is shutdown");let[o,...l]=await Promise.all([this._sdkMetricProducer.collect({timeoutMillis:n?.timeoutMillis}),...this._metricProducers.map((t)=>t.collect({timeoutMillis:n?.timeoutMillis}))]),p=o.errors.concat(l.flatMap((t)=>t.errors)),u=o.resourceMetrics.resource,s=o.resourceMetrics.scopeMetrics.concat(l.flatMap((t)=>t.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:u,scopeMetrics:s},errors:p}}async shutdown(n){if(this._shutdown){Es.diag.error("Cannot call shutdown twice.");return}if(n?.timeoutMillis==null)await this.onShutdown();else await As.callWithTimeout(this.onShutdown(),n.timeoutMillis);this._shutdown=!0}async forceFlush(n){if(this._shutdown){Es.diag.warn("Cannot forceFlush on already shutdown MetricReader.");return}if(n?.timeoutMillis==null){await this.onForceFlush();return}await As.callWithTimeout(this.onForceFlush(),n.timeoutMillis)}}ws.MetricReader=Ps});var Cs=i(function(Us){Object.defineProperty(Us,"__esModule",{value:!0});Us.PeriodicExportingMetricReader=void 0;var tr=A(),rr=Tt(),hv=ln(),Rs=ne();class Ms extends hv.MetricReader{_interval;_exporter;_exportInterval;_exportTimeout;constructor(n){let{exporter:o,exportIntervalMillis:l=60000,metricProducers:p}=n,{exportTimeoutMillis:u=30000}=n;super({aggregationSelector:o.selectAggregation?.bind(o),aggregationTemporalitySelector:o.selectAggregationTemporality?.bind(o),metricProducers:p});if(l<=0)throw Error("exportIntervalMillis must be greater than 0");if(u<=0)throw Error("exportTimeoutMillis must be greater than 0");if(l<u)if("exportIntervalMillis"in n&&"exportTimeoutMillis"in n)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");else tr.diag.info(`Timeout of ${u} exceeds the interval of ${l}. Clamping timeout to interval duration.`),u=l;this._exportInterval=l,this._exportTimeout=u,this._exporter=o}async _runOnce(){try{await Rs.callWithTimeout(this._doRun(),this._exportTimeout)}catch(n){if(n instanceof Rs.TimeoutError){tr.diag.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}rr.globalErrorHandler(n)}}async _doRun(){let{resourceMetrics:n,errors:o}=await this.collect({timeoutMillis:this._exportTimeout});if(o.length>0)tr.diag.error("PeriodicExportingMetricReader: metrics collection errors",...o);if(n.resource.asyncAttributesPending)try{await n.resource.waitForAsyncAttributes?.()}catch(p){tr.diag.debug("Error while resolving async portion of resource: ",p),rr.globalErrorHandler(p)}if(n.scopeMetrics.length===0)return;let l=await rr.internal._export(this._exporter,n);if(l.code!==rr.ExportResultCode.SUCCESS)throw Error(`PeriodicExportingMetricReader: metrics export failed (error ${l.error})`)}onInitialized(){if(this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),typeof this._interval!=="number")this._interval.unref()}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){if(this._interval)clearInterval(this._interval);await this.onForceFlush(),await this._exporter.shutdown()}}Us.PeriodicExportingMetricReader=Ms});var qs=i(function(Vs){Object.defineProperty(Vs,"__esModule",{value:!0});Vs.InMemoryMetricExporter=void 0;var Ds=Tt();class ks{_shutdown=!1;_aggregationTemporality;_metrics=[];constructor(n){this._aggregationTemporality=n}export(n,o){if(this._shutdown){setTimeout(()=>o({code:Ds.ExportResultCode.FAILED}),0);return}this._metrics.push(n),setTimeout(()=>o({code:Ds.ExportResultCode.SUCCESS}),0)}getMetrics(){return this._metrics}forceFlush(){return Promise.resolve()}reset(){this._metrics=[]}selectAggregationTemporality(n){return this._aggregationTemporality}shutdown(){return this._shutdown=!0,Promise.resolve()}}Vs.InMemoryMetricExporter=ks});var Fs=i(function(Gs){Object.defineProperty(Gs,"__esModule",{value:!0});Gs.ConsoleMetricExporter=void 0;var js=Tt(),yv=sn();class pn{_shutdown=!1;_temporalitySelector;constructor(n){this._temporalitySelector=n?.temporalitySelector??yv.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR}export(n,o){if(this._shutdown){o({code:js.ExportResultCode.FAILED});return}return pn._sendMetrics(n,o)}forceFlush(){return Promise.resolve()}selectAggregationTemporality(n){return this._temporalitySelector(n)}shutdown(){return this._shutdown=!0,Promise.resolve()}static _sendMetrics(n,o){for(let l of n.scopeMetrics)for(let p of l.metrics)console.dir({descriptor:p.descriptor,dataPointType:p.dataPointType,dataPoints:p.dataPoints},{depth:null});o({code:js.ExportResultCode.SUCCESS})}}Gs.ConsoleMetricExporter=pn});var fn=i(function(Ks){Object.defineProperty(Ks,"__esModule",{value:!0});Ks._clearDefaultServiceNameCache=Ks.defaultServiceName=void 0;var ft;function mv(){if(ft===void 0)try{let n=globalThis.process.argv0;ft=n?`unknown_service:${n}`:"unknown_service"}catch{ft="unknown_service"}return ft}Ks.defaultServiceName=mv;function _v(){ft=void 0}Ks._clearDefaultServiceNameCache=_v});var Ws=i(function(Js){Object.defineProperty(Js,"__esModule",{value:!0});Js.isPromiseLike=void 0;var vv=(n)=>n!==null&&typeof n==="object"&&typeof n.then==="function";Js.isPromiseLike=vv});var yn=i(function(Xs){Object.defineProperty(Xs,"__esModule",{value:!0});Xs.defaultResource=Xs.emptyResource=Xs.resourceFromDetectedResource=Xs.resourceFromAttributes=void 0;var ht=A(),dn=Tt(),Re=fa(),bv=fn(),dt=Ws();class yt{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(n,o){let l=new yt({},o);return l._rawAttributes=Ys(n),l._asyncAttributesPending=n.filter(([p,u])=>dt.isPromiseLike(u)).length>0,l}constructor(n,o){let l=n.attributes??{};this._rawAttributes=Object.entries(l).map(([p,u])=>{if(dt.isPromiseLike(u))this._asyncAttributesPending=!0;return[p,u]}),this._rawAttributes=Ys(this._rawAttributes),this._schemaUrl=xv(o?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(!this.asyncAttributesPending)return;for(let n=0;n<this._rawAttributes.length;n++){let[o,l]=this._rawAttributes[n];this._rawAttributes[n]=[o,dt.isPromiseLike(l)?await l:l]}this._asyncAttributesPending=!1}get attributes(){if(this.asyncAttributesPending)ht.diag.error("Accessing resource attributes before async attributes settled");if(this._memoizedAttributes)return this._memoizedAttributes;let n={};for(let[o,l]of this._rawAttributes){if(dt.isPromiseLike(l)){ht.diag.debug(`Unsettled resource attribute ${o} skipped`);continue}if(l!=null)n[o]??=l}if(!this._asyncAttributesPending)this._memoizedAttributes=n;return n}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(n){if(n==null)return this;let o=Ev(this,n),l=o?{schemaUrl:o}:void 0;return yt.FromAttributeList([...n.getRawAttributes(),...this.getRawAttributes()],l)}}function hn(n,o){return yt.FromAttributeList(Object.entries(n),o)}Xs.resourceFromAttributes=hn;function Ov(n,o){return new yt(n,o)}Xs.resourceFromDetectedResource=Ov;function Sv(){return hn({})}Xs.emptyResource=Sv;function Tv(){return hn({[Re.ATTR_SERVICE_NAME]:bv.defaultServiceName(),[Re.ATTR_TELEMETRY_SDK_LANGUAGE]:dn.SDK_INFO[Re.ATTR_TELEMETRY_SDK_LANGUAGE],[Re.ATTR_TELEMETRY_SDK_NAME]:dn.SDK_INFO[Re.ATTR_TELEMETRY_SDK_NAME],[Re.ATTR_TELEMETRY_SDK_VERSION]:dn.SDK_INFO[Re.ATTR_TELEMETRY_SDK_VERSION]})}Xs.defaultResource=Tv;function Ys(n){return n.map(([o,l])=>{if(dt.isPromiseLike(l))return[o,l.catch((p)=>{ht.diag.debug("promise rejection for resource attribute: %s - %s",o,p);return})];return[o,l]})}function xv(n){if(typeof n==="string"||n===void 0)return n;ht.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",n);return}function Ev(n,o){let l=n?.schemaUrl,p=o?.schemaUrl,u=l===void 0||l==="",s=p===void 0||p==="";if(u)return p;if(s)return l;if(l===p)return l;ht.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',l,p);return}});var rl=i(function(el){Object.defineProperty(el,"__esModule",{value:!0});el.detectResources=void 0;var Qs=A(),mn=yn(),wv=(n={})=>(n.detectors||[]).map((l)=>{try{let p=mn.resourceFromDetectedResource(l.detect(n));return Qs.diag.debug(`${l.constructor.name} found resource.`,p),p}catch(p){return Qs.diag.debug(`${l.constructor.name} failed: ${p.message}`),mn.emptyResource()}}).reduce((l,p)=>l.merge(p),mn.emptyResource());el.detectResources=wv});var al=i(function(il){Object.defineProperty(il,"__esModule",{value:!0});il.envDetector=void 0;var Iv=A(),Rv=fa(),nl=Tt();class ol{_MAX_LENGTH=255;_COMMA_SEPARATOR=",";_LABEL_KEY_VALUE_SPLITTER="=";detect(n){let o={},l=nl.getStringFromEnv("OTEL_RESOURCE_ATTRIBUTES"),p=nl.getStringFromEnv("OTEL_SERVICE_NAME");if(l)try{let u=this._parseResourceAttributes(l);Object.assign(o,u)}catch(u){Iv.diag.debug(`EnvDetector failed: ${u instanceof Error?u.message:u}`)}if(p)o[Rv.ATTR_SERVICE_NAME]=p;return{attributes:o}}_parseResourceAttributes(n){if(!n)return{};let o={},l=n.split(this._COMMA_SEPARATOR);for(let p of l){let u=p.split(this._LABEL_KEY_VALUE_SPLITTER);if(u.length!==2)throw Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${p}". Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.`);let[s,t]=u,e=s.trim(),r=t.trim();if(e.length===0)throw Error(`Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in "${p}".`);let a,f;try{a=decodeURIComponent(e),f=decodeURIComponent(r)}catch(y){throw Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${p}": ${y instanceof Error?y.message:y}`)}if(a.length>this._MAX_LENGTH)throw Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${a}".`);if(f.length>this._MAX_LENGTH)throw Error(`Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key "${a}".`);o[a]=f}return o}}il.envDetector=new ol});var mt=i(function(cl){Object.defineProperty(cl,"__esModule",{value:!0});cl.ATTR_WEBENGINE_VERSION=cl.ATTR_WEBENGINE_NAME=cl.ATTR_WEBENGINE_DESCRIPTION=cl.ATTR_SERVICE_NAMESPACE=cl.ATTR_SERVICE_INSTANCE_ID=cl.ATTR_PROCESS_RUNTIME_VERSION=cl.ATTR_PROCESS_RUNTIME_NAME=cl.ATTR_PROCESS_RUNTIME_DESCRIPTION=cl.ATTR_PROCESS_PID=cl.ATTR_PROCESS_OWNER=cl.ATTR_PROCESS_EXECUTABLE_PATH=cl.ATTR_PROCESS_EXECUTABLE_NAME=cl.ATTR_PROCESS_COMMAND_ARGS=cl.ATTR_PROCESS_COMMAND=cl.ATTR_OS_VERSION=cl.ATTR_OS_TYPE=cl.ATTR_K8S_POD_NAME=cl.ATTR_K8S_NAMESPACE_NAME=cl.ATTR_K8S_DEPLOYMENT_NAME=cl.ATTR_K8S_CLUSTER_NAME=cl.ATTR_HOST_TYPE=cl.ATTR_HOST_NAME=cl.ATTR_HOST_IMAGE_VERSION=cl.ATTR_HOST_IMAGE_NAME=cl.ATTR_HOST_IMAGE_ID=cl.ATTR_HOST_ID=cl.ATTR_HOST_ARCH=cl.ATTR_CONTAINER_NAME=cl.ATTR_CONTAINER_IMAGE_TAGS=cl.ATTR_CONTAINER_IMAGE_NAME=cl.ATTR_CONTAINER_ID=cl.ATTR_CLOUD_REGION=cl.ATTR_CLOUD_PROVIDER=cl.ATTR_CLOUD_AVAILABILITY_ZONE=cl.ATTR_CLOUD_ACCOUNT_ID=void 0;cl.ATTR_CLOUD_ACCOUNT_ID="cloud.account.id";cl.ATTR_CLOUD_AVAILABILITY_ZONE="cloud.availability_zone";cl.ATTR_CLOUD_PROVIDER="cloud.provider";cl.ATTR_CLOUD_REGION="cloud.region";cl.ATTR_CONTAINER_ID="container.id";cl.ATTR_CONTAINER_IMAGE_NAME="container.image.name";cl.ATTR_CONTAINER_IMAGE_TAGS="container.image.tags";cl.ATTR_CONTAINER_NAME="container.name";cl.ATTR_HOST_ARCH="host.arch";cl.ATTR_HOST_ID="host.id";cl.ATTR_HOST_IMAGE_ID="host.image.id";cl.ATTR_HOST_IMAGE_NAME="host.image.name";cl.ATTR_HOST_IMAGE_VERSION="host.image.version";cl.ATTR_HOST_NAME="host.name";cl.ATTR_HOST_TYPE="host.type";cl.ATTR_K8S_CLUSTER_NAME="k8s.cluster.name";cl.ATTR_K8S_DEPLOYMENT_NAME="k8s.deployment.name";cl.ATTR_K8S_NAMESPACE_NAME="k8s.namespace.name";cl.ATTR_K8S_POD_NAME="k8s.pod.name";cl.ATTR_OS_TYPE="os.type";cl.ATTR_OS_VERSION="os.version";cl.ATTR_PROCESS_COMMAND="process.command";cl.ATTR_PROCESS_COMMAND_ARGS="process.command_args";cl.ATTR_PROCESS_EXECUTABLE_NAME="process.executable.name";cl.ATTR_PROCESS_EXECUTABLE_PATH="process.executable.path";cl.ATTR_PROCESS_OWNER="process.owner";cl.ATTR_PROCESS_PID="process.pid";cl.ATTR_PROCESS_RUNTIME_DESCRIPTION="process.runtime.description";cl.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name";cl.ATTR_PROCESS_RUNTIME_VERSION="process.runtime.version";cl.ATTR_SERVICE_INSTANCE_ID="service.instance.id";cl.ATTR_SERVICE_NAMESPACE="service.namespace";cl.ATTR_WEBENGINE_DESCRIPTION="webengine.description";cl.ATTR_WEBENGINE_NAME="webengine.name";cl.ATTR_WEBENGINE_VERSION="webengine.version"});var fl=i(function(ll){Object.defineProperty(ll,"__esModule",{value:!0});ll.getMachineId=void 0;var fb=c("process"),Me;async function db(){if(!Me)switch(fb.platform){case"darwin":Me=(await import("./getMachineId-darwin-918h9zb6.js").then((m)=>v(m.default))).getMachineId;break;case"linux":Me=(await import("./getMachineId-linux-cr4wnstr.js").then((m)=>v(m.default))).getMachineId;break;case"freebsd":Me=(await import("./getMachineId-bsd-2h2811k3.js").then((m)=>v(m.default))).getMachineId;break;case"win32":Me=(await import("./getMachineId-win-1hvm2h6v.js").then((m)=>v(m.default))).getMachineId;break;default:Me=(await import("./getMachineId-unsupported-aa72jh2v.js").then((m)=>v(m.default))).getMachineId;break}return Me()}ll.getMachineId=db});var _n=i(function(dl){Object.defineProperty(dl,"__esModule",{value:!0});dl.normalizeType=dl.normalizeArch=void 0;var hb=(n)=>{switch(n){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return n}};dl.normalizeArch=hb;var yb=(n)=>{switch(n){case"sunos":return"solaris";case"win32":return"windows";default:return n}};dl.normalizeType=yb});var vl=i(function(_l){Object.defineProperty(_l,"__esModule",{value:!0});_l.hostDetector=void 0;var gn=mt(),yl=c("os"),_b=fl(),gb=_n();class ml{detect(n){return{attributes:{[gn.ATTR_HOST_NAME]:yl.hostname(),[gn.ATTR_HOST_ARCH]:gb.normalizeArch(yl.arch()),[gn.ATTR_HOST_ID]:_b.getMachineId()}}}}_l.hostDetector=new ml});var El=i(function(Tl){Object.defineProperty(Tl,"__esModule",{value:!0});Tl.osDetector=void 0;var bl=mt(),Ol=c("os"),vb=_n();class Sl{detect(n){return{attributes:{[bl.ATTR_OS_TYPE]:vb.normalizeType(Ol.platform()),[bl.ATTR_OS_VERSION]:Ol.release()}}}}Tl.osDetector=new Sl});var wl=i(function(Nl){Object.defineProperty(Nl,"__esModule",{value:!0});Nl.processDetector=void 0;var bb=A(),se=mt(),Ob=c("os");class Al{detect(n){let o={[se.ATTR_PROCESS_PID]:process.pid,[se.ATTR_PROCESS_EXECUTABLE_NAME]:process.title,[se.ATTR_PROCESS_EXECUTABLE_PATH]:process.execPath,[se.ATTR_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[se.ATTR_PROCESS_RUNTIME_VERSION]:process.versions.node,[se.ATTR_PROCESS_RUNTIME_NAME]:"nodejs",[se.ATTR_PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};if(process.argv.length>1)o[se.ATTR_PROCESS_COMMAND]=process.argv[1];try{let l=Ob.userInfo();o[se.ATTR_PROCESS_OWNER]=l.username}catch(l){bb.diag.debug(`error obtaining process owner: ${l}`)}return{attributes:o}}}Nl.processDetector=new Al});var Ul=i(function(Rl){Object.defineProperty(Rl,"__esModule",{value:!0});Rl.serviceInstanceIdDetector=void 0;var Sb=mt(),Tb=c("crypto");class Il{detect(n){return{attributes:{[Sb.ATTR_SERVICE_INSTANCE_ID]:Tb.randomUUID()}}}}Rl.serviceInstanceIdDetector=new Il});var Ll=i(function(He){Object.defineProperty(He,"__esModule",{value:!0});He.serviceInstanceIdDetector=He.processDetector=He.osDetector=He.hostDetector=void 0;var xb=vl();Object.defineProperty(He,"hostDetector",{enumerable:!0,get:function(){return xb.hostDetector}});var Eb=El();Object.defineProperty(He,"osDetector",{enumerable:!0,get:function(){return Eb.osDetector}});var Ab=wl();Object.defineProperty(He,"processDetector",{enumerable:!0,get:function(){return Ab.processDetector}});var Nb=Ul();Object.defineProperty(He,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return Nb.serviceInstanceIdDetector}})});var Cl=i(function(Fe){Object.defineProperty(Fe,"__esModule",{value:!0});Fe.serviceInstanceIdDetector=Fe.processDetector=Fe.osDetector=Fe.hostDetector=void 0;var nr=Ll();Object.defineProperty(Fe,"hostDetector",{enumerable:!0,get:function(){return nr.hostDetector}});Object.defineProperty(Fe,"osDetector",{enumerable:!0,get:function(){return nr.osDetector}});Object.defineProperty(Fe,"processDetector",{enumerable:!0,get:function(){return nr.processDetector}});Object.defineProperty(Fe,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return nr.serviceInstanceIdDetector}})});var Vl=i(function(Dl){Object.defineProperty(Dl,"__esModule",{value:!0});Dl.noopDetector=Dl.NoopDetector=void 0;class vn{detect(){return{attributes:{}}}}Dl.NoopDetector=vn;Dl.noopDetector=new vn});var Bl=i(function(_e){Object.defineProperty(_e,"__esModule",{value:!0});_e.noopDetector=_e.serviceInstanceIdDetector=_e.processDetector=_e.osDetector=_e.hostDetector=_e.envDetector=void 0;var Rb=al();Object.defineProperty(_e,"envDetector",{enumerable:!0,get:function(){return Rb.envDetector}});var or=Cl();Object.defineProperty(_e,"hostDetector",{enumerable:!0,get:function(){return or.hostDetector}});Object.defineProperty(_e,"osDetector",{enumerable:!0,get:function(){return or.osDetector}});Object.defineProperty(_e,"processDetector",{enumerable:!0,get:function(){return or.processDetector}});Object.defineProperty(_e,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return or.serviceInstanceIdDetector}});var Mb=Vl();Object.defineProperty(_e,"noopDetector",{enumerable:!0,get:function(){return Mb.noopDetector}})});var Jg=i(function(Z){Object.defineProperty(Z,"__esModule",{value:!0});Z.defaultServiceName=Z.emptyResource=Z.defaultResource=Z.resourceFromAttributes=Z.serviceInstanceIdDetector=Z.processDetector=Z.osDetector=Z.hostDetector=Z.envDetector=Z.detectResources=void 0;var Lb=rl();Object.defineProperty(Z,"detectResources",{enumerable:!0,get:function(){return Lb.detectResources}});var _t=Bl();Object.defineProperty(Z,"envDetector",{enumerable:!0,get:function(){return _t.envDetector}});Object.defineProperty(Z,"hostDetector",{enumerable:!0,get:function(){return _t.hostDetector}});Object.defineProperty(Z,"osDetector",{enumerable:!0,get:function(){return _t.osDetector}});Object.defineProperty(Z,"processDetector",{enumerable:!0,get:function(){return _t.processDetector}});Object.defineProperty(Z,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return _t.serviceInstanceIdDetector}});var bn=yn();Object.defineProperty(Z,"resourceFromAttributes",{enumerable:!0,get:function(){return bn.resourceFromAttributes}});Object.defineProperty(Z,"defaultResource",{enumerable:!0,get:function(){return bn.defaultResource}});Object.defineProperty(Z,"emptyResource",{enumerable:!0,get:function(){return bn.emptyResource}});var Cb=fn();Object.defineProperty(Z,"defaultServiceName",{enumerable:!0,get:function(){return Cb.defaultServiceName}})});var Hl=i(function(jl){Object.defineProperty(jl,"__esModule",{value:!0});jl.ViewRegistry=void 0;class ql{_registeredViews=[];addView(n){this._registeredViews.push(n)}findViews(n,o){return this._registeredViews.filter((p)=>this._matchInstrument(p.instrumentSelector,n)&&this._matchMeter(p.meterSelector,o))}_matchInstrument(n,o){return(n.getType()===void 0||o.type===n.getType())&&n.getNameFilter().match(o.name)&&n.getUnitFilter().match(o.unit)}_matchMeter(n,o){return n.getNameFilter().match(o.name)&&(o.version===void 0||n.getVersionFilter().match(o.version))&&(o.schemaUrl===void 0||n.getSchemaUrlFilter().match(o.schemaUrl))}}jl.ViewRegistry=ql});var gt=i(function(zl){Object.defineProperty(zl,"__esModule",{value:!0});zl.isValidName=zl.isDescriptorCompatibleWith=zl.createInstrumentDescriptorWithView=zl.createInstrumentDescriptor=void 0;var Fl=A(),kb=ne();function Vb(n,o,l){if(!Kl(n))Fl.diag.warn(`Invalid metric name: "${n}". The metric name should be a ASCII string with a length no greater than 255 characters.`);return{name:n,type:o,description:l?.description??"",unit:l?.unit??"",valueType:l?.valueType??Fl.ValueType.DOUBLE,advice:l?.advice??{}}}zl.createInstrumentDescriptor=Vb;function Bb(n,o){return{name:n.name??o.name,description:n.description??o.description,type:o.type,unit:o.unit,valueType:o.valueType,advice:o.advice}}zl.createInstrumentDescriptorWithView=Bb;function qb(n,o){return kb.equalsCaseInsensitive(n.name,o.name)&&n.unit===o.unit&&n.type===o.type&&n.valueType===o.valueType}zl.isDescriptorCompatibleWith=qb;var jb=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Kl(n){return jb.test(n)}zl.isValidName=Kl});var ir=i(function(tp){Object.defineProperty(tp,"__esModule",{value:!0});tp.isObservableInstrument=tp.ObservableUpDownCounterInstrument=tp.ObservableGaugeInstrument=tp.ObservableCounterInstrument=tp.ObservableInstrument=tp.HistogramInstrument=tp.GaugeInstrument=tp.CounterInstrument=tp.UpDownCounterInstrument=tp.SyncInstrument=void 0;var Ke=A(),Kb=Tt();class ze{_writableMetricStorage;_descriptor;constructor(n,o){this._writableMetricStorage=n,this._descriptor=o}_record(n,o={},l=Ke.context.active()){if(typeof n!=="number"){Ke.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${n}`);return}if(this._descriptor.valueType===Ke.ValueType.INT&&!Number.isInteger(n)){if(Ke.diag.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`),n=Math.trunc(n),!Number.isInteger(n))return}this._writableMetricStorage.record(n,o,l,Kb.millisToHrTime(Date.now()))}}tp.SyncInstrument=ze;class $l extends ze{add(n,o,l){this._record(n,o,l)}}tp.UpDownCounterInstrument=$l;class Wl extends ze{add(n,o,l){if(n<0){Ke.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${n}`);return}this._record(n,o,l)}}tp.CounterInstrument=Wl;class Yl extends ze{record(n,o,l){this._record(n,o,l)}}tp.GaugeInstrument=Yl;class Xl extends ze{record(n,o,l){if(n<0){Ke.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${n}`);return}this._record(n,o,l)}}tp.HistogramInstrument=Xl;class Je{_metricStorages;_descriptor;_observableRegistry;constructor(n,o,l){this._descriptor=n,this._metricStorages=o,this._observableRegistry=l}addCallback(n){this._observableRegistry.addCallback(n,this)}removeCallback(n){this._observableRegistry.removeCallback(n,this)}}tp.ObservableInstrument=Je;class Zl extends Je{}tp.ObservableCounterInstrument=Zl;class Ql extends Je{}tp.ObservableGaugeInstrument=Ql;class ep extends Je{}tp.ObservableUpDownCounterInstrument=ep;function zb(n){return n instanceof Je}tp.isObservableInstrument=zb});var up=i(function(op){Object.defineProperty(op,"__esModule",{value:!0});op.Meter=void 0;var Ue=gt(),Ce=ir(),Le=me();class np{_meterSharedState;constructor(n){this._meterSharedState=n}createGauge(n,o){let l=Ue.createInstrumentDescriptor(n,Le.InstrumentType.GAUGE,o),p=this._meterSharedState.registerMetricStorage(l);return new Ce.GaugeInstrument(p,l)}createHistogram(n,o){let l=Ue.createInstrumentDescriptor(n,Le.InstrumentType.HISTOGRAM,o),p=this._meterSharedState.registerMetricStorage(l);return new Ce.HistogramInstrument(p,l)}createCounter(n,o){let l=Ue.createInstrumentDescriptor(n,Le.InstrumentType.COUNTER,o),p=this._meterSharedState.registerMetricStorage(l);return new Ce.CounterInstrument(p,l)}createUpDownCounter(n,o){let l=Ue.createInstrumentDescriptor(n,Le.InstrumentType.UP_DOWN_COUNTER,o),p=this._meterSharedState.registerMetricStorage(l);return new Ce.UpDownCounterInstrument(p,l)}createObservableGauge(n,o){let l=Ue.createInstrumentDescriptor(n,Le.InstrumentType.OBSERVABLE_GAUGE,o),p=this._meterSharedState.registerAsyncMetricStorage(l);return new Ce.ObservableGaugeInstrument(l,p,this._meterSharedState.observableRegistry)}createObservableCounter(n,o){let l=Ue.createInstrumentDescriptor(n,Le.InstrumentType.OBSERVABLE_COUNTER,o),p=this._meterSharedState.registerAsyncMetricStorage(l);return new Ce.ObservableCounterInstrument(l,p,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(n,o){let l=Ue.createInstrumentDescriptor(n,Le.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER,o),p=this._meterSharedState.registerAsyncMetricStorage(l);return new Ce.ObservableUpDownCounterInstrument(l,p,this._meterSharedState.observableRegistry)}addBatchObservableCallback(n,o){this._meterSharedState.observableRegistry.addBatchCallback(n,o)}removeBatchObservableCallback(n,o){this._meterSharedState.observableRegistry.removeBatchCallback(n,o)}}op.Meter=np});var On=i(function(cp){Object.defineProperty(cp,"__esModule",{value:!0});cp.MetricStorage=void 0;var rO=gt();class ap{_instrumentDescriptor;constructor(n){this._instrumentDescriptor=n}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(n){this._instrumentDescriptor=rO.createInstrumentDescriptor(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:n,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}}cp.MetricStorage=ap});var vt=i(function(pp){Object.defineProperty(pp,"__esModule",{value:!0});pp.AttributeHashMap=pp.HashMap=void 0;var nO=ne();class Sn{_valueMap=new Map;_keyMap=new Map;_hash;constructor(n){this._hash=n}get(n,o){return o??=this._hash(n),this._valueMap.get(o)}getOrDefault(n,o){let l=this._hash(n);if(this._valueMap.has(l))return this._valueMap.get(l);let p=o();if(!this._keyMap.has(l))this._keyMap.set(l,n);return this._valueMap.set(l,p),p}set(n,o,l){if(l??=this._hash(n),!this._keyMap.has(l))this._keyMap.set(l,n);this._valueMap.set(l,o)}has(n,o){return o??=this._hash(n),this._valueMap.has(o)}*keys(){let n=this._keyMap.entries(),o=n.next();while(o.done!==!0)yield[o.value[1],o.value[0]],o=n.next()}*entries(){let n=this._valueMap.entries(),o=n.next();while(o.done!==!0)yield[this._keyMap.get(o.value[0]),o.value[1],o.value[0]],o=n.next()}get size(){return this._valueMap.size}}pp.HashMap=Sn;class lp extends Sn{constructor(){super(nO.hashAttributes)}}pp.AttributeHashMap=lp});var xn=i(function(hp){Object.defineProperty(hp,"__esModule",{value:!0});hp.DeltaMetricProcessor=void 0;var iO=ne(),Tn=vt();class dp{_activeCollectionStorage=new Tn.AttributeHashMap;_cumulativeMemoStorage=new Tn.AttributeHashMap;_cardinalityLimit;_overflowAttributes={"otel.metric.overflow":!0};_overflowHashCode;_aggregator;constructor(n,o){this._aggregator=n,this._cardinalityLimit=(o??2000)-1,this._overflowHashCode=iO.hashAttributes(this._overflowAttributes)}record(n,o,l,p){let u=this._activeCollectionStorage.get(o);if(!u){if(this._activeCollectionStorage.size>=this._cardinalityLimit){this._activeCollectionStorage.getOrDefault(this._overflowAttributes,()=>this._aggregator.createAccumulation(p))?.record(n);return}u=this._aggregator.createAccumulation(p),this._activeCollectionStorage.set(o,u)}u?.record(n)}batchCumulate(n,o){Array.from(n.entries()).forEach(([l,p,u])=>{let s=this._aggregator.createAccumulation(o);s?.record(p);let t=s;if(this._cumulativeMemoStorage.has(l,u)){let e=this._cumulativeMemoStorage.get(l,u);t=this._aggregator.diff(e,s)}else if(this._cumulativeMemoStorage.size>=this._cardinalityLimit){if(l=this._overflowAttributes,u=this._overflowHashCode,this._cumulativeMemoStorage.has(l,u)){let e=this._cumulativeMemoStorage.get(l,u);t=this._aggregator.diff(e,s)}}if(this._activeCollectionStorage.has(l,u)){let e=this._activeCollectionStorage.get(l,u);t=this._aggregator.merge(e,t)}this._cumulativeMemoStorage.set(l,s,u),this._activeCollectionStorage.set(l,t,u)})}collect(){let n=this._activeCollectionStorage;return this._activeCollectionStorage=new Tn.AttributeHashMap,n}}hp.DeltaMetricProcessor=dp});var En=i(function(mp){Object.defineProperty(mp,"__esModule",{value:!0});mp.TemporalMetricProcessor=void 0;var uO=Jt(),aO=vt();class bt{_aggregator;_unreportedAccumulations=new Map;_reportHistory=new Map;constructor(n,o){this._aggregator=n,o.forEach((l)=>{this._unreportedAccumulations.set(l,[])})}buildMetrics(n,o,l,p){this._stashAccumulations(l);let u=this._getMergedUnreportedAccumulations(n),s=u,t;if(this._reportHistory.has(n)){let r=this._reportHistory.get(n),a=r.collectionTime;if(t=r.aggregationTemporality,t===uO.AggregationTemporality.CUMULATIVE)s=bt.merge(r.accumulations,u,this._aggregator);else s=bt.calibrateStartTime(r.accumulations,u,a)}else t=n.selectAggregationTemporality(o.type);this._reportHistory.set(n,{accumulations:s,collectionTime:p,aggregationTemporality:t});let e=cO(s);if(e.length===0)return;return this._aggregator.toMetricData(o,t,e,p)}_stashAccumulations(n){let o=this._unreportedAccumulations.keys();for(let l of o){let p=this._unreportedAccumulations.get(l);if(p===void 0)p=[],this._unreportedAccumulations.set(l,p);p.push(n)}}_getMergedUnreportedAccumulations(n){let o=new aO.AttributeHashMap,l=this._unreportedAccumulations.get(n);if(this._unreportedAccumulations.set(n,[]),l===void 0)return o;for(let p of l)o=bt.merge(o,p,this._aggregator);return o}static merge(n,o,l){let p=n,u=o.entries(),s=u.next();while(s.done!==!0){let[t,e,r]=s.value;if(n.has(t,r)){let a=n.get(t,r),f=l.merge(a,e);p.set(t,f,r)}else p.set(t,e,r);s=u.next()}return p}static calibrateStartTime(n,o,l){for(let[p,u]of n.keys())o.get(p,u)?.setStartTime(l);return o}}mp.TemporalMetricProcessor=bt;function cO(n){return Array.from(n.entries())}});var Op=i(function(vp){Object.defineProperty(vp,"__esModule",{value:!0});vp.AsyncMetricStorage=void 0;var sO=On(),lO=xn(),pO=En(),fO=vt();class gp extends sO.MetricStorage{_aggregationCardinalityLimit;_deltaMetricStorage;_temporalMetricStorage;_attributesProcessor;constructor(n,o,l,p,u){super(n);this._aggregationCardinalityLimit=u,this._deltaMetricStorage=new lO.DeltaMetricProcessor(o,this._aggregationCardinalityLimit),this._temporalMetricStorage=new pO.TemporalMetricProcessor(o,p),this._attributesProcessor=l}record(n,o){let l=new fO.AttributeHashMap;Array.from(n.entries()).forEach(([p,u])=>{l.set(this._attributesProcessor.process(p),u)}),this._deltaMetricStorage.batchCumulate(l,o)}collect(n,o){let l=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,l,o)}}vp.AsyncMetricStorage=gp});var Pp=i(function(Ap){Object.defineProperty(Ap,"__esModule",{value:!0});Ap.getConflictResolutionRecipe=Ap.getDescriptionResolutionRecipe=Ap.getTypeConflictResolutionRecipe=Ap.getUnitConflictResolutionRecipe=Ap.getValueTypeConflictResolutionRecipe=Ap.getIncompatibilityDetails=void 0;function dO(n,o){let l="";if(n.unit!==o.unit)l+=` - Unit '${n.unit}' does not match '${o.unit}'
|
|
2
|
+
`;if(n.type!==o.type)l+=` - Type '${n.type}' does not match '${o.type}'
|
|
3
|
+
`;if(n.valueType!==o.valueType)l+=` - Value Type '${n.valueType}' does not match '${o.valueType}'
|
|
4
|
+
`;if(n.description!==o.description)l+=` - Description '${n.description}' does not match '${o.description}'
|
|
5
|
+
`;return l}Ap.getIncompatibilityDetails=dO;function Sp(n,o){return` - use valueType '${n.valueType}' on instrument creation or use an instrument name other than '${o.name}'`}Ap.getValueTypeConflictResolutionRecipe=Sp;function Tp(n,o){return` - use unit '${n.unit}' on instrument creation or use an instrument name other than '${o.name}'`}Ap.getUnitConflictResolutionRecipe=Tp;function xp(n,o){let l={name:o.name,type:o.type,unit:o.unit},p=JSON.stringify(l);return` - create a new view with a name other than '${n.name}' and InstrumentSelector '${p}'`}Ap.getTypeConflictResolutionRecipe=xp;function Ep(n,o){let l={name:o.name,type:o.type,unit:o.unit},p=JSON.stringify(l);return` - create a new view with a name other than '${n.name}' and InstrumentSelector '${p}'
|
|
6
|
+
- OR - create a new view with the name ${n.name} and description '${n.description}' and InstrumentSelector ${p}
|
|
7
|
+
- OR - create a new view with the name ${o.name} and description '${n.description}' and InstrumentSelector ${p}`}Ap.getDescriptionResolutionRecipe=Ep;function hO(n,o){if(n.valueType!==o.valueType)return Sp(n,o);if(n.unit!==o.unit)return Tp(n,o);if(n.type!==o.type)return xp(n,o);if(n.description!==o.description)return Ep(n,o);return""}Ap.getConflictResolutionRecipe=hO});var Mp=i(function(Ip){Object.defineProperty(Ip,"__esModule",{value:!0});Ip.MetricStorageRegistry=void 0;var bO=gt(),wp=A(),ur=Pp();class An{_sharedRegistry=new Map;_perCollectorRegistry=new Map;static create(){return new An}getStorages(n){let o=[];for(let p of this._sharedRegistry.values())o=o.concat(p);let l=this._perCollectorRegistry.get(n);if(l!=null)for(let p of l.values())o=o.concat(p);return o}register(n){this._registerStorage(n,this._sharedRegistry)}registerForCollector(n,o){let l=this._perCollectorRegistry.get(n);if(l==null)l=new Map,this._perCollectorRegistry.set(n,l);this._registerStorage(o,l)}findOrUpdateCompatibleStorage(n){let o=this._sharedRegistry.get(n.name);if(o===void 0)return null;return this._findOrUpdateCompatibleStorage(n,o)}findOrUpdateCompatibleCollectorStorage(n,o){let l=this._perCollectorRegistry.get(n);if(l===void 0)return null;let p=l.get(o.name);if(p===void 0)return null;return this._findOrUpdateCompatibleStorage(o,p)}_registerStorage(n,o){let l=n.getInstrumentDescriptor(),p=o.get(l.name);if(p===void 0){o.set(l.name,[n]);return}p.push(n)}_findOrUpdateCompatibleStorage(n,o){let l=null;for(let p of o){let u=p.getInstrumentDescriptor();if(bO.isDescriptorCompatibleWith(u,n)){if(u.description!==n.description){if(n.description.length>u.description.length)p.updateDescription(n.description);wp.diag.warn("A view or instrument with the name ",n.name,` has already been registered, but has a different description and is incompatible with another registered view.
|
|
8
|
+
`,`Details:
|
|
9
|
+
`,ur.getIncompatibilityDetails(u,n),`The longer description will be used.
|
|
10
|
+
To resolve the conflict:`,ur.getConflictResolutionRecipe(u,n))}l=p}else wp.diag.warn("A view or instrument with the name ",n.name,` has already been registered and is incompatible with another registered view.
|
|
11
|
+
`,`Details:
|
|
12
|
+
`,ur.getIncompatibilityDetails(u,n),`To resolve the conflict:
|
|
13
|
+
`,ur.getConflictResolutionRecipe(u,n))}return l}}Ip.MetricStorageRegistry=An});var Dp=i(function(Lp){Object.defineProperty(Lp,"__esModule",{value:!0});Lp.MultiMetricStorage=void 0;class Up{_backingStorages;constructor(n){this._backingStorages=n}record(n,o,l,p){this._backingStorages.forEach((u)=>{u.record(n,o,l,p)})}}Lp.MultiMetricStorage=Up});var Gp=i(function(qp){Object.defineProperty(qp,"__esModule",{value:!0});qp.BatchObservableResultImpl=qp.ObservableResultImpl=void 0;var $e=A(),kp=vt(),OO=ir();class Vp{_buffer=new kp.AttributeHashMap;_instrumentName;_valueType;constructor(n,o){this._instrumentName=n,this._valueType=o}observe(n,o={}){if(typeof n!=="number"){$e.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${n}`);return}if(this._valueType===$e.ValueType.INT&&!Number.isInteger(n)){if($e.diag.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`),n=Math.trunc(n),!Number.isInteger(n))return}this._buffer.set(o,n)}}qp.ObservableResultImpl=Vp;class Bp{_buffer=new Map;observe(n,o,l={}){if(!OO.isObservableInstrument(n))return;let p=this._buffer.get(n);if(p==null)p=new kp.AttributeHashMap,this._buffer.set(n,p);if(typeof o!=="number"){$e.diag.warn(`non-number value provided to metric ${n._descriptor.name}: ${o}`);return}if(n._descriptor.valueType===$e.ValueType.INT&&!Number.isInteger(o)){if($e.diag.warn(`INT value type cannot accept a floating-point value for ${n._descriptor.name}, ignoring the fractional digits.`),o=Math.trunc(o),!Number.isInteger(o))return}p.set(l,o)}}qp.BatchObservableResultImpl=Bp});var $p=i(function(zp){Object.defineProperty(zp,"__esModule",{value:!0});zp.ObservableRegistry=void 0;var TO=A(),Hp=ir(),Fp=Gp(),Nn=ne();class Kp{_callbacks=[];_batchCallbacks=[];addCallback(n,o){if(this._findCallback(n,o)>=0)return;this._callbacks.push({callback:n,instrument:o})}removeCallback(n,o){let l=this._findCallback(n,o);if(l<0)return;this._callbacks.splice(l,1)}addBatchCallback(n,o){let l=new Set(o.filter(Hp.isObservableInstrument));if(l.size===0){TO.diag.error("BatchObservableCallback is not associated with valid instruments",o);return}if(this._findBatchCallback(n,l)>=0)return;this._batchCallbacks.push({callback:n,instruments:l})}removeBatchCallback(n,o){let l=new Set(o.filter(Hp.isObservableInstrument)),p=this._findBatchCallback(n,l);if(p<0)return;this._batchCallbacks.splice(p,1)}async observe(n,o){let l=this._observeCallbacks(n,o),p=this._observeBatchCallbacks(n,o);return(await Promise.allSettled([...l,...p])).filter((t)=>t.status==="rejected").map((t)=>t.reason)}_observeCallbacks(n,o){return this._callbacks.map(async({callback:l,instrument:p})=>{let u=new Fp.ObservableResultImpl(p._descriptor.name,p._descriptor.valueType),s=Promise.resolve(l(u));if(o!=null)s=Nn.callWithTimeout(s,o);await s,p._metricStorages.forEach((t)=>{t.record(u._buffer,n)})})}_observeBatchCallbacks(n,o){return this._batchCallbacks.map(async({callback:l,instruments:p})=>{let u=new Fp.BatchObservableResultImpl,s=Promise.resolve(l(u));if(o!=null)s=Nn.callWithTimeout(s,o);await s,p.forEach((t)=>{let e=u._buffer.get(t);if(e==null)return;t._metricStorages.forEach((r)=>{r.record(e,n)})})})}_findCallback(n,o){return this._callbacks.findIndex((l)=>l.callback===n&&l.instrument===o)}_findBatchCallback(n,o){return this._batchCallbacks.findIndex((l)=>l.callback===n&&Nn.setEquals(l.instruments,o))}}zp.ObservableRegistry=Kp});var Zp=i(function(Yp){Object.defineProperty(Yp,"__esModule",{value:!0});Yp.SyncMetricStorage=void 0;var xO=On(),EO=xn(),AO=En();class Wp extends xO.MetricStorage{_aggregationCardinalityLimit;_deltaMetricStorage;_temporalMetricStorage;_attributesProcessor;constructor(n,o,l,p,u){super(n);this._aggregationCardinalityLimit=u,this._deltaMetricStorage=new EO.DeltaMetricProcessor(o,this._aggregationCardinalityLimit),this._temporalMetricStorage=new AO.TemporalMetricProcessor(o,p),this._attributesProcessor=l}record(n,o,l,p){o=this._attributesProcessor.process(o,l),this._deltaMetricStorage.record(n,o,l,p)}collect(n,o){let l=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,l,o)}}Yp.SyncMetricStorage=Wp});var ar=i(function(nf){Object.defineProperty(nf,"__esModule",{value:!0});nf.createDenyListAttributesProcessor=nf.createAllowListAttributesProcessor=nf.createMultiAttributesProcessor=nf.createNoopAttributesProcessor=void 0;class Qp{process(n,o){return n}}class ef{_processors;constructor(n){this._processors=n}process(n,o){let l=n;for(let p of this._processors)l=p.process(l,o);return l}}class tf{_allowedAttributeNames;constructor(n){this._allowedAttributeNames=n}process(n,o){let l={};return Object.keys(n).forEach((p)=>{if(this._allowedAttributeNames.includes(p))l[p]=n[p]}),l}}class rf{_deniedAttributeNames;constructor(n){this._deniedAttributeNames=n}process(n,o){let l={};return Object.keys(n).forEach((p)=>{if(!this._deniedAttributeNames.includes(p))l[p]=n[p]}),l}}function NO(){return RO}nf.createNoopAttributesProcessor=NO;function PO(n){return new ef(n)}nf.createMultiAttributesProcessor=PO;function wO(n){return new tf(n)}nf.createAllowListAttributesProcessor=wO;function IO(n){return new rf(n)}nf.createDenyListAttributesProcessor=IO;var RO=new Qp});var sf=i(function(af){Object.defineProperty(af,"__esModule",{value:!0});af.MeterSharedState=void 0;var CO=gt(),DO=up(),kO=Op(),VO=Mp(),BO=Dp(),qO=$p(),jO=Zp(),GO=ar();class uf{metricStorageRegistry=new VO.MetricStorageRegistry;observableRegistry=new qO.ObservableRegistry;meter;_meterProviderSharedState;_instrumentationScope;constructor(n,o){this.meter=new DO.Meter(this),this._meterProviderSharedState=n,this._instrumentationScope=o}registerMetricStorage(n){let o=this._registerMetricStorage(n,jO.SyncMetricStorage);if(o.length===1)return o[0];return new BO.MultiMetricStorage(o)}registerAsyncMetricStorage(n){return this._registerMetricStorage(n,kO.AsyncMetricStorage)}async collect(n,o,l){let p=await this.observableRegistry.observe(o,l?.timeoutMillis),u=this.metricStorageRegistry.getStorages(n);if(u.length===0)return null;let s=[];if(u.forEach((t)=>{let e=t.collect(n,o);if(e!=null)s.push(e)}),s.length===0)return{errors:p};return{scopeMetrics:{scope:this._instrumentationScope,metrics:s},errors:p}}_registerMetricStorage(n,o){let p=this._meterProviderSharedState.viewRegistry.findViews(n,this._instrumentationScope).map((u)=>{let s=CO.createInstrumentDescriptorWithView(u,n),t=this.metricStorageRegistry.findOrUpdateCompatibleStorage(s);if(t!=null)return t;let e=u.aggregation.createAggregator(s),r=new o(s,e,u.attributesProcessor,this._meterProviderSharedState.metricCollectors,u.aggregationCardinalityLimit);return this.metricStorageRegistry.register(r),r});if(p.length===0){let s=this._meterProviderSharedState.selectAggregations(n.type).map(([t,e])=>{let r=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(t,n);if(r!=null)return r;let a=e.createAggregator(n),f=t.selectCardinalityLimit(n.type),y=new o(n,a,GO.createNoopAttributesProcessor(),[t],f);return this.metricStorageRegistry.registerForCollector(t,y),y});p=p.concat(s)}return p}}af.MeterSharedState=uf});var df=i(function(pf){Object.defineProperty(pf,"__esModule",{value:!0});pf.MeterProviderSharedState=void 0;var HO=ne(),FO=Hl(),KO=sf(),zO=pt();class lf{viewRegistry=new FO.ViewRegistry;metricCollectors=[];meterSharedStates=new Map;resource;constructor(n){this.resource=n}getMeterSharedState(n){let o=HO.instrumentationScopeId(n),l=this.meterSharedStates.get(o);if(l==null)l=new KO.MeterSharedState(this,n),this.meterSharedStates.set(o,l);return l}selectAggregations(n){let o=[];for(let l of this.metricCollectors)o.push([l,zO.toAggregation(l.selectAggregation(n))]);return o}}pf.MeterProviderSharedState=lf});var _f=i(function(yf){Object.defineProperty(yf,"__esModule",{value:!0});yf.MetricCollector=void 0;var JO=Tt();class hf{_sharedState;_metricReader;constructor(n,o){this._sharedState=n,this._metricReader=o}async collect(n){let o=JO.millisToHrTime(Date.now()),l=[],p=[],u=Array.from(this._sharedState.meterSharedStates.values()).map(async(s)=>{let t=await s.collect(this,o,n);if(t?.scopeMetrics!=null)l.push(t.scopeMetrics);if(t?.errors!=null)p.push(...t.errors)});return await Promise.all(u),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:l},errors:p}}async forceFlush(n){await this._metricReader.forceFlush(n)}async shutdown(n){await this._metricReader.shutdown(n)}selectAggregationTemporality(n){return this._metricReader.selectAggregationTemporality(n)}selectAggregation(n){return this._metricReader.selectAggregation(n)}selectCardinalityLimit(n){return this._metricReader.selectCardinalityLimit?.(n)??2000}}yf.MetricCollector=hf});var cr=i(function(vf){Object.defineProperty(vf,"__esModule",{value:!0});vf.ExactPredicate=vf.PatternPredicate=void 0;var $O=/[\^$\\.+?()[\]{}|]/g;class Pn{_matchAll;_regexp;constructor(n){if(n==="*")this._matchAll=!0,this._regexp=/.*/;else this._matchAll=!1,this._regexp=new RegExp(Pn.escapePattern(n))}match(n){if(this._matchAll)return!0;return this._regexp.test(n)}static escapePattern(n){return`^${n.replace($O,"\\$&").replace("*",".*")}$`}static hasWildcard(n){return n.includes("*")}}vf.PatternPredicate=Pn;class gf{_matchAll;_pattern;constructor(n){this._matchAll=n===void 0,this._pattern=n}match(n){if(this._matchAll)return!0;if(n===this._pattern)return!0;return!1}}vf.ExactPredicate=gf});var Ef=i(function(Tf){Object.defineProperty(Tf,"__esModule",{value:!0});Tf.InstrumentSelector=void 0;var Of=cr();class Sf{_nameFilter;_type;_unitFilter;constructor(n){this._nameFilter=new Of.PatternPredicate(n?.name??"*"),this._type=n?.type,this._unitFilter=new Of.ExactPredicate(n?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}}Tf.InstrumentSelector=Sf});var wf=i(function(Nf){Object.defineProperty(Nf,"__esModule",{value:!0});Nf.MeterSelector=void 0;var wn=cr();class Af{_nameFilter;_versionFilter;_schemaUrlFilter;constructor(n){this._nameFilter=new wn.ExactPredicate(n?.name),this._versionFilter=new wn.ExactPredicate(n?.version),this._schemaUrlFilter=new wn.ExactPredicate(n?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}}Nf.MeterSelector=Af});var Cf=i(function(Uf){Object.defineProperty(Uf,"__esModule",{value:!0});Uf.View=void 0;var YO=cr(),If=ar(),XO=Ef(),ZO=wf(),Rf=pt();function QO(n){return n.instrumentName==null&&n.instrumentType==null&&n.instrumentUnit==null&&n.meterName==null&&n.meterVersion==null&&n.meterSchemaUrl==null}function eS(n){if(QO(n))throw Error("Cannot create view with no selector arguments supplied");if(n.name!=null&&(n?.instrumentName==null||YO.PatternPredicate.hasWildcard(n.instrumentName)))throw Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.")}class Mf{name;description;aggregation;attributesProcessor;instrumentSelector;meterSelector;aggregationCardinalityLimit;constructor(n){if(eS(n),n.attributesProcessors!=null)this.attributesProcessor=If.createMultiAttributesProcessor(n.attributesProcessors);else this.attributesProcessor=If.createNoopAttributesProcessor();this.name=n.name,this.description=n.description,this.aggregation=Rf.toAggregation(n.aggregation??{type:Rf.AggregationType.DEFAULT}),this.instrumentSelector=new XO.InstrumentSelector({name:n.instrumentName,type:n.instrumentType,unit:n.instrumentUnit}),this.meterSelector=new ZO.MeterSelector({name:n.meterName,version:n.meterVersion,schemaUrl:n.meterSchemaUrl}),this.aggregationCardinalityLimit=n.aggregationCardinalityLimit}}Uf.View=Mf});var Bf=i(function(kf){Object.defineProperty(kf,"__esModule",{value:!0});kf.MeterProvider=void 0;var sr=A(),tS=Jg(),rS=df(),nS=_f(),oS=Cf();class Df{_sharedState;_shutdown=!1;constructor(n){if(this._sharedState=new rS.MeterProviderSharedState(n?.resource??tS.defaultResource()),n?.views!=null&&n.views.length>0)for(let o of n.views)this._sharedState.viewRegistry.addView(new oS.View(o));if(n?.readers!=null&&n.readers.length>0)for(let o of n.readers){let l=new nS.MetricCollector(this._sharedState,o);o.setMetricProducer(l),this._sharedState.metricCollectors.push(l)}}getMeter(n,o="",l={}){if(this._shutdown)return sr.diag.warn("A shutdown MeterProvider cannot provide a Meter"),sr.createNoopMeter();return this._sharedState.getMeterSharedState({name:n,version:o,schemaUrl:l.schemaUrl}).meter}async shutdown(n){if(this._shutdown){sr.diag.warn("shutdown may only be called once per MeterProvider");return}this._shutdown=!0,await Promise.all(this._sharedState.metricCollectors.map((o)=>o.shutdown(n)))}async forceFlush(n){if(this._shutdown){sr.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map((o)=>o.forceFlush(n)))}}kf.MeterProvider=Df});var Xg=i(function(G){Object.defineProperty(G,"__esModule",{value:!0});G.TimeoutError=G.createDenyListAttributesProcessor=G.createAllowListAttributesProcessor=G.AggregationType=G.MeterProvider=G.ConsoleMetricExporter=G.InMemoryMetricExporter=G.PeriodicExportingMetricReader=G.MetricReader=G.InstrumentType=G.DataPointType=G.AggregationTemporality=void 0;var iS=Jt();Object.defineProperty(G,"AggregationTemporality",{enumerable:!0,get:function(){return iS.AggregationTemporality}});var qf=me();Object.defineProperty(G,"DataPointType",{enumerable:!0,get:function(){return qf.DataPointType}});Object.defineProperty(G,"InstrumentType",{enumerable:!0,get:function(){return qf.InstrumentType}});var uS=ln();Object.defineProperty(G,"MetricReader",{enumerable:!0,get:function(){return uS.MetricReader}});var aS=Cs();Object.defineProperty(G,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return aS.PeriodicExportingMetricReader}});var cS=qs();Object.defineProperty(G,"InMemoryMetricExporter",{enumerable:!0,get:function(){return cS.InMemoryMetricExporter}});var sS=Fs();Object.defineProperty(G,"ConsoleMetricExporter",{enumerable:!0,get:function(){return sS.ConsoleMetricExporter}});var lS=Bf();Object.defineProperty(G,"MeterProvider",{enumerable:!0,get:function(){return lS.MeterProvider}});var pS=pt();Object.defineProperty(G,"AggregationType",{enumerable:!0,get:function(){return pS.AggregationType}});var jf=ar();Object.defineProperty(G,"createAllowListAttributesProcessor",{enumerable:!0,get:function(){return jf.createAllowListAttributesProcessor}});Object.defineProperty(G,"createDenyListAttributesProcessor",{enumerable:!0,get:function(){return jf.createDenyListAttributesProcessor}});var fS=ne();Object.defineProperty(G,"TimeoutError",{enumerable:!0,get:function(){return fS.TimeoutError}})});var Hf=i(function(Gf){Object.defineProperty(Gf,"__esModule",{value:!0});Gf.EAggregationTemporality=void 0;var hS;(function(n){n[n.AGGREGATION_TEMPORALITY_UNSPECIFIED=0]="AGGREGATION_TEMPORALITY_UNSPECIFIED",n[n.AGGREGATION_TEMPORALITY_DELTA=1]="AGGREGATION_TEMPORALITY_DELTA",n[n.AGGREGATION_TEMPORALITY_CUMULATIVE=2]="AGGREGATION_TEMPORALITY_CUMULATIVE"})(hS=Gf.EAggregationTemporality||(Gf.EAggregationTemporality={}))});var Rn=i(function(Yf){Object.defineProperty(Yf,"__esModule",{value:!0});Yf.createExportMetricsServiceRequest=Yf.toMetric=Yf.toScopeMetrics=Yf.toResourceMetrics=void 0;var Ff=A(),We=Xg(),Kf=Hf(),Ot=Kt();function Jf(n,o){let l=Ot.createResource(n.resource,o);return{resource:l,schemaUrl:l.schemaUrl,scopeMetrics:$f(n.scopeMetrics,o)}}Yf.toResourceMetrics=Jf;function $f(n,o){return Array.from(n.map((l)=>({scope:Ot.createInstrumentationScope(l.scope),metrics:l.metrics.map((p)=>Wf(p,o)),schemaUrl:l.scope.schemaUrl})))}Yf.toScopeMetrics=$f;function Wf(n,o){let l={name:n.descriptor.name,description:n.descriptor.description,unit:n.descriptor.unit},p=gS(n.aggregationTemporality);switch(n.dataPointType){case We.DataPointType.SUM:l.sum={aggregationTemporality:p,isMonotonic:n.isMonotonic,dataPoints:zf(n,o)};break;case We.DataPointType.GAUGE:l.gauge={dataPoints:zf(n,o)};break;case We.DataPointType.HISTOGRAM:l.histogram={aggregationTemporality:p,dataPoints:mS(n,o)};break;case We.DataPointType.EXPONENTIAL_HISTOGRAM:l.exponentialHistogram={aggregationTemporality:p,dataPoints:_S(n,o)};break}return l}Yf.toMetric=Wf;function yS(n,o,l){let p={attributes:Ot.toAttributes(n.attributes,l),startTimeUnixNano:l.encodeHrTime(n.startTime),timeUnixNano:l.encodeHrTime(n.endTime)};switch(o){case Ff.ValueType.INT:p.asInt=n.value;break;case Ff.ValueType.DOUBLE:p.asDouble=n.value;break}return p}function zf(n,o){return n.dataPoints.map((l)=>yS(l,n.descriptor.valueType,o))}function mS(n,o){return n.dataPoints.map((l)=>{let p=l.value;return{attributes:Ot.toAttributes(l.attributes,o),bucketCounts:p.buckets.counts,explicitBounds:p.buckets.boundaries,count:p.count,sum:p.sum,min:p.min,max:p.max,startTimeUnixNano:o.encodeHrTime(l.startTime),timeUnixNano:o.encodeHrTime(l.endTime)}})}function _S(n,o){return n.dataPoints.map((l)=>{let p=l.value;return{attributes:Ot.toAttributes(l.attributes,o),count:p.count,min:p.min,max:p.max,sum:p.sum,positive:{offset:p.positive.offset,bucketCounts:p.positive.bucketCounts},negative:{offset:p.negative.offset,bucketCounts:p.negative.bucketCounts},scale:p.scale,zeroCount:p.zeroCount,startTimeUnixNano:o.encodeHrTime(l.startTime),timeUnixNano:o.encodeHrTime(l.endTime)}})}function gS(n){switch(n){case We.AggregationTemporality.DELTA:return Kf.EAggregationTemporality.AGGREGATION_TEMPORALITY_DELTA;case We.AggregationTemporality.CUMULATIVE:return Kf.EAggregationTemporality.AGGREGATION_TEMPORALITY_CUMULATIVE}}function vS(n,o){return{resourceMetrics:n.map((l)=>Jf(l,o))}}Yf.createExportMetricsServiceRequest=vS});var td=i(function(Qf){Object.defineProperty(Qf,"__esModule",{value:!0});Qf.ProtobufMetricsSerializer=void 0;var Zf=Ht(),TS=Rn(),xS=Ae(),ES=Zf.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,AS=Zf.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;Qf.ProtobufMetricsSerializer={serializeRequest:(n)=>{let o=TS.createExportMetricsServiceRequest([n],xS.PROTOBUF_ENCODER);return AS.encode(o).finish()},deserializeResponse:(n)=>ES.decode(n)}});var rd=i(function(Mn){Object.defineProperty(Mn,"__esModule",{value:!0});Mn.ProtobufMetricsSerializer=void 0;var NS=td();Object.defineProperty(Mn,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return NS.ProtobufMetricsSerializer}})});var Un=i(function(ad){Object.defineProperty(ad,"__esModule",{value:!0});ad.createExportTraceServiceRequest=ad.toOtlpSpanEvent=ad.toOtlpLink=ad.sdkSpanToOtlpSpan=void 0;var St=Kt(),wS=256,IS=512;function nd(n,o){let l=n&255|wS;if(o)l|=IS;return l}function od(n,o){let l=n.spanContext(),p=n.status,u=n.parentSpanContext?.spanId?o.encodeSpanContext(n.parentSpanContext?.spanId):void 0;return{traceId:o.encodeSpanContext(l.traceId),spanId:o.encodeSpanContext(l.spanId),parentSpanId:u,traceState:l.traceState?.serialize(),name:n.name,kind:n.kind==null?0:n.kind+1,startTimeUnixNano:o.encodeHrTime(n.startTime),endTimeUnixNano:o.encodeHrTime(n.endTime),attributes:St.toAttributes(n.attributes,o),droppedAttributesCount:n.droppedAttributesCount,events:n.events.map((s)=>ud(s,o)),droppedEventsCount:n.droppedEventsCount,status:{code:p.code,message:p.message},links:n.links.map((s)=>id(s,o)),droppedLinksCount:n.droppedLinksCount,flags:nd(l.traceFlags,n.parentSpanContext?.isRemote)}}ad.sdkSpanToOtlpSpan=od;function id(n,o){return{attributes:n.attributes?St.toAttributes(n.attributes,o):[],spanId:o.encodeSpanContext(n.context.spanId),traceId:o.encodeSpanContext(n.context.traceId),traceState:n.context.traceState?.serialize(),droppedAttributesCount:n.droppedAttributesCount||0,flags:nd(n.context.traceFlags,n.context.isRemote)}}ad.toOtlpLink=id;function ud(n,o){return{attributes:n.attributes?St.toAttributes(n.attributes,o):[],name:n.name,timeUnixNano:o.encodeHrTime(n.time),droppedAttributesCount:n.droppedAttributesCount||0}}ad.toOtlpSpanEvent=ud;function RS(n,o){return{resourceSpans:US(n,o)}}ad.createExportTraceServiceRequest=RS;function MS(n){let o=new Map;for(let l of n){let p=o.get(l.resource);if(!p)p=new Map,o.set(l.resource,p);let u=`${l.instrumentationScope.name}@${l.instrumentationScope.version||""}:${l.instrumentationScope.schemaUrl||""}`,s=p.get(u);if(!s)s=[],p.set(u,s);s.push(l)}return o}function US(n,o){let l=MS(n),p=[],u=l.entries(),s=u.next();while(!s.done){let[t,e]=s.value,r=[],a=e.values(),f=a.next();while(!f.done){let M=f.value;if(M.length>0){let F=M.map((le)=>od(le,o));r.push({scope:St.createInstrumentationScope(M[0].instrumentationScope),spans:F,schemaUrl:M[0].instrumentationScope.schemaUrl})}f=a.next()}let y=St.createResource(t,o),g={resource:y,scopeSpans:r,schemaUrl:y.schemaUrl};p.push(g),s=u.next()}return p}});var fd=i(function(ld){Object.defineProperty(ld,"__esModule",{value:!0});ld.ProtobufTraceSerializer=void 0;var sd=Ht(),kS=Un(),VS=Ae(),BS=sd.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,qS=sd.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;ld.ProtobufTraceSerializer={serializeRequest:(n)=>{let o=kS.createExportTraceServiceRequest(n,VS.PROTOBUF_ENCODER);return qS.encode(o).finish()},deserializeResponse:(n)=>BS.decode(n)}});var dd=i(function(Ln){Object.defineProperty(Ln,"__esModule",{value:!0});Ln.ProtobufTraceSerializer=void 0;var jS=fd();Object.defineProperty(Ln,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return jS.ProtobufTraceSerializer}})});var md=i(function(hd){Object.defineProperty(hd,"__esModule",{value:!0});hd.JsonLogsSerializer=void 0;var HS=Jr(),FS=Ae();hd.JsonLogsSerializer={serializeRequest:(n)=>{let o=HS.createExportLogsServiceRequest(n,FS.JSON_ENCODER);return new TextEncoder().encode(JSON.stringify(o))},deserializeResponse:(n)=>{if(n.length===0)return{};return JSON.parse(new TextDecoder().decode(n))}}});var _d=i(function(Cn){Object.defineProperty(Cn,"__esModule",{value:!0});Cn.JsonLogsSerializer=void 0;var KS=md();Object.defineProperty(Cn,"JsonLogsSerializer",{enumerable:!0,get:function(){return KS.JsonLogsSerializer}})});var bd=i(function(gd){Object.defineProperty(gd,"__esModule",{value:!0});gd.JsonMetricsSerializer=void 0;var JS=Rn(),$S=Ae();gd.JsonMetricsSerializer={serializeRequest:(n)=>{let o=JS.createExportMetricsServiceRequest([n],$S.JSON_ENCODER);return new TextEncoder().encode(JSON.stringify(o))},deserializeResponse:(n)=>{if(n.length===0)return{};return JSON.parse(new TextDecoder().decode(n))}}});var Od=i(function(Dn){Object.defineProperty(Dn,"__esModule",{value:!0});Dn.JsonMetricsSerializer=void 0;var WS=bd();Object.defineProperty(Dn,"JsonMetricsSerializer",{enumerable:!0,get:function(){return WS.JsonMetricsSerializer}})});var xd=i(function(Sd){Object.defineProperty(Sd,"__esModule",{value:!0});Sd.JsonTraceSerializer=void 0;var XS=Un(),ZS=Ae();Sd.JsonTraceSerializer={serializeRequest:(n)=>{let o=XS.createExportTraceServiceRequest(n,ZS.JSON_ENCODER);return new TextEncoder().encode(JSON.stringify(o))},deserializeResponse:(n)=>{if(n.length===0)return{};return JSON.parse(new TextDecoder().decode(n))}}});var Ed=i(function(kn){Object.defineProperty(kn,"__esModule",{value:!0});kn.JsonTraceSerializer=void 0;var QS=xd();Object.defineProperty(kn,"JsonTraceSerializer",{enumerable:!0,get:function(){return QS.JsonTraceSerializer}})});var dm=i(function(ge){Object.defineProperty(ge,"__esModule",{value:!0});ge.JsonTraceSerializer=ge.JsonMetricsSerializer=ge.JsonLogsSerializer=ge.ProtobufTraceSerializer=ge.ProtobufMetricsSerializer=ge.ProtobufLogsSerializer=void 0;var tT=ac();Object.defineProperty(ge,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return tT.ProtobufLogsSerializer}});var rT=rd();Object.defineProperty(ge,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return rT.ProtobufMetricsSerializer}});var nT=dd();Object.defineProperty(ge,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return nT.ProtobufTraceSerializer}});var oT=_d();Object.defineProperty(ge,"JsonLogsSerializer",{enumerable:!0,get:function(){return oT.JsonLogsSerializer}});var iT=Od();Object.defineProperty(ge,"JsonMetricsSerializer",{enumerable:!0,get:function(){return iT.JsonMetricsSerializer}});var uT=Ed();Object.defineProperty(ge,"JsonTraceSerializer",{enumerable:!0,get:function(){return uT.JsonTraceSerializer}})});var Pd=i(function(Ad){Object.defineProperty(Ad,"__esModule",{value:!0});Ad.validateAndNormalizeHeaders=void 0;var cT=A();function sT(n){let o={};return Object.entries(n??{}).forEach(([l,p])=>{if(typeof p<"u")o[l]=String(p);else cT.diag.warn(`Header "${l}" has invalid value (${p}) and will be ignored`)}),o}Ad.validateAndNormalizeHeaders=sT});var Md=i(function(Id){Object.defineProperty(Id,"__esModule",{value:!0});Id.getHttpConfigurationDefaults=Id.mergeOtlpHttpConfigurationWithDefaults=void 0;var wd=Xe(),lT=Pd();function pT(n,o,l){return async()=>{let p={...await l()},u={};if(o!=null)Object.assign(u,await o());if(n!=null)Object.assign(u,lT.validateAndNormalizeHeaders(await n()));return Object.assign(u,p)}}function fT(n){if(n==null)return;try{let o=globalThis.location?.href;return new URL(n,o).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${n}'`)}}function dT(n,o,l){return{...wd.mergeOtlpSharedConfigurationWithDefaults(n,o,l),headers:pT(n.headers,o.headers,l.headers),url:fT(n.url)??o.url??l.url}}Id.mergeOtlpHttpConfigurationWithDefaults=dT;function hT(n,o){return{...wd.getSharedConfigurationDefaults(),headers:async()=>n,url:"http://localhost:4318/"+o}}Id.getHttpConfigurationDefaults=hT});var lr=i(function(Cd){Object.defineProperty(Cd,"__esModule",{value:!0});Cd.getNodeHttpConfigurationDefaults=Cd.mergeOtlpNodeHttpConfigurationWithDefaults=Cd.httpAgentFactoryFromOptions=void 0;var Ud=Md();function Ld(n){return async(o)=>{let l=o==="http:",p=l?import("http"):import("https"),{Agent:u}=await p;if(l){let{ca:s,cert:t,key:e,...r}=n;return new u(r)}return new u(n)}}Cd.httpAgentFactoryFromOptions=Ld;function mT(n,o,l){return{...Ud.mergeOtlpHttpConfigurationWithDefaults(n,o,l),agentFactory:n.agentFactory??o.agentFactory??l.agentFactory,userAgent:n.userAgent}}Cd.mergeOtlpNodeHttpConfigurationWithDefaults=mT;function _T(n,o){return{...Ud.getHttpConfigurationDefaults(n,o),agentFactory:Ld({keepAlive:!0})}}Cd.getNodeHttpConfigurationDefaults=_T});var Bd=i(function(kd){Object.defineProperty(kd,"__esModule",{value:!0});kd.parseRetryAfterToMills=kd.isExportHTTPErrorRetryable=void 0;function bT(n){return n===429||n===502||n===503||n===504}kd.isExportHTTPErrorRetryable=bT;function OT(n){if(n==null)return;let o=Number.parseInt(n,10);if(Number.isInteger(o))return o>0?o*1000:-1;let l=new Date(n).getTime()-Date.now();if(l>=0)return l;return 0}kd.parseRetryAfterToMills=OT});var Gd=i(function(qd){Object.defineProperty(qd,"__esModule",{value:!0});qd.VERSION=void 0;qd.VERSION="0.214.0"});var Jd=i(function(Kd){Object.defineProperty(Kd,"__esModule",{value:!0});Kd.compressAndSend=Kd.sendWithHttp=void 0;var TT=c("zlib"),xT=c("stream"),pr=Bd(),ET=At(),AT=Gd(),Hd=`OTel-OTLP-Exporter-JavaScript/${AT.VERSION}`;function NT(n,o,l,p,u,s,t,e){return new Promise((r)=>{let a=new URL(o);if(u)l["User-Agent"]=`${u} ${Hd}`;else l["User-Agent"]=Hd;let f={hostname:a.hostname,port:a.port,path:a.pathname,method:"POST",headers:l,agent:s},y=n(f,(g)=>{let M=[];g.on("data",(F)=>M.push(F)),g.on("end",()=>{if(g.statusCode&&g.statusCode<=299)r({status:"success",data:Buffer.concat(M)});else if(g.statusCode&&pr.isExportHTTPErrorRetryable(g.statusCode))r({status:"retryable",retryInMillis:pr.parseRetryAfterToMills(g.headers["retry-after"])});else{let F=new ET.OTLPExporterError(g.statusMessage,g.statusCode,Buffer.concat(M).toString());r({status:"failure",error:F})}}),g.on("error",(F)=>{if(g.statusCode&&g.statusCode<=299)r({status:"success"});else if(g.statusCode&&pr.isExportHTTPErrorRetryable(g.statusCode))r({status:"retryable",error:F,retryInMillis:pr.parseRetryAfterToMills(g.headers["retry-after"])});else r({status:"failure",error:F})})});y.setTimeout(e,()=>{y.destroy(),r({status:"retryable",error:Error("Request timed out")})}),y.on("error",(g)=>{if(wT(g))r({status:"retryable",error:g});else r({status:"failure",error:g})}),Fd(y,p,t,(g)=>{r({status:"failure",error:g})})})}Kd.sendWithHttp=NT;function Fd(n,o,l,p){let u=PT(l);if(o==="gzip")n.setHeader("Content-Encoding","gzip"),u=u.on("error",p).pipe(TT.createGzip()).on("error",p);u.pipe(n).on("error",p)}Kd.compressAndSend=Fd;function PT(n){let o=new xT.Readable;return o.push(n),o.push(null),o}function wT(n){let o=new Set(["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","EAI_AGAIN","ENOTFOUND","ENETUNREACH","EHOSTUNREACH"]);if("code"in n&&typeof n.code==="string")return o.has(n.code);return!1}});var Xd=i(function(Wd){Object.defineProperty(Wd,"__esModule",{value:!0});Wd.createHttpExporterTransport=void 0;var RT=Jd();class $d{_utils=null;_parameters;constructor(n){this._parameters=n}async send(n,o){let{agent:l,request:p}=await this._loadUtils(),u=await this._parameters.headers();return RT.sendWithHttp(p,this._parameters.url,u,this._parameters.compression,this._parameters.userAgent,l,n,o)}shutdown(){}async _loadUtils(){let n=this._utils;if(n===null){let o=new URL(this._parameters.url).protocol,[l,p]=await Promise.all([this._parameters.agentFactory(o),MT(o)]);n=this._utils={agent:l,request:p}}return n}}async function MT(n){let o=n==="http:"?import("http"):import("https"),{request:l}=await o;return l}function UT(n){return new $d(n)}Wd.createHttpExporterTransport=UT});var rh=i(function(eh){Object.defineProperty(eh,"__esModule",{value:!0});eh.createRetryingTransport=void 0;var xt=A(),Vn=5,LT=1000,CT=5000,DT=1.5,Zd=0.2;function kT(){return Math.random()*(2*Zd)-Zd}class Qd{_transport;constructor(n){this._transport=n}retry(n,o,l){return new Promise((p,u)=>{setTimeout(()=>{this._transport.send(n,o).then(p,u)},l)})}async send(n,o){let l=Vn,p=LT,u=Date.now()+o,s=await this._transport.send(n,o);while(s.status==="retryable"&&l>0){l--;let t=Math.max(Math.min(p*(1+kT()),CT),0);p=p*DT;let e=s.retryInMillis??t,r=u-Date.now();if(e>r)return xt.diag.info(`Export retry time ${Math.round(e)}ms exceeds remaining timeout ${Math.round(r)}ms, not retrying further.`),s;xt.diag.verbose(`Scheduling export retry in ${Math.round(e)}ms`),s=await this.retry(n,r,e)}if(s.status==="success")xt.diag.verbose(`Export succeeded after ${Vn-l} retry attempts.`);else if(s.status==="retryable")xt.diag.info(`Export failed after maximum retry attempts (${Vn}).`);else xt.diag.info(`Export failed with non-retryable error: ${s.error}`);return s}shutdown(){return this._transport.shutdown()}}function VT(n){return new Qd(n.transport)}eh.createRetryingTransport=VT});var ih=i(function(nh){Object.defineProperty(nh,"__esModule",{value:!0});nh.createOtlpHttpExportDelegate=void 0;var BT=Rr(),qT=Xd(),jT=yr(),GT=rh();function HT(n,o){return BT.createOtlpExportDelegate({transport:GT.createRetryingTransport({transport:qT.createHttpExporterTransport(n)}),serializer:o,promiseHandler:jT.createBoundedQueueExportPromiseHandler(n)},{timeout:n.timeoutMillis})}nh.createOtlpHttpExportDelegate=HT});var Bn=i(function(lh){Object.defineProperty(lh,"__esModule",{value:!0});lh.getSharedConfigurationFromEnvironment=void 0;var ch=Tt(),sh=A();function uh(n){let o=ch.getNumberFromEnv(n);if(o!=null){if(Number.isFinite(o)&&o>0)return o;sh.diag.warn(`Configuration: ${n} is invalid, expected number greater than 0 (actual: ${o})`)}return}function FT(n){let o=uh(`OTEL_EXPORTER_OTLP_${n}_TIMEOUT`),l=uh("OTEL_EXPORTER_OTLP_TIMEOUT");return o??l}function ah(n){let o=ch.getStringFromEnv(n)?.trim();if(o==null||o==="none"||o==="gzip")return o;sh.diag.warn(`Configuration: ${n} is invalid, expected 'none' or 'gzip' (actual: '${o}')`);return}function KT(n){let o=ah(`OTEL_EXPORTER_OTLP_${n}_COMPRESSION`),l=ah("OTEL_EXPORTER_OTLP_COMPRESSION");return o??l}function zT(n){return{timeoutMillis:FT(n),compression:KT(n)}}lh.getSharedConfigurationFromEnvironment=zT});var hh=i(function(fh){Object.defineProperty(fh,"__esModule",{value:!0});fh.getNodeHttpConfigurationFromEnvironment=void 0;var JT=c("fs"),$T=c("path"),ie=Tt(),fr=A(),WT=Bn(),YT=Xe(),XT=lr();function ZT(n){let o=ie.getStringFromEnv(`OTEL_EXPORTER_OTLP_${n}_HEADERS`),l=ie.getStringFromEnv("OTEL_EXPORTER_OTLP_HEADERS"),p=ie.parseKeyPairsIntoRecord(o),u=ie.parseKeyPairsIntoRecord(l);if(Object.keys(p).length===0&&Object.keys(u).length===0)return;return Object.assign({},ie.parseKeyPairsIntoRecord(l),ie.parseKeyPairsIntoRecord(o))}function QT(n){try{return new URL(n).toString()}catch{fr.diag.warn(`Configuration: Could not parse environment-provided export URL: '${n}', falling back to undefined`);return}}function ex(n,o){try{new URL(n)}catch{fr.diag.warn(`Configuration: Could not parse environment-provided export URL: '${n}', falling back to undefined`);return}if(!n.endsWith("/"))n=n+"/";n+=o;try{new URL(n)}catch{fr.diag.warn(`Configuration: Provided URL appended with '${o}' is not a valid URL, using 'undefined' instead of '${n}'`);return}return n}function tx(n){let o=ie.getStringFromEnv("OTEL_EXPORTER_OTLP_ENDPOINT");if(o===void 0)return;return ex(o,n)}function rx(n){let o=ie.getStringFromEnv(`OTEL_EXPORTER_OTLP_${n}_ENDPOINT`);if(o===void 0)return;return QT(o)}function qn(n,o,l){let p=ie.getStringFromEnv(n),u=ie.getStringFromEnv(o),s=p??u;if(s!=null)try{return JT.readFileSync($T.resolve(process.cwd(),s))}catch{fr.diag.warn(l);return}else return}function nx(n){return qn(`OTEL_EXPORTER_OTLP_${n}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function ox(n){return qn(`OTEL_EXPORTER_OTLP_${n}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function ix(n){return qn(`OTEL_EXPORTER_OTLP_${n}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function ux(n,o){return{...WT.getSharedConfigurationFromEnvironment(n),url:rx(n)??tx(o),headers:YT.wrapStaticHeadersInFunction(ZT(n)),agentFactory:XT.httpAgentFactoryFromOptions({keepAlive:!0,ca:ix(n),cert:nx(n),key:ox(n)})}}fh.getNodeHttpConfigurationFromEnvironment=ux});var _h=i(function(yh){Object.defineProperty(yh,"__esModule",{value:!0});yh.convertLegacyHeaders=void 0;var ax=Xe();function cx(n){if(typeof n.headers==="function")return n.headers;return ax.wrapStaticHeadersInFunction(n.headers)}yh.convertLegacyHeaders=cx});var Oh=i(function(vh){Object.defineProperty(vh,"__esModule",{value:!0});vh.convertLegacyHttpOptions=void 0;var sx=A(),gh=lr(),lx=ju(),px=hh(),fx=_h();function dx(n){if(typeof n.httpAgentOptions==="function")return n.httpAgentOptions;let o=n.httpAgentOptions;if(n.keepAlive!=null)o={keepAlive:n.keepAlive,...o};if(o!=null)return lx.httpAgentFactoryFromOptions(o);else return}function hx(n,o,l,p){if(n.metadata)sx.diag.warn("Metadata cannot be set when using http");return gh.mergeOtlpNodeHttpConfigurationWithDefaults({url:n.url,headers:fx.convertLegacyHeaders(n),concurrencyLimit:n.concurrencyLimit,timeoutMillis:n.timeoutMillis,compression:n.compression,agentFactory:dx(n),userAgent:n.userAgent},px.getNodeHttpConfigurationFromEnvironment(o,l),gh.getNodeHttpConfigurationDefaults(p,l))}vh.convertLegacyHttpOptions=hx});var ju=i(function(Ye){Object.defineProperty(Ye,"__esModule",{value:!0});Ye.convertLegacyHttpOptions=Ye.getSharedConfigurationFromEnvironment=Ye.createOtlpHttpExportDelegate=Ye.httpAgentFactoryFromOptions=void 0;var yx=lr();Object.defineProperty(Ye,"httpAgentFactoryFromOptions",{enumerable:!0,get:function(){return yx.httpAgentFactoryFromOptions}});var mx=ih();Object.defineProperty(Ye,"createOtlpHttpExportDelegate",{enumerable:!0,get:function(){return mx.createOtlpHttpExportDelegate}});var _x=Bn();Object.defineProperty(Ye,"getSharedConfigurationFromEnvironment",{enumerable:!0,get:function(){return _x.getSharedConfigurationFromEnvironment}});var gx=Oh();Object.defineProperty(Ye,"convertLegacyHttpOptions",{enumerable:!0,get:function(){return gx.convertLegacyHttpOptions}})});var Ah=i(function(xh){Object.defineProperty(xh,"__esModule",{value:!0});xh.OTLPTraceExporter=void 0;var bx=pm(),Ox=dm(),Sh=ju();class Th extends bx.OTLPExporterBase{constructor(n={}){super(Sh.createOtlpHttpExportDelegate(Sh.convertLegacyHttpOptions(n,"TRACES","v1/traces",{"Content-Type":"application/json"}),Ox.JsonTraceSerializer))}}xh.OTLPTraceExporter=Th});var Nh=i(function(jn){Object.defineProperty(jn,"__esModule",{value:!0});jn.OTLPTraceExporter=void 0;var Sx=Ah();Object.defineProperty(jn,"OTLPTraceExporter",{enumerable:!0,get:function(){return Sx.OTLPTraceExporter}})});var Ph=i(function(Gn){Object.defineProperty(Gn,"__esModule",{value:!0});Gn.OTLPTraceExporter=void 0;var xx=Nh();Object.defineProperty(Gn,"OTLPTraceExporter",{enumerable:!0,get:function(){return xx.OTLPTraceExporter}})});var fo=i(function(Hn){Object.defineProperty(Hn,"__esModule",{value:!0});Hn.OTLPTraceExporter=void 0;var Ax=Ph();Object.defineProperty(Hn,"OTLPTraceExporter",{enumerable:!0,get:function(){return Ax.OTLPTraceExporter}})});
|
|
14
|
+
export{Tt,pm,Jg,Xg,dm,ju,fo};
|