browser-devtools-mcp 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -20
- package/dist/cli/runner.js +22 -7
- package/dist/collector/index.d.ts +4 -0
- package/dist/collector/types.d.ts +27 -0
- package/dist/{core-5DYSM5YY.js → core-5GP5ISLC.js} +1 -1
- package/dist/core-MEE5B4UB.js +888 -0
- package/dist/core-X3FD2EZG.js +17 -0
- package/dist/core-Y6NR2NG6.js +36 -0
- package/dist/daemon-server.js +1 -1
- package/dist/index.js +2 -2
- package/dist/platform/browser/otel/otel-initializer.bundle.js +1 -1
- package/dist/platform/browser/tools/index.d.ts +1 -0
- package/dist/platform/browser/tools/scenario/index.d.ts +7 -0
- package/dist/scenario/index.d.ts +3 -0
- package/dist/scenario/types.d.ts +9 -0
- package/dist/search/index.d.ts +3 -0
- package/dist/search/types.d.ts +20 -0
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/tools/index.d.ts +3 -1
- package/dist/tools/types.d.ts +28 -0
- package/package.json +15 -8
- package/dist/core-3YBKJFSF.js +0 -17
- package/dist/core-HGFC3X6X.js +0 -36
- package/dist/core-PKYX4YOY.js +0 -862
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __mcpOtelBundle=(()=>{var hr=Object.defineProperty;var Vs=Object.getOwnPropertyDescriptor;var Gs=Object.getOwnPropertyNames;var Hs=Object.prototype.hasOwnProperty;var Bs=(t,e,r)=>e in t?hr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Fs=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Gs(e))!Hs.call(t,o)&&o!==r&&hr(t,o,{get:()=>e[o],enumerable:!(n=Vs(e,o))||n.enumerable});return t};var ks=t=>Fs(hr({},"__esModule",{value:!0}),t);var c=(t,e,r)=>Bs(t,typeof e!="symbol"?e+"":e,r);var pc={};var _n=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};var Q="1.9.0";var En=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function Ks(t){var e=new Set([t]),r=new Set,n=t.match(En);if(!n)return function(){return!1};var o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null)return function(p){return p===t};function s(a){return r.add(a),!1}function i(a){return e.add(a),!0}return function(p){if(e.has(p))return!0;if(r.has(p))return!1;var u=p.match(En);if(!u)return s(p);var _={major:+u[1],minor:+u[2],patch:+u[3],prerelease:u[4]};return _.prerelease!=null||o.major!==_.major?s(p):o.major===0?o.minor===_.minor&&o.patch<=_.patch?i(p):s(p):o.minor<=_.minor?i(p):s(p)}}var Tn=Ks(Q);var Ys=Q.split(".")[0],bt=Symbol.for("opentelemetry.js.api."+Ys),vt=_n;function Y(t,e,r,n){var o;n===void 0&&(n=!1);var s=vt[bt]=(o=vt[bt])!==null&&o!==void 0?o:{version:Q};if(!n&&s[t]){var i=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return r.error(i.stack||i.message),!1}if(s.version!==Q){var i=new Error("@opentelemetry/api: Registration of version v"+s.version+" for "+t+" does not match previously registered API v"+Q);return r.error(i.stack||i.message),!1}return s[t]=e,r.debug("@opentelemetry/api: Registered a global for "+t+" v"+Q+"."),!0}function w(t){var e,r,n=(e=vt[bt])===null||e===void 0?void 0:e.version;if(!(!n||!Tn(n)))return(r=vt[bt])===null||r===void 0?void 0:r[t]}function j(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+Q+".");var r=vt[bt];r&&delete r[t]}var js=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],i;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return s},Ws=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n<o;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},ln=(function(){function t(e){this._namespace=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Dt("debug",this._namespace,e)},t.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Dt("error",this._namespace,e)},t.prototype.info=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Dt("info",this._namespace,e)},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Dt("warn",this._namespace,e)},t.prototype.verbose=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Dt("verbose",this._namespace,e)},t})();function Dt(t,e,r){var n=w("diag");if(n)return r.unshift(e),n[t].apply(n,Ws([],js(r),!1))}var y;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(y||(y={}));function fn(t,e){t<y.NONE?t=y.NONE:t>y.ALL&&(t=y.ALL),e=e||{};function r(n,o){var s=e[n];return typeof s=="function"&&t>=o?s.bind(e):function(){}}return{error:r("error",y.ERROR),warn:r("warn",y.WARN),info:r("info",y.INFO),debug:r("debug",y.DEBUG),verbose:r("verbose",y.VERBOSE)}}var zs=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],i;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return s},Xs=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n<o;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},$s="diag",v=(function(){function t(){function e(o){return function(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];var a=w("diag");if(a)return a[o].apply(a,Xs([],zs(s),!1))}}var r=this,n=function(o,s){var i,a,p;if(s===void 0&&(s={logLevel:y.INFO}),o===r){var u=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((i=u.stack)!==null&&i!==void 0?i:u.message),!1}typeof s=="number"&&(s={logLevel:s});var _=w("diag"),f=fn((a=s.logLevel)!==null&&a!==void 0?a:y.INFO,o);if(_&&!s.suppressOverrideMessage){var h=(p=new Error().stack)!==null&&p!==void 0?p:"<failed to generate stacktrace>";_.warn("Current logger will be overwritten from "+h),f.warn("Current logger will overwrite one already registered from "+h)}return Y("diag",f,r,!0)};r.setLogger=n,r.disable=function(){j($s,r)},r.createComponentLogger=function(o){return new ln(o)},r.verbose=e("verbose"),r.debug=e("debug"),r.info=e("info"),r.warn=e("warn"),r.error=e("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t})();var qs=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],i;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return s},Qs=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},dn=(function(){function t(e){this._entries=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var r=this._entries.get(e);if(r)return Object.assign({},r)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var r=qs(e,2),n=r[0],o=r[1];return[n,o]})},t.prototype.setEntry=function(e,r){var n=new t(this._entries);return n._entries.set(e,r),n},t.prototype.removeEntry=function(e){var r=new t(this._entries);return r._entries.delete(e),r},t.prototype.removeEntries=function(){for(var e,r,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var s=new t(this._entries);try{for(var i=Qs(n),a=i.next();!a.done;a=i.next()){var p=a.value;s._entries.delete(p)}}catch(u){e={error:u}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return s},t.prototype.clear=function(){return new t},t})();var Sn=Symbol("BaggageEntryMetadata");var Js=v.instance();function mn(t){return t===void 0&&(t={}),new dn(new Map(Object.entries(t)))}function Ar(t){return typeof t!="string"&&(Js.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:Sn,toString:function(){return t}}}function ct(t){return Symbol.for(t)}var Zs=(function(){function t(e){var r=this;r._currentContext=e?new Map(e):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,o){var s=new t(r._currentContext);return s._currentContext.set(n,o),s},r.deleteValue=function(n){var o=new t(r._currentContext);return o._currentContext.delete(n),o}}return t})(),K=new Zs;var gr=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],Rr=(function(){function t(){function e(n){return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(console){var i=console[n];if(typeof i!="function"&&(i=console.log),typeof i=="function")return i.apply(console,o)}}}for(var r=0;r<gr.length;r++)this[gr[r].n]=e(gr[r].c)}return t})();var pt=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),ti=(function(){function t(){}return t.prototype.createGauge=function(e,r){return pi},t.prototype.createHistogram=function(e,r){return ui},t.prototype.createCounter=function(e,r){return ci},t.prototype.createUpDownCounter=function(e,r){return _i},t.prototype.createObservableGauge=function(e,r){return Ti},t.prototype.createObservableCounter=function(e,r){return Ei},t.prototype.createObservableUpDownCounter=function(e,r){return li},t.prototype.addBatchObservableCallback=function(e,r){},t.prototype.removeBatchObservableCallback=function(e){},t})();var Ae=(function(){function t(){}return t})();var ei=(function(t){pt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n){},e})(Ae);var ri=(function(t){pt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n){},e})(Ae);var ni=(function(t){pt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,n){},e})(Ae);var oi=(function(t){pt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,n){},e})(Ae);var Or=(function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})();var si=(function(t){pt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Or);var ii=(function(t){pt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Or);var ai=(function(t){pt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Or);var hn=new ti,ci=new ei,pi=new ni,ui=new oi,_i=new ri,Ei=new si,Ti=new ii,li=new ai;var An={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},gn={set:function(t,e,r){t!=null&&(t[e]=r)}};var fi=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],i;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return s},di=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n<o;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},Rn=(function(){function t(){}return t.prototype.active=function(){return K},t.prototype.with=function(e,r,n){for(var o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];return r.call.apply(r,di([n],fi(o),!1))},t.prototype.bind=function(e,r){return r},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t})();var Si=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,s=[],i;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return s},mi=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,s;n<o;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},Lr="context",hi=new Rn,ot=(function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(e){return Y(Lr,e,v.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(e,r,n){for(var o,s=[],i=3;i<arguments.length;i++)s[i-3]=arguments[i];return(o=this._getContextManager()).with.apply(o,mi([e,r,n],Si(s),!1))},t.prototype.bind=function(e,r){return this._getContextManager().bind(e,r)},t.prototype._getContextManager=function(){return w(Lr)||hi},t.prototype.disable=function(){this._getContextManager().disable(),j(Lr,v.instance())},t})();var I;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(I||(I={}));var ge="0000000000000000",Re="00000000000000000000000000000000",Ut={traceId:Re,spanId:ge,traceFlags:I.NONE};var st=(function(){function t(e){e===void 0&&(e=Ut),this._spanContext=e}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,r){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,r){},t})();var xr=ct("OpenTelemetry Context Key SPAN");function Oe(t){return t.getValue(xr)||void 0}function On(){return Oe(ot.getInstance().active())}function wt(t,e){return t.setValue(xr,e)}function Ln(t){return t.deleteValue(xr)}function xn(t,e){return wt(t,new st(e))}function Le(t){var e;return(e=Oe(t))===null||e===void 0?void 0:e.spanContext()}var Ai=/^([0-9a-f]{32})$/i,gi=/^[0-9a-f]{16}$/i;function xe(t){return Ai.test(t)&&t!==Re}function Nn(t){return gi.test(t)&&t!==ge}function J(t){return xe(t.traceId)&&Nn(t.spanId)}function Pn(t){return new st(t)}var Nr=ot.getInstance(),Ne=(function(){function t(){}return t.prototype.startSpan=function(e,r,n){n===void 0&&(n=Nr.active());var o=!!r?.root;if(o)return new st;var s=n&&Le(n);return Ri(s)&&J(s)?new st(s):new st},t.prototype.startActiveSpan=function(e,r,n,o){var s,i,a;if(!(arguments.length<2)){arguments.length===2?a=r:arguments.length===3?(s=r,a=n):(s=r,i=n,a=o);var p=i??Nr.active(),u=this.startSpan(e,s,p),_=wt(p,u);return Nr.with(_,a,void 0,u)}},t})();function Ri(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var Oi=new Ne,Cn=(function(){function t(e,r,n,o){this._provider=e,this.name=r,this.version=n,this.options=o}return t.prototype.startSpan=function(e,r,n){return this._getTracer().startSpan(e,r,n)},t.prototype.startActiveSpan=function(e,r,n,o){var s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Oi},t})();var Mn=(function(){function t(){}return t.prototype.getTracer=function(e,r,n){return new Ne},t})();var Li=new Mn,Pr=(function(){function t(){}return t.prototype.getTracer=function(e,r,n){var o;return(o=this.getDelegateTracer(e,r,n))!==null&&o!==void 0?o:new Cn(this,e,r,n)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:Li},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,r,n){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getTracer(e,r,n)},t})();var At;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(At||(At={}));var Z;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(Z||(Z={}));var W;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(W||(W={}));var S=ot.getInstance();var T=v.instance();var xi=(function(){function t(){}return t.prototype.getMeter=function(e,r,n){return hn},t})();var yn=new xi;var Cr="metrics",In=(function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(e){return Y(Cr,e,v.instance())},t.prototype.getMeterProvider=function(){return w(Cr)||yn},t.prototype.getMeter=function(e,r,n){return this.getMeterProvider().getMeter(e,r,n)},t.prototype.disable=function(){j(Cr,v.instance())},t})();var Vt=In.getInstance();var bn=(function(){function t(){}return t.prototype.inject=function(e,r){},t.prototype.extract=function(e,r){return e},t.prototype.fields=function(){return[]},t})();var Mr=ct("OpenTelemetry Baggage Key");function yr(t){return t.getValue(Mr)||void 0}function vn(){return yr(ot.getInstance().active())}function Dn(t,e){return t.setValue(Mr,e)}function Un(t){return t.deleteValue(Mr)}var Ir="propagation",Ni=new bn,wn=(function(){function t(){this.createBaggage=mn,this.getBaggage=yr,this.getActiveBaggage=vn,this.setBaggage=Dn,this.deleteBaggage=Un}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(e){return Y(Ir,e,v.instance())},t.prototype.inject=function(e,r,n){return n===void 0&&(n=gn),this._getGlobalPropagator().inject(e,r,n)},t.prototype.extract=function(e,r,n){return n===void 0&&(n=An),this._getGlobalPropagator().extract(e,r,n)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){j(Ir,v.instance())},t.prototype._getGlobalPropagator=function(){return w(Ir)||Ni},t})();var C=wn.getInstance();var br="trace",Vn=(function(){function t(){this._proxyTracerProvider=new Pr,this.wrapSpanContext=Pn,this.isSpanContextValid=J,this.deleteSpan=Ln,this.getSpan=Oe,this.getActiveSpan=On,this.getSpanContext=Le,this.setSpan=wt,this.setSpanContext=xn}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var r=Y(br,this._proxyTracerProvider,v.instance());return r&&this._proxyTracerProvider.setDelegate(e),r},t.prototype.getTracerProvider=function(){return w(br)||this._proxyTracerProvider},t.prototype.getTracer=function(e,r){return this.getTracerProvider().getTracer(e,r)},t.prototype.disable=function(){j(br,v.instance()),this._proxyTracerProvider=new Pr},t})();var A=Vn.getInstance();var Gn=ct("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Gt(t){return t.setValue(Gn,!0)}function ut(t){return t.getValue(Gn)===!0}var Pe="baggage";function Bn(t){return t.reduce((e,r)=>{let n=`${e}${e!==""?",":""}${r}`;return n.length>8192?e:n},"")}function Fn(t){return t.getAllEntries().map(([e,r])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(r.value)}`;return r.metadata!==void 0&&(n+=";"+r.metadata.toString()),n})}function kn(t){let e=t.split(";");if(e.length<=0)return;let r=e.shift();if(!r)return;let n=r.indexOf("=");if(n<=0)return;let o=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim()),i;return e.length>0&&(i=Ar(e.join(";"))),{key:o,value:s,metadata:i}}var Ht=class{inject(e,r,n){let o=C.getBaggage(e);if(!o||ut(e))return;let s=Fn(o).filter(a=>a.length<=4096).slice(0,180),i=Bn(s);i.length>0&&n.set(r,Pe,i)}extract(e,r,n){let o=n.get(r,Pe),s=Array.isArray(o)?o.join(","):o;if(!s)return e;let i={};return s.length===0||(s.split(",").forEach(p=>{let u=kn(p);if(u){let _={value:u.value};u.metadata&&(_.metadata=u.metadata),i[u.key]=_}}),Object.entries(i).length===0)?e:C.setBaggage(e,C.createBaggage(i))}fields(){return[Pe]}};function _t(t){let e={};if(typeof t!="object"||t==null)return e;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;if(!Mi(r)){T.warn(`Invalid attribute key: ${r}`);continue}let n=t[r];if(!Ce(n)){T.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(n)?e[r]=n.slice():e[r]=n}return e}function Mi(t){return typeof t=="string"&&t!==""}function Ce(t){return t==null?!0:Array.isArray(t)?yi(t):Kn(typeof t)}function yi(t){let e;for(let r of t){if(r==null)continue;let n=typeof r;if(n!==e){if(!e){if(Kn(n)){e=n;continue}return!1}return!1}}return!0}function Kn(t){switch(t){case"number":case"boolean":case"string":return!0}return!1}function Yn(){return t=>{T.error(Ii(t))}}function Ii(t){return typeof t=="string"?t:JSON.stringify(bi(t))}function bi(t){let e={},r=t;for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n=>{if(e[n])return;let o=r[n];o&&(e[n]=String(o))}),r=Object.getPrototypeOf(r);return e}var vi=Yn();function V(t){try{vi(t)}catch{}}var Rt=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};var M=performance;var jn="2.2.0";var Di="service.name";var Ui="service.version";var Wn=Di;var zn=Ui;var Bt="error.type";var Me="exception.message",Xn="exception.stacktrace",ye="exception.type";var Ie="http.request.method";var be="http.request.method_original";var ve="http.response.status_code";var De="server.address",Ue="server.port",$n="service.name";var Ft="telemetry.sdk.language";var qn="webjs",kt="telemetry.sdk.name",Kt="telemetry.sdk.version";var it="url.full";var Qn="user_agent.original";var Jn="process.runtime.name";var Ot={[kt]:"opentelemetry",[Jn]:"browser",[Ft]:qn,[Kt]:jn};var wi=9,Vi=6,Gi=Math.pow(10,Vi),we=Math.pow(10,wi);function G(t){let e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*Gi);return[r,n]}function Yt(){let t=M.timeOrigin;if(typeof t!="number"){let e=M;t=e.timing&&e.timing.fetchStart}return t}function H(t){let e=G(Yt()),r=G(typeof t=="number"?t:M.now());return He(e,r)}function Et(t){if(jt(t))return t;if(typeof t=="number")return t<Yt()?H(t):G(t);if(t instanceof Date)return G(t.getTime());throw TypeError("Invalid input type")}function Dr(t,e){let r=e[0]-t[0],n=e[1]-t[1];return n<0&&(r-=1,n+=we),[r,n]}function B(t){return t[0]*we+t[1]}function Ve(t){return t[0]*1e6+t[1]/1e3}function jt(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Ge(t){return jt(t)||typeof t=="number"||t instanceof Date}function He(t,e){let r=[t[0]+e[0],t[1]+e[1]];return r[1]>=we&&(r[1]-=we,r[0]+=1),r}var b;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(b||(b={}));var Wt=class{constructor(e={}){c(this,"_propagators");c(this,"_fields");this._propagators=e.propagators??[],this._fields=Array.from(new Set(this._propagators.map(r=>typeof r.fields=="function"?r.fields():[]).reduce((r,n)=>r.concat(n),[])))}inject(e,r,n){for(let o of this._propagators)try{o.inject(e,r,n)}catch(s){T.warn(`Failed to inject with ${o.constructor.name}. Err: ${s.message}`)}}extract(e,r,n){return this._propagators.reduce((o,s)=>{try{return s.extract(o,r,n)}catch(i){T.warn(`Failed to extract with ${s.constructor.name}. Err: ${i.message}`)}return o},e)}fields(){return this._fields.slice()}};var Ur="[_0-9a-z-*/]",Hi=`[a-z]${Ur}{0,255}`,Bi=`[a-z0-9]${Ur}{0,240}@[a-z]${Ur}{0,13}`,Fi=new RegExp(`^(?:${Hi}|${Bi})$`),ki=/^[ -~]{0,255}[!-~]$/,Ki=/,|=/;function Zn(t){return Fi.test(t)}function to(t){return ki.test(t)&&!Ki.test(t)}var eo=32,Yi=512,ro=",",no="=",Be=class t{constructor(e){c(this,"_internalState",new Map);e&&this._parse(e)}set(e,r){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n}unset(e){let r=this._clone();return r._internalState.delete(e),r}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,r)=>(e.push(r+no+this.get(r)),e),[]).join(ro)}_parse(e){e.length>Yi||(this._internalState=e.split(ro).reverse().reduce((r,n)=>{let o=n.trim(),s=o.indexOf(no);if(s!==-1){let i=o.slice(0,s),a=o.slice(s+1,n.length);Zn(i)&&to(a)&&r.set(i,a)}return r},new Map),this._internalState.size>eo&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,eo))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new t;return e._internalState=new Map(this._internalState),e}};var Lt="traceparent",Fe="tracestate",ji="00",Wi="(?!ff)[\\da-f]{2}",zi="(?![0]{32})[\\da-f]{32}",Xi="(?![0]{16})[\\da-f]{16}",$i="[\\da-f]{2}",qi=new RegExp(`^\\s?(${Wi})-(${zi})-(${Xi})-(${$i})(-.*)?\\s?$`);function oo(t){let e=qi.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var zt=class{inject(e,r,n){let o=A.getSpanContext(e);if(!o||ut(e)||!J(o))return;let s=`${ji}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||I.NONE).toString(16)}`;n.set(r,Lt,s),o.traceState&&n.set(r,Fe,o.traceState.serialize())}extract(e,r,n){let o=n.get(r,Lt);if(!o)return e;let s=Array.isArray(o)?o[0]:o;if(typeof s!="string")return e;let i=oo(s);if(!i)return e;i.isRemote=!0;let a=n.get(r,Fe);if(a){let p=Array.isArray(a)?a.join(","):a;i.traceState=new Be(typeof p=="string"?p:void 0)}return A.setSpanContext(e,i)}fields(){return[Lt,Fe]}};var Qi="[object Object]",Ji="[object Null]",Zi="[object Undefined]",ta=Function.prototype,so=ta.toString,ea=so.call(Object),ra=Object.getPrototypeOf,io=Object.prototype,ao=io.hasOwnProperty,Tt=Symbol?Symbol.toStringTag:void 0,co=io.toString;function wr(t){if(!na(t)||oa(t)!==Qi)return!1;let e=ra(t);if(e===null)return!0;let r=ao.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&so.call(r)===ea}function na(t){return t!=null&&typeof t=="object"}function oa(t){return t==null?t===void 0?Zi:Ji:Tt&&Tt in Object(t)?sa(t):ia(t)}function sa(t){let e=ao.call(t,Tt),r=t[Tt],n=!1;try{t[Tt]=void 0,n=!0}catch{}let o=co.call(t);return n&&(e?t[Tt]=r:delete t[Tt]),o}function ia(t){return co.call(t)}var aa=20;function Gr(...t){let e=t.shift(),r=new WeakMap;for(;t.length>0;)e=uo(e,t.shift(),0,r);return e}function Vr(t){return Ke(t)?t.slice():t}function uo(t,e,r=0,n){let o;if(!(r>aa)){if(r++,ke(t)||ke(e)||_o(e))o=Vr(e);else if(Ke(t)){if(o=t.slice(),Ke(e))for(let s=0,i=e.length;s<i;s++)o.push(Vr(e[s]));else if(Xt(e)){let s=Object.keys(e);for(let i=0,a=s.length;i<a;i++){let p=s[i];o[p]=Vr(e[p])}}}else if(Xt(t))if(Xt(e)){if(!ca(t,e))return e;o=Object.assign({},t);let s=Object.keys(e);for(let i=0,a=s.length;i<a;i++){let p=s[i],u=e[p];if(ke(u))typeof u>"u"?delete o[p]:o[p]=u;else{let _=o[p],f=u;if(po(t,p,n)||po(e,p,n))delete o[p];else{if(Xt(_)&&Xt(f)){let h=n.get(_)||[],R=n.get(f)||[];h.push({obj:t,key:p}),R.push({obj:e,key:p}),n.set(_,h),n.set(f,R)}o[p]=uo(o[p],u,r,n)}}}}else o=e;return o}}function po(t,e,r){let n=r.get(t[e])||[];for(let o=0,s=n.length;o<s;o++){let i=n[o];if(i.key===e&&i.obj===t)return!0}return!1}function Ke(t){return Array.isArray(t)}function _o(t){return typeof t=="function"}function Xt(t){return!ke(t)&&!Ke(t)&&!_o(t)&&typeof t=="object"}function ke(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function ca(t,e){return!(!wr(t)||!wr(e))}function Ye(t,e){return typeof e=="string"?t===e:!!t.match(e)}function $t(t,e){if(!e)return!1;for(let r of e)if(Ye(t,r))return!0;return!1}var je=class{constructor(){c(this,"_promise");c(this,"_resolve");c(this,"_reject");this._promise=new Promise((e,r)=>{this._resolve=e,this._reject=r})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}};var lt=class{constructor(e,r){c(this,"_callback");c(this,"_that");c(this,"_isCalled",!1);c(this,"_deferred",new je);this._callback=e,this._that=r}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(r=>this._deferred.resolve(r),r=>this._deferred.reject(r))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}};function Eo(t,e){return new Promise(r=>{S.with(Gt(S.active()),()=>{t.export(e,n=>{r(n)})})})}var To={_export:Eo};function Hr(){return"unknown_service"}var xt=t=>t!==null&&typeof t=="object"&&typeof t.then=="function";var Br=class t{constructor(e,r){c(this,"_rawAttributes");c(this,"_asyncAttributesPending",!1);c(this,"_schemaUrl");c(this,"_memoizedAttributes");let n=e.attributes??{};this._rawAttributes=Object.entries(n).map(([o,s])=>(xt(s)&&(this._asyncAttributesPending=!0),[o,s])),this._rawAttributes=lo(this._rawAttributes),this._schemaUrl=_a(r?.schemaUrl)}static FromAttributeList(e,r){let n=new t({},r);return n._rawAttributes=lo(e),n._asyncAttributesPending=e.filter(([o,s])=>xt(s)).length>0,n}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[r,n]=this._rawAttributes[e];this._rawAttributes[e]=[r,xt(n)?await n:n]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&T.error("Accessing resource attributes before async attributes settled"),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[r,n]of this._rawAttributes){if(xt(n)){T.debug(`Unsettled resource attribute ${r} skipped`);continue}n!=null&&(e[r]??(e[r]=n))}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(e){if(e==null)return this;let r=Ea(this,e),n=r?{schemaUrl:r}:void 0;return t.FromAttributeList([...e.getRawAttributes(),...this.getRawAttributes()],n)}};function We(t,e){return Br.FromAttributeList(Object.entries(t),e)}function Fr(){return We({[$n]:Hr(),[Ft]:Ot[Ft],[kt]:Ot[kt],[Kt]:Ot[Kt]})}function lo(t){return t.map(([e,r])=>xt(r)?[e,r.catch(n=>{T.debug("promise rejection for resource attribute: %s - %s",e,n)})]:[e,r])}function _a(t){if(typeof t=="string"||t===void 0)return t;T.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",t)}function Ea(t,e){let r=t?.schemaUrl,n=e?.schemaUrl,o=r===void 0||r==="",s=n===void 0||n==="";if(o)return n;if(s||r===n)return r;T.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',r,n)}var fo="exception";var ze=class{constructor(e){c(this,"_spanContext");c(this,"kind");c(this,"parentSpanContext");c(this,"attributes",{});c(this,"links",[]);c(this,"events",[]);c(this,"startTime");c(this,"resource");c(this,"instrumentationScope");c(this,"_droppedAttributesCount",0);c(this,"_droppedEventsCount",0);c(this,"_droppedLinksCount",0);c(this,"name");c(this,"status",{code:W.UNSET});c(this,"endTime",[0,0]);c(this,"_ended",!1);c(this,"_duration",[-1,-1]);c(this,"_spanProcessor");c(this,"_spanLimits");c(this,"_attributeValueLengthLimit");c(this,"_performanceStartTime");c(this,"_performanceOffset");c(this,"_startTimeProvided");let r=Date.now();this._spanContext=e.spanContext,this._performanceStartTime=M.now(),this._performanceOffset=r-(this._performanceStartTime+Yt()),this._startTimeProvided=e.startTime!=null,this._spanLimits=e.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,this._spanProcessor=e.spanProcessor,this.name=e.name,this.parentSpanContext=e.parentSpanContext,this.kind=e.kind,this.links=e.links||[],this.startTime=this._getTime(e.startTime??r),this.resource=e.resource,this.instrumentationScope=e.scope,e.attributes!=null&&this.setAttributes(e.attributes),this._spanProcessor.onStart(this,e.context)}spanContext(){return this._spanContext}setAttribute(e,r){if(r==null||this._isSpanEnded())return this;if(e.length===0)return T.warn(`Invalid attribute key: ${e}`),this;if(!Ce(r))return T.warn(`Invalid attribute value set for key: ${e}`),this;let{attributeCountLimit:n}=this._spanLimits;return n!==void 0&&Object.keys(this.attributes).length>=n&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(r),this)}setAttributes(e){for(let[r,n]of Object.entries(e))this.setAttribute(r,n);return this}addEvent(e,r,n){if(this._isSpanEnded())return this;let{eventCountLimit:o}=this._spanLimits;if(o===0)return T.warn("No events allowed."),this._droppedEventsCount++,this;o!==void 0&&this.events.length>=o&&(this._droppedEventsCount===0&&T.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Ge(r)&&(Ge(n)||(n=r),r=void 0);let s=_t(r);return this.events.push({name:e,attributes:s,time:this._getTime(n),droppedAttributesCount:0}),this}addLink(e){return this.links.push(e),this}addLinks(e){return this.links.push(...e),this}setStatus(e){return this._isSpanEnded()?this:(this.status={...e},this.status.message!=null&&typeof e.message!="string"&&(T.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`),delete this.status.message),this)}updateName(e){return this._isSpanEnded()?this:(this.name=e,this)}end(e){if(this._isSpanEnded()){T.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this._ended=!0,this.endTime=this._getTime(e),this._duration=Dr(this.startTime,this.endTime),this._duration[0]<0&&(T.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&T.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e=="number"&&e<=M.now())return H(e+this._performanceOffset);if(typeof e=="number")return G(e);if(e instanceof Date)return G(e.getTime());if(jt(e))return e;if(this._startTimeProvided)return G(Date.now());let r=M.now()-this._performanceStartTime;return He(this.startTime,G(r))}isRecording(){return this._ended===!1}recordException(e,r){let n={};typeof e=="string"?n[Me]=e:e&&(e.code?n[ye]=e.code.toString():e.name&&(n[ye]=e.name),e.message&&(n[Me]=e.message),e.stack&&(n[Xn]=e.stack)),n[ye]||n[Me]?this.addEvent(fo,n,r):T.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){let e=new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);T.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,e)}return this._ended}_truncateToLimitUtil(e,r){return e.length<=r?e:e.substring(0,r)}_truncateToSize(e){let r=this._attributeValueLengthLimit;return r<=0?(T.warn(`Attribute value limit must be positive, got ${r}`),e):typeof e=="string"?this._truncateToLimitUtil(e,r):Array.isArray(e)?e.map(n=>typeof n=="string"?this._truncateToLimitUtil(n,r):n):e}};var tt;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(tt||(tt={}));var at=class{shouldSample(){return{decision:tt.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};var z=class{shouldSample(){return{decision:tt.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};var ft=class{constructor(e){c(this,"_root");c(this,"_remoteParentSampled");c(this,"_remoteParentNotSampled");c(this,"_localParentSampled");c(this,"_localParentNotSampled");this._root=e.root,this._root||(V(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new z),this._remoteParentSampled=e.remoteParentSampled??new z,this._remoteParentNotSampled=e.remoteParentNotSampled??new at,this._localParentSampled=e.localParentSampled??new z,this._localParentNotSampled=e.localParentNotSampled??new at}shouldSample(e,r,n,o,s,i){let a=A.getSpanContext(e);return!a||!J(a)?this._root.shouldSample(e,r,n,o,s,i):a.isRemote?a.traceFlags&I.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,o,s,i):this._remoteParentNotSampled.shouldSample(e,r,n,o,s,i):a.traceFlags&I.SAMPLED?this._localParentSampled.shouldSample(e,r,n,o,s,i):this._localParentNotSampled.shouldSample(e,r,n,o,s,i)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};var qt=class{constructor(e=0){c(this,"_ratio");c(this,"_upperBound");this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,r){return{decision:xe(r)&&this._accumulate(r)<this._upperBound?tt.RECORD_AND_SAMPLED:tt.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let r=0;for(let n=0;n<e.length/8;n++){let o=n*8,s=parseInt(e.slice(o,o+8),16);r=(r^s)>>>0}return r}};var X;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(X||(X={}));var Xe=1;function $e(){return{sampler:kr(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:void 0??1/0,attributeCountLimit:void 0??128},spanLimits:{attributeValueLengthLimit:void 0??1/0,attributeCountLimit:void 0??128,linkCountLimit:void 0??128,eventCountLimit:void 0??128,attributePerEventCountLimit:void 0??128,attributePerLinkCountLimit:void 0??128}}}function kr(){let t=void 0??X.ParentBasedAlwaysOn;switch(t){case X.AlwaysOn:return new z;case X.AlwaysOff:return new at;case X.ParentBasedAlwaysOn:return new ft({root:new z});case X.ParentBasedAlwaysOff:return new ft({root:new at});case X.TraceIdRatio:return new qt(So());case X.ParentBasedTraceIdRatio:return new ft({root:new qt(So())});default:return T.error(`OTEL_TRACES_SAMPLER value "${t}" invalid, defaulting to "${X.ParentBasedAlwaysOn}".`),new ft({root:new z})}}function So(){let t=void 0;return t==null?(T.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Xe}.`),Xe):t<0||t>1?(T.error(`OTEL_TRACES_SAMPLER_ARG=${t} was given, but it is out of range ([0..1]), defaulting to ${Xe}.`),Xe):t}var Ta=128,la=1/0;function mo(t){let e={sampler:kr()},r=$e(),n=Object.assign({},r,e,t);return n.generalLimits=Object.assign({},r.generalLimits,t.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,t.spanLimits||{}),n}function ho(t){let e=Object.assign({},t.spanLimits);return e.attributeCountLimit=t.spanLimits?.attributeCountLimit??t.generalLimits?.attributeCountLimit??void 0??void 0??Ta,e.attributeValueLengthLimit=t.spanLimits?.attributeValueLengthLimit??t.generalLimits?.attributeValueLengthLimit??void 0??void 0??la,Object.assign({},t,{spanLimits:e})}var qe=class{constructor(e,r){c(this,"_exporter");c(this,"_maxExportBatchSize");c(this,"_maxQueueSize");c(this,"_scheduledDelayMillis");c(this,"_exportTimeoutMillis");c(this,"_isExporting",!1);c(this,"_finishedSpans",[]);c(this,"_timer");c(this,"_shutdownOnce");c(this,"_droppedSpansCount",0);this._exporter=e,this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:void 0??512,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:void 0??2048,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:void 0??5e3,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:void 0??3e4,this._shutdownOnce=new lt(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(T.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,r){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&I.SAMPLED)!==0&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&T.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(T.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,r)=>{let n=[],o=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let s=0,i=o;s<i;s++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(r)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,r)=>{let n=setTimeout(()=>{r(new Error("Timeout"))},this._exportTimeoutMillis);S.with(Gt(S.active()),()=>{let o;this._finishedSpans.length<=this._maxExportBatchSize?(o=this._finishedSpans,this._finishedSpans=[]):o=this._finishedSpans.splice(0,this._maxExportBatchSize);let s=()=>this._exporter.export(o,a=>{clearTimeout(n),a.code===b.SUCCESS?e():r(a.error??new Error("BatchSpanProcessor: span export failed"))}),i=null;for(let a=0,p=o.length;a<p;a++){let u=o[a];u.resource.asyncAttributesPending&&u.resource.waitForAsyncAttributes&&(i??(i=[]),i.push(u.resource.waitForAsyncAttributes()))}i===null?s():Promise.all(i).then(s,a=>{V(a),r(a)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(r=>{this._isExporting=!1,V(r)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),typeof this._timer!="number"&&this._timer.unref())}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};var Nt=class extends qe{constructor(r,n){super(r,n);c(this,"_visibilityChangeListener");c(this,"_pageHideListener");this.onInit(n)}onInit(r){r?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=()=>{document.visibilityState==="hidden"&&this.forceFlush().catch(n=>{V(n)})},this._pageHideListener=()=>{this.forceFlush().catch(n=>{V(n)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))}onShutdown(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))}};var Pt=class{constructor(){c(this,"generateTraceId",Ao(16));c(this,"generateSpanId",Ao(8))}},Qe=Array(32);function Ao(t){return function(){for(let r=0;r<t*2;r++)Qe[r]=Math.floor(Math.random()*16)+48,Qe[r]>=58&&(Qe[r]+=39);return String.fromCharCode.apply(null,Qe.slice(0,t*2))}}var Je=class{constructor(e,r,n,o){c(this,"_sampler");c(this,"_generalLimits");c(this,"_spanLimits");c(this,"_idGenerator");c(this,"instrumentationScope");c(this,"_resource");c(this,"_spanProcessor");let s=mo(r);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=r.idGenerator||new Pt,this._resource=n,this._spanProcessor=o,this.instrumentationScope=e}startSpan(e,r={},n=S.active()){r.root&&(n=A.deleteSpan(n));let o=A.getSpan(n);if(ut(n))return T.debug("Instrumentation suppressed, returning Noop Span"),A.wrapSpanContext(Ut);let s=o?.spanContext(),i=this._idGenerator.generateSpanId(),a,p,u;!s||!A.isSpanContextValid(s)?p=this._idGenerator.generateTraceId():(p=s.traceId,u=s.traceState,a=s);let _=r.kind??Z.INTERNAL,f=(r.links??[]).map(m=>({context:m.context,attributes:_t(m.attributes)})),h=_t(r.attributes),R=this._sampler.shouldSample(n,p,e,_,h,f);u=R.traceState??u;let O=R.decision===At.RECORD_AND_SAMPLED?I.SAMPLED:I.NONE,L={traceId:p,spanId:i,traceFlags:O,traceState:u};if(R.decision===At.NOT_RECORD)return T.debug("Recording is off, propagating context in a non-recording span"),A.wrapSpanContext(L);let E=_t(Object.assign(h,R.attributes));return new ze({resource:this._resource,scope:this.instrumentationScope,context:n,spanContext:L,name:e,kind:_,links:f,parentSpanContext:a,attributes:E,startTime:r.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits})}startActiveSpan(e,r,n,o){let s,i,a;if(arguments.length<2)return;arguments.length===2?a=r:arguments.length===3?(s=r,a=n):(s=r,i=n,a=o);let p=i??S.active(),u=this.startSpan(e,s,p),_=A.setSpan(p,u);return S.with(_,a,void 0,u)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}};var Ze=class{constructor(e){c(this,"_spanProcessors");this._spanProcessors=e}forceFlush(){let e=[];for(let r of this._spanProcessors)e.push(r.forceFlush());return new Promise(r=>{Promise.all(e).then(()=>{r()}).catch(n=>{V(n||new Error("MultiSpanProcessor: forceFlush failed")),r()})})}onStart(e,r){for(let n of this._spanProcessors)n.onStart(e,r)}onEnd(e){for(let r of this._spanProcessors)r.onEnd(e)}shutdown(){let e=[];for(let r of this._spanProcessors)e.push(r.shutdown());return new Promise((r,n)=>{Promise.all(e).then(()=>{r()},n)})}};var dt;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(dt||(dt={}));var Qt=class{constructor(e={}){c(this,"_config");c(this,"_tracers",new Map);c(this,"_resource");c(this,"_activeSpanProcessor");let r=Gr({},$e(),ho(e));this._resource=r.resource??Fr(),this._config=Object.assign({},r,{resource:this._resource});let n=[];e.spanProcessors?.length&&n.push(...e.spanProcessors),this._activeSpanProcessor=new Ze(n)}getTracer(e,r,n){let o=`${e}@${r||""}:${n?.schemaUrl||""}`;return this._tracers.has(o)||this._tracers.set(o,new Je({name:e,version:r,schemaUrl:n?.schemaUrl},this._config,this._resource,this._activeSpanProcessor)),this._tracers.get(o)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,r=this._activeSpanProcessor._spanProcessors.map(n=>new Promise(o=>{let s,i=setTimeout(()=>{o(new Error(`Span processor did not completed within timeout period of ${e} ms`)),s=dt.timeout},e);n.forceFlush().then(()=>{clearTimeout(i),s!==dt.timeout&&(s=dt.resolved,o(s))}).catch(a=>{clearTimeout(i),s=dt.error,o(a)})}));return new Promise((n,o)=>{Promise.all(r).then(s=>{let i=s.filter(a=>a!==dt.resolved);i.length>0?o(i):n()}).catch(s=>o([s]))})}shutdown(){return this._activeSpanProcessor.shutdown()}};var Jt=class{export(e,r){return this._sendSpans(e,r)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(e){return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationScope,traceId:e.spanContext().traceId,parentSpanContext:e.parentSpanContext,traceState:e.spanContext().traceState?.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:Ve(e.startTime),duration:Ve(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}}_sendSpans(e,r){for(let n of e)console.dir(this._exportInfo(n),{depth:3});if(r)return r({code:b.SUCCESS})}};var Zt=class{constructor(e){c(this,"_exporter");c(this,"_shutdownOnce");c(this,"_pendingExports");this._exporter=e,this._shutdownOnce=new lt(this._shutdown,this),this._pendingExports=new Set}async forceFlush(){await Promise.all(Array.from(this._pendingExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(e,r){}onEnd(e){if(this._shutdownOnce.isCalled||(e.spanContext().traceFlags&I.SAMPLED)===0)return;let r=this._doExport(e).catch(n=>V(n));this._pendingExports.add(r),r.finally(()=>this._pendingExports.delete(r))}async _doExport(e){e.resource.asyncAttributesPending&&await e.resource.waitForAsyncAttributes?.();let r=await To._export(this._exporter,[e]);if(r.code!==b.SUCCESS)throw r.error??new Error(`SimpleSpanProcessor: span export failed (status ${r})`)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};var tr=class{constructor(){c(this,"_enabled",!1);c(this,"_currentContext",K)}_bindFunction(e=K,r){let n=this,o=function(...s){return n.with(e,()=>r.apply(this,s))};return Object.defineProperty(o,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),o}active(){return this._currentContext}bind(e,r){return e===void 0&&(e=this.active()),typeof r=="function"?this._bindFunction(e,r):r}disable(){return this._currentContext=K,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=K,this)}with(e,r,n,...o){let s=this._currentContext;this._currentContext=e||K;try{return r.call(n,...o)}finally{this._currentContext=s}}};function fa(t){if(t!==null){if(t===void 0){let e=new tr;e.enable(),S.setGlobalContextManager(e);return}t.enable(),S.setGlobalContextManager(t)}}function da(t){if(t!==null){if(t===void 0){C.setGlobalPropagator(new Wt({propagators:[new zt,new Ht]}));return}C.setGlobalPropagator(t)}}var te=class extends Qt{constructor(e={}){super(e)}register(e={}){A.setGlobalTracerProvider(this),da(e.propagator),fa(e.contextManager)}};var d;(function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.START_TIME="startTime",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"})(d||(d={}));var go="http.response_content_length",Ro="http.response_content_length_uncompressed";var Kr;function Sa(){return Kr||(Kr=document.createElement("a")),Kr}function et(t,e){return e in t}function P(t,e,r,n=!0){if(et(r,e)&&typeof r[e]=="number"&&!(n&&r[e]===0))return t.addEvent(e,r[e])}function $(t,e,r=!1,n,o){if(n===void 0&&(n=e[d.START_TIME]!==0),r||(P(t,d.FETCH_START,e,n),P(t,d.DOMAIN_LOOKUP_START,e,n),P(t,d.DOMAIN_LOOKUP_END,e,n),P(t,d.CONNECT_START,e,n),P(t,d.SECURE_CONNECTION_START,e,n),P(t,d.CONNECT_END,e,n),P(t,d.REQUEST_START,e,n),P(t,d.RESPONSE_START,e,n),P(t,d.RESPONSE_END,e,n)),!o){let s=e[d.ENCODED_BODY_SIZE];s!==void 0&&t.setAttribute(go,s);let i=e[d.DECODED_BODY_SIZE];i!==void 0&&s!==i&&t.setAttribute(Ro,i)}}function Oo(t){return t.slice().sort((e,r)=>{let n=e[d.FETCH_START],o=r[d.FETCH_START];return n>o?1:n<o?-1:0})}function Lo(){return typeof location<"u"?location.origin:void 0}function ee(t,e,r,n,o=new WeakSet,s){let i=F(t);t=i.toString();let a=ha(t,e,r,n,o,s);if(a.length===0)return{mainRequest:void 0};if(a.length===1)return{mainRequest:a[0]};let p=Oo(a);if(i.origin!==Lo()&&p.length>1){let u=p[0],_=ma(p,u[d.RESPONSE_END],r),f=u[d.RESPONSE_END];return _[d.FETCH_START]<f&&(_=u,u=void 0),{corsPreFlightRequest:u,mainRequest:_}}else return{mainRequest:a[0]}}function ma(t,e,r){let n=B(r),o=B(Et(e)),s=t[1],i,a=t.length;for(let p=1;p<a;p++){let u=t[p],_=B(Et(u[d.FETCH_START])),f=B(Et(u[d.RESPONSE_END])),h=n-f;_>=o&&(!i||h<i)&&(i=h,s=u)}return s}function ha(t,e,r,n,o,s){let i=B(e),a=B(r),p=n.filter(u=>{let _=B(Et(u[d.FETCH_START])),f=B(Et(u[d.RESPONSE_END]));return u.initiatorType.toLowerCase()===(s||"xmlhttprequest")&&u.name===t&&_>=i&&f<=a});return p.length>0&&(p=p.filter(u=>!o.has(u))),p}function F(t){if(typeof URL=="function")return new URL(t,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);let e=Sa();return e.href=t,e}function er(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";let r=ga(t,e);if(e&&r.indexOf("@id")>0)return r;let n="";return t.parentNode&&(n+=er(t.parentNode,!1)),n+=r,n}function Aa(t){if(!t.parentNode)return 0;let e=[t.nodeType];t.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);let r=Array.from(t.parentNode.childNodes);return r=r.filter(n=>{let o=n.localName;return e.indexOf(n.nodeType)>=0&&o===t.localName}),r.length>=1?r.indexOf(t)+1:0}function ga(t,e){let r=t.nodeType,n=Aa(t),o="";if(r===Node.ELEMENT_NODE){let s=t.getAttribute("id");if(e&&s)return`//*[@id="${s}"]`;o=t.localName}else if(r===Node.TEXT_NODE||r===Node.CDATA_SECTION_NODE)o="text()";else if(r===Node.COMMENT_NODE)o="comment()";else return"";return o&&n>1?`/${o}[${n}]`:`/${o}`}function re(t,e){let r=e||[];return(typeof r=="string"||r instanceof RegExp)&&(r=[r]),F(t).origin===Lo()?!0:r.some(o=>Ye(t,o))}var ne=class{constructor(e){c(this,"_delegate");this._delegate=e}export(e,r){this._delegate.export(e,r)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}};var oe=class extends Error{constructor(r,n,o){super(r);c(this,"code");c(this,"name","OTLPExporterError");c(this,"data");this.data=o,this.code=n}};function Oa(t){if(Number.isFinite(t)&&t>0)return t;throw new Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${t}')`)}function xo(t){if(t!=null)return async()=>t}function No(t,e,r){return{timeoutMillis:Oa(t.timeoutMillis??e.timeoutMillis??r.timeoutMillis),concurrencyLimit:t.concurrencyLimit??e.concurrencyLimit??r.concurrencyLimit,compression:t.compression??e.compression??r.compression}}function Po(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var Yr=class{constructor(e){c(this,"_concurrencyLimit");c(this,"_sendingPromises",[]);this._concurrencyLimit=e}pushPromise(e){if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(e);let r=()=>{let n=this._sendingPromises.indexOf(e);this._sendingPromises.splice(n,1)};e.then(r,r)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}};function Co(t){return new Yr(t.concurrencyLimit)}function La(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function Mo(){return{handleResponse(t){t==null||!La(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||T.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var jr=class{constructor(e,r,n,o,s){c(this,"_transport");c(this,"_serializer");c(this,"_responseHandler");c(this,"_promiseQueue");c(this,"_timeout");c(this,"_diagLogger");this._transport=e,this._serializer=r,this._responseHandler=n,this._promiseQueue=o,this._timeout=s,this._diagLogger=T.createComponentLogger({namespace:"OTLPExportDelegate"})}export(e,r){if(this._diagLogger.debug("items to be sent",e),this._promiseQueue.hasReachedLimit()){r({code:b.FAILED,error:new Error("Concurrent export limit reached")});return}let n=this._serializer.serializeRequest(e);if(n==null){r({code:b.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(n,this._timeout).then(o=>{if(o.status==="success"){if(o.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(o.data))}catch(s){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",s,o.data)}r({code:b.SUCCESS});return}else if(o.status==="failure"&&o.error){r({code:b.FAILED,error:o.error});return}else o.status==="retryable"?r({code:b.FAILED,error:new oe("Export failed with retryable status")}):r({code:b.FAILED,error:new oe("Export failed with unknown error")})},o=>r({code:b.FAILED,error:o})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}};function yo(t,e){return new jr(t.transport,t.serializer,Mo(),t.promiseHandler,e.timeout)}function rr(t,e,r){return yo({transport:r,serializer:e,promiseHandler:Co(t)},{timeout:t.timeoutMillis})}function Io(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function nr(t){let e=new Uint8Array(t.length/2),r=0;for(let n=0;n<t.length;n+=2){let o=Io(t.charCodeAt(n)),s=Io(t.charCodeAt(n+1));e[r++]=o<<4|s}return e}function vo(t){let e=BigInt(1e9);return BigInt(Math.trunc(t[0]))*e+BigInt(Math.trunc(t[1]))}function xa(t){let e=Number(BigInt.asUintN(32,t)),r=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:r}}function Do(t){let e=vo(t);return xa(e)}function Na(t){return vo(t).toString()}var Pa=typeof BigInt<"u"?Na:B;function bo(t){return t}function Uo(t){if(t!==void 0)return nr(t)}var Ca={encodeHrTime:Do,encodeSpanContext:nr,encodeOptionalSpanContext:Uo};function wo(t){if(t===void 0)return Ca;let e=t.useLongBits??!0,r=t.useHex??!1;return{encodeHrTime:e?Do:Pa,encodeSpanContext:r?bo:nr,encodeOptionalSpanContext:r?bo:Uo}}function Vo(t){let e={attributes:se(t.attributes),droppedAttributesCount:0},r=t.schemaUrl;return r&&r!==""&&(e.schemaUrl=r),e}function Go(t){return{name:t.name,version:t.version}}function se(t){return Object.keys(t).map(e=>Ho(e,t[e]))}function Ho(t,e){return{key:t,value:Bo(e)}}function Bo(t){let e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(Bo)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(([r,n])=>Ho(r,n))}}:{}}var Ma=256,ya=512;function Fo(t,e){let r=t&255|Ma;return e&&(r|=ya),r}function Ia(t,e){let r=t.spanContext(),n=t.status,o=t.parentSpanContext?.spanId?e.encodeSpanContext(t.parentSpanContext?.spanId):void 0;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:o,traceState:r.traceState?.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:se(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(s=>va(s,e)),droppedEventsCount:t.droppedEventsCount,status:{code:n.code,message:n.message},links:t.links.map(s=>ba(s,e)),droppedLinksCount:t.droppedLinksCount,flags:Fo(r.traceFlags,t.parentSpanContext?.isRemote)}}function ba(t,e){return{attributes:t.attributes?se(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:t.context.traceState?.serialize(),droppedAttributesCount:t.droppedAttributesCount||0,flags:Fo(t.context.traceFlags,t.context.isRemote)}}function va(t,e){return{attributes:t.attributes?se(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function ko(t,e){let r=wo(e);return{resourceSpans:Ua(t,r)}}function Da(t){let e=new Map;for(let r of t){let n=e.get(r.resource);n||(n=new Map,e.set(r.resource,n));let o=`${r.instrumentationScope.name}@${r.instrumentationScope.version||""}:${r.instrumentationScope.schemaUrl||""}`,s=n.get(o);s||(s=[],n.set(o,s)),s.push(r)}return e}function Ua(t,e){let r=Da(t),n=[],o=r.entries(),s=o.next();for(;!s.done;){let[i,a]=s.value,p=[],u=a.values(),_=u.next();for(;!_.done;){let R=_.value;if(R.length>0){let O=R.map(L=>Ia(L,e));p.push({scope:Go(R[0].instrumentationScope),spans:O,schemaUrl:R[0].instrumentationScope.schemaUrl})}_=u.next()}let f=Vo(i),h={resource:f,scopeSpans:p,schemaUrl:f.schemaUrl};n.push(h),s=o.next()}return n}var or={serializeRequest:t=>{let e=ko(t,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:t=>{if(t.length===0)return{};let e=new TextDecoder;return JSON.parse(e.decode(t))}};function wa(){return Math.random()*(2*.2)-.2}var Wr=class{constructor(e){c(this,"_transport");this._transport=e}retry(e,r,n){return new Promise((o,s)=>{setTimeout(()=>{this._transport.send(e,r).then(o,s)},n)})}async send(e,r){let n=Date.now()+r,o=await this._transport.send(e,r),s=5,i=1e3;for(;o.status==="retryable"&&s>0;){s--;let a=Math.max(Math.min(i,5e3)+wa(),0);i=i*1.5;let p=o.retryInMillis??a,u=n-Date.now();if(p>u)return o;o=await this.retry(e,u,p)}return o}shutdown(){return this._transport.shutdown()}};function sr(t){return new Wr(t.transport)}function ir(t){return[429,502,503,504].includes(t)}function ar(t){if(t==null)return;let e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;let r=new Date(t).getTime()-Date.now();return r>=0?r:0}var zr=class{constructor(e){c(this,"_parameters");this._parameters=e}async send(e,r){let n=await this._parameters.headers();return await new Promise(s=>{let i=new XMLHttpRequest;i.timeout=r,i.open("POST",this._parameters.url),Object.entries(n).forEach(([a,p])=>{i.setRequestHeader(a,p)}),i.ontimeout=a=>{s({status:"failure",error:new Error("XHR request timed out")})},i.onreadystatechange=()=>{i.status>=200&&i.status<=299?(T.debug("XHR success"),s({status:"success"})):i.status&&ir(i.status)?s({status:"retryable",retryInMillis:ar(i.getResponseHeader("Retry-After"))}):i.status!==0&&s({status:"failure",error:new Error("XHR request failed with non-retryable status")})},i.onabort=()=>{s({status:"failure",error:new Error("XHR request aborted")})},i.onerror=()=>{s({status:"failure",error:new Error("XHR request errored")})},i.send(e)})}shutdown(){}};function Ko(t){return new zr(t)}var Xr=class{constructor(e){c(this,"_params");this._params=e}async send(e){let r=(await this._params.headers())["Content-Type"];return new Promise(n=>{navigator.sendBeacon(this._params.url,new Blob([e],{type:r}))?(T.debug("SendBeacon success"),n({status:"success"})):n({status:"failure",error:new Error("SendBeacon failed")})})}shutdown(){}};function Yo(t){return new Xr(t)}var $r=class{constructor(e){c(this,"_parameters");this._parameters=e}async send(e,r){let n=new AbortController,o=setTimeout(()=>n.abort(),r);try{let s=!!globalThis.location,i=new URL(this._parameters.url),a=await fetch(i.href,{method:"POST",headers:await this._parameters.headers(),body:e,signal:n.signal,keepalive:s,mode:s?globalThis.location?.origin===i.origin?"same-origin":"cors":"no-cors"});if(a.status>=200&&a.status<=299)return T.debug("response success"),{status:"success"};if(ir(a.status)){let p=a.headers.get("Retry-After");return{status:"retryable",retryInMillis:ar(p)}}return{status:"failure",error:new Error("Fetch request failed with non-retryable status")}}catch(s){return s?.name==="AbortError"?{status:"failure",error:new Error("Fetch request timed out",{cause:s})}:{status:"failure",error:new Error("Fetch request errored",{cause:s})}}finally{clearTimeout(o)}}shutdown(){}};function jo(t){return new $r(t)}function Wo(t,e){return rr(t,e,sr({transport:Ko(t)}))}function zo(t,e){return rr(t,e,sr({transport:jo(t)}))}function Xo(t,e){return rr(t,e,sr({transport:Yo({url:t.url,headers:t.headers})}))}function $o(t){let e={};return Object.entries(t??{}).forEach(([r,n])=>{typeof n<"u"?e[r]=String(n):T.warn(`Header "${r}" has invalid value (${n}) and will be ignored`)}),e}function Va(t,e,r){return async()=>{let n={...await r()},o={};return e!=null&&Object.assign(o,await e()),t!=null&&Object.assign(o,$o(await t())),Object.assign(o,n)}}function Ga(t){if(t!=null)try{let e=globalThis.location?.href;return new URL(t,e).href}catch{throw new Error(`Configuration: Could not parse user-provided export URL: '${t}'`)}}function qo(t,e,r){return{...No(t,e,r),headers:Va(t.headers,e.headers,r.headers),url:Ga(t.url)??e.url??r.url}}function Qo(t,e){return{...Po(),headers:async()=>t,url:"http://localhost:4318/"+e}}function Jo(t){return typeof t.headers=="function"?t.headers:xo(t.headers)}function Zo(t,e,r){return qo({url:t.url,timeoutMillis:t.timeoutMillis,headers:Jo(t),concurrencyLimit:t.concurrencyLimit},{},Qo(r,e))}function qr(t,e,r,n){let o=Ha(t.headers),s=Zo(t,r,n);return o(s,e)}function Ha(t){return!t&&typeof navigator.sendBeacon=="function"?Xo:typeof globalThis.fetch<"u"?zo:Wo}var Ct=class extends ne{constructor(e={}){super(qr(e,or,"v1/traces",{"Content-Type":"application/json"}))}};var ie=class{emit(e){}},ts=new ie;var Qr=class{getLogger(e,r,n){return new ie}},cr=new Qr;var pr=class{constructor(e,r,n,o){this._provider=e,this.name=r,this.version=n,this.options=o}emit(e){this._getLogger().emit(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider._getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):ts}};var ae=class{getLogger(e,r,n){var o;return(o=this._getDelegateLogger(e,r,n))!==null&&o!==void 0?o:new pr(this,e,r,n)}_getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:cr}_setDelegate(e){this._delegate=e}_getDelegateLogger(e,r,n){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(e,r,n)}};var Jr=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};var ce=Symbol.for("io.opentelemetry.js.api.logs"),Mt=Jr;function es(t,e,r){return n=>n===t?e:r}var Zr=1;var ur=class t{constructor(){this._proxyLoggerProvider=new ae}static getInstance(){return this._instance||(this._instance=new t),this._instance}setGlobalLoggerProvider(e){return Mt[ce]?this.getLoggerProvider():(Mt[ce]=es(Zr,e,cr),this._proxyLoggerProvider._setDelegate(e),e)}getLoggerProvider(){var e,r;return(r=(e=Mt[ce])===null||e===void 0?void 0:e.call(Mt,Zr))!==null&&r!==void 0?r:this._proxyLoggerProvider}getLogger(e,r,n){return this.getLoggerProvider().getLogger(e,r,n)}disable(){delete Mt[ce],this._proxyLoggerProvider=new ae}};var _r=ur.getInstance();function rs(t,e,r,n){for(let o=0,s=t.length;o<s;o++){let i=t[o];e&&i.setTracerProvider(e),r&&i.setMeterProvider(r),n&&i.setLoggerProvider&&i.setLoggerProvider(n),i.getConfig().enabled||i.enable()}}function ns(t){t.forEach(e=>e.disable())}function tn(t){let e=t.tracerProvider||A.getTracerProvider(),r=t.meterProvider||Vt.getMeterProvider(),n=t.loggerProvider||_r.getLoggerProvider(),o=t.instrumentations?.flat()??[];return rs(o,e,r,n),()=>{ns(o)}}var D=console.error.bind(console);function pe(t,e,r){let n=!!t[e]&&Object.prototype.propertyIsEnumerable.call(t,e);Object.defineProperty(t,e,{configurable:!0,enumerable:n,writable:!0,value:r})}var Er=(t,e,r)=>{if(!t||!t[e]){D("no original function "+String(e)+" to wrap");return}if(!r){D("no wrapper function"),D(new Error().stack);return}let n=t[e];if(typeof n!="function"||typeof r!="function"){D("original object and wrapper must be functions");return}let o=r(n,e);return pe(o,"__original",n),pe(o,"__unwrap",()=>{t[e]===o&&pe(t,e,n)}),pe(o,"__wrapped",!0),pe(t,e,o),o},en=(t,e,r)=>{if(t)Array.isArray(t)||(t=[t]);else{D("must provide one or more modules to patch"),D(new Error().stack);return}if(!(e&&Array.isArray(e))){D("must provide one or more functions to wrap on modules");return}t.forEach(n=>{e.forEach(o=>{Er(n,o,r)})})},Tr=(t,e)=>{if(!t||!t[e]){D("no function to unwrap."),D(new Error().stack);return}let r=t[e];if(!r.__unwrap)D("no original to unwrap to -- has "+String(e)+" already been unwrapped?");else{r.__unwrap();return}},rn=(t,e)=>{if(t)Array.isArray(t)||(t=[t]);else{D("must provide one or more modules to patch"),D(new Error().stack);return}if(!(e&&Array.isArray(e))){D("must provide one or more functions to unwrap on modules");return}t.forEach(r=>{e.forEach(n=>{Tr(r,n)})})};function ue(t){t&&t.logger&&(typeof t.logger!="function"?D("new logger isn't a function, not replacing"):D=t.logger)}ue.wrap=Er;ue.massWrap=en;ue.unwrap=Tr;ue.massUnwrap=rn;var lr=class{constructor(e,r,n){c(this,"instrumentationName");c(this,"instrumentationVersion");c(this,"_config",{});c(this,"_tracer");c(this,"_meter");c(this,"_logger");c(this,"_diag");c(this,"_wrap",Er);c(this,"_unwrap",Tr);c(this,"_massWrap",en);c(this,"_massUnwrap",rn);this.instrumentationName=e,this.instrumentationVersion=r,this.setConfig(n),this._diag=T.createComponentLogger({namespace:e}),this._tracer=A.getTracer(e,r),this._meter=Vt.getMeter(e,r),this._logger=_r.getLogger(e,r),this._updateMetricInstruments()}get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let e=this.init()??[];return Array.isArray(e)?e:[e]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config={enabled:!0,...e}}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,r,n,o){if(e)try{e(n,o)}catch(s){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},s)}}};var k=class extends lr{constructor(e,r,n){super(e,r,n),this._config.enabled&&this.enable()}};function rt(t,e,r){let n,o;try{o=t()}catch(s){n=s}finally{if(e(n,o),n&&!r)throw n;return o}}function x(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var g;(function(t){t[t.STABLE=1]="STABLE",t[t.OLD=2]="OLD",t[t.DUPLICATE=3]="DUPLICATE"})(g||(g={}));function St(t,e){let r=g.OLD,n=e?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of n??[])if(o.toLowerCase()===t+"/dup"){r=g.DUPLICATE;break}else o.toLowerCase()===t&&(r=g.STABLE);return r}var mt;(function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"})(mt||(mt={}));var os="0.54.0",ss="@opentelemetry/instrumentation-document-load";var fr="http.url",is="http.user_agent";var _e;(function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(_e||(_e={}));var cs=()=>{let t={},e=M.getEntriesByType?.("navigation")[0];if(e)Object.values(d).forEach(n=>{if(et(e,n)){let o=e[n];typeof o=="number"&&(t[n]=o)}});else{let n=M.timing;n&&Object.values(d).forEach(s=>{if(et(n,s)){let i=n[s];typeof i=="number"&&(t[s]=i)}})}return t},as={"first-paint":_e.FIRST_PAINT,"first-contentful-paint":_e.FIRST_CONTENTFUL_PAINT},ps=t=>{let e=M.getEntriesByType?.("paint");e&&e.forEach(({name:r,startTime:n})=>{et(as,r)&&t.addEvent(as[r],n)})};var Ee=class extends k{constructor(r={}){super(ss,os,r);c(this,"component","document-load");c(this,"version","1");c(this,"moduleName",this.component);c(this,"_semconvStability");this._semconvStability=St("http",r?.semconvStabilityOptIn)}init(){}_onDocumentLoaded(){window.setTimeout(()=>{this._collectPerformance()})}_addResourcesSpans(r){let n=M.getEntriesByType?.("resource");n&&n.forEach(o=>{this._initResourceSpan(o,r)})}_collectPerformance(){let r=Array.from(document.getElementsByTagName("meta")).find(s=>s.getAttribute("name")===Lt),n=cs(),o=r&&r.content||"";S.with(C.extract(K,{traceparent:o}),()=>{let s=this._startSpan(mt.DOCUMENT_LOAD,d.FETCH_START,n);s&&(S.with(A.setSpan(S.active(),s),()=>{let i=this._startSpan(mt.DOCUMENT_FETCH,d.FETCH_START,n);i&&(this._semconvStability&g.OLD&&i.setAttribute(fr,location.href),this._semconvStability&g.STABLE&&i.setAttribute(it,location.href),S.with(A.setSpan(S.active(),i),()=>{let a=!(this._semconvStability&g.OLD);$(i,n,this.getConfig().ignoreNetworkEvents,void 0,a),this._addCustomAttributesOnSpan(i,this.getConfig().applyCustomAttributesOnSpan?.documentFetch),this._endSpan(i,d.RESPONSE_END,n)}))}),this._semconvStability&g.OLD&&(s.setAttribute(fr,location.href),s.setAttribute(is,navigator.userAgent)),this._semconvStability&g.STABLE&&(s.setAttribute(it,location.href),s.setAttribute(Qn,navigator.userAgent)),this._addResourcesSpans(s),this.getConfig().ignoreNetworkEvents||(P(s,d.FETCH_START,n),P(s,d.UNLOAD_EVENT_START,n),P(s,d.UNLOAD_EVENT_END,n),P(s,d.DOM_INTERACTIVE,n),P(s,d.DOM_CONTENT_LOADED_EVENT_START,n),P(s,d.DOM_CONTENT_LOADED_EVENT_END,n),P(s,d.DOM_COMPLETE,n),P(s,d.LOAD_EVENT_START,n),P(s,d.LOAD_EVENT_END,n)),this.getConfig().ignorePerformancePaintEvents||ps(s),this._addCustomAttributesOnSpan(s,this.getConfig().applyCustomAttributesOnSpan?.documentLoad),this._endSpan(s,d.LOAD_EVENT_END,n))})}_endSpan(r,n,o){r&&(et(o,n)?r.end(o[n]):r.end())}_initResourceSpan(r,n){let o=this._startSpan(mt.RESOURCE_FETCH,d.FETCH_START,r,n);if(o){this._semconvStability&g.OLD&&o.setAttribute(fr,r.name),this._semconvStability&g.STABLE&&o.setAttribute(it,r.name);let s=!(this._semconvStability&g.OLD);$(o,r,this.getConfig().ignoreNetworkEvents,void 0,s),this._addCustomAttributesOnResourceSpan(o,r,this.getConfig().applyCustomAttributesOnSpan?.resourceFetch),this._endSpan(o,d.RESPONSE_END,r)}}_startSpan(r,n,o,s){if(et(o,n)&&typeof o[n]=="number")return this.tracer.startSpan(r,{startTime:o[n]},s?A.setSpan(S.active(),s):void 0)}_waitForPageLoad(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))}_addCustomAttributesOnSpan(r,n){n&&rt(()=>n(r),o=>{o&&this._diag.error("addCustomAttributesOnSpan",o)},!0)}_addCustomAttributesOnResourceSpan(r,n,o){o&&rt(()=>o(r,n),s=>{s&&this._diag.error("addCustomAttributesOnResourceSpan",s)},!0)}enable(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()}disable(){window.removeEventListener("load",this._onDocumentLoaded)}};var Te;(function(t){t.COMPONENT="component",t.HTTP_STATUS_TEXT="http.status_text"})(Te||(Te={}));var us="http.host",_s="http.method",Es="http.request.body.size",Ts="http.request_content_length_uncompressed";var ls="http.scheme",fs="http.status_code",ds="http.url",Ss="http.user_agent";var ms=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function hs(...t){if(t[0]instanceof URL||typeof t[0]=="string"){let e=t[1];if(!e?.body)return Promise.resolve();if(e.body instanceof ReadableStream){let{body:r,length:n}=Fa(e.body);return e.body=r,n}else return Promise.resolve(Ka(e.body))}else{let e=t[0];return e?.body?e.clone().text().then(r=>nn(r)):Promise.resolve()}}function Fa(t){if(!t.pipeThrough)return ms.warn("Platform has ReadableStream but not pipeThrough!"),{body:t,length:Promise.resolve(void 0)};let e=0,r,n=new Promise(s=>{r=s}),o=new TransformStream({start(){},async transform(s,i){let a=await s;e+=a.byteLength,i.enqueue(s)},flush(){r(e)}});return{body:t.pipeThrough(o),length:n}}function ka(t){return typeof Document<"u"&&t instanceof Document}function Ka(t){if(ka(t))return new XMLSerializer().serializeToString(document).length;if(typeof t=="string")return nn(t);if(t instanceof Blob)return t.size;if(t instanceof FormData)return ja(t);if(t instanceof URLSearchParams)return nn(t.toString());if(t.byteLength!==void 0)return t.byteLength;ms.warn("unknown body type")}var Ya=new TextEncoder;function nn(t){return Ya.encode(t).byteLength}function ja(t){let e=0;for(let[r,n]of t.entries())e+=r.length,n instanceof Blob?e+=n.size:e+=n.length;return e}function As(t){let e=za(),r=t.toUpperCase();return r in e?r:"_OTHER"}var Wa={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0},le;function za(){if(le===void 0){let t=void 0;t&&t.length>0?(le={},t.forEach(e=>{le[e]=!0})):le=Wa}return le}var Xa={"https:":"443","http:":"80"};function gs(t){let e=Number(t.port||Xa[t.protocol]);if(e&&!isNaN(e))return e}var on="0.208.0";var $a=300,Rs=typeof process=="object"&&process.release?.name==="node",fe=class extends k{constructor(r={}){super("@opentelemetry/instrumentation-fetch",on,r);c(this,"component","fetch");c(this,"version",on);c(this,"moduleName",this.component);c(this,"_usedResources",new WeakSet);c(this,"_tasksCount",0);c(this,"_semconvStability");this._semconvStability=St("http",r?.semconvStabilityOptIn)}init(){}_addChildSpan(r,n){let o=this.tracer.startSpan("CORS Preflight",{startTime:n[d.FETCH_START]},A.setSpan(S.active(),r)),s=!(this._semconvStability&g.OLD);$(o,n,this.getConfig().ignoreNetworkEvents,void 0,s),o.end(n[d.RESPONSE_END])}_addFinalSpanAttributes(r,n){let o=F(n.url);if(this._semconvStability&g.OLD&&(r.setAttribute(fs,n.status),n.statusText!=null&&r.setAttribute(Te.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(us,o.host),r.setAttribute(ls,o.protocol.replace(":","")),typeof navigator<"u"&&r.setAttribute(Ss,navigator.userAgent)),this._semconvStability&g.STABLE){r.setAttribute(ve,n.status),r.setAttribute(De,o.hostname);let s=gs(o);s&&r.setAttribute(Ue,s)}}_addHeaders(r,n){if(!re(n,this.getConfig().propagateTraceHeaderCorsUrls)){let o={};C.inject(S.active(),o),Object.keys(o).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(r instanceof Request)C.inject(S.active(),r.headers,{set:(o,s,i)=>o.set(s,typeof i=="string"?i:String(i))});else if(r.headers instanceof Headers)C.inject(S.active(),r.headers,{set:(o,s,i)=>o.set(s,typeof i=="string"?i:String(i))});else if(r.headers instanceof Map)C.inject(S.active(),r.headers,{set:(o,s,i)=>o.set(s,typeof i=="string"?i:String(i))});else{let o={};C.inject(S.active(),o),r.headers=Object.assign({},o,r.headers||{})}}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}_createSpan(r,n={}){if($t(r,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}let o="",s={};if(this._semconvStability&g.OLD){let i=(n.method||"GET").toUpperCase();o=`HTTP ${i}`,s[Te.COMPONENT]=this.moduleName,s[_s]=i,s[ds]=r}if(this._semconvStability&g.STABLE){let i=n.method,a=As(n.method||"GET");o||(o=a),s[Ie]=a,a!==i&&(s[be]=i),s[it]=r}return this.tracer.startSpan(o,{kind:Z.CLIENT,attributes:s})}_findResourceAndAddNetworkEvents(r,n,o){let s=n.entries;if(!s.length){if(!performance.getEntriesByType)return;s=performance.getEntriesByType("resource")}let i=ee(n.spanUrl,n.startTime,o,s,this._usedResources,"fetch");if(i.mainRequest){let a=i.mainRequest;this._markResourceAsUsed(a);let p=i.corsPreFlightRequest;p&&(this._addChildSpan(r,p),this._markResourceAsUsed(p));let u=!(this._semconvStability&g.OLD);$(r,a,this.getConfig().ignoreNetworkEvents,void 0,u)}}_markResourceAsUsed(r){this._usedResources.add(r)}_endSpan(r,n,o){let s=G(Date.now()),i=H();this._addFinalSpanAttributes(r,o),this._semconvStability&g.STABLE&&o.status>=400&&(r.setStatus({code:W.ERROR}),r.setAttribute(Bt,String(o.status))),setTimeout(()=>{n.observer?.disconnect(),this._findResourceAndAddNetworkEvents(r,n,i),this._tasksCount--,this._clearResources(),r.end(s)},$a)}_patchConstructor(){return r=>{let n=this;return function(...s){let i=this,a=F(s[0]instanceof Request?s[0].url:String(s[0])).href,p=s[0]instanceof Request?s[0]:s[1]||{},u=n._createSpan(a,p);if(!u)return r.apply(this,s);let _=n._prepareSpanData(a);n.getConfig().measureRequestSize&&hs(...s).then(E=>{E&&(n._semconvStability&g.OLD&&u.setAttribute(Ts,E),n._semconvStability&g.STABLE&&u.setAttribute(Es,E))}).catch(E=>{n._diag.warn("getFetchBodyLength",E)});function f(E,l){n._applyAttributesAfterFetch(E,p,l),n._endSpan(E,_,{status:l.status||0,statusText:l.message,url:a})}function h(E,l){n._applyAttributesAfterFetch(E,p,l),l.status>=200&&l.status<400?n._endSpan(E,_,l):n._endSpan(E,_,{status:l.status,statusText:l.statusText,url:a})}function R(E,l){if(!E)return null;let m=E.getReader();return new ReadableStream({async pull(N){try{let{value:U,done:nt}=await m.read();nt?(m.releaseLock(),N.close()):N.enqueue(U)}catch(U){N.error(U),m.cancel(U).catch(nt=>{});try{m.releaseLock()}catch{}}},cancel(N){return l.cancel(N).catch(U=>{}),m.cancel(N)}})}function O(E,l,m){let N=null;try{let nt=m.clone().body;if(nt){let It=nt.getReader(),he=m.status===204||m.status===205||m.status===304?null:R(m.body,It);N=new Response(he,{status:m.status,statusText:m.statusText,headers:m.headers});let un=()=>{It.read().then(({done:mr})=>{mr?h(E,m):un()},mr=>{f(E,mr)})};un()}else h(E,m)}finally{l(N??m)}}function L(E,l,m){try{f(E,m)}finally{l(m)}}return new Promise((E,l)=>S.with(A.setSpan(S.active(),u),()=>(n._addHeaders(p,a),n._callRequestHook(u,p),n._tasksCount++,r.apply(i,p instanceof Request?[p]:[a,p]).then(O.bind(i,u,E),L.bind(i,u,l)))))}}}_applyAttributesAfterFetch(r,n,o){let s=this.getConfig().applyCustomAttributesOnSpan;s&&rt(()=>s(r,n,o),i=>{i&&this._diag.error("applyCustomAttributesOnSpan",i)},!0)}_callRequestHook(r,n){let o=this.getConfig().requestHook;o&&rt(()=>o(r,n),s=>{s&&this._diag.error("requestHook",s)},!0)}_prepareSpanData(r){let n=H(),o=[];if(typeof PerformanceObserver!="function")return{entries:o,startTime:n,spanUrl:r};let s=new PerformanceObserver(i=>{i.getEntries().forEach(p=>{p.initiatorType==="fetch"&&p.name===r&&o.push(p)})});return s.observe({entryTypes:["resource"]}),{entries:o,observer:s,startTime:n,spanUrl:r}}enable(){if(Rs){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}x(fetch)&&(this._unwrap(Rt,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Rt,"fetch",this._patchConstructor())}disable(){Rs||(this._unwrap(Rt,"fetch"),this._usedResources=new WeakSet)}};var ht;(function(t){t.EVENT_TYPE="event_type",t.TARGET_ELEMENT="target_element",t.TARGET_XPATH="target_xpath",t.HTTP_URL="http.url"})(ht||(ht={}));var sn="0.53.0",Os="@opentelemetry/instrumentation-user-interaction";var qa="OT_ZONE_CONTEXT",Qa="Navigation:",Ja=["click"];function Za(){return!1}var de=class extends k{constructor(r={}){super(Os,sn,r);c(this,"version",sn);c(this,"moduleName","user-interaction");c(this,"_spansData",new WeakMap);c(this,"_wrappedListeners",new WeakMap);c(this,"_eventsSpanMap",new WeakMap);c(this,"_eventNames");c(this,"_shouldPreventSpanCreation");this._eventNames=new Set(r?.eventNames??Ja),this._shouldPreventSpanCreation=typeof r?.shouldPreventSpanCreation=="function"?r.shouldPreventSpanCreation:Za}init(){}_checkForTimeout(r,n){let o=this._spansData.get(n);o&&(r.source==="setTimeout"?o.hrTimeLastTimeout=H():r.source!=="Promise.then"&&r.source!=="setTimeout"&&(o.hrTimeLastTimeout=void 0))}_allowEventName(r){return this._eventNames.has(r)}_createSpan(r,n,o){if(!(r instanceof HTMLElement)||!r.getAttribute||r.hasAttribute("disabled")||!this._allowEventName(n))return;let s=er(r,!0);try{let i=this.tracer.startSpan(n,{attributes:{[ht.EVENT_TYPE]:n,[ht.TARGET_ELEMENT]:r.tagName,[ht.TARGET_XPATH]:s,[ht.HTTP_URL]:window.location.href}},o?A.setSpan(S.active(),o):void 0);return this._shouldPreventSpanCreation(n,r,i)===!0?void 0:(this._spansData.set(i,{taskCount:0}),i)}catch(i){this._diag.error("failed to start create new user interaction span",i)}}_decrementTask(r){let n=this._spansData.get(r);n&&(n.taskCount--,n.taskCount===0&&this._tryToEndSpan(r,n.hrTimeLastTimeout))}_getCurrentSpan(r){let n=r.get(qa);return n&&A.getSpan(n)}_incrementTask(r){let n=this._spansData.get(r);n&&n.taskCount++}addPatchedListener(r,n,o,s){let i=this._wrappedListeners.get(o);i||(i=new Map,this._wrappedListeners.set(o,i));let a=i.get(n);return a||(a=new Map,i.set(n,a)),a.has(r)?!1:(a.set(r,s),!0)}removePatchedListener(r,n,o){let s=this._wrappedListeners.get(o);if(!s)return;let i=s.get(n);if(!i)return;let a=i.get(r);return a&&(i.delete(r),i.size===0&&(s.delete(n),s.size===0&&this._wrappedListeners.delete(o))),a}_invokeListener(r,n,o){return typeof r=="function"?r.apply(n,o):r.handleEvent(o[0])}_patchAddEventListener(){let r=this;return n=>function(s,i,a){if(!i)return n.call(this,s,i,a);let p=a&&typeof a=="object"&&a.once,u=function(..._){let f,h=_[0],R=h?.target;h&&(f=r._eventsSpanMap.get(h)),p&&r.removePatchedListener(this,s,i);let O=r._createSpan(R,s,f);return O?(h&&r._eventsSpanMap.set(h,O),S.with(A.setSpan(S.active(),O),()=>{let L=r._invokeListener(i,this,_);return O.end(),L})):r._invokeListener(i,this,_)};if(r.addPatchedListener(this,s,i,u))return n.call(this,s,u,a)}}_patchRemoveEventListener(){let r=this;return n=>function(s,i,a){let p=r.removePatchedListener(this,s,i);return p?n.call(this,s,p,a):n.call(this,s,i,a)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())}_patchHistoryMethod(){let r=this;return n=>function(...s){let i=`${location.pathname}${location.hash}${location.search}`,a=n.apply(this,s),p=`${location.pathname}${location.hash}${location.search}`;return i!==p&&r._updateInteractionName(p),a}}_unpatchHistoryApi(){x(history.replaceState)&&this._unwrap(history,"replaceState"),x(history.pushState)&&this._unwrap(history,"pushState"),x(history.back)&&this._unwrap(history,"back"),x(history.forward)&&this._unwrap(history,"forward"),x(history.go)&&this._unwrap(history,"go")}_updateInteractionName(r){let n=A.getSpan(S.active());n&&typeof n.updateName=="function"&&n.updateName(`${Qa} ${r}`)}_patchZoneCancelTask(){let r=this;return n=>function(s){let i=Zone.current,a=r._getCurrentSpan(i);return a&&r._shouldCountTask(s,i)&&r._decrementTask(a),n.call(this,s)}}_patchZoneScheduleTask(){let r=this;return n=>function(s){let i=Zone.current,a=r._getCurrentSpan(i);return a&&r._shouldCountTask(s,i)&&(r._incrementTask(a),r._checkForTimeout(s,a)),n.call(this,s)}}_patchZoneRunTask(){let r=this;return n=>function(s,i,a){let u=(Array.isArray(a)&&a[0]instanceof Event?a[0]:void 0)?.target,_,f=this;if(u){if(_=r._createSpan(u,s.eventName),_)return r._incrementTask(_),f.run(()=>{try{return S.with(A.setSpan(S.active(),_),()=>{let h=Zone.current;return s._zone=h,n.call(h,s,i,a)})}finally{r._decrementTask(_)}})}else _=r._getCurrentSpan(f);try{return n.call(f,s,i,a)}finally{_&&r._shouldCountTask(s,f)&&r._decrementTask(_)}}}_shouldCountTask(r,n){if(r._zone&&(n=r._zone),!n||!r.data||r.data.isPeriodic)return!1;let o=this._getCurrentSpan(n);return!o||!this._spansData.get(o)?!1:r.type==="macroTask"||r.type==="microTask"}_tryToEndSpan(r,n){r&&this._spansData.get(r)&&(r.end(n),this._spansData.delete(r))}enable(){let r=this._getZoneWithPrototype();this._diag.debug("applying patch to",this.moduleName,this.version,"zone:",!!r),r?(x(r.prototype.runTask)&&(this._unwrap(r.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),x(r.prototype.scheduleTask)&&(this._unwrap(r.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),x(r.prototype.cancelTask)&&(this._unwrap(r.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(r.prototype,"runTask",this._patchZoneRunTask()),this._wrap(r.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(r.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(o=>{x(o.addEventListener)&&(this._unwrap(o,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),x(o.removeEventListener)&&(this._unwrap(o,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(o,"addEventListener",this._patchAddEventListener()),this._wrap(o,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){let r=this._getZoneWithPrototype();this._diag.debug("removing patch from",this.moduleName,this.version,"zone:",!!r),r&&this._zonePatched?(x(r.prototype.runTask)&&this._unwrap(r.prototype,"runTask"),x(r.prototype.scheduleTask)&&this._unwrap(r.prototype,"scheduleTask"),x(r.prototype.cancelTask)&&this._unwrap(r.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(o=>{x(o.addEventListener)&&this._unwrap(o,"addEventListener"),x(o.removeEventListener)&&this._unwrap(o,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};var Ls="http.host",xs="http.method",Ns="http.request.body.size",Ps="http.request_content_length_uncompressed";var Cs="http.scheme",Ms="http.status_code",ys="http.url",Is="http.user_agent";var q;(function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"})(q||(q={}));var tc=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function ec(t){return typeof Document<"u"&&t instanceof Document}function vs(t){if(ec(t))return new XMLSerializer().serializeToString(document).length;if(typeof t=="string")return bs(t);if(t instanceof Blob)return t.size;if(t instanceof FormData)return nc(t);if(t instanceof URLSearchParams)return bs(t.toString());if(t.byteLength!==void 0)return t.byteLength;tc.warn("unknown body type")}var rc=new TextEncoder;function bs(t){return rc.encode(t).byteLength}function nc(t){let e=0;for(let[r,n]of t.entries())e+=r.length,n instanceof Blob?e+=n.size:e+=n.length;return e}function Ds(t){let e=sc(),r=t.toUpperCase();return r in e?r:"_OTHER"}var oc={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0},Se;function sc(){if(Se===void 0){let t=void 0;t&&t.length>0?(Se={},t.forEach(e=>{Se[e]=!0})):Se=oc}return Se}var ic={"https:":"443","http:":"80"};function Us(t){let e=Number(t.port||ic[t.protocol]);if(e&&!isNaN(e))return e}var an="0.208.0";var dr;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(dr||(dr={}));var ac=300,me=class extends k{constructor(r={}){super("@opentelemetry/instrumentation-xml-http-request",an,r);c(this,"component","xml-http-request");c(this,"version",an);c(this,"moduleName",this.component);c(this,"_tasksCount",0);c(this,"_xhrMem",new WeakMap);c(this,"_usedResources",new WeakSet);c(this,"_semconvStability");this._semconvStability=St("http",r?.semconvStabilityOptIn)}init(){}_addHeaders(r,n){let o=F(n).href;if(!re(o,this.getConfig().propagateTraceHeaderCorsUrls)){let i={};C.inject(S.active(),i),Object.keys(i).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}let s={};C.inject(S.active(),s),Object.keys(s).forEach(i=>{r.setRequestHeader(i,String(s[i]))})}_addChildSpan(r,n){S.with(A.setSpan(S.active(),r),()=>{let o=this.tracer.startSpan("CORS Preflight",{startTime:n[d.FETCH_START]}),s=!(this._semconvStability&g.OLD);$(o,n,this.getConfig().ignoreNetworkEvents,void 0,s),o.end(n[d.RESPONSE_END])})}_addFinalSpanAttributes(r,n,o){if(this._semconvStability&g.OLD){if(n.status!==void 0&&r.setAttribute(Ms,n.status),n.statusText!==void 0&&r.setAttribute(dr.HTTP_STATUS_TEXT,n.statusText),typeof o=="string"){let s=F(o);r.setAttribute(Ls,s.host),r.setAttribute(Cs,s.protocol.replace(":",""))}r.setAttribute(Is,navigator.userAgent)}this._semconvStability&g.STABLE&&n.status&&r.setAttribute(ve,n.status)}_applyAttributesAfterXHR(r,n){let o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&rt(()=>o(r,n),s=>{s&&this._diag.error("applyCustomAttributesOnSpan",s)},!0)}_addResourceObserver(r,n){let o=this._xhrMem.get(r);!o||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(o.createdResources={observer:new PerformanceObserver(s=>{let i=s.getEntries(),a=F(n);i.forEach(p=>{p.initiatorType==="xmlhttprequest"&&p.name===a.href&&o.createdResources&&o.createdResources.entries.push(p)})}),entries:[]},o.createdResources.observer.observe({entryTypes:["resource"]}))}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(M.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)}_findResourceAndAddNetworkEvents(r,n,o,s,i){if(!o||!s||!i||!r.createdResources)return;let a=r.createdResources.entries;(!a||!a.length)&&(a=M.getEntriesByType("resource"));let p=ee(F(o).href,s,i,a,this._usedResources);if(p.mainRequest){let u=p.mainRequest;this._markResourceAsUsed(u);let _=p.corsPreFlightRequest;_&&(this._addChildSpan(n,_),this._markResourceAsUsed(_));let f=!(this._semconvStability&g.OLD);$(n,u,this.getConfig().ignoreNetworkEvents,void 0,f)}}_cleanPreviousSpanInformation(r){let n=this._xhrMem.get(r);if(n){let o=n.callbackToRemoveEvents;o&&o(),this._xhrMem.delete(r)}}_createSpan(r,n,o){if($t(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}let s="",i=F(n),a={};if(this._semconvStability&g.OLD&&(s=o.toUpperCase(),a[xs]=o,a[ys]=i.toString()),this._semconvStability&g.STABLE){let u=o,_=Ds(o);s||(s=_),a[Ie]=_,_!==u&&(a[be]=u),a[it]=i.toString(),a[De]=i.hostname;let f=Us(i);f&&(a[Ue]=f)}let p=this.tracer.startSpan(s,{kind:Z.CLIENT,attributes:a});return p.addEvent(q.METHOD_OPEN),this._cleanPreviousSpanInformation(r),this._xhrMem.set(r,{span:p,spanUrl:n}),p}_markResourceAsUsed(r){this._usedResources.add(r)}_patchOpen(){return r=>{let n=this;return function(...s){let i=s[0],a=s[1];return n._createSpan(this,a,i),r.apply(this,s)}}}_patchSend(){let r=this;function n(_,f,h,R){let O=f.callbackToRemoveEvents;typeof O=="function"&&O();let{span:L,spanUrl:E,sendStartTime:l}=f;L&&(r._findResourceAndAddNetworkEvents(f,L,E,l,h),L.addEvent(_,R),r._addFinalSpanAttributes(L,f,E),L.end(R),r._tasksCount--),r._clearResources()}function o(_,f,h,R){let O=r._xhrMem.get(f);if(!O)return;if(O.status=f.status,O.statusText=f.statusText,r._xhrMem.delete(f),O.span){let l=O.span;r._applyAttributesAfterXHR(l,f),r._semconvStability&g.STABLE&&(h?R&&(l.setStatus({code:W.ERROR,message:R}),l.setAttribute(Bt,R)):O.status&&O.status>=400&&(l.setStatus({code:W.ERROR}),l.setAttribute(Bt,String(O.status))))}let L=H(),E=Date.now();setTimeout(()=>{n(_,O,L,E)},ac)}function s(){o(q.EVENT_ERROR,this,!0,"error")}function i(){o(q.EVENT_ABORT,this,!1)}function a(){o(q.EVENT_TIMEOUT,this,!0,"timeout")}function p(){this.status<299?o(q.EVENT_LOAD,this,!1):o(q.EVENT_ERROR,this,!1)}function u(_){_.removeEventListener("abort",i),_.removeEventListener("error",s),_.removeEventListener("load",p),_.removeEventListener("timeout",a);let f=r._xhrMem.get(_);f&&(f.callbackToRemoveEvents=void 0)}return _=>function(...h){let R=r._xhrMem.get(this);if(!R)return _.apply(this,h);let O=R.span,L=R.spanUrl;if(O&&L){if(r.getConfig().measureRequestSize&&h?.[0]){let E=h[0],l=vs(E);l!==void 0&&(r._semconvStability&g.OLD&&O.setAttribute(Ps,l),r._semconvStability&g.STABLE&&O.setAttribute(Ns,l))}S.with(A.setSpan(S.active(),O),()=>{r._tasksCount++,R.sendStartTime=H(),O.addEvent(q.METHOD_SEND),this.addEventListener("abort",i),this.addEventListener("error",s),this.addEventListener("load",p),this.addEventListener("timeout",a),R.callbackToRemoveEvents=()=>{u(this),R.createdResources&&R.createdResources.observer.disconnect()},r._addHeaders(this,L),r._addResourceObserver(this,L)})}return _.apply(this,h)}}enable(){this._diag.debug("applying patch to",this.moduleName,this.version),x(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),x(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())}disable(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet}};var ws="v1/traces";function cc(t){let e=t.trim().toLowerCase();return/^[0-9a-f]{32}$/.test(e)&&e!=="00000000000000000000000000000000"}function pn(t){let e=new Uint8Array(t);crypto.getRandomValues(e);let r="";for(let n=0;n<e.length;n++){let o=e[n];r+=o.toString(16).padStart(2,"0")}return r}function yt(t){let e=t.trim().toLowerCase();return cc(e)?e:pn(16)}var cn=class{constructor(e){c(this,"traceId");this.traceId=yt(e)}setTraceId(e){this.traceId=yt(e)}getTraceId(){return this.traceId}generateTraceId(){return this.traceId}generateSpanId(){return pn(8)}};(function(){let e=globalThis;e.__MCP_DEVTOOLS__||(e.__MCP_DEVTOOLS__={});let r=e.__MCP_DEVTOOLS__;if(e.__mcpOtel)return;let n=null,o=!1,s;function i(E){E===!0&&T.setLogger(new Rr,y.DEBUG)}function a(E){let l=[];if(E.exporter.type==="none")return l;if(E.exporter.type==="console"){let m=new Jt,N=new Zt(m);return l.push(N),l}else if(E.exporter.type==="otlp/http"){let m=E.exporter.url.endsWith("/")?`${E.exporter.url}${ws}`:`${E.exporter.url}/${ws}`,N=new Ct({url:m,headers:E.exporter.headers}),U=new Nt(N);return l.push(U),l}throw new Error(`Not supported exporter type: ${E.exporter.type}`)}function p(E){let l=E.trim();if(!l)return[];let m=l.startsWith("/")?l:"/"+l,N=m.endsWith("/")?m:m+"/";return[new RegExp(`^${N.replace(/\//g,"\\/")}`),new RegExp(`${N.replace(/\//g,"\\/")}`)]}function u(E,l,m){let N=m?p(m):[],U=l??{},nt=new fe({ignoreUrls:N}),It=new me({ignoreUrls:N}),Sr=new Ee,he=new de({eventNames:U.userInteractionEvents||["click"]});tn({tracerProvider:E,instrumentations:[nt,It,Sr,he]});try{nt.enable?.()}catch{}try{It.enable?.()}catch{}try{Sr.enable?.()}catch{}try{he.enable?.()}catch{}}function _(E){try{if(e.__MCP_DEVTOOLS__||(e.__MCP_DEVTOOLS__={}),r.otelInitialized===!0){n&&n.setTraceId(E.traceId),e.__MCP_TRACE_ID__=yt(E.traceId),o=!0,s=void 0;return}i(E.debug);let l=yt(E.traceId);n=new cn(l);let m=We({[Wn]:E.serviceName,...E.serviceVersion?{[zn]:E.serviceVersion}:{}}),N=a(E),U=new te({resource:m,idGenerator:n,spanProcessors:N});U.register(),u(U,E.instrumentation??{},E.exporter.url),A.getTracer(E.serviceName),r.otelInitialized=!0,r.otelInitError=void 0,e.__MCP_TRACE_ID__=l,o=!0,s=void 0}catch(l){let m=String(l?.message??l);r.otelInitialized=!1,r.otelInitError=m,o=!1,s=m}}function f(E){let l=yt(E);n&&n.setTraceId(l),e.__MCP_TRACE_ID__=l}function h(){return n?n.getTraceId():typeof e.__MCP_TRACE_ID__=="string"&&e.__MCP_TRACE_ID__?String(e.__MCP_TRACE_ID__).toLowerCase():yt(pn(16))}function R(){return r.otelInitialized===!0&&o===!0}function O(){let E=r.otelInitError??s;if(typeof E=="string"&&E.trim())return E}let L={init:E=>{_(E)},setTraceId:E=>{f(E)},getTraceId:()=>h(),isInitialized:()=>R(),getInitError:()=>O()};e.__mcpOtel=L})();return ks(pc);})();
|
|
1
|
+
"use strict";var __mcpOtelBundle=(()=>{var bc=Object.create;var Ze=Object.defineProperty;var Nc=Object.getOwnPropertyDescriptor;var Rc=Object.getOwnPropertyNames;var Pc=Object.getPrototypeOf,Lc=Object.prototype.hasOwnProperty;var Ic=(o,n,i)=>n in o?Ze(o,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[n]=i;var V=(o,n)=>()=>(n||o((n={exports:{}}).exports,n),n.exports);var Lo=(o,n,i,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of Rc(n))!Lc.call(o,a)&&a!==i&&Ze(o,a,{get:()=>n[a],enumerable:!(s=Nc(n,a))||s.enumerable});return o};var Cc=(o,n,i)=>(i=o!=null?bc(Pc(o)):{},Lo(n||!o||!o.__esModule?Ze(i,"default",{value:o,enumerable:!0}):i,o)),wc=o=>Lo(Ze({},"__esModule",{value:!0}),o);var h=(o,n,i)=>Ic(o,typeof n!="symbol"?n+"":n,i);var ha=V((Q_,ma)=>{"use strict";ma.exports=Gl;function Gl(o,n){for(var i=new Array(arguments.length-1),s=0,a=2,u=!0;a<arguments.length;)i[s++]=arguments[a++];return new Promise(function(t,r){i[s]=function(l){if(u)if(u=!1,l)r(l);else{for(var d=new Array(arguments.length-1),y=0;y<d.length;)d[y++]=arguments[y];t.apply(null,d)}};try{o.apply(n||null,i)}catch(c){u&&(u=!1,r(c))}})}});var Ea=V(_a=>{"use strict";var Fr=_a;Fr.length=function(n){var i=n.length;if(!i)return 0;for(var s=0;--i%4>1&&n.charAt(i)==="=";)++s;return Math.ceil(n.length*3)/4-s};var te=new Array(64),Ta=new Array(123);for(rt=0;rt<64;)Ta[te[rt]=rt<26?rt+65:rt<52?rt+71:rt<62?rt-4:rt-59|43]=rt++;var rt;Fr.encode=function(n,i,s){for(var a=null,u=[],e=0,t=0,r;i<s;){var c=n[i++];switch(t){case 0:u[e++]=te[c>>2],r=(c&3)<<4,t=1;break;case 1:u[e++]=te[r|c>>4],r=(c&15)<<2,t=2;break;case 2:u[e++]=te[r|c>>6],u[e++]=te[c&63],t=0;break}e>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,u)),e=0)}return t&&(u[e++]=te[r],u[e++]=61,t===1&&(u[e++]=61)),a?(e&&a.push(String.fromCharCode.apply(String,u.slice(0,e))),a.join("")):String.fromCharCode.apply(String,u.slice(0,e))};var ya="invalid encoding";Fr.decode=function(n,i,s){for(var a=s,u=0,e,t=0;t<n.length;){var r=n.charCodeAt(t++);if(r===61&&u>1)break;if((r=Ta[r])===void 0)throw Error(ya);switch(u){case 0:e=r,u=1;break;case 1:i[s++]=e<<2|(r&48)>>4,e=r,u=2;break;case 2:i[s++]=(e&15)<<4|(r&60)>>2,e=r,u=3;break;case 3:i[s++]=(e&3)<<6|r,u=0;break}}if(u===1)throw Error(ya);return s-a};Fr.test=function(n){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(n)}});var va=V((tE,Sa)=>{"use strict";Sa.exports=Kr;function Kr(){this._listeners={}}Kr.prototype.on=function(n,i,s){return(this._listeners[n]||(this._listeners[n]=[])).push({fn:i,ctx:s||this}),this};Kr.prototype.off=function(n,i){if(n===void 0)this._listeners={};else if(i===void 0)this._listeners[n]=[];else for(var s=this._listeners[n],a=0;a<s.length;)s[a].fn===i?s.splice(a,1):++a;return this};Kr.prototype.emit=function(n){var i=this._listeners[n];if(i){for(var s=[],a=1;a<arguments.length;)s.push(arguments[a++]);for(a=0;a<i.length;)i[a].fn.apply(i[a++].ctx,s)}return this}});var Ra=V((eE,Na)=>{"use strict";Na.exports=xa(xa);function xa(o){return typeof Float32Array<"u"?(function(){var n=new Float32Array([-0]),i=new Uint8Array(n.buffer),s=i[3]===128;function a(r,c,l){n[0]=r,c[l]=i[0],c[l+1]=i[1],c[l+2]=i[2],c[l+3]=i[3]}function u(r,c,l){n[0]=r,c[l]=i[3],c[l+1]=i[2],c[l+2]=i[1],c[l+3]=i[0]}o.writeFloatLE=s?a:u,o.writeFloatBE=s?u:a;function e(r,c){return i[0]=r[c],i[1]=r[c+1],i[2]=r[c+2],i[3]=r[c+3],n[0]}function t(r,c){return i[3]=r[c],i[2]=r[c+1],i[1]=r[c+2],i[0]=r[c+3],n[0]}o.readFloatLE=s?e:t,o.readFloatBE=s?t:e})():(function(){function n(s,a,u,e){var t=a<0?1:0;if(t&&(a=-a),a===0)s(1/a>0?0:2147483648,u,e);else if(isNaN(a))s(2143289344,u,e);else if(a>34028234663852886e22)s((t<<31|2139095040)>>>0,u,e);else if(a<11754943508222875e-54)s((t<<31|Math.round(a/1401298464324817e-60))>>>0,u,e);else{var r=Math.floor(Math.log(a)/Math.LN2),c=Math.round(a*Math.pow(2,-r)*8388608)&8388607;s((t<<31|r+127<<23|c)>>>0,u,e)}}o.writeFloatLE=n.bind(null,Oa),o.writeFloatBE=n.bind(null,Aa);function i(s,a,u){var e=s(a,u),t=(e>>31)*2+1,r=e>>>23&255,c=e&8388607;return r===255?c?NaN:t*(1/0):r===0?t*1401298464324817e-60*c:t*Math.pow(2,r-150)*(c+8388608)}o.readFloatLE=i.bind(null,ga),o.readFloatBE=i.bind(null,ba)})(),typeof Float64Array<"u"?(function(){var n=new Float64Array([-0]),i=new Uint8Array(n.buffer),s=i[7]===128;function a(r,c,l){n[0]=r,c[l]=i[0],c[l+1]=i[1],c[l+2]=i[2],c[l+3]=i[3],c[l+4]=i[4],c[l+5]=i[5],c[l+6]=i[6],c[l+7]=i[7]}function u(r,c,l){n[0]=r,c[l]=i[7],c[l+1]=i[6],c[l+2]=i[5],c[l+3]=i[4],c[l+4]=i[3],c[l+5]=i[2],c[l+6]=i[1],c[l+7]=i[0]}o.writeDoubleLE=s?a:u,o.writeDoubleBE=s?u:a;function e(r,c){return i[0]=r[c],i[1]=r[c+1],i[2]=r[c+2],i[3]=r[c+3],i[4]=r[c+4],i[5]=r[c+5],i[6]=r[c+6],i[7]=r[c+7],n[0]}function t(r,c){return i[7]=r[c],i[6]=r[c+1],i[5]=r[c+2],i[4]=r[c+3],i[3]=r[c+4],i[2]=r[c+5],i[1]=r[c+6],i[0]=r[c+7],n[0]}o.readDoubleLE=s?e:t,o.readDoubleBE=s?t:e})():(function(){function n(s,a,u,e,t,r){var c=e<0?1:0;if(c&&(e=-e),e===0)s(0,t,r+a),s(1/e>0?0:2147483648,t,r+u);else if(isNaN(e))s(0,t,r+a),s(2146959360,t,r+u);else if(e>17976931348623157e292)s(0,t,r+a),s((c<<31|2146435072)>>>0,t,r+u);else{var l;if(e<22250738585072014e-324)l=e/5e-324,s(l>>>0,t,r+a),s((c<<31|l/4294967296)>>>0,t,r+u);else{var d=Math.floor(Math.log(e)/Math.LN2);d===1024&&(d=1023),l=e*Math.pow(2,-d),s(l*4503599627370496>>>0,t,r+a),s((c<<31|d+1023<<20|l*1048576&1048575)>>>0,t,r+u)}}}o.writeDoubleLE=n.bind(null,Oa,0,4),o.writeDoubleBE=n.bind(null,Aa,4,0);function i(s,a,u,e,t){var r=s(e,t+a),c=s(e,t+u),l=(c>>31)*2+1,d=c>>>20&2047,y=4294967296*(c&1048575)+r;return d===2047?y?NaN:l*(1/0):d===0?l*5e-324*y:l*Math.pow(2,d-1075)*(y+4503599627370496)}o.readDoubleLE=i.bind(null,ga,0,4),o.readDoubleBE=i.bind(null,ba,4,0)})(),o}function Oa(o,n,i){n[i]=o&255,n[i+1]=o>>>8&255,n[i+2]=o>>>16&255,n[i+3]=o>>>24}function Aa(o,n,i){n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=o&255}function ga(o,n){return(o[n]|o[n+1]<<8|o[n+2]<<16|o[n+3]<<24)>>>0}function ba(o,n){return(o[n]<<24|o[n+1]<<16|o[n+2]<<8|o[n+3])>>>0}});var Pa=V((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(o){}return null}});var Ia=V(La=>{"use strict";var qn=La;qn.length=function(n){for(var i=0,s=0,a=0;a<n.length;++a)s=n.charCodeAt(a),s<128?i+=1:s<2048?i+=2:(s&64512)===55296&&(n.charCodeAt(a+1)&64512)===56320?(++a,i+=4):i+=3;return i};qn.read=function(n,i,s){var a=s-i;if(a<1)return"";for(var u=null,e=[],t=0,r;i<s;)r=n[i++],r<128?e[t++]=r:r>191&&r<224?e[t++]=(r&31)<<6|n[i++]&63:r>239&&r<365?(r=((r&7)<<18|(n[i++]&63)<<12|(n[i++]&63)<<6|n[i++]&63)-65536,e[t++]=55296+(r>>10),e[t++]=56320+(r&1023)):e[t++]=(r&15)<<12|(n[i++]&63)<<6|n[i++]&63,t>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,e)),t=0);return u?(t&&u.push(String.fromCharCode.apply(String,e.slice(0,t))),u.join("")):String.fromCharCode.apply(String,e.slice(0,t))};qn.write=function(n,i,s){for(var a=s,u,e,t=0;t<n.length;++t)u=n.charCodeAt(t),u<128?i[s++]=u:u<2048?(i[s++]=u>>6|192,i[s++]=u&63|128):(u&64512)===55296&&((e=n.charCodeAt(t+1))&64512)===56320?(u=65536+((u&1023)<<10)+(e&1023),++t,i[s++]=u>>18|240,i[s++]=u>>12&63|128,i[s++]=u>>6&63|128,i[s++]=u&63|128):(i[s++]=u>>12|224,i[s++]=u>>6&63|128,i[s++]=u&63|128);return s-a}});var wa=V((nE,Ca)=>{"use strict";Ca.exports=Fl;function Fl(o,n,i){var s=i||8192,a=s>>>1,u=null,e=s;return function(r){if(r<1||r>a)return o(r);e+r>s&&(u=o(s),e=0);var c=n.call(u,e,e+=r);return e&7&&(e=(e|7)+1),c}}});var Ma=V((oE,Ua)=>{"use strict";Ua.exports=F;var we=Lt();function F(o,n){this.lo=o>>>0,this.hi=n>>>0}var Gt=F.zero=new F(0,0);Gt.toNumber=function(){return 0};Gt.zzEncode=Gt.zzDecode=function(){return this};Gt.length=function(){return 1};var Kl=F.zeroHash="\0\0\0\0\0\0\0\0";F.fromNumber=function(n){if(n===0)return Gt;var i=n<0;i&&(n=-n);var s=n>>>0,a=(n-s)/4294967296>>>0;return i&&(a=~a>>>0,s=~s>>>0,++s>4294967295&&(s=0,++a>4294967295&&(a=0))),new F(s,a)};F.from=function(n){if(typeof n=="number")return F.fromNumber(n);if(we.isString(n))if(we.Long)n=we.Long.fromString(n);else return F.fromNumber(parseInt(n,10));return n.low||n.high?new F(n.low>>>0,n.high>>>0):Gt};F.prototype.toNumber=function(n){if(!n&&this.hi>>>31){var i=~this.lo+1>>>0,s=~this.hi>>>0;return i||(s=s+1>>>0),-(i+s*4294967296)}return this.lo+this.hi*4294967296};F.prototype.toLong=function(n){return we.Long?new we.Long(this.lo|0,this.hi|0,!!n):{low:this.lo|0,high:this.hi|0,unsigned:!!n}};var Pt=String.prototype.charCodeAt;F.fromHash=function(n){return n===Kl?Gt:new F((Pt.call(n,0)|Pt.call(n,1)<<8|Pt.call(n,2)<<16|Pt.call(n,3)<<24)>>>0,(Pt.call(n,4)|Pt.call(n,5)<<8|Pt.call(n,6)<<16|Pt.call(n,7)<<24)>>>0)};F.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)};F.prototype.zzEncode=function(){var n=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^n)>>>0,this.lo=(this.lo<<1^n)>>>0,this};F.prototype.zzDecode=function(){var n=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^n)>>>0,this.hi=(this.hi>>>1^n)>>>0,this};F.prototype.length=function(){var n=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,s=this.hi>>>24;return s===0?i===0?n<16384?n<128?1:2:n<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:s<128?9:10}});var Lt=V(Wn=>{"use strict";var E=Wn;E.asPromise=ha();E.base64=Ea();E.EventEmitter=va();E.float=Ra();E.inquire=Pa();E.utf8=Ia();E.pool=wa();E.LongBits=Ma();E.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);E.global=E.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||Wn;E.emptyArray=Object.freeze?Object.freeze([]):[];E.emptyObject=Object.freeze?Object.freeze({}):{};E.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};E.isString=function(n){return typeof n=="string"||n instanceof String};E.isObject=function(n){return n&&typeof n=="object"};E.isset=E.isSet=function(n,i){var s=n[i];return s!=null&&n.hasOwnProperty(i)?typeof s!="object"||(Array.isArray(s)?s.length:Object.keys(s).length)>0:!1};E.Buffer=(function(){try{var o=E.inquire("buffer").Buffer;return o.prototype.utf8Write?o:null}catch{return null}})();E._Buffer_from=null;E._Buffer_allocUnsafe=null;E.newBuffer=function(n){return typeof n=="number"?E.Buffer?E._Buffer_allocUnsafe(n):new E.Array(n):E.Buffer?E._Buffer_from(n):typeof Uint8Array>"u"?n:new Uint8Array(n)};E.Array=typeof Uint8Array<"u"?Uint8Array:Array;E.Long=E.global.dcodeIO&&E.global.dcodeIO.Long||E.global.Long||E.inquire("long");E.key2Re=/^true|false|0|1$/;E.key32Re=/^-?(?:0|[1-9][0-9]*)$/;E.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;E.longToHash=function(n){return n?E.LongBits.from(n).toHash():E.LongBits.zeroHash};E.longFromHash=function(n,i){var s=E.LongBits.fromHash(n);return E.Long?E.Long.fromBits(s.lo,s.hi,i):s.toNumber(!!i)};function Da(o,n,i){for(var s=Object.keys(n),a=0;a<s.length;++a)(o[s[a]]===void 0||!i)&&(o[s[a]]=n[s[a]]);return o}E.merge=Da;E.lcFirst=function(n){return n.charAt(0).toLowerCase()+n.substring(1)};function Va(o){function n(i,s){if(!(this instanceof n))return new n(i,s);Object.defineProperty(this,"message",{get:function(){return i}}),Error.captureStackTrace?Error.captureStackTrace(this,n):Object.defineProperty(this,"stack",{value:new Error().stack||""}),s&&Da(this,s)}return n.prototype=Object.create(Error.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return o},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),n}E.newError=Va;E.ProtocolError=Va("ProtocolError");E.oneOfGetter=function(n){for(var i={},s=0;s<n.length;++s)i[n[s]]=1;return function(){for(var a=Object.keys(this),u=a.length-1;u>-1;--u)if(i[a[u]]===1&&this[a[u]]!==void 0&&this[a[u]]!==null)return a[u]}};E.oneOfSetter=function(n){return function(i){for(var s=0;s<n.length;++s)n[s]!==i&&delete this[n[s]]}};E.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};E._configure=function(){var o=E.Buffer;if(!o){E._Buffer_from=E._Buffer_allocUnsafe=null;return}E._Buffer_from=o.from!==Uint8Array.from&&o.from||function(i,s){return new o(i,s)},E._Buffer_allocUnsafe=o.allocUnsafe||function(i){return new o(i)}}});var eo=V((aE,Ga)=>{"use strict";Ga.exports=I;var X=Lt(),Jn,jr=X.LongBits,ka=X.base64,Ba=X.utf8;function Ue(o,n,i){this.fn=o,this.len=n,this.next=void 0,this.val=i}function Xn(){}function jl(o){this.head=o.head,this.tail=o.tail,this.len=o.len,this.next=o.states}function I(){this.len=0,this.head=new Ue(Xn,0,0),this.tail=this.head,this.states=null}var Ha=function(){return X.Buffer?function(){return(I.create=function(){return new Jn})()}:function(){return new I}};I.create=Ha();I.alloc=function(n){return new X.Array(n)};X.Array!==Array&&(I.alloc=X.pool(I.alloc,X.Array.prototype.subarray));I.prototype._push=function(n,i,s){return this.tail=this.tail.next=new Ue(n,i,s),this.len+=i,this};function Qn(o,n,i){n[i]=o&255}function Yl(o,n,i){for(;o>127;)n[i++]=o&127|128,o>>>=7;n[i]=o}function Zn(o,n){this.len=o,this.next=void 0,this.val=n}Zn.prototype=Object.create(Ue.prototype);Zn.prototype.fn=Yl;I.prototype.uint32=function(n){return this.len+=(this.tail=this.tail.next=new Zn((n=n>>>0)<128?1:n<16384?2:n<2097152?3:n<268435456?4:5,n)).len,this};I.prototype.int32=function(n){return n<0?this._push(to,10,jr.fromNumber(n)):this.uint32(n)};I.prototype.sint32=function(n){return this.uint32((n<<1^n>>31)>>>0)};function to(o,n,i){for(;o.hi;)n[i++]=o.lo&127|128,o.lo=(o.lo>>>7|o.hi<<25)>>>0,o.hi>>>=7;for(;o.lo>127;)n[i++]=o.lo&127|128,o.lo=o.lo>>>7;n[i++]=o.lo}I.prototype.uint64=function(n){var i=jr.from(n);return this._push(to,i.length(),i)};I.prototype.int64=I.prototype.uint64;I.prototype.sint64=function(n){var i=jr.from(n).zzEncode();return this._push(to,i.length(),i)};I.prototype.bool=function(n){return this._push(Qn,1,n?1:0)};function $n(o,n,i){n[i]=o&255,n[i+1]=o>>>8&255,n[i+2]=o>>>16&255,n[i+3]=o>>>24}I.prototype.fixed32=function(n){return this._push($n,4,n>>>0)};I.prototype.sfixed32=I.prototype.fixed32;I.prototype.fixed64=function(n){var i=jr.from(n);return this._push($n,4,i.lo)._push($n,4,i.hi)};I.prototype.sfixed64=I.prototype.fixed64;I.prototype.float=function(n){return this._push(X.float.writeFloatLE,4,n)};I.prototype.double=function(n){return this._push(X.float.writeDoubleLE,8,n)};var zl=X.Array.prototype.set?function(n,i,s){i.set(n,s)}:function(n,i,s){for(var a=0;a<n.length;++a)i[s+a]=n[a]};I.prototype.bytes=function(n){var i=n.length>>>0;if(!i)return this._push(Qn,1,0);if(X.isString(n)){var s=I.alloc(i=ka.length(n));ka.decode(n,s,0),n=s}return this.uint32(i)._push(zl,i,n)};I.prototype.string=function(n){var i=Ba.length(n);return i?this.uint32(i)._push(Ba.write,i,n):this._push(Qn,1,0)};I.prototype.fork=function(){return this.states=new jl(this),this.head=this.tail=new Ue(Xn,0,0),this.len=0,this};I.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Ue(Xn,0,0),this.len=0),this};I.prototype.ldelim=function(){var n=this.head,i=this.tail,s=this.len;return this.reset().uint32(s),s&&(this.tail.next=n.next,this.tail=i,this.len+=s),this};I.prototype.finish=function(){for(var n=this.head.next,i=this.constructor.alloc(this.len),s=0;n;)n.fn(n.val,i,s),s+=n.len,n=n.next;return i};I._configure=function(o){Jn=o,I.create=Ha(),Jn._configure()}});var ja=V((uE,Ka)=>{"use strict";Ka.exports=ht;var Fa=eo();(ht.prototype=Object.create(Fa.prototype)).constructor=ht;var It=Lt();function ht(){Fa.call(this)}ht._configure=function(){ht.alloc=It._Buffer_allocUnsafe,ht.writeBytesBuffer=It.Buffer&&It.Buffer.prototype instanceof Uint8Array&&It.Buffer.prototype.set.name==="set"?function(n,i,s){i.set(n,s)}:function(n,i,s){if(n.copy)n.copy(i,s,0,n.length);else for(var a=0;a<n.length;)i[s++]=n[a++]}};ht.prototype.bytes=function(n){It.isString(n)&&(n=It._Buffer_from(n,"base64"));var i=n.length>>>0;return this.uint32(i),i&&this._push(ht.writeBytesBuffer,i,n),this};function ql(o,n,i){o.length<40?It.utf8.write(o,n,i):n.utf8Write?n.utf8Write(o,i):n.write(o,i)}ht.prototype.string=function(n){var i=It.Buffer.byteLength(n);return this.uint32(i),i&&this._push(ql,i,n),this};ht._configure()});var oo=V((cE,Ja)=>{"use strict";Ja.exports=M;var nt=Lt(),no,qa=nt.LongBits,Wl=nt.utf8;function ot(o,n){return RangeError("index out of range: "+o.pos+" + "+(n||1)+" > "+o.len)}function M(o){this.buf=o,this.pos=0,this.len=o.length}var Ya=typeof Uint8Array<"u"?function(n){if(n instanceof Uint8Array||Array.isArray(n))return new M(n);throw Error("illegal buffer")}:function(n){if(Array.isArray(n))return new M(n);throw Error("illegal buffer")},Wa=function(){return nt.Buffer?function(i){return(M.create=function(a){return nt.Buffer.isBuffer(a)?new no(a):Ya(a)})(i)}:Ya};M.create=Wa();M.prototype._slice=nt.Array.prototype.subarray||nt.Array.prototype.slice;M.prototype.uint32=(function(){var n=4294967295;return function(){if(n=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(n=(n|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return n;if((this.pos+=5)>this.len)throw this.pos=this.len,ot(this,10);return n}})();M.prototype.int32=function(){return this.uint32()|0};M.prototype.sint32=function(){var n=this.uint32();return n>>>1^-(n&1)|0};function ro(){var o=new qa(0,0),n=0;if(this.len-this.pos>4){for(;n<4;++n)if(o.lo=(o.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return o;if(o.lo=(o.lo|(this.buf[this.pos]&127)<<28)>>>0,o.hi=(o.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return o;n=0}else{for(;n<3;++n){if(this.pos>=this.len)throw ot(this);if(o.lo=(o.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return o}return o.lo=(o.lo|(this.buf[this.pos++]&127)<<n*7)>>>0,o}if(this.len-this.pos>4){for(;n<5;++n)if(o.hi=(o.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return o}else for(;n<5;++n){if(this.pos>=this.len)throw ot(this);if(o.hi=(o.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return o}throw Error("invalid varint encoding")}M.prototype.bool=function(){return this.uint32()!==0};function Yr(o,n){return(o[n-4]|o[n-3]<<8|o[n-2]<<16|o[n-1]<<24)>>>0}M.prototype.fixed32=function(){if(this.pos+4>this.len)throw ot(this,4);return Yr(this.buf,this.pos+=4)};M.prototype.sfixed32=function(){if(this.pos+4>this.len)throw ot(this,4);return Yr(this.buf,this.pos+=4)|0};function za(){if(this.pos+8>this.len)throw ot(this,8);return new qa(Yr(this.buf,this.pos+=4),Yr(this.buf,this.pos+=4))}M.prototype.float=function(){if(this.pos+4>this.len)throw ot(this,4);var n=nt.float.readFloatLE(this.buf,this.pos);return this.pos+=4,n};M.prototype.double=function(){if(this.pos+8>this.len)throw ot(this,4);var n=nt.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,n};M.prototype.bytes=function(){var n=this.uint32(),i=this.pos,s=this.pos+n;if(s>this.len)throw ot(this,n);if(this.pos+=n,Array.isArray(this.buf))return this.buf.slice(i,s);if(i===s){var a=nt.Buffer;return a?a.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,i,s)};M.prototype.string=function(){var n=this.bytes();return Wl.read(n,0,n.length)};M.prototype.skip=function(n){if(typeof n=="number"){if(this.pos+n>this.len)throw ot(this,n);this.pos+=n}else do if(this.pos>=this.len)throw ot(this);while(this.buf[this.pos++]&128);return this};M.prototype.skipType=function(o){switch(o){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(o=this.uint32()&7)!==4;)this.skipType(o);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+o+" at offset "+this.pos)}return this};M._configure=function(o){no=o,M.create=Wa(),no._configure();var n=nt.Long?"toLong":"toNumber";nt.merge(M.prototype,{int64:function(){return ro.call(this)[n](!1)},uint64:function(){return ro.call(this)[n](!0)},sint64:function(){return ro.call(this).zzDecode()[n](!1)},fixed64:function(){return za.call(this)[n](!0)},sfixed64:function(){return za.call(this)[n](!1)}})}});var Za=V((sE,Qa)=>{"use strict";Qa.exports=Ft;var Xa=oo();(Ft.prototype=Object.create(Xa.prototype)).constructor=Ft;var $a=Lt();function Ft(o){Xa.call(this,o)}Ft._configure=function(){$a.Buffer&&(Ft.prototype._slice=$a.Buffer.prototype.slice)};Ft.prototype.string=function(){var n=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+n,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+n,this.len))};Ft._configure()});var eu=V((lE,tu)=>{"use strict";tu.exports=Me;var io=Lt();(Me.prototype=Object.create(io.EventEmitter.prototype)).constructor=Me;function Me(o,n,i){if(typeof o!="function")throw TypeError("rpcImpl must be a function");io.EventEmitter.call(this),this.rpcImpl=o,this.requestDelimited=!!n,this.responseDelimited=!!i}Me.prototype.rpcCall=function o(n,i,s,a,u){if(!a)throw TypeError("request must be specified");var e=this;if(!u)return io.asPromise(o,e,n,i,s,a);if(!e.rpcImpl){setTimeout(function(){u(Error("already ended"))},0);return}try{return e.rpcImpl(n,i[e.requestDelimited?"encodeDelimited":"encode"](a).finish(),function(r,c){if(r)return e.emit("error",r,n),u(r);if(c===null){e.end(!0);return}if(!(c instanceof s))try{c=s[e.responseDelimited?"decodeDelimited":"decode"](c)}catch(l){return e.emit("error",l,n),u(l)}return e.emit("data",c,n),u(null,c)})}catch(t){e.emit("error",t,n),setTimeout(function(){u(t)},0);return}};Me.prototype.end=function(n){return this.rpcImpl&&(n||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var nu=V(ru=>{"use strict";var Jl=ru;Jl.Service=eu()});var iu=V((fE,ou)=>{"use strict";ou.exports={}});var cu=V(uu=>{"use strict";var Y=uu;Y.build="minimal";Y.Writer=eo();Y.BufferWriter=ja();Y.Reader=oo();Y.BufferReader=Za();Y.util=Lt();Y.rpc=nu();Y.roots=iu();Y.configure=au;function au(){Y.util._configure(),Y.Writer._configure(Y.BufferWriter),Y.Reader._configure(Y.BufferReader)}au()});var lu=V((mE,su)=>{"use strict";su.exports=cu()});var fu=V((hE,pu)=>{"use strict";var S=lu(),m=S.Reader,O=S.Writer,f=S.util,p=S.roots.default||(S.roots.default={});p.opentelemetry=(function(){var o={};return o.proto=(function(){var n={};return n.common=(function(){var i={};return i.v1=(function(){var s={};return s.AnyValue=(function(){function a(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}a.prototype.stringValue=null,a.prototype.boolValue=null,a.prototype.intValue=null,a.prototype.doubleValue=null,a.prototype.arrayValue=null,a.prototype.kvlistValue=null,a.prototype.bytesValue=null;var u;return Object.defineProperty(a.prototype,"value",{get:f.oneOfGetter(u=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:f.oneOfSetter(u)}),a.create=function(t){return new a(t)},a.encode=function(t,r){return r||(r=O.create()),t.stringValue!=null&&Object.hasOwnProperty.call(t,"stringValue")&&r.uint32(10).string(t.stringValue),t.boolValue!=null&&Object.hasOwnProperty.call(t,"boolValue")&&r.uint32(16).bool(t.boolValue),t.intValue!=null&&Object.hasOwnProperty.call(t,"intValue")&&r.uint32(24).int64(t.intValue),t.doubleValue!=null&&Object.hasOwnProperty.call(t,"doubleValue")&&r.uint32(33).double(t.doubleValue),t.arrayValue!=null&&Object.hasOwnProperty.call(t,"arrayValue")&&p.opentelemetry.proto.common.v1.ArrayValue.encode(t.arrayValue,r.uint32(42).fork()).ldelim(),t.kvlistValue!=null&&Object.hasOwnProperty.call(t,"kvlistValue")&&p.opentelemetry.proto.common.v1.KeyValueList.encode(t.kvlistValue,r.uint32(50).fork()).ldelim(),t.bytesValue!=null&&Object.hasOwnProperty.call(t,"bytesValue")&&r.uint32(58).bytes(t.bytesValue),r},a.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},a.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.common.v1.AnyValue;t.pos<l;){var y=t.uint32();if(y===c)break;switch(y>>>3){case 1:{d.stringValue=t.string();break}case 2:{d.boolValue=t.bool();break}case 3:{d.intValue=t.int64();break}case 4:{d.doubleValue=t.double();break}case 5:{d.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.decode(t,t.uint32());break}case 6:{d.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.decode(t,t.uint32());break}case 7:{d.bytesValue=t.bytes();break}default:t.skipType(y&7);break}}return d},a.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.stringValue!=null&&t.hasOwnProperty("stringValue")&&(r.value=1,!f.isString(t.stringValue)))return"stringValue: string expected";if(t.boolValue!=null&&t.hasOwnProperty("boolValue")){if(r.value===1)return"value: multiple values";if(r.value=1,typeof t.boolValue!="boolean")return"boolValue: boolean expected"}if(t.intValue!=null&&t.hasOwnProperty("intValue")){if(r.value===1)return"value: multiple values";if(r.value=1,!f.isInteger(t.intValue)&&!(t.intValue&&f.isInteger(t.intValue.low)&&f.isInteger(t.intValue.high)))return"intValue: integer|Long expected"}if(t.doubleValue!=null&&t.hasOwnProperty("doubleValue")){if(r.value===1)return"value: multiple values";if(r.value=1,typeof t.doubleValue!="number")return"doubleValue: number expected"}if(t.arrayValue!=null&&t.hasOwnProperty("arrayValue")){if(r.value===1)return"value: multiple values";r.value=1;{var c=p.opentelemetry.proto.common.v1.ArrayValue.verify(t.arrayValue);if(c)return"arrayValue."+c}}if(t.kvlistValue!=null&&t.hasOwnProperty("kvlistValue")){if(r.value===1)return"value: multiple values";r.value=1;{var c=p.opentelemetry.proto.common.v1.KeyValueList.verify(t.kvlistValue);if(c)return"kvlistValue."+c}}if(t.bytesValue!=null&&t.hasOwnProperty("bytesValue")){if(r.value===1)return"value: multiple values";if(r.value=1,!(t.bytesValue&&typeof t.bytesValue.length=="number"||f.isString(t.bytesValue)))return"bytesValue: buffer expected"}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.AnyValue)return t;var r=new p.opentelemetry.proto.common.v1.AnyValue;if(t.stringValue!=null&&(r.stringValue=String(t.stringValue)),t.boolValue!=null&&(r.boolValue=!!t.boolValue),t.intValue!=null&&(f.Long?(r.intValue=f.Long.fromValue(t.intValue)).unsigned=!1:typeof t.intValue=="string"?r.intValue=parseInt(t.intValue,10):typeof t.intValue=="number"?r.intValue=t.intValue:typeof t.intValue=="object"&&(r.intValue=new f.LongBits(t.intValue.low>>>0,t.intValue.high>>>0).toNumber())),t.doubleValue!=null&&(r.doubleValue=Number(t.doubleValue)),t.arrayValue!=null){if(typeof t.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");r.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.fromObject(t.arrayValue)}if(t.kvlistValue!=null){if(typeof t.kvlistValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");r.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.fromObject(t.kvlistValue)}return t.bytesValue!=null&&(typeof t.bytesValue=="string"?f.base64.decode(t.bytesValue,r.bytesValue=f.newBuffer(f.base64.length(t.bytesValue)),0):t.bytesValue.length>=0&&(r.bytesValue=t.bytesValue)),r},a.toObject=function(t,r){r||(r={});var c={};return t.stringValue!=null&&t.hasOwnProperty("stringValue")&&(c.stringValue=t.stringValue,r.oneofs&&(c.value="stringValue")),t.boolValue!=null&&t.hasOwnProperty("boolValue")&&(c.boolValue=t.boolValue,r.oneofs&&(c.value="boolValue")),t.intValue!=null&&t.hasOwnProperty("intValue")&&(typeof t.intValue=="number"?c.intValue=r.longs===String?String(t.intValue):t.intValue:c.intValue=r.longs===String?f.Long.prototype.toString.call(t.intValue):r.longs===Number?new f.LongBits(t.intValue.low>>>0,t.intValue.high>>>0).toNumber():t.intValue,r.oneofs&&(c.value="intValue")),t.doubleValue!=null&&t.hasOwnProperty("doubleValue")&&(c.doubleValue=r.json&&!isFinite(t.doubleValue)?String(t.doubleValue):t.doubleValue,r.oneofs&&(c.value="doubleValue")),t.arrayValue!=null&&t.hasOwnProperty("arrayValue")&&(c.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.toObject(t.arrayValue,r),r.oneofs&&(c.value="arrayValue")),t.kvlistValue!=null&&t.hasOwnProperty("kvlistValue")&&(c.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.toObject(t.kvlistValue,r),r.oneofs&&(c.value="kvlistValue")),t.bytesValue!=null&&t.hasOwnProperty("bytesValue")&&(c.bytesValue=r.bytes===String?f.base64.encode(t.bytesValue,0,t.bytesValue.length):r.bytes===Array?Array.prototype.slice.call(t.bytesValue):t.bytesValue,r.oneofs&&(c.value="bytesValue")),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.AnyValue"},a})(),s.ArrayValue=(function(){function a(u){if(this.values=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.values=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.values!=null&&e.values.length)for(var r=0;r<e.values.length;++r)p.opentelemetry.proto.common.v1.AnyValue.encode(e.values[r],t.uint32(10).fork()).ldelim();return t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.common.v1.ArrayValue;e.pos<c;){var d=e.uint32();if(d===r)break;d>>>3===1?(l.values&&l.values.length||(l.values=[]),l.values.push(p.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32()))):e.skipType(d&7)}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.values!=null&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var r=p.opentelemetry.proto.common.v1.AnyValue.verify(e.values[t]);if(r)return"values."+r}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.common.v1.ArrayValue)return e;var t=new p.opentelemetry.proto.common.v1.ArrayValue;if(e.values){if(!Array.isArray(e.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");t.values=[];for(var r=0;r<e.values.length;++r){if(typeof e.values[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");t.values[r]=p.opentelemetry.proto.common.v1.AnyValue.fromObject(e.values[r])}}return t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.values=[]),e.values&&e.values.length){r.values=[];for(var c=0;c<e.values.length;++c)r.values[c]=p.opentelemetry.proto.common.v1.AnyValue.toObject(e.values[c],t)}return r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.ArrayValue"},a})(),s.KeyValueList=(function(){function a(u){if(this.values=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.values=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.values!=null&&e.values.length)for(var r=0;r<e.values.length;++r)p.opentelemetry.proto.common.v1.KeyValue.encode(e.values[r],t.uint32(10).fork()).ldelim();return t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.common.v1.KeyValueList;e.pos<c;){var d=e.uint32();if(d===r)break;d>>>3===1?(l.values&&l.values.length||(l.values=[]),l.values.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()))):e.skipType(d&7)}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.values!=null&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var r=p.opentelemetry.proto.common.v1.KeyValue.verify(e.values[t]);if(r)return"values."+r}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.common.v1.KeyValueList)return e;var t=new p.opentelemetry.proto.common.v1.KeyValueList;if(e.values){if(!Array.isArray(e.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");t.values=[];for(var r=0;r<e.values.length;++r){if(typeof e.values[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");t.values[r]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.values[r])}}return t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.values=[]),e.values&&e.values.length){r.values=[];for(var c=0;c<e.values.length;++c)r.values[c]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.values[c],t)}return r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.KeyValueList"},a})(),s.KeyValue=(function(){function a(u){if(u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.key=null,a.prototype.value=null,a.create=function(e){return new a(e)},a.encode=function(e,t){return t||(t=O.create()),e.key!=null&&Object.hasOwnProperty.call(e,"key")&&t.uint32(10).string(e.key),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&p.opentelemetry.proto.common.v1.AnyValue.encode(e.value,t.uint32(18).fork()).ldelim(),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.common.v1.KeyValue;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.key=e.string();break}case 2:{l.value=p.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32());break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.key!=null&&e.hasOwnProperty("key")&&!f.isString(e.key))return"key: string expected";if(e.value!=null&&e.hasOwnProperty("value")){var t=p.opentelemetry.proto.common.v1.AnyValue.verify(e.value);if(t)return"value."+t}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.common.v1.KeyValue)return e;var t=new p.opentelemetry.proto.common.v1.KeyValue;if(e.key!=null&&(t.key=String(e.key)),e.value!=null){if(typeof e.value!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");t.value=p.opentelemetry.proto.common.v1.AnyValue.fromObject(e.value)}return t},a.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.key="",r.value=null),e.key!=null&&e.hasOwnProperty("key")&&(r.key=e.key),e.value!=null&&e.hasOwnProperty("value")&&(r.value=p.opentelemetry.proto.common.v1.AnyValue.toObject(e.value,t)),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.KeyValue"},a})(),s.InstrumentationScope=(function(){function a(u){if(this.attributes=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.name=null,a.prototype.version=null,a.prototype.attributes=f.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&t.uint32(18).string(e.version),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(32).uint32(e.droppedAttributesCount),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.common.v1.InstrumentationScope;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.name=e.string();break}case 2:{l.version=e.string();break}case 3:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 4:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name))return"name: string expected";if(e.version!=null&&e.hasOwnProperty("version")&&!f.isString(e.version))return"version: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.common.v1.InstrumentationScope)return e;var t=new p.opentelemetry.proto.common.v1.InstrumentationScope;if(e.name!=null&&(t.name=String(e.name)),e.version!=null&&(t.version=String(e.version)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");t.attributes[r]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}return e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[]),t.defaults&&(r.name="",r.version="",r.droppedAttributesCount=0),e.name!=null&&e.hasOwnProperty("name")&&(r.name=e.name),e.version!=null&&e.hasOwnProperty("version")&&(r.version=e.version),e.attributes&&e.attributes.length){r.attributes=[];for(var c=0;c<e.attributes.length;++c)r.attributes[c]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[c],t)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.InstrumentationScope"},a})(),s.EntityRef=(function(){function a(u){if(this.idKeys=[],this.descriptionKeys=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.schemaUrl=null,a.prototype.type=null,a.prototype.idKeys=f.emptyArray,a.prototype.descriptionKeys=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(10).string(e.schemaUrl),e.type!=null&&Object.hasOwnProperty.call(e,"type")&&t.uint32(18).string(e.type),e.idKeys!=null&&e.idKeys.length)for(var r=0;r<e.idKeys.length;++r)t.uint32(26).string(e.idKeys[r]);if(e.descriptionKeys!=null&&e.descriptionKeys.length)for(var r=0;r<e.descriptionKeys.length;++r)t.uint32(34).string(e.descriptionKeys[r]);return t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.common.v1.EntityRef;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.schemaUrl=e.string();break}case 2:{l.type=e.string();break}case 3:{l.idKeys&&l.idKeys.length||(l.idKeys=[]),l.idKeys.push(e.string());break}case 4:{l.descriptionKeys&&l.descriptionKeys.length||(l.descriptionKeys=[]),l.descriptionKeys.push(e.string());break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!f.isString(e.schemaUrl))return"schemaUrl: string expected";if(e.type!=null&&e.hasOwnProperty("type")&&!f.isString(e.type))return"type: string expected";if(e.idKeys!=null&&e.hasOwnProperty("idKeys")){if(!Array.isArray(e.idKeys))return"idKeys: array expected";for(var t=0;t<e.idKeys.length;++t)if(!f.isString(e.idKeys[t]))return"idKeys: string[] expected"}if(e.descriptionKeys!=null&&e.hasOwnProperty("descriptionKeys")){if(!Array.isArray(e.descriptionKeys))return"descriptionKeys: array expected";for(var t=0;t<e.descriptionKeys.length;++t)if(!f.isString(e.descriptionKeys[t]))return"descriptionKeys: string[] expected"}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.common.v1.EntityRef)return e;var t=new p.opentelemetry.proto.common.v1.EntityRef;if(e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),e.type!=null&&(t.type=String(e.type)),e.idKeys){if(!Array.isArray(e.idKeys))throw TypeError(".opentelemetry.proto.common.v1.EntityRef.idKeys: array expected");t.idKeys=[];for(var r=0;r<e.idKeys.length;++r)t.idKeys[r]=String(e.idKeys[r])}if(e.descriptionKeys){if(!Array.isArray(e.descriptionKeys))throw TypeError(".opentelemetry.proto.common.v1.EntityRef.descriptionKeys: array expected");t.descriptionKeys=[];for(var r=0;r<e.descriptionKeys.length;++r)t.descriptionKeys[r]=String(e.descriptionKeys[r])}return t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.idKeys=[],r.descriptionKeys=[]),t.defaults&&(r.schemaUrl="",r.type=""),e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),e.type!=null&&e.hasOwnProperty("type")&&(r.type=e.type),e.idKeys&&e.idKeys.length){r.idKeys=[];for(var c=0;c<e.idKeys.length;++c)r.idKeys[c]=e.idKeys[c]}if(e.descriptionKeys&&e.descriptionKeys.length){r.descriptionKeys=[];for(var c=0;c<e.descriptionKeys.length;++c)r.descriptionKeys[c]=e.descriptionKeys[c]}return r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.EntityRef"},a})(),s})(),i})(),n.resource=(function(){var i={};return i.v1=(function(){var s={};return s.Resource=(function(){function a(u){if(this.attributes=[],this.entityRefs=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.attributes=f.emptyArray,a.prototype.droppedAttributesCount=null,a.prototype.entityRefs=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(10).fork()).ldelim();if(e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(16).uint32(e.droppedAttributesCount),e.entityRefs!=null&&e.entityRefs.length)for(var r=0;r<e.entityRefs.length;++r)p.opentelemetry.proto.common.v1.EntityRef.encode(e.entityRefs[r],t.uint32(26).fork()).ldelim();return t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.resource.v1.Resource;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.droppedAttributesCount=e.uint32();break}case 3:{l.entityRefs&&l.entityRefs.length||(l.entityRefs=[]),l.entityRefs.push(p.opentelemetry.proto.common.v1.EntityRef.decode(e,e.uint32()));break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(e.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(e.entityRefs!=null&&e.hasOwnProperty("entityRefs")){if(!Array.isArray(e.entityRefs))return"entityRefs: array expected";for(var t=0;t<e.entityRefs.length;++t){var r=p.opentelemetry.proto.common.v1.EntityRef.verify(e.entityRefs[t]);if(r)return"entityRefs."+r}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.resource.v1.Resource)return e;var t=new p.opentelemetry.proto.resource.v1.Resource;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");t.attributes[r]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}if(e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),e.entityRefs){if(!Array.isArray(e.entityRefs))throw TypeError(".opentelemetry.proto.resource.v1.Resource.entityRefs: array expected");t.entityRefs=[];for(var r=0;r<e.entityRefs.length;++r){if(typeof e.entityRefs[r]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.entityRefs: object expected");t.entityRefs[r]=p.opentelemetry.proto.common.v1.EntityRef.fromObject(e.entityRefs[r])}}return t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[],r.entityRefs=[]),t.defaults&&(r.droppedAttributesCount=0),e.attributes&&e.attributes.length){r.attributes=[];for(var c=0;c<e.attributes.length;++c)r.attributes[c]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[c],t)}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),e.entityRefs&&e.entityRefs.length){r.entityRefs=[];for(var c=0;c<e.entityRefs.length;++c)r.entityRefs[c]=p.opentelemetry.proto.common.v1.EntityRef.toObject(e.entityRefs[c],t)}return r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.resource.v1.Resource"},a})(),s})(),i})(),n.trace=(function(){var i={};return i.v1=(function(){var s={};return s.TracesData=(function(){function a(u){if(this.resourceSpans=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.resourceSpans=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.resourceSpans!=null&&e.resourceSpans.length)for(var r=0;r<e.resourceSpans.length;++r)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[r],t.uint32(10).fork()).ldelim();return t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.trace.v1.TracesData;e.pos<c;){var d=e.uint32();if(d===r)break;d>>>3===1?(l.resourceSpans&&l.resourceSpans.length||(l.resourceSpans=[]),l.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()))):e.skipType(d&7)}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.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 t=0;t<e.resourceSpans.length;++t){var r=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[t]);if(r)return"resourceSpans."+r}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.TracesData)return e;var t=new p.opentelemetry.proto.trace.v1.TracesData;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");t.resourceSpans=[];for(var r=0;r<e.resourceSpans.length;++r){if(typeof e.resourceSpans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");t.resourceSpans[r]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[r])}}return t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){r.resourceSpans=[];for(var c=0;c<e.resourceSpans.length;++c)r.resourceSpans[c]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[c],t)}return r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.TracesData"},a})(),s.ResourceSpans=(function(){function a(u){if(this.scopeSpans=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.resource=null,a.prototype.scopeSpans=f.emptyArray,a.prototype.schemaUrl=null,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeSpans!=null&&e.scopeSpans.length)for(var r=0;r<e.scopeSpans.length;++r)p.opentelemetry.proto.trace.v1.ScopeSpans.encode(e.scopeSpans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.trace.v1.ResourceSpans;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.resource=p.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{l.scopeSpans&&l.scopeSpans.length||(l.scopeSpans=[]),l.scopeSpans.push(p.opentelemetry.proto.trace.v1.ScopeSpans.decode(e,e.uint32()));break}case 3:{l.schemaUrl=e.string();break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=p.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeSpans!=null&&e.hasOwnProperty("scopeSpans")){if(!Array.isArray(e.scopeSpans))return"scopeSpans: array expected";for(var r=0;r<e.scopeSpans.length;++r){var t=p.opentelemetry.proto.trace.v1.ScopeSpans.verify(e.scopeSpans[r]);if(t)return"scopeSpans."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!f.isString(e.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.ResourceSpans)return e;var t=new p.opentelemetry.proto.trace.v1.ResourceSpans;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");t.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeSpans){if(!Array.isArray(e.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");t.scopeSpans=[];for(var r=0;r<e.scopeSpans.length;++r){if(typeof e.scopeSpans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");t.scopeSpans[r]=p.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(e.scopeSpans[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeSpans=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeSpans&&e.scopeSpans.length){r.scopeSpans=[];for(var c=0;c<e.scopeSpans.length;++c)r.scopeSpans[c]=p.opentelemetry.proto.trace.v1.ScopeSpans.toObject(e.scopeSpans[c],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.ResourceSpans"},a})(),s.ScopeSpans=(function(){function a(u){if(this.spans=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.scope=null,a.prototype.spans=f.emptyArray,a.prototype.schemaUrl=null,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.spans!=null&&e.spans.length)for(var r=0;r<e.spans.length;++r)p.opentelemetry.proto.trace.v1.Span.encode(e.spans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.trace.v1.ScopeSpans;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{l.spans&&l.spans.length||(l.spans=[]),l.spans.push(p.opentelemetry.proto.trace.v1.Span.decode(e,e.uint32()));break}case 3:{l.schemaUrl=e.string();break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.spans!=null&&e.hasOwnProperty("spans")){if(!Array.isArray(e.spans))return"spans: array expected";for(var r=0;r<e.spans.length;++r){var t=p.opentelemetry.proto.trace.v1.Span.verify(e.spans[r]);if(t)return"spans."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!f.isString(e.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.ScopeSpans)return e;var t=new p.opentelemetry.proto.trace.v1.ScopeSpans;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");t.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.spans){if(!Array.isArray(e.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");t.spans=[];for(var r=0;r<e.spans.length;++r){if(typeof e.spans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");t.spans[r]=p.opentelemetry.proto.trace.v1.Span.fromObject(e.spans[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.spans=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.spans&&e.spans.length){r.spans=[];for(var c=0;c<e.spans.length;++c)r.spans[c]=p.opentelemetry.proto.trace.v1.Span.toObject(e.spans[c],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.ScopeSpans"},a})(),s.Span=(function(){function a(u){if(this.attributes=[],this.events=[],this.links=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.traceId=null,a.prototype.spanId=null,a.prototype.traceState=null,a.prototype.parentSpanId=null,a.prototype.flags=null,a.prototype.name=null,a.prototype.kind=null,a.prototype.startTimeUnixNano=null,a.prototype.endTimeUnixNano=null,a.prototype.attributes=f.emptyArray,a.prototype.droppedAttributesCount=null,a.prototype.events=f.emptyArray,a.prototype.droppedEventsCount=null,a.prototype.links=f.emptyArray,a.prototype.droppedLinksCount=null,a.prototype.status=null,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&t.uint32(10).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&t.uint32(18).bytes(e.spanId),e.traceState!=null&&Object.hasOwnProperty.call(e,"traceState")&&t.uint32(26).string(e.traceState),e.parentSpanId!=null&&Object.hasOwnProperty.call(e,"parentSpanId")&&t.uint32(34).bytes(e.parentSpanId),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(42).string(e.name),e.kind!=null&&Object.hasOwnProperty.call(e,"kind")&&t.uint32(48).int32(e.kind),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(57).fixed64(e.startTimeUnixNano),e.endTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"endTimeUnixNano")&&t.uint32(65).fixed64(e.endTimeUnixNano),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(74).fork()).ldelim();if(e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(80).uint32(e.droppedAttributesCount),e.events!=null&&e.events.length)for(var r=0;r<e.events.length;++r)p.opentelemetry.proto.trace.v1.Span.Event.encode(e.events[r],t.uint32(90).fork()).ldelim();if(e.droppedEventsCount!=null&&Object.hasOwnProperty.call(e,"droppedEventsCount")&&t.uint32(96).uint32(e.droppedEventsCount),e.links!=null&&e.links.length)for(var r=0;r<e.links.length;++r)p.opentelemetry.proto.trace.v1.Span.Link.encode(e.links[r],t.uint32(106).fork()).ldelim();return e.droppedLinksCount!=null&&Object.hasOwnProperty.call(e,"droppedLinksCount")&&t.uint32(112).uint32(e.droppedLinksCount),e.status!=null&&Object.hasOwnProperty.call(e,"status")&&p.opentelemetry.proto.trace.v1.Status.encode(e.status,t.uint32(122).fork()).ldelim(),e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(133).fixed32(e.flags),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.trace.v1.Span;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.traceId=e.bytes();break}case 2:{l.spanId=e.bytes();break}case 3:{l.traceState=e.string();break}case 4:{l.parentSpanId=e.bytes();break}case 16:{l.flags=e.fixed32();break}case 5:{l.name=e.string();break}case 6:{l.kind=e.int32();break}case 7:{l.startTimeUnixNano=e.fixed64();break}case 8:{l.endTimeUnixNano=e.fixed64();break}case 9:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 10:{l.droppedAttributesCount=e.uint32();break}case 11:{l.events&&l.events.length||(l.events=[]),l.events.push(p.opentelemetry.proto.trace.v1.Span.Event.decode(e,e.uint32()));break}case 12:{l.droppedEventsCount=e.uint32();break}case 13:{l.links&&l.links.length||(l.links=[]),l.links.push(p.opentelemetry.proto.trace.v1.Span.Link.decode(e,e.uint32()));break}case 14:{l.droppedLinksCount=e.uint32();break}case 15:{l.status=p.opentelemetry.proto.trace.v1.Status.decode(e,e.uint32());break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||f.isString(e.traceId)))return"traceId: buffer expected";if(e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||f.isString(e.spanId)))return"spanId: buffer expected";if(e.traceState!=null&&e.hasOwnProperty("traceState")&&!f.isString(e.traceState))return"traceState: string expected";if(e.parentSpanId!=null&&e.hasOwnProperty("parentSpanId")&&!(e.parentSpanId&&typeof e.parentSpanId.length=="number"||f.isString(e.parentSpanId)))return"parentSpanId: buffer expected";if(e.flags!=null&&e.hasOwnProperty("flags")&&!f.isInteger(e.flags))return"flags: integer expected";if(e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name))return"name: string expected";if(e.kind!=null&&e.hasOwnProperty("kind"))switch(e.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&f.isInteger(e.startTimeUnixNano.low)&&f.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.endTimeUnixNano!=null&&e.hasOwnProperty("endTimeUnixNano")&&!f.isInteger(e.endTimeUnixNano)&&!(e.endTimeUnixNano&&f.isInteger(e.endTimeUnixNano.low)&&f.isInteger(e.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(e.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(e.events!=null&&e.hasOwnProperty("events")){if(!Array.isArray(e.events))return"events: array expected";for(var t=0;t<e.events.length;++t){var r=p.opentelemetry.proto.trace.v1.Span.Event.verify(e.events[t]);if(r)return"events."+r}}if(e.droppedEventsCount!=null&&e.hasOwnProperty("droppedEventsCount")&&!f.isInteger(e.droppedEventsCount))return"droppedEventsCount: integer expected";if(e.links!=null&&e.hasOwnProperty("links")){if(!Array.isArray(e.links))return"links: array expected";for(var t=0;t<e.links.length;++t){var r=p.opentelemetry.proto.trace.v1.Span.Link.verify(e.links[t]);if(r)return"links."+r}}if(e.droppedLinksCount!=null&&e.hasOwnProperty("droppedLinksCount")&&!f.isInteger(e.droppedLinksCount))return"droppedLinksCount: integer expected";if(e.status!=null&&e.hasOwnProperty("status")){var r=p.opentelemetry.proto.trace.v1.Status.verify(e.status);if(r)return"status."+r}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span)return e;var t=new p.opentelemetry.proto.trace.v1.Span;switch(e.traceId!=null&&(typeof e.traceId=="string"?f.base64.decode(e.traceId,t.traceId=f.newBuffer(f.base64.length(e.traceId)),0):e.traceId.length>=0&&(t.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?f.base64.decode(e.spanId,t.spanId=f.newBuffer(f.base64.length(e.spanId)),0):e.spanId.length>=0&&(t.spanId=e.spanId)),e.traceState!=null&&(t.traceState=String(e.traceState)),e.parentSpanId!=null&&(typeof e.parentSpanId=="string"?f.base64.decode(e.parentSpanId,t.parentSpanId=f.newBuffer(f.base64.length(e.parentSpanId)),0):e.parentSpanId.length>=0&&(t.parentSpanId=e.parentSpanId)),e.flags!=null&&(t.flags=e.flags>>>0),e.name!=null&&(t.name=String(e.name)),e.kind){default:if(typeof e.kind=="number"){t.kind=e.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:t.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:t.kind=1;break;case"SPAN_KIND_SERVER":case 2:t.kind=2;break;case"SPAN_KIND_CLIENT":case 3:t.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:t.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:t.kind=5;break}if(e.startTimeUnixNano!=null&&(f.Long?(t.startTimeUnixNano=f.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?t.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(t.startTimeUnixNano=new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.endTimeUnixNano!=null&&(f.Long?(t.endTimeUnixNano=f.Long.fromValue(e.endTimeUnixNano)).unsigned=!1:typeof e.endTimeUnixNano=="string"?t.endTimeUnixNano=parseInt(e.endTimeUnixNano,10):typeof e.endTimeUnixNano=="number"?t.endTimeUnixNano=e.endTimeUnixNano:typeof e.endTimeUnixNano=="object"&&(t.endTimeUnixNano=new f.LongBits(e.endTimeUnixNano.low>>>0,e.endTimeUnixNano.high>>>0).toNumber())),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");t.attributes[r]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}if(e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),e.events){if(!Array.isArray(e.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");t.events=[];for(var r=0;r<e.events.length;++r){if(typeof e.events[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");t.events[r]=p.opentelemetry.proto.trace.v1.Span.Event.fromObject(e.events[r])}}if(e.droppedEventsCount!=null&&(t.droppedEventsCount=e.droppedEventsCount>>>0),e.links){if(!Array.isArray(e.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");t.links=[];for(var r=0;r<e.links.length;++r){if(typeof e.links[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");t.links[r]=p.opentelemetry.proto.trace.v1.Span.Link.fromObject(e.links[r])}}if(e.droppedLinksCount!=null&&(t.droppedLinksCount=e.droppedLinksCount>>>0),e.status!=null){if(typeof e.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");t.status=p.opentelemetry.proto.trace.v1.Status.fromObject(e.status)}return t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[],r.events=[],r.links=[]),t.defaults){if(t.bytes===String?r.traceId="":(r.traceId=[],t.bytes!==Array&&(r.traceId=f.newBuffer(r.traceId))),t.bytes===String?r.spanId="":(r.spanId=[],t.bytes!==Array&&(r.spanId=f.newBuffer(r.spanId))),r.traceState="",t.bytes===String?r.parentSpanId="":(r.parentSpanId=[],t.bytes!==Array&&(r.parentSpanId=f.newBuffer(r.parentSpanId))),r.name="",r.kind=t.enums===String?"SPAN_KIND_UNSPECIFIED":0,f.Long){var c=new f.Long(0,0,!1);r.startTimeUnixNano=t.longs===String?c.toString():t.longs===Number?c.toNumber():c}else r.startTimeUnixNano=t.longs===String?"0":0;if(f.Long){var c=new f.Long(0,0,!1);r.endTimeUnixNano=t.longs===String?c.toString():t.longs===Number?c.toNumber():c}else r.endTimeUnixNano=t.longs===String?"0":0;r.droppedAttributesCount=0,r.droppedEventsCount=0,r.droppedLinksCount=0,r.status=null,r.flags=0}if(e.traceId!=null&&e.hasOwnProperty("traceId")&&(r.traceId=t.bytes===String?f.base64.encode(e.traceId,0,e.traceId.length):t.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(r.spanId=t.bytes===String?f.base64.encode(e.spanId,0,e.spanId.length):t.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceState!=null&&e.hasOwnProperty("traceState")&&(r.traceState=e.traceState),e.parentSpanId!=null&&e.hasOwnProperty("parentSpanId")&&(r.parentSpanId=t.bytes===String?f.base64.encode(e.parentSpanId,0,e.parentSpanId.length):t.bytes===Array?Array.prototype.slice.call(e.parentSpanId):e.parentSpanId),e.name!=null&&e.hasOwnProperty("name")&&(r.name=e.name),e.kind!=null&&e.hasOwnProperty("kind")&&(r.kind=t.enums===String?p.opentelemetry.proto.trace.v1.Span.SpanKind[e.kind]===void 0?e.kind:p.opentelemetry.proto.trace.v1.Span.SpanKind[e.kind]:e.kind),e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?r.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:r.startTimeUnixNano=t.longs===String?f.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.endTimeUnixNano!=null&&e.hasOwnProperty("endTimeUnixNano")&&(typeof e.endTimeUnixNano=="number"?r.endTimeUnixNano=t.longs===String?String(e.endTimeUnixNano):e.endTimeUnixNano:r.endTimeUnixNano=t.longs===String?f.Long.prototype.toString.call(e.endTimeUnixNano):t.longs===Number?new f.LongBits(e.endTimeUnixNano.low>>>0,e.endTimeUnixNano.high>>>0).toNumber():e.endTimeUnixNano),e.attributes&&e.attributes.length){r.attributes=[];for(var l=0;l<e.attributes.length;++l)r.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[l],t)}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),e.events&&e.events.length){r.events=[];for(var l=0;l<e.events.length;++l)r.events[l]=p.opentelemetry.proto.trace.v1.Span.Event.toObject(e.events[l],t)}if(e.droppedEventsCount!=null&&e.hasOwnProperty("droppedEventsCount")&&(r.droppedEventsCount=e.droppedEventsCount),e.links&&e.links.length){r.links=[];for(var l=0;l<e.links.length;++l)r.links[l]=p.opentelemetry.proto.trace.v1.Span.Link.toObject(e.links[l],t)}return e.droppedLinksCount!=null&&e.hasOwnProperty("droppedLinksCount")&&(r.droppedLinksCount=e.droppedLinksCount),e.status!=null&&e.hasOwnProperty("status")&&(r.status=p.opentelemetry.proto.trace.v1.Status.toObject(e.status,t)),e.flags!=null&&e.hasOwnProperty("flags")&&(r.flags=e.flags),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span"},a.SpanKind=(function(){var u={},e=Object.create(u);return e[u[0]="SPAN_KIND_UNSPECIFIED"]=0,e[u[1]="SPAN_KIND_INTERNAL"]=1,e[u[2]="SPAN_KIND_SERVER"]=2,e[u[3]="SPAN_KIND_CLIENT"]=3,e[u[4]="SPAN_KIND_PRODUCER"]=4,e[u[5]="SPAN_KIND_CONSUMER"]=5,e})(),a.Event=(function(){function u(e){if(this.attributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return u.prototype.timeUnixNano=null,u.prototype.name=null,u.prototype.attributes=f.emptyArray,u.prototype.droppedAttributesCount=null,u.create=function(t){return new u(t)},u.encode=function(t,r){if(r||(r=O.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(9).fixed64(t.timeUnixNano),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&r.uint32(18).string(t.name),t.attributes!=null&&t.attributes.length)for(var c=0;c<t.attributes.length;++c)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[c],r.uint32(26).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&r.uint32(32).uint32(t.droppedAttributesCount),r},u.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},u.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.trace.v1.Span.Event;t.pos<l;){var y=t.uint32();if(y===c)break;switch(y>>>3){case 1:{d.timeUnixNano=t.fixed64();break}case 2:{d.name=t.string();break}case 3:{d.attributes&&d.attributes.length||(d.attributes=[]),d.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{d.droppedAttributesCount=t.uint32();break}default:t.skipType(y&7);break}}return d},u.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),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")&&!f.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&f.isInteger(t.timeUnixNano.low)&&f.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.name!=null&&t.hasOwnProperty("name")&&!f.isString(t.name))return"name: string expected";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 c=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[r]);if(c)return"attributes."+c}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},u.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.Span.Event)return t;var r=new p.opentelemetry.proto.trace.v1.Span.Event;if(t.timeUnixNano!=null&&(f.Long?(r.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.name!=null&&(r.name=String(t.name)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");r.attributes=[];for(var c=0;c<t.attributes.length;++c){if(typeof t.attributes[c]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");r.attributes[c]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[c])}}return t.droppedAttributesCount!=null&&(r.droppedAttributesCount=t.droppedAttributesCount>>>0),r},u.toObject=function(t,r){r||(r={});var c={};if((r.arrays||r.defaults)&&(c.attributes=[]),r.defaults){if(f.Long){var l=new f.Long(0,0,!1);c.timeUnixNano=r.longs===String?l.toString():r.longs===Number?l.toNumber():l}else c.timeUnixNano=r.longs===String?"0":0;c.name="",c.droppedAttributesCount=0}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?c.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:c.timeUnixNano=r.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.name!=null&&t.hasOwnProperty("name")&&(c.name=t.name),t.attributes&&t.attributes.length){c.attributes=[];for(var d=0;d<t.attributes.length;++d)c.attributes[d]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(c.droppedAttributesCount=t.droppedAttributesCount),c},u.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span.Event"},u})(),a.Link=(function(){function u(e){if(this.attributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return u.prototype.traceId=null,u.prototype.spanId=null,u.prototype.traceState=null,u.prototype.attributes=f.emptyArray,u.prototype.droppedAttributesCount=null,u.prototype.flags=null,u.create=function(t){return new u(t)},u.encode=function(t,r){if(r||(r=O.create()),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&r.uint32(10).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&r.uint32(18).bytes(t.spanId),t.traceState!=null&&Object.hasOwnProperty.call(t,"traceState")&&r.uint32(26).string(t.traceState),t.attributes!=null&&t.attributes.length)for(var c=0;c<t.attributes.length;++c)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[c],r.uint32(34).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&r.uint32(40).uint32(t.droppedAttributesCount),t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(53).fixed32(t.flags),r},u.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},u.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.trace.v1.Span.Link;t.pos<l;){var y=t.uint32();if(y===c)break;switch(y>>>3){case 1:{d.traceId=t.bytes();break}case 2:{d.spanId=t.bytes();break}case 3:{d.traceState=t.string();break}case 4:{d.attributes&&d.attributes.length||(d.attributes=[]),d.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 5:{d.droppedAttributesCount=t.uint32();break}case 6:{d.flags=t.fixed32();break}default:t.skipType(y&7);break}}return d},u.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),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")&&!(t.traceId&&typeof t.traceId.length=="number"||f.isString(t.traceId)))return"traceId: buffer expected";if(t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||f.isString(t.spanId)))return"spanId: buffer expected";if(t.traceState!=null&&t.hasOwnProperty("traceState")&&!f.isString(t.traceState))return"traceState: string expected";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 c=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[r]);if(c)return"attributes."+c}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":t.flags!=null&&t.hasOwnProperty("flags")&&!f.isInteger(t.flags)?"flags: integer expected":null},u.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.Span.Link)return t;var r=new p.opentelemetry.proto.trace.v1.Span.Link;if(t.traceId!=null&&(typeof t.traceId=="string"?f.base64.decode(t.traceId,r.traceId=f.newBuffer(f.base64.length(t.traceId)),0):t.traceId.length>=0&&(r.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?f.base64.decode(t.spanId,r.spanId=f.newBuffer(f.base64.length(t.spanId)),0):t.spanId.length>=0&&(r.spanId=t.spanId)),t.traceState!=null&&(r.traceState=String(t.traceState)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");r.attributes=[];for(var c=0;c<t.attributes.length;++c){if(typeof t.attributes[c]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");r.attributes[c]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[c])}}return t.droppedAttributesCount!=null&&(r.droppedAttributesCount=t.droppedAttributesCount>>>0),t.flags!=null&&(r.flags=t.flags>>>0),r},u.toObject=function(t,r){r||(r={});var c={};if((r.arrays||r.defaults)&&(c.attributes=[]),r.defaults&&(r.bytes===String?c.traceId="":(c.traceId=[],r.bytes!==Array&&(c.traceId=f.newBuffer(c.traceId))),r.bytes===String?c.spanId="":(c.spanId=[],r.bytes!==Array&&(c.spanId=f.newBuffer(c.spanId))),c.traceState="",c.droppedAttributesCount=0,c.flags=0),t.traceId!=null&&t.hasOwnProperty("traceId")&&(c.traceId=r.bytes===String?f.base64.encode(t.traceId,0,t.traceId.length):r.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(c.spanId=r.bytes===String?f.base64.encode(t.spanId,0,t.spanId.length):r.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceState!=null&&t.hasOwnProperty("traceState")&&(c.traceState=t.traceState),t.attributes&&t.attributes.length){c.attributes=[];for(var l=0;l<t.attributes.length;++l)c.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],r)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(c.droppedAttributesCount=t.droppedAttributesCount),t.flags!=null&&t.hasOwnProperty("flags")&&(c.flags=t.flags),c},u.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span.Link"},u})(),a})(),s.Status=(function(){function a(u){if(u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.message=null,a.prototype.code=null,a.create=function(e){return new a(e)},a.encode=function(e,t){return t||(t=O.create()),e.message!=null&&Object.hasOwnProperty.call(e,"message")&&t.uint32(18).string(e.message),e.code!=null&&Object.hasOwnProperty.call(e,"code")&&t.uint32(24).int32(e.code),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.trace.v1.Status;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 2:{l.message=e.string();break}case 3:{l.code=e.int32();break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.message!=null&&e.hasOwnProperty("message")&&!f.isString(e.message))return"message: string expected";if(e.code!=null&&e.hasOwnProperty("code"))switch(e.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Status)return e;var t=new p.opentelemetry.proto.trace.v1.Status;switch(e.message!=null&&(t.message=String(e.message)),e.code){default:if(typeof e.code=="number"){t.code=e.code;break}break;case"STATUS_CODE_UNSET":case 0:t.code=0;break;case"STATUS_CODE_OK":case 1:t.code=1;break;case"STATUS_CODE_ERROR":case 2:t.code=2;break}return t},a.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.message="",r.code=t.enums===String?"STATUS_CODE_UNSET":0),e.message!=null&&e.hasOwnProperty("message")&&(r.message=e.message),e.code!=null&&e.hasOwnProperty("code")&&(r.code=t.enums===String?p.opentelemetry.proto.trace.v1.Status.StatusCode[e.code]===void 0?e.code:p.opentelemetry.proto.trace.v1.Status.StatusCode[e.code]:e.code),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Status"},a.StatusCode=(function(){var u={},e=Object.create(u);return e[u[0]="STATUS_CODE_UNSET"]=0,e[u[1]="STATUS_CODE_OK"]=1,e[u[2]="STATUS_CODE_ERROR"]=2,e})(),a})(),s.SpanFlags=(function(){var a={},u=Object.create(a);return u[a[0]="SPAN_FLAGS_DO_NOT_USE"]=0,u[a[255]="SPAN_FLAGS_TRACE_FLAGS_MASK"]=255,u[a[256]="SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK"]=256,u[a[512]="SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK"]=512,u})(),s})(),i})(),n.collector=(function(){var i={};return i.trace=(function(){var s={};return s.v1=(function(){var a={};return a.TraceService=(function(){function u(e,t,r){S.rpc.Service.call(this,e,t,r)}return(u.prototype=Object.create(S.rpc.Service.prototype)).constructor=u,u.create=function(t,r,c){return new this(t,r,c)},Object.defineProperty(u.prototype.export=function e(t,r){return this.rpcCall(e,p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,t,r)},"name",{value:"Export"}),u})(),a.ExportTraceServiceRequest=(function(){function u(e){if(this.resourceSpans=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return u.prototype.resourceSpans=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,r){if(r||(r=O.create()),t.resourceSpans!=null&&t.resourceSpans.length)for(var c=0;c<t.resourceSpans.length;++c)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(t.resourceSpans[c],r.uint32(10).fork()).ldelim();return r},u.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},u.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;t.pos<l;){var y=t.uint32();if(y===c)break;y>>>3===1?(d.resourceSpans&&d.resourceSpans.length||(d.resourceSpans=[]),d.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()))):t.skipType(y&7)}return d},u.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),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 r=0;r<t.resourceSpans.length;++r){var c=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(t.resourceSpans[r]);if(c)return"resourceSpans."+c}}return null},u.fromObject=function(t){if(t instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return t;var r=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(t.resourceSpans){if(!Array.isArray(t.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");r.resourceSpans=[];for(var c=0;c<t.resourceSpans.length;++c){if(typeof t.resourceSpans[c]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");r.resourceSpans[c]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(t.resourceSpans[c])}}return r},u.toObject=function(t,r){r||(r={});var c={};if((r.arrays||r.defaults)&&(c.resourceSpans=[]),t.resourceSpans&&t.resourceSpans.length){c.resourceSpans=[];for(var l=0;l<t.resourceSpans.length;++l)c.resourceSpans[l]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[l],r)}return c},u.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},u})(),a.ExportTraceServiceResponse=(function(){function u(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return u.prototype.partialSuccess=null,u.create=function(t){return new u(t)},u.encode=function(t,r){return r||(r=O.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},u.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},u.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;t.pos<l;){var y=t.uint32();if(y===c)break;y>>>3===1?d.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(t,t.uint32()):t.skipType(y&7)}return d},u.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},u.fromObject=function(t){if(t instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return t;var r=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");r.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(t.partialSuccess)}return r},u.toObject=function(t,r){r||(r={});var c={};return r.defaults&&(c.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(c.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(t.partialSuccess,r)),c},u.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},u})(),a.ExportTracePartialSuccess=(function(){function u(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return u.prototype.rejectedSpans=null,u.prototype.errorMessage=null,u.create=function(t){return new u(t)},u.encode=function(t,r){return r||(r=O.create()),t.rejectedSpans!=null&&Object.hasOwnProperty.call(t,"rejectedSpans")&&r.uint32(8).int64(t.rejectedSpans),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},u.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},u.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;t.pos<l;){var y=t.uint32();if(y===c)break;switch(y>>>3){case 1:{d.rejectedSpans=t.int64();break}case 2:{d.errorMessage=t.string();break}default:t.skipType(y&7);break}}return d},u.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},u.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedSpans!=null&&t.hasOwnProperty("rejectedSpans")&&!f.isInteger(t.rejectedSpans)&&!(t.rejectedSpans&&f.isInteger(t.rejectedSpans.low)&&f.isInteger(t.rejectedSpans.high))?"rejectedSpans: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!f.isString(t.errorMessage)?"errorMessage: string expected":null},u.fromObject=function(t){if(t instanceof p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return t;var r=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return t.rejectedSpans!=null&&(f.Long?(r.rejectedSpans=f.Long.fromValue(t.rejectedSpans)).unsigned=!1:typeof t.rejectedSpans=="string"?r.rejectedSpans=parseInt(t.rejectedSpans,10):typeof t.rejectedSpans=="number"?r.rejectedSpans=t.rejectedSpans:typeof t.rejectedSpans=="object"&&(r.rejectedSpans=new f.LongBits(t.rejectedSpans.low>>>0,t.rejectedSpans.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},u.toObject=function(t,r){r||(r={});var c={};if(r.defaults){if(f.Long){var l=new f.Long(0,0,!1);c.rejectedSpans=r.longs===String?l.toString():r.longs===Number?l.toNumber():l}else c.rejectedSpans=r.longs===String?"0":0;c.errorMessage=""}return t.rejectedSpans!=null&&t.hasOwnProperty("rejectedSpans")&&(typeof t.rejectedSpans=="number"?c.rejectedSpans=r.longs===String?String(t.rejectedSpans):t.rejectedSpans:c.rejectedSpans=r.longs===String?f.Long.prototype.toString.call(t.rejectedSpans):r.longs===Number?new f.LongBits(t.rejectedSpans.low>>>0,t.rejectedSpans.high>>>0).toNumber():t.rejectedSpans),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(c.errorMessage=t.errorMessage),c},u.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},u})(),a})(),s})(),i.metrics=(function(){var s={};return s.v1=(function(){var a={};return a.MetricsService=(function(){function u(e,t,r){S.rpc.Service.call(this,e,t,r)}return(u.prototype=Object.create(S.rpc.Service.prototype)).constructor=u,u.create=function(t,r,c){return new this(t,r,c)},Object.defineProperty(u.prototype.export=function e(t,r){return this.rpcCall(e,p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,t,r)},"name",{value:"Export"}),u})(),a.ExportMetricsServiceRequest=(function(){function u(e){if(this.resourceMetrics=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return u.prototype.resourceMetrics=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,r){if(r||(r=O.create()),t.resourceMetrics!=null&&t.resourceMetrics.length)for(var c=0;c<t.resourceMetrics.length;++c)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(t.resourceMetrics[c],r.uint32(10).fork()).ldelim();return r},u.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},u.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;t.pos<l;){var y=t.uint32();if(y===c)break;y>>>3===1?(d.resourceMetrics&&d.resourceMetrics.length||(d.resourceMetrics=[]),d.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()))):t.skipType(y&7)}return d},u.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),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 r=0;r<t.resourceMetrics.length;++r){var c=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(t.resourceMetrics[r]);if(c)return"resourceMetrics."+c}}return null},u.fromObject=function(t){if(t instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return t;var r=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(t.resourceMetrics){if(!Array.isArray(t.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");r.resourceMetrics=[];for(var c=0;c<t.resourceMetrics.length;++c){if(typeof t.resourceMetrics[c]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");r.resourceMetrics[c]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(t.resourceMetrics[c])}}return r},u.toObject=function(t,r){r||(r={});var c={};if((r.arrays||r.defaults)&&(c.resourceMetrics=[]),t.resourceMetrics&&t.resourceMetrics.length){c.resourceMetrics=[];for(var l=0;l<t.resourceMetrics.length;++l)c.resourceMetrics[l]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[l],r)}return c},u.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},u})(),a.ExportMetricsServiceResponse=(function(){function u(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return u.prototype.partialSuccess=null,u.create=function(t){return new u(t)},u.encode=function(t,r){return r||(r=O.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},u.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},u.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;t.pos<l;){var y=t.uint32();if(y===c)break;y>>>3===1?d.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(t,t.uint32()):t.skipType(y&7)}return d},u.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},u.fromObject=function(t){if(t instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return t;var r=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");r.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(t.partialSuccess)}return r},u.toObject=function(t,r){r||(r={});var c={};return r.defaults&&(c.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(c.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(t.partialSuccess,r)),c},u.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},u})(),a.ExportMetricsPartialSuccess=(function(){function u(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return u.prototype.rejectedDataPoints=null,u.prototype.errorMessage=null,u.create=function(t){return new u(t)},u.encode=function(t,r){return r||(r=O.create()),t.rejectedDataPoints!=null&&Object.hasOwnProperty.call(t,"rejectedDataPoints")&&r.uint32(8).int64(t.rejectedDataPoints),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},u.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},u.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;t.pos<l;){var y=t.uint32();if(y===c)break;switch(y>>>3){case 1:{d.rejectedDataPoints=t.int64();break}case 2:{d.errorMessage=t.string();break}default:t.skipType(y&7);break}}return d},u.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},u.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedDataPoints!=null&&t.hasOwnProperty("rejectedDataPoints")&&!f.isInteger(t.rejectedDataPoints)&&!(t.rejectedDataPoints&&f.isInteger(t.rejectedDataPoints.low)&&f.isInteger(t.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!f.isString(t.errorMessage)?"errorMessage: string expected":null},u.fromObject=function(t){if(t instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return t;var r=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return t.rejectedDataPoints!=null&&(f.Long?(r.rejectedDataPoints=f.Long.fromValue(t.rejectedDataPoints)).unsigned=!1:typeof t.rejectedDataPoints=="string"?r.rejectedDataPoints=parseInt(t.rejectedDataPoints,10):typeof t.rejectedDataPoints=="number"?r.rejectedDataPoints=t.rejectedDataPoints:typeof t.rejectedDataPoints=="object"&&(r.rejectedDataPoints=new f.LongBits(t.rejectedDataPoints.low>>>0,t.rejectedDataPoints.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},u.toObject=function(t,r){r||(r={});var c={};if(r.defaults){if(f.Long){var l=new f.Long(0,0,!1);c.rejectedDataPoints=r.longs===String?l.toString():r.longs===Number?l.toNumber():l}else c.rejectedDataPoints=r.longs===String?"0":0;c.errorMessage=""}return t.rejectedDataPoints!=null&&t.hasOwnProperty("rejectedDataPoints")&&(typeof t.rejectedDataPoints=="number"?c.rejectedDataPoints=r.longs===String?String(t.rejectedDataPoints):t.rejectedDataPoints:c.rejectedDataPoints=r.longs===String?f.Long.prototype.toString.call(t.rejectedDataPoints):r.longs===Number?new f.LongBits(t.rejectedDataPoints.low>>>0,t.rejectedDataPoints.high>>>0).toNumber():t.rejectedDataPoints),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(c.errorMessage=t.errorMessage),c},u.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},u})(),a})(),s})(),i.logs=(function(){var s={};return s.v1=(function(){var a={};return a.LogsService=(function(){function u(e,t,r){S.rpc.Service.call(this,e,t,r)}return(u.prototype=Object.create(S.rpc.Service.prototype)).constructor=u,u.create=function(t,r,c){return new this(t,r,c)},Object.defineProperty(u.prototype.export=function e(t,r){return this.rpcCall(e,p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,t,r)},"name",{value:"Export"}),u})(),a.ExportLogsServiceRequest=(function(){function u(e){if(this.resourceLogs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return u.prototype.resourceLogs=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,r){if(r||(r=O.create()),t.resourceLogs!=null&&t.resourceLogs.length)for(var c=0;c<t.resourceLogs.length;++c)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(t.resourceLogs[c],r.uint32(10).fork()).ldelim();return r},u.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},u.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;t.pos<l;){var y=t.uint32();if(y===c)break;y>>>3===1?(d.resourceLogs&&d.resourceLogs.length||(d.resourceLogs=[]),d.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()))):t.skipType(y&7)}return d},u.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),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 r=0;r<t.resourceLogs.length;++r){var c=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(t.resourceLogs[r]);if(c)return"resourceLogs."+c}}return null},u.fromObject=function(t){if(t instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return t;var r=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(t.resourceLogs){if(!Array.isArray(t.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");r.resourceLogs=[];for(var c=0;c<t.resourceLogs.length;++c){if(typeof t.resourceLogs[c]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");r.resourceLogs[c]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(t.resourceLogs[c])}}return r},u.toObject=function(t,r){r||(r={});var c={};if((r.arrays||r.defaults)&&(c.resourceLogs=[]),t.resourceLogs&&t.resourceLogs.length){c.resourceLogs=[];for(var l=0;l<t.resourceLogs.length;++l)c.resourceLogs[l]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[l],r)}return c},u.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},u})(),a.ExportLogsServiceResponse=(function(){function u(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return u.prototype.partialSuccess=null,u.create=function(t){return new u(t)},u.encode=function(t,r){return r||(r=O.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},u.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},u.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;t.pos<l;){var y=t.uint32();if(y===c)break;y>>>3===1?d.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(t,t.uint32()):t.skipType(y&7)}return d},u.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},u.fromObject=function(t){if(t instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return t;var r=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");r.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(t.partialSuccess)}return r},u.toObject=function(t,r){r||(r={});var c={};return r.defaults&&(c.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(c.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(t.partialSuccess,r)),c},u.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},u})(),a.ExportLogsPartialSuccess=(function(){function u(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return u.prototype.rejectedLogRecords=null,u.prototype.errorMessage=null,u.create=function(t){return new u(t)},u.encode=function(t,r){return r||(r=O.create()),t.rejectedLogRecords!=null&&Object.hasOwnProperty.call(t,"rejectedLogRecords")&&r.uint32(8).int64(t.rejectedLogRecords),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},u.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},u.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;t.pos<l;){var y=t.uint32();if(y===c)break;switch(y>>>3){case 1:{d.rejectedLogRecords=t.int64();break}case 2:{d.errorMessage=t.string();break}default:t.skipType(y&7);break}}return d},u.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},u.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedLogRecords!=null&&t.hasOwnProperty("rejectedLogRecords")&&!f.isInteger(t.rejectedLogRecords)&&!(t.rejectedLogRecords&&f.isInteger(t.rejectedLogRecords.low)&&f.isInteger(t.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!f.isString(t.errorMessage)?"errorMessage: string expected":null},u.fromObject=function(t){if(t instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return t;var r=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return t.rejectedLogRecords!=null&&(f.Long?(r.rejectedLogRecords=f.Long.fromValue(t.rejectedLogRecords)).unsigned=!1:typeof t.rejectedLogRecords=="string"?r.rejectedLogRecords=parseInt(t.rejectedLogRecords,10):typeof t.rejectedLogRecords=="number"?r.rejectedLogRecords=t.rejectedLogRecords:typeof t.rejectedLogRecords=="object"&&(r.rejectedLogRecords=new f.LongBits(t.rejectedLogRecords.low>>>0,t.rejectedLogRecords.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},u.toObject=function(t,r){r||(r={});var c={};if(r.defaults){if(f.Long){var l=new f.Long(0,0,!1);c.rejectedLogRecords=r.longs===String?l.toString():r.longs===Number?l.toNumber():l}else c.rejectedLogRecords=r.longs===String?"0":0;c.errorMessage=""}return t.rejectedLogRecords!=null&&t.hasOwnProperty("rejectedLogRecords")&&(typeof t.rejectedLogRecords=="number"?c.rejectedLogRecords=r.longs===String?String(t.rejectedLogRecords):t.rejectedLogRecords:c.rejectedLogRecords=r.longs===String?f.Long.prototype.toString.call(t.rejectedLogRecords):r.longs===Number?new f.LongBits(t.rejectedLogRecords.low>>>0,t.rejectedLogRecords.high>>>0).toNumber():t.rejectedLogRecords),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(c.errorMessage=t.errorMessage),c},u.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},u})(),a})(),s})(),i})(),n.metrics=(function(){var i={};return i.v1=(function(){var s={};return s.MetricsData=(function(){function a(u){if(this.resourceMetrics=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.resourceMetrics=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.resourceMetrics!=null&&e.resourceMetrics.length)for(var r=0;r<e.resourceMetrics.length;++r)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[r],t.uint32(10).fork()).ldelim();return t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.metrics.v1.MetricsData;e.pos<c;){var d=e.uint32();if(d===r)break;d>>>3===1?(l.resourceMetrics&&l.resourceMetrics.length||(l.resourceMetrics=[]),l.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()))):e.skipType(d&7)}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.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 t=0;t<e.resourceMetrics.length;++t){var r=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[t]);if(r)return"resourceMetrics."+r}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.MetricsData)return e;var t=new p.opentelemetry.proto.metrics.v1.MetricsData;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");t.resourceMetrics=[];for(var r=0;r<e.resourceMetrics.length;++r){if(typeof e.resourceMetrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");t.resourceMetrics[r]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[r])}}return t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){r.resourceMetrics=[];for(var c=0;c<e.resourceMetrics.length;++c)r.resourceMetrics[c]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[c],t)}return r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.MetricsData"},a})(),s.ResourceMetrics=(function(){function a(u){if(this.scopeMetrics=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.resource=null,a.prototype.scopeMetrics=f.emptyArray,a.prototype.schemaUrl=null,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeMetrics!=null&&e.scopeMetrics.length)for(var r=0;r<e.scopeMetrics.length;++r)p.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(e.scopeMetrics[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.resource=p.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{l.scopeMetrics&&l.scopeMetrics.length||(l.scopeMetrics=[]),l.scopeMetrics.push(p.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(e,e.uint32()));break}case 3:{l.schemaUrl=e.string();break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=p.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeMetrics!=null&&e.hasOwnProperty("scopeMetrics")){if(!Array.isArray(e.scopeMetrics))return"scopeMetrics: array expected";for(var r=0;r<e.scopeMetrics.length;++r){var t=p.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(e.scopeMetrics[r]);if(t)return"scopeMetrics."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!f.isString(e.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.ResourceMetrics)return e;var t=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");t.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeMetrics){if(!Array.isArray(e.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");t.scopeMetrics=[];for(var r=0;r<e.scopeMetrics.length;++r){if(typeof e.scopeMetrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");t.scopeMetrics[r]=p.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(e.scopeMetrics[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeMetrics=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeMetrics&&e.scopeMetrics.length){r.scopeMetrics=[];for(var c=0;c<e.scopeMetrics.length;++c)r.scopeMetrics[c]=p.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(e.scopeMetrics[c],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},a})(),s.ScopeMetrics=(function(){function a(u){if(this.metrics=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.scope=null,a.prototype.metrics=f.emptyArray,a.prototype.schemaUrl=null,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.metrics!=null&&e.metrics.length)for(var r=0;r<e.metrics.length;++r)p.opentelemetry.proto.metrics.v1.Metric.encode(e.metrics[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{l.metrics&&l.metrics.length||(l.metrics=[]),l.metrics.push(p.opentelemetry.proto.metrics.v1.Metric.decode(e,e.uint32()));break}case 3:{l.schemaUrl=e.string();break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.metrics!=null&&e.hasOwnProperty("metrics")){if(!Array.isArray(e.metrics))return"metrics: array expected";for(var r=0;r<e.metrics.length;++r){var t=p.opentelemetry.proto.metrics.v1.Metric.verify(e.metrics[r]);if(t)return"metrics."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!f.isString(e.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.ScopeMetrics)return e;var t=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");t.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.metrics){if(!Array.isArray(e.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");t.metrics=[];for(var r=0;r<e.metrics.length;++r){if(typeof e.metrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");t.metrics[r]=p.opentelemetry.proto.metrics.v1.Metric.fromObject(e.metrics[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.metrics=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.metrics&&e.metrics.length){r.metrics=[];for(var c=0;c<e.metrics.length;++c)r.metrics[c]=p.opentelemetry.proto.metrics.v1.Metric.toObject(e.metrics[c],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},a})(),s.Metric=(function(){function a(e){if(this.metadata=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}a.prototype.name=null,a.prototype.description=null,a.prototype.unit=null,a.prototype.gauge=null,a.prototype.sum=null,a.prototype.histogram=null,a.prototype.exponentialHistogram=null,a.prototype.summary=null,a.prototype.metadata=f.emptyArray;var u;return Object.defineProperty(a.prototype,"data",{get:f.oneOfGetter(u=["gauge","sum","histogram","exponentialHistogram","summary"]),set:f.oneOfSetter(u)}),a.create=function(t){return new a(t)},a.encode=function(t,r){if(r||(r=O.create()),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&r.uint32(10).string(t.name),t.description!=null&&Object.hasOwnProperty.call(t,"description")&&r.uint32(18).string(t.description),t.unit!=null&&Object.hasOwnProperty.call(t,"unit")&&r.uint32(26).string(t.unit),t.gauge!=null&&Object.hasOwnProperty.call(t,"gauge")&&p.opentelemetry.proto.metrics.v1.Gauge.encode(t.gauge,r.uint32(42).fork()).ldelim(),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&p.opentelemetry.proto.metrics.v1.Sum.encode(t.sum,r.uint32(58).fork()).ldelim(),t.histogram!=null&&Object.hasOwnProperty.call(t,"histogram")&&p.opentelemetry.proto.metrics.v1.Histogram.encode(t.histogram,r.uint32(74).fork()).ldelim(),t.exponentialHistogram!=null&&Object.hasOwnProperty.call(t,"exponentialHistogram")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(t.exponentialHistogram,r.uint32(82).fork()).ldelim(),t.summary!=null&&Object.hasOwnProperty.call(t,"summary")&&p.opentelemetry.proto.metrics.v1.Summary.encode(t.summary,r.uint32(90).fork()).ldelim(),t.metadata!=null&&t.metadata.length)for(var c=0;c<t.metadata.length;++c)p.opentelemetry.proto.common.v1.KeyValue.encode(t.metadata[c],r.uint32(98).fork()).ldelim();return r},a.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},a.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.metrics.v1.Metric;t.pos<l;){var y=t.uint32();if(y===c)break;switch(y>>>3){case 1:{d.name=t.string();break}case 2:{d.description=t.string();break}case 3:{d.unit=t.string();break}case 5:{d.gauge=p.opentelemetry.proto.metrics.v1.Gauge.decode(t,t.uint32());break}case 7:{d.sum=p.opentelemetry.proto.metrics.v1.Sum.decode(t,t.uint32());break}case 9:{d.histogram=p.opentelemetry.proto.metrics.v1.Histogram.decode(t,t.uint32());break}case 10:{d.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(t,t.uint32());break}case 11:{d.summary=p.opentelemetry.proto.metrics.v1.Summary.decode(t,t.uint32());break}case 12:{d.metadata&&d.metadata.length||(d.metadata=[]),d.metadata.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return d},a.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.name!=null&&t.hasOwnProperty("name")&&!f.isString(t.name))return"name: string expected";if(t.description!=null&&t.hasOwnProperty("description")&&!f.isString(t.description))return"description: string expected";if(t.unit!=null&&t.hasOwnProperty("unit")&&!f.isString(t.unit))return"unit: string expected";if(t.gauge!=null&&t.hasOwnProperty("gauge")){r.data=1;{var c=p.opentelemetry.proto.metrics.v1.Gauge.verify(t.gauge);if(c)return"gauge."+c}}if(t.sum!=null&&t.hasOwnProperty("sum")){if(r.data===1)return"data: multiple values";r.data=1;{var c=p.opentelemetry.proto.metrics.v1.Sum.verify(t.sum);if(c)return"sum."+c}}if(t.histogram!=null&&t.hasOwnProperty("histogram")){if(r.data===1)return"data: multiple values";r.data=1;{var c=p.opentelemetry.proto.metrics.v1.Histogram.verify(t.histogram);if(c)return"histogram."+c}}if(t.exponentialHistogram!=null&&t.hasOwnProperty("exponentialHistogram")){if(r.data===1)return"data: multiple values";r.data=1;{var c=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(t.exponentialHistogram);if(c)return"exponentialHistogram."+c}}if(t.summary!=null&&t.hasOwnProperty("summary")){if(r.data===1)return"data: multiple values";r.data=1;{var c=p.opentelemetry.proto.metrics.v1.Summary.verify(t.summary);if(c)return"summary."+c}}if(t.metadata!=null&&t.hasOwnProperty("metadata")){if(!Array.isArray(t.metadata))return"metadata: array expected";for(var l=0;l<t.metadata.length;++l){var c=p.opentelemetry.proto.common.v1.KeyValue.verify(t.metadata[l]);if(c)return"metadata."+c}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Metric)return t;var r=new p.opentelemetry.proto.metrics.v1.Metric;if(t.name!=null&&(r.name=String(t.name)),t.description!=null&&(r.description=String(t.description)),t.unit!=null&&(r.unit=String(t.unit)),t.gauge!=null){if(typeof t.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");r.gauge=p.opentelemetry.proto.metrics.v1.Gauge.fromObject(t.gauge)}if(t.sum!=null){if(typeof t.sum!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");r.sum=p.opentelemetry.proto.metrics.v1.Sum.fromObject(t.sum)}if(t.histogram!=null){if(typeof t.histogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");r.histogram=p.opentelemetry.proto.metrics.v1.Histogram.fromObject(t.histogram)}if(t.exponentialHistogram!=null){if(typeof t.exponentialHistogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");r.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(t.exponentialHistogram)}if(t.summary!=null){if(typeof t.summary!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");r.summary=p.opentelemetry.proto.metrics.v1.Summary.fromObject(t.summary)}if(t.metadata){if(!Array.isArray(t.metadata))throw TypeError(".opentelemetry.proto.metrics.v1.Metric.metadata: array expected");r.metadata=[];for(var c=0;c<t.metadata.length;++c){if(typeof t.metadata[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.metadata: object expected");r.metadata[c]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.metadata[c])}}return r},a.toObject=function(t,r){r||(r={});var c={};if((r.arrays||r.defaults)&&(c.metadata=[]),r.defaults&&(c.name="",c.description="",c.unit=""),t.name!=null&&t.hasOwnProperty("name")&&(c.name=t.name),t.description!=null&&t.hasOwnProperty("description")&&(c.description=t.description),t.unit!=null&&t.hasOwnProperty("unit")&&(c.unit=t.unit),t.gauge!=null&&t.hasOwnProperty("gauge")&&(c.gauge=p.opentelemetry.proto.metrics.v1.Gauge.toObject(t.gauge,r),r.oneofs&&(c.data="gauge")),t.sum!=null&&t.hasOwnProperty("sum")&&(c.sum=p.opentelemetry.proto.metrics.v1.Sum.toObject(t.sum,r),r.oneofs&&(c.data="sum")),t.histogram!=null&&t.hasOwnProperty("histogram")&&(c.histogram=p.opentelemetry.proto.metrics.v1.Histogram.toObject(t.histogram,r),r.oneofs&&(c.data="histogram")),t.exponentialHistogram!=null&&t.hasOwnProperty("exponentialHistogram")&&(c.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(t.exponentialHistogram,r),r.oneofs&&(c.data="exponentialHistogram")),t.summary!=null&&t.hasOwnProperty("summary")&&(c.summary=p.opentelemetry.proto.metrics.v1.Summary.toObject(t.summary,r),r.oneofs&&(c.data="summary")),t.metadata&&t.metadata.length){c.metadata=[];for(var l=0;l<t.metadata.length;++l)c.metadata[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.metadata[l],r)}return c},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Metric"},a})(),s.Gauge=(function(){function a(u){if(this.dataPoints=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.dataPoints=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)p.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.metrics.v1.Gauge;e.pos<c;){var d=e.uint32();if(d===r)break;d>>>3===1?(l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(e,e.uint32()))):e.skipType(d&7)}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=p.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.Gauge)return e;var t=new p.opentelemetry.proto.metrics.v1.Gauge;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");t.dataPoints[r]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(e.dataPoints[r])}}return t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var c=0;c<e.dataPoints.length;++c)r.dataPoints[c]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(e.dataPoints[c],t)}return r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Gauge"},a})(),s.Sum=(function(){function a(u){if(this.dataPoints=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.dataPoints=f.emptyArray,a.prototype.aggregationTemporality=null,a.prototype.isMonotonic=null,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)p.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),e.isMonotonic!=null&&Object.hasOwnProperty.call(e,"isMonotonic")&&t.uint32(24).bool(e.isMonotonic),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.metrics.v1.Sum;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(e,e.uint32()));break}case 2:{l.aggregationTemporality=e.int32();break}case 3:{l.isMonotonic=e.bool();break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=p.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return e.isMonotonic!=null&&e.hasOwnProperty("isMonotonic")&&typeof e.isMonotonic!="boolean"?"isMonotonic: boolean expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.Sum)return e;var t=new p.opentelemetry.proto.metrics.v1.Sum;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");t.dataPoints[r]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return e.isMonotonic!=null&&(t.isMonotonic=!!e.isMonotonic),t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,r.isMonotonic=!1),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var c=0;c<e.dataPoints.length;++c)r.dataPoints[c]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(e.dataPoints[c],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),e.isMonotonic!=null&&e.hasOwnProperty("isMonotonic")&&(r.isMonotonic=e.isMonotonic),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Sum"},a})(),s.Histogram=(function(){function a(u){if(this.dataPoints=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.dataPoints=f.emptyArray,a.prototype.aggregationTemporality=null,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)p.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.metrics.v1.Histogram;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(p.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(e,e.uint32()));break}case 2:{l.aggregationTemporality=e.int32();break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.Histogram)return e;var t=new p.opentelemetry.proto.metrics.v1.Histogram;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");t.dataPoints[r]=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var c=0;c<e.dataPoints.length;++c)r.dataPoints[c]=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(e.dataPoints[c],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Histogram"},a})(),s.ExponentialHistogram=(function(){function a(u){if(this.dataPoints=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.dataPoints=f.emptyArray,a.prototype.aggregationTemporality=null,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(e,e.uint32()));break}case 2:{l.aggregationTemporality=e.int32();break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogram)return e;var t=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");t.dataPoints[r]=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var c=0;c<e.dataPoints.length;++c)r.dataPoints[c]=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(e.dataPoints[c],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},a})(),s.Summary=(function(){function a(u){if(this.dataPoints=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.dataPoints=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)p.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.metrics.v1.Summary;e.pos<c;){var d=e.uint32();if(d===r)break;d>>>3===1?(l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(e,e.uint32()))):e.skipType(d&7)}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.Summary)return e;var t=new p.opentelemetry.proto.metrics.v1.Summary;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");t.dataPoints[r]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(e.dataPoints[r])}}return t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var c=0;c<e.dataPoints.length;++c)r.dataPoints[c]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(e.dataPoints[c],t)}return r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Summary"},a})(),s.AggregationTemporality=(function(){var a={},u=Object.create(a);return u[a[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,u[a[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,u[a[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,u})(),s.DataPointFlags=(function(){var a={},u=Object.create(a);return u[a[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,u[a[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,u})(),s.NumberDataPoint=(function(){function a(e){if(this.attributes=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}a.prototype.attributes=f.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.asDouble=null,a.prototype.asInt=null,a.prototype.exemplars=f.emptyArray,a.prototype.flags=null;var u;return Object.defineProperty(a.prototype,"value",{get:f.oneOfGetter(u=["asDouble","asInt"]),set:f.oneOfSetter(u)}),a.create=function(t){return new a(t)},a.encode=function(t,r){if(r||(r=O.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.asDouble!=null&&Object.hasOwnProperty.call(t,"asDouble")&&r.uint32(33).double(t.asDouble),t.exemplars!=null&&t.exemplars.length)for(var c=0;c<t.exemplars.length;++c)p.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[c],r.uint32(42).fork()).ldelim();if(t.asInt!=null&&Object.hasOwnProperty.call(t,"asInt")&&r.uint32(49).sfixed64(t.asInt),t.attributes!=null&&t.attributes.length)for(var c=0;c<t.attributes.length;++c)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[c],r.uint32(58).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(64).uint32(t.flags),r},a.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},a.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;t.pos<l;){var y=t.uint32();if(y===c)break;switch(y>>>3){case 7:{d.attributes&&d.attributes.length||(d.attributes=[]),d.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{d.startTimeUnixNano=t.fixed64();break}case 3:{d.timeUnixNano=t.fixed64();break}case 4:{d.asDouble=t.double();break}case 6:{d.asInt=t.sfixed64();break}case 5:{d.exemplars&&d.exemplars.length||(d.exemplars=[]),d.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 8:{d.flags=t.uint32();break}default:t.skipType(y&7);break}}return d},a.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var c=0;c<t.attributes.length;++c){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[c]);if(l)return"attributes."+l}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&f.isInteger(t.startTimeUnixNano.low)&&f.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!f.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&f.isInteger(t.timeUnixNano.low)&&f.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(r.value=1,typeof t.asDouble!="number"))return"asDouble: number expected";if(t.asInt!=null&&t.hasOwnProperty("asInt")){if(r.value===1)return"value: multiple values";if(r.value=1,!f.isInteger(t.asInt)&&!(t.asInt&&f.isInteger(t.asInt.low)&&f.isInteger(t.asInt.high)))return"asInt: integer|Long expected"}if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var c=0;c<t.exemplars.length;++c){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[c]);if(l)return"exemplars."+l}}return t.flags!=null&&t.hasOwnProperty("flags")&&!f.isInteger(t.flags)?"flags: integer expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.NumberDataPoint)return t;var r=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");r.attributes=[];for(var c=0;c<t.attributes.length;++c){if(typeof t.attributes[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");r.attributes[c]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[c])}}if(t.startTimeUnixNano!=null&&(f.Long?(r.startTimeUnixNano=f.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(f.Long?(r.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.asDouble!=null&&(r.asDouble=Number(t.asDouble)),t.asInt!=null&&(f.Long?(r.asInt=f.Long.fromValue(t.asInt)).unsigned=!1:typeof t.asInt=="string"?r.asInt=parseInt(t.asInt,10):typeof t.asInt=="number"?r.asInt=t.asInt:typeof t.asInt=="object"&&(r.asInt=new f.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber())),t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");r.exemplars=[];for(var c=0;c<t.exemplars.length;++c){if(typeof t.exemplars[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");r.exemplars[c]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[c])}}return t.flags!=null&&(r.flags=t.flags>>>0),r},a.toObject=function(t,r){r||(r={});var c={};if((r.arrays||r.defaults)&&(c.exemplars=[],c.attributes=[]),r.defaults){if(f.Long){var l=new f.Long(0,0,!1);c.startTimeUnixNano=r.longs===String?l.toString():r.longs===Number?l.toNumber():l}else c.startTimeUnixNano=r.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);c.timeUnixNano=r.longs===String?l.toString():r.longs===Number?l.toNumber():l}else c.timeUnixNano=r.longs===String?"0":0;c.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?c.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:c.startTimeUnixNano=r.longs===String?f.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?c.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:c.timeUnixNano=r.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(c.asDouble=r.json&&!isFinite(t.asDouble)?String(t.asDouble):t.asDouble,r.oneofs&&(c.value="asDouble")),t.exemplars&&t.exemplars.length){c.exemplars=[];for(var d=0;d<t.exemplars.length;++d)c.exemplars[d]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}if(t.asInt!=null&&t.hasOwnProperty("asInt")&&(typeof t.asInt=="number"?c.asInt=r.longs===String?String(t.asInt):t.asInt:c.asInt=r.longs===String?f.Long.prototype.toString.call(t.asInt):r.longs===Number?new f.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber():t.asInt,r.oneofs&&(c.value="asInt")),t.attributes&&t.attributes.length){c.attributes=[];for(var d=0;d<t.attributes.length;++d)c.attributes[d]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.flags!=null&&t.hasOwnProperty("flags")&&(c.flags=t.flags),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},a})(),s.HistogramDataPoint=(function(){function a(e){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}a.prototype.attributes=f.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.count=null,a.prototype.sum=null,a.prototype.bucketCounts=f.emptyArray,a.prototype.explicitBounds=f.emptyArray,a.prototype.exemplars=f.emptyArray,a.prototype.flags=null,a.prototype.min=null,a.prototype.max=null;var u;return Object.defineProperty(a.prototype,"_sum",{get:f.oneOfGetter(u=["sum"]),set:f.oneOfSetter(u)}),Object.defineProperty(a.prototype,"_min",{get:f.oneOfGetter(u=["min"]),set:f.oneOfSetter(u)}),Object.defineProperty(a.prototype,"_max",{get:f.oneOfGetter(u=["max"]),set:f.oneOfSetter(u)}),a.create=function(t){return new a(t)},a.encode=function(t,r){if(r||(r=O.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&r.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&r.uint32(41).double(t.sum),t.bucketCounts!=null&&t.bucketCounts.length){r.uint32(50).fork();for(var c=0;c<t.bucketCounts.length;++c)r.fixed64(t.bucketCounts[c]);r.ldelim()}if(t.explicitBounds!=null&&t.explicitBounds.length){r.uint32(58).fork();for(var c=0;c<t.explicitBounds.length;++c)r.double(t.explicitBounds[c]);r.ldelim()}if(t.exemplars!=null&&t.exemplars.length)for(var c=0;c<t.exemplars.length;++c)p.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[c],r.uint32(66).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var c=0;c<t.attributes.length;++c)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[c],r.uint32(74).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(80).uint32(t.flags),t.min!=null&&Object.hasOwnProperty.call(t,"min")&&r.uint32(89).double(t.min),t.max!=null&&Object.hasOwnProperty.call(t,"max")&&r.uint32(97).double(t.max),r},a.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},a.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;t.pos<l;){var y=t.uint32();if(y===c)break;switch(y>>>3){case 9:{d.attributes&&d.attributes.length||(d.attributes=[]),d.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{d.startTimeUnixNano=t.fixed64();break}case 3:{d.timeUnixNano=t.fixed64();break}case 4:{d.count=t.fixed64();break}case 5:{d.sum=t.double();break}case 6:{if(d.bucketCounts&&d.bucketCounts.length||(d.bucketCounts=[]),(y&7)===2)for(var A=t.uint32()+t.pos;t.pos<A;)d.bucketCounts.push(t.fixed64());else d.bucketCounts.push(t.fixed64());break}case 7:{if(d.explicitBounds&&d.explicitBounds.length||(d.explicitBounds=[]),(y&7)===2)for(var A=t.uint32()+t.pos;t.pos<A;)d.explicitBounds.push(t.double());else d.explicitBounds.push(t.double());break}case 8:{d.exemplars&&d.exemplars.length||(d.exemplars=[]),d.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 10:{d.flags=t.uint32();break}case 11:{d.min=t.double();break}case 12:{d.max=t.double();break}default:t.skipType(y&7);break}}return d},a.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var c=0;c<t.attributes.length;++c){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[c]);if(l)return"attributes."+l}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&f.isInteger(t.startTimeUnixNano.low)&&f.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!f.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&f.isInteger(t.timeUnixNano.low)&&f.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!f.isInteger(t.count)&&!(t.count&&f.isInteger(t.count.low)&&f.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&(r._sum=1,typeof t.sum!="number"))return"sum: number expected";if(t.bucketCounts!=null&&t.hasOwnProperty("bucketCounts")){if(!Array.isArray(t.bucketCounts))return"bucketCounts: array expected";for(var c=0;c<t.bucketCounts.length;++c)if(!f.isInteger(t.bucketCounts[c])&&!(t.bucketCounts[c]&&f.isInteger(t.bucketCounts[c].low)&&f.isInteger(t.bucketCounts[c].high)))return"bucketCounts: integer|Long[] expected"}if(t.explicitBounds!=null&&t.hasOwnProperty("explicitBounds")){if(!Array.isArray(t.explicitBounds))return"explicitBounds: array expected";for(var c=0;c<t.explicitBounds.length;++c)if(typeof t.explicitBounds[c]!="number")return"explicitBounds: number[] expected"}if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var c=0;c<t.exemplars.length;++c){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[c]);if(l)return"exemplars."+l}}return t.flags!=null&&t.hasOwnProperty("flags")&&!f.isInteger(t.flags)?"flags: integer expected":t.min!=null&&t.hasOwnProperty("min")&&(r._min=1,typeof t.min!="number")?"min: number expected":t.max!=null&&t.hasOwnProperty("max")&&(r._max=1,typeof t.max!="number")?"max: number expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.HistogramDataPoint)return t;var r=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");r.attributes=[];for(var c=0;c<t.attributes.length;++c){if(typeof t.attributes[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");r.attributes[c]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[c])}}if(t.startTimeUnixNano!=null&&(f.Long?(r.startTimeUnixNano=f.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(f.Long?(r.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(f.Long?(r.count=f.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?r.count=parseInt(t.count,10):typeof t.count=="number"?r.count=t.count:typeof t.count=="object"&&(r.count=new f.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(r.sum=Number(t.sum)),t.bucketCounts){if(!Array.isArray(t.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");r.bucketCounts=[];for(var c=0;c<t.bucketCounts.length;++c)f.Long?(r.bucketCounts[c]=f.Long.fromValue(t.bucketCounts[c])).unsigned=!1:typeof t.bucketCounts[c]=="string"?r.bucketCounts[c]=parseInt(t.bucketCounts[c],10):typeof t.bucketCounts[c]=="number"?r.bucketCounts[c]=t.bucketCounts[c]:typeof t.bucketCounts[c]=="object"&&(r.bucketCounts[c]=new f.LongBits(t.bucketCounts[c].low>>>0,t.bucketCounts[c].high>>>0).toNumber())}if(t.explicitBounds){if(!Array.isArray(t.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");r.explicitBounds=[];for(var c=0;c<t.explicitBounds.length;++c)r.explicitBounds[c]=Number(t.explicitBounds[c])}if(t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");r.exemplars=[];for(var c=0;c<t.exemplars.length;++c){if(typeof t.exemplars[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");r.exemplars[c]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[c])}}return t.flags!=null&&(r.flags=t.flags>>>0),t.min!=null&&(r.min=Number(t.min)),t.max!=null&&(r.max=Number(t.max)),r},a.toObject=function(t,r){r||(r={});var c={};if((r.arrays||r.defaults)&&(c.bucketCounts=[],c.explicitBounds=[],c.exemplars=[],c.attributes=[]),r.defaults){if(f.Long){var l=new f.Long(0,0,!1);c.startTimeUnixNano=r.longs===String?l.toString():r.longs===Number?l.toNumber():l}else c.startTimeUnixNano=r.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);c.timeUnixNano=r.longs===String?l.toString():r.longs===Number?l.toNumber():l}else c.timeUnixNano=r.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);c.count=r.longs===String?l.toString():r.longs===Number?l.toNumber():l}else c.count=r.longs===String?"0":0;c.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?c.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:c.startTimeUnixNano=r.longs===String?f.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?c.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:c.timeUnixNano=r.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?c.count=r.longs===String?String(t.count):t.count:c.count=r.longs===String?f.Long.prototype.toString.call(t.count):r.longs===Number?new f.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(c.sum=r.json&&!isFinite(t.sum)?String(t.sum):t.sum,r.oneofs&&(c._sum="sum")),t.bucketCounts&&t.bucketCounts.length){c.bucketCounts=[];for(var d=0;d<t.bucketCounts.length;++d)typeof t.bucketCounts[d]=="number"?c.bucketCounts[d]=r.longs===String?String(t.bucketCounts[d]):t.bucketCounts[d]:c.bucketCounts[d]=r.longs===String?f.Long.prototype.toString.call(t.bucketCounts[d]):r.longs===Number?new f.LongBits(t.bucketCounts[d].low>>>0,t.bucketCounts[d].high>>>0).toNumber():t.bucketCounts[d]}if(t.explicitBounds&&t.explicitBounds.length){c.explicitBounds=[];for(var d=0;d<t.explicitBounds.length;++d)c.explicitBounds[d]=r.json&&!isFinite(t.explicitBounds[d])?String(t.explicitBounds[d]):t.explicitBounds[d]}if(t.exemplars&&t.exemplars.length){c.exemplars=[];for(var d=0;d<t.exemplars.length;++d)c.exemplars[d]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}if(t.attributes&&t.attributes.length){c.attributes=[];for(var d=0;d<t.attributes.length;++d)c.attributes[d]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.flags!=null&&t.hasOwnProperty("flags")&&(c.flags=t.flags),t.min!=null&&t.hasOwnProperty("min")&&(c.min=r.json&&!isFinite(t.min)?String(t.min):t.min,r.oneofs&&(c._min="min")),t.max!=null&&t.hasOwnProperty("max")&&(c.max=r.json&&!isFinite(t.max)?String(t.max):t.max,r.oneofs&&(c._max="max")),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},a})(),s.ExponentialHistogramDataPoint=(function(){function a(e){if(this.attributes=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}a.prototype.attributes=f.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.count=null,a.prototype.sum=null,a.prototype.scale=null,a.prototype.zeroCount=null,a.prototype.positive=null,a.prototype.negative=null,a.prototype.flags=null,a.prototype.exemplars=f.emptyArray,a.prototype.min=null,a.prototype.max=null,a.prototype.zeroThreshold=null;var u;return Object.defineProperty(a.prototype,"_sum",{get:f.oneOfGetter(u=["sum"]),set:f.oneOfSetter(u)}),Object.defineProperty(a.prototype,"_min",{get:f.oneOfGetter(u=["min"]),set:f.oneOfSetter(u)}),Object.defineProperty(a.prototype,"_max",{get:f.oneOfGetter(u=["max"]),set:f.oneOfSetter(u)}),a.create=function(t){return new a(t)},a.encode=function(t,r){if(r||(r=O.create()),t.attributes!=null&&t.attributes.length)for(var c=0;c<t.attributes.length;++c)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[c],r.uint32(10).fork()).ldelim();if(t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&r.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&r.uint32(41).double(t.sum),t.scale!=null&&Object.hasOwnProperty.call(t,"scale")&&r.uint32(48).sint32(t.scale),t.zeroCount!=null&&Object.hasOwnProperty.call(t,"zeroCount")&&r.uint32(57).fixed64(t.zeroCount),t.positive!=null&&Object.hasOwnProperty.call(t,"positive")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(t.positive,r.uint32(66).fork()).ldelim(),t.negative!=null&&Object.hasOwnProperty.call(t,"negative")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(t.negative,r.uint32(74).fork()).ldelim(),t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(80).uint32(t.flags),t.exemplars!=null&&t.exemplars.length)for(var c=0;c<t.exemplars.length;++c)p.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[c],r.uint32(90).fork()).ldelim();return t.min!=null&&Object.hasOwnProperty.call(t,"min")&&r.uint32(97).double(t.min),t.max!=null&&Object.hasOwnProperty.call(t,"max")&&r.uint32(105).double(t.max),t.zeroThreshold!=null&&Object.hasOwnProperty.call(t,"zeroThreshold")&&r.uint32(113).double(t.zeroThreshold),r},a.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},a.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;t.pos<l;){var y=t.uint32();if(y===c)break;switch(y>>>3){case 1:{d.attributes&&d.attributes.length||(d.attributes=[]),d.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{d.startTimeUnixNano=t.fixed64();break}case 3:{d.timeUnixNano=t.fixed64();break}case 4:{d.count=t.fixed64();break}case 5:{d.sum=t.double();break}case 6:{d.scale=t.sint32();break}case 7:{d.zeroCount=t.fixed64();break}case 8:{d.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(t,t.uint32());break}case 9:{d.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(t,t.uint32());break}case 10:{d.flags=t.uint32();break}case 11:{d.exemplars&&d.exemplars.length||(d.exemplars=[]),d.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 12:{d.min=t.double();break}case 13:{d.max=t.double();break}case 14:{d.zeroThreshold=t.double();break}default:t.skipType(y&7);break}}return d},a.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var c=0;c<t.attributes.length;++c){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[c]);if(l)return"attributes."+l}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&f.isInteger(t.startTimeUnixNano.low)&&f.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!f.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&f.isInteger(t.timeUnixNano.low)&&f.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!f.isInteger(t.count)&&!(t.count&&f.isInteger(t.count.low)&&f.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&(r._sum=1,typeof t.sum!="number"))return"sum: number expected";if(t.scale!=null&&t.hasOwnProperty("scale")&&!f.isInteger(t.scale))return"scale: integer expected";if(t.zeroCount!=null&&t.hasOwnProperty("zeroCount")&&!f.isInteger(t.zeroCount)&&!(t.zeroCount&&f.isInteger(t.zeroCount.low)&&f.isInteger(t.zeroCount.high)))return"zeroCount: integer|Long expected";if(t.positive!=null&&t.hasOwnProperty("positive")){var l=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(t.positive);if(l)return"positive."+l}if(t.negative!=null&&t.hasOwnProperty("negative")){var l=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(t.negative);if(l)return"negative."+l}if(t.flags!=null&&t.hasOwnProperty("flags")&&!f.isInteger(t.flags))return"flags: integer expected";if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var c=0;c<t.exemplars.length;++c){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[c]);if(l)return"exemplars."+l}}return t.min!=null&&t.hasOwnProperty("min")&&(r._min=1,typeof t.min!="number")?"min: number expected":t.max!=null&&t.hasOwnProperty("max")&&(r._max=1,typeof t.max!="number")?"max: number expected":t.zeroThreshold!=null&&t.hasOwnProperty("zeroThreshold")&&typeof t.zeroThreshold!="number"?"zeroThreshold: number expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return t;var r=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");r.attributes=[];for(var c=0;c<t.attributes.length;++c){if(typeof t.attributes[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");r.attributes[c]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[c])}}if(t.startTimeUnixNano!=null&&(f.Long?(r.startTimeUnixNano=f.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(f.Long?(r.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(f.Long?(r.count=f.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?r.count=parseInt(t.count,10):typeof t.count=="number"?r.count=t.count:typeof t.count=="object"&&(r.count=new f.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(r.sum=Number(t.sum)),t.scale!=null&&(r.scale=t.scale|0),t.zeroCount!=null&&(f.Long?(r.zeroCount=f.Long.fromValue(t.zeroCount)).unsigned=!1:typeof t.zeroCount=="string"?r.zeroCount=parseInt(t.zeroCount,10):typeof t.zeroCount=="number"?r.zeroCount=t.zeroCount:typeof t.zeroCount=="object"&&(r.zeroCount=new f.LongBits(t.zeroCount.low>>>0,t.zeroCount.high>>>0).toNumber())),t.positive!=null){if(typeof t.positive!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");r.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(t.positive)}if(t.negative!=null){if(typeof t.negative!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");r.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(t.negative)}if(t.flags!=null&&(r.flags=t.flags>>>0),t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");r.exemplars=[];for(var c=0;c<t.exemplars.length;++c){if(typeof t.exemplars[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");r.exemplars[c]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[c])}}return t.min!=null&&(r.min=Number(t.min)),t.max!=null&&(r.max=Number(t.max)),t.zeroThreshold!=null&&(r.zeroThreshold=Number(t.zeroThreshold)),r},a.toObject=function(t,r){r||(r={});var c={};if((r.arrays||r.defaults)&&(c.attributes=[],c.exemplars=[]),r.defaults){if(f.Long){var l=new f.Long(0,0,!1);c.startTimeUnixNano=r.longs===String?l.toString():r.longs===Number?l.toNumber():l}else c.startTimeUnixNano=r.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);c.timeUnixNano=r.longs===String?l.toString():r.longs===Number?l.toNumber():l}else c.timeUnixNano=r.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);c.count=r.longs===String?l.toString():r.longs===Number?l.toNumber():l}else c.count=r.longs===String?"0":0;if(c.scale=0,f.Long){var l=new f.Long(0,0,!1);c.zeroCount=r.longs===String?l.toString():r.longs===Number?l.toNumber():l}else c.zeroCount=r.longs===String?"0":0;c.positive=null,c.negative=null,c.flags=0,c.zeroThreshold=0}if(t.attributes&&t.attributes.length){c.attributes=[];for(var d=0;d<t.attributes.length;++d)c.attributes[d]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?c.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:c.startTimeUnixNano=r.longs===String?f.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?c.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:c.timeUnixNano=r.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?c.count=r.longs===String?String(t.count):t.count:c.count=r.longs===String?f.Long.prototype.toString.call(t.count):r.longs===Number?new f.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(c.sum=r.json&&!isFinite(t.sum)?String(t.sum):t.sum,r.oneofs&&(c._sum="sum")),t.scale!=null&&t.hasOwnProperty("scale")&&(c.scale=t.scale),t.zeroCount!=null&&t.hasOwnProperty("zeroCount")&&(typeof t.zeroCount=="number"?c.zeroCount=r.longs===String?String(t.zeroCount):t.zeroCount:c.zeroCount=r.longs===String?f.Long.prototype.toString.call(t.zeroCount):r.longs===Number?new f.LongBits(t.zeroCount.low>>>0,t.zeroCount.high>>>0).toNumber():t.zeroCount),t.positive!=null&&t.hasOwnProperty("positive")&&(c.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(t.positive,r)),t.negative!=null&&t.hasOwnProperty("negative")&&(c.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(t.negative,r)),t.flags!=null&&t.hasOwnProperty("flags")&&(c.flags=t.flags),t.exemplars&&t.exemplars.length){c.exemplars=[];for(var d=0;d<t.exemplars.length;++d)c.exemplars[d]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}return t.min!=null&&t.hasOwnProperty("min")&&(c.min=r.json&&!isFinite(t.min)?String(t.min):t.min,r.oneofs&&(c._min="min")),t.max!=null&&t.hasOwnProperty("max")&&(c.max=r.json&&!isFinite(t.max)?String(t.max):t.max,r.oneofs&&(c._max="max")),t.zeroThreshold!=null&&t.hasOwnProperty("zeroThreshold")&&(c.zeroThreshold=r.json&&!isFinite(t.zeroThreshold)?String(t.zeroThreshold):t.zeroThreshold),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},a.Buckets=(function(){function e(t){if(this.bucketCounts=[],t)for(var r=Object.keys(t),c=0;c<r.length;++c)t[r[c]]!=null&&(this[r[c]]=t[r[c]])}return e.prototype.offset=null,e.prototype.bucketCounts=f.emptyArray,e.create=function(r){return new e(r)},e.encode=function(r,c){if(c||(c=O.create()),r.offset!=null&&Object.hasOwnProperty.call(r,"offset")&&c.uint32(8).sint32(r.offset),r.bucketCounts!=null&&r.bucketCounts.length){c.uint32(18).fork();for(var l=0;l<r.bucketCounts.length;++l)c.uint64(r.bucketCounts[l]);c.ldelim()}return c},e.encodeDelimited=function(r,c){return this.encode(r,c).ldelim()},e.decode=function(r,c,l){r instanceof m||(r=m.create(r));for(var d=c===void 0?r.len:r.pos+c,y=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;r.pos<d;){var A=r.uint32();if(A===l)break;switch(A>>>3){case 1:{y.offset=r.sint32();break}case 2:{if(y.bucketCounts&&y.bucketCounts.length||(y.bucketCounts=[]),(A&7)===2)for(var b=r.uint32()+r.pos;r.pos<b;)y.bucketCounts.push(r.uint64());else y.bucketCounts.push(r.uint64());break}default:r.skipType(A&7);break}}return y},e.decodeDelimited=function(r){return r instanceof m||(r=new m(r)),this.decode(r,r.uint32())},e.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.offset!=null&&r.hasOwnProperty("offset")&&!f.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 c=0;c<r.bucketCounts.length;++c)if(!f.isInteger(r.bucketCounts[c])&&!(r.bucketCounts[c]&&f.isInteger(r.bucketCounts[c].low)&&f.isInteger(r.bucketCounts[c].high)))return"bucketCounts: integer|Long[] expected"}return null},e.fromObject=function(r){if(r instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return r;var c=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(r.offset!=null&&(c.offset=r.offset|0),r.bucketCounts){if(!Array.isArray(r.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");c.bucketCounts=[];for(var l=0;l<r.bucketCounts.length;++l)f.Long?(c.bucketCounts[l]=f.Long.fromValue(r.bucketCounts[l])).unsigned=!0:typeof r.bucketCounts[l]=="string"?c.bucketCounts[l]=parseInt(r.bucketCounts[l],10):typeof r.bucketCounts[l]=="number"?c.bucketCounts[l]=r.bucketCounts[l]:typeof r.bucketCounts[l]=="object"&&(c.bucketCounts[l]=new f.LongBits(r.bucketCounts[l].low>>>0,r.bucketCounts[l].high>>>0).toNumber(!0))}return c},e.toObject=function(r,c){c||(c={});var l={};if((c.arrays||c.defaults)&&(l.bucketCounts=[]),c.defaults&&(l.offset=0),r.offset!=null&&r.hasOwnProperty("offset")&&(l.offset=r.offset),r.bucketCounts&&r.bucketCounts.length){l.bucketCounts=[];for(var d=0;d<r.bucketCounts.length;++d)typeof r.bucketCounts[d]=="number"?l.bucketCounts[d]=c.longs===String?String(r.bucketCounts[d]):r.bucketCounts[d]:l.bucketCounts[d]=c.longs===String?f.Long.prototype.toString.call(r.bucketCounts[d]):c.longs===Number?new f.LongBits(r.bucketCounts[d].low>>>0,r.bucketCounts[d].high>>>0).toNumber(!0):r.bucketCounts[d]}return l},e.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},e.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},e})(),a})(),s.SummaryDataPoint=(function(){function a(u){if(this.attributes=[],this.quantileValues=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.attributes=f.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.count=null,a.prototype.sum=null,a.prototype.quantileValues=f.emptyArray,a.prototype.flags=null,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&t.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&t.uint32(41).double(e.sum),e.quantileValues!=null&&e.quantileValues.length)for(var r=0;r<e.quantileValues.length;++r)p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(e.quantileValues[r],t.uint32(50).fork()).ldelim();if(e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(58).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(64).uint32(e.flags),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 7:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{l.quantileValues&&l.quantileValues.length||(l.quantileValues=[]),l.quantileValues.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(e,e.uint32()));break}case 8:{l.flags=e.uint32();break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&f.isInteger(e.startTimeUnixNano.low)&&f.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!f.isInteger(e.count)&&!(e.count&&f.isInteger(e.count.low)&&f.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&typeof e.sum!="number")return"sum: number expected";if(e.quantileValues!=null&&e.hasOwnProperty("quantileValues")){if(!Array.isArray(e.quantileValues))return"quantileValues: array expected";for(var t=0;t<e.quantileValues.length;++t){var r=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(e.quantileValues[t]);if(r)return"quantileValues."+r}}return e.flags!=null&&e.hasOwnProperty("flags")&&!f.isInteger(e.flags)?"flags: integer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint)return e;var t=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");t.attributes[r]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}if(e.startTimeUnixNano!=null&&(f.Long?(t.startTimeUnixNano=f.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?t.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(t.startTimeUnixNano=new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(f.Long?(t.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?t.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?t.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(t.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(f.Long?(t.count=f.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?t.count=parseInt(e.count,10):typeof e.count=="number"?t.count=e.count:typeof e.count=="object"&&(t.count=new f.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(t.sum=Number(e.sum)),e.quantileValues){if(!Array.isArray(e.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");t.quantileValues=[];for(var r=0;r<e.quantileValues.length;++r){if(typeof e.quantileValues[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");t.quantileValues[r]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(e.quantileValues[r])}}return e.flags!=null&&(t.flags=e.flags>>>0),t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.quantileValues=[],r.attributes=[]),t.defaults){if(f.Long){var c=new f.Long(0,0,!1);r.startTimeUnixNano=t.longs===String?c.toString():t.longs===Number?c.toNumber():c}else r.startTimeUnixNano=t.longs===String?"0":0;if(f.Long){var c=new f.Long(0,0,!1);r.timeUnixNano=t.longs===String?c.toString():t.longs===Number?c.toNumber():c}else r.timeUnixNano=t.longs===String?"0":0;if(f.Long){var c=new f.Long(0,0,!1);r.count=t.longs===String?c.toString():t.longs===Number?c.toNumber():c}else r.count=t.longs===String?"0":0;r.sum=0,r.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?r.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:r.startTimeUnixNano=t.longs===String?f.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?r.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:r.timeUnixNano=t.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?r.count=t.longs===String?String(e.count):e.count:r.count=t.longs===String?f.Long.prototype.toString.call(e.count):t.longs===Number?new f.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(r.sum=t.json&&!isFinite(e.sum)?String(e.sum):e.sum),e.quantileValues&&e.quantileValues.length){r.quantileValues=[];for(var l=0;l<e.quantileValues.length;++l)r.quantileValues[l]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(e.quantileValues[l],t)}if(e.attributes&&e.attributes.length){r.attributes=[];for(var l=0;l<e.attributes.length;++l)r.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[l],t)}return e.flags!=null&&e.hasOwnProperty("flags")&&(r.flags=e.flags),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},a.ValueAtQuantile=(function(){function u(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return u.prototype.quantile=null,u.prototype.value=null,u.create=function(t){return new u(t)},u.encode=function(t,r){return r||(r=O.create()),t.quantile!=null&&Object.hasOwnProperty.call(t,"quantile")&&r.uint32(9).double(t.quantile),t.value!=null&&Object.hasOwnProperty.call(t,"value")&&r.uint32(17).double(t.value),r},u.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},u.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;t.pos<l;){var y=t.uint32();if(y===c)break;switch(y>>>3){case 1:{d.quantile=t.double();break}case 2:{d.value=t.double();break}default:t.skipType(y&7);break}}return d},u.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},u.verify=function(t){return typeof t!="object"||t===null?"object expected":t.quantile!=null&&t.hasOwnProperty("quantile")&&typeof t.quantile!="number"?"quantile: number expected":t.value!=null&&t.hasOwnProperty("value")&&typeof t.value!="number"?"value: number expected":null},u.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return t;var r=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return t.quantile!=null&&(r.quantile=Number(t.quantile)),t.value!=null&&(r.value=Number(t.value)),r},u.toObject=function(t,r){r||(r={});var c={};return r.defaults&&(c.quantile=0,c.value=0),t.quantile!=null&&t.hasOwnProperty("quantile")&&(c.quantile=r.json&&!isFinite(t.quantile)?String(t.quantile):t.quantile),t.value!=null&&t.hasOwnProperty("value")&&(c.value=r.json&&!isFinite(t.value)?String(t.value):t.value),c},u.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},u})(),a})(),s.Exemplar=(function(){function a(e){if(this.filteredAttributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}a.prototype.filteredAttributes=f.emptyArray,a.prototype.timeUnixNano=null,a.prototype.asDouble=null,a.prototype.asInt=null,a.prototype.spanId=null,a.prototype.traceId=null;var u;return Object.defineProperty(a.prototype,"value",{get:f.oneOfGetter(u=["asDouble","asInt"]),set:f.oneOfSetter(u)}),a.create=function(t){return new a(t)},a.encode=function(t,r){if(r||(r=O.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(17).fixed64(t.timeUnixNano),t.asDouble!=null&&Object.hasOwnProperty.call(t,"asDouble")&&r.uint32(25).double(t.asDouble),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&r.uint32(34).bytes(t.spanId),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&r.uint32(42).bytes(t.traceId),t.asInt!=null&&Object.hasOwnProperty.call(t,"asInt")&&r.uint32(49).sfixed64(t.asInt),t.filteredAttributes!=null&&t.filteredAttributes.length)for(var c=0;c<t.filteredAttributes.length;++c)p.opentelemetry.proto.common.v1.KeyValue.encode(t.filteredAttributes[c],r.uint32(58).fork()).ldelim();return r},a.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},a.decode=function(t,r,c){t instanceof m||(t=m.create(t));for(var l=r===void 0?t.len:t.pos+r,d=new p.opentelemetry.proto.metrics.v1.Exemplar;t.pos<l;){var y=t.uint32();if(y===c)break;switch(y>>>3){case 7:{d.filteredAttributes&&d.filteredAttributes.length||(d.filteredAttributes=[]),d.filteredAttributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{d.timeUnixNano=t.fixed64();break}case 3:{d.asDouble=t.double();break}case 6:{d.asInt=t.sfixed64();break}case 4:{d.spanId=t.bytes();break}case 5:{d.traceId=t.bytes();break}default:t.skipType(y&7);break}}return d},a.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.filteredAttributes!=null&&t.hasOwnProperty("filteredAttributes")){if(!Array.isArray(t.filteredAttributes))return"filteredAttributes: array expected";for(var c=0;c<t.filteredAttributes.length;++c){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(t.filteredAttributes[c]);if(l)return"filteredAttributes."+l}}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!f.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&f.isInteger(t.timeUnixNano.low)&&f.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(r.value=1,typeof t.asDouble!="number"))return"asDouble: number expected";if(t.asInt!=null&&t.hasOwnProperty("asInt")){if(r.value===1)return"value: multiple values";if(r.value=1,!f.isInteger(t.asInt)&&!(t.asInt&&f.isInteger(t.asInt.low)&&f.isInteger(t.asInt.high)))return"asInt: integer|Long expected"}return t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||f.isString(t.spanId))?"spanId: buffer expected":t.traceId!=null&&t.hasOwnProperty("traceId")&&!(t.traceId&&typeof t.traceId.length=="number"||f.isString(t.traceId))?"traceId: buffer expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Exemplar)return t;var r=new p.opentelemetry.proto.metrics.v1.Exemplar;if(t.filteredAttributes){if(!Array.isArray(t.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");r.filteredAttributes=[];for(var c=0;c<t.filteredAttributes.length;++c){if(typeof t.filteredAttributes[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");r.filteredAttributes[c]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.filteredAttributes[c])}}return t.timeUnixNano!=null&&(f.Long?(r.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.asDouble!=null&&(r.asDouble=Number(t.asDouble)),t.asInt!=null&&(f.Long?(r.asInt=f.Long.fromValue(t.asInt)).unsigned=!1:typeof t.asInt=="string"?r.asInt=parseInt(t.asInt,10):typeof t.asInt=="number"?r.asInt=t.asInt:typeof t.asInt=="object"&&(r.asInt=new f.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber())),t.spanId!=null&&(typeof t.spanId=="string"?f.base64.decode(t.spanId,r.spanId=f.newBuffer(f.base64.length(t.spanId)),0):t.spanId.length>=0&&(r.spanId=t.spanId)),t.traceId!=null&&(typeof t.traceId=="string"?f.base64.decode(t.traceId,r.traceId=f.newBuffer(f.base64.length(t.traceId)),0):t.traceId.length>=0&&(r.traceId=t.traceId)),r},a.toObject=function(t,r){r||(r={});var c={};if((r.arrays||r.defaults)&&(c.filteredAttributes=[]),r.defaults){if(f.Long){var l=new f.Long(0,0,!1);c.timeUnixNano=r.longs===String?l.toString():r.longs===Number?l.toNumber():l}else c.timeUnixNano=r.longs===String?"0":0;r.bytes===String?c.spanId="":(c.spanId=[],r.bytes!==Array&&(c.spanId=f.newBuffer(c.spanId))),r.bytes===String?c.traceId="":(c.traceId=[],r.bytes!==Array&&(c.traceId=f.newBuffer(c.traceId)))}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?c.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:c.timeUnixNano=r.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(c.asDouble=r.json&&!isFinite(t.asDouble)?String(t.asDouble):t.asDouble,r.oneofs&&(c.value="asDouble")),t.spanId!=null&&t.hasOwnProperty("spanId")&&(c.spanId=r.bytes===String?f.base64.encode(t.spanId,0,t.spanId.length):r.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceId!=null&&t.hasOwnProperty("traceId")&&(c.traceId=r.bytes===String?f.base64.encode(t.traceId,0,t.traceId.length):r.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.asInt!=null&&t.hasOwnProperty("asInt")&&(typeof t.asInt=="number"?c.asInt=r.longs===String?String(t.asInt):t.asInt:c.asInt=r.longs===String?f.Long.prototype.toString.call(t.asInt):r.longs===Number?new f.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber():t.asInt,r.oneofs&&(c.value="asInt")),t.filteredAttributes&&t.filteredAttributes.length){c.filteredAttributes=[];for(var d=0;d<t.filteredAttributes.length;++d)c.filteredAttributes[d]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.filteredAttributes[d],r)}return c},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Exemplar"},a})(),s})(),i})(),n.logs=(function(){var i={};return i.v1=(function(){var s={};return s.LogsData=(function(){function a(u){if(this.resourceLogs=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.resourceLogs=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.resourceLogs!=null&&e.resourceLogs.length)for(var r=0;r<e.resourceLogs.length;++r)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[r],t.uint32(10).fork()).ldelim();return t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.logs.v1.LogsData;e.pos<c;){var d=e.uint32();if(d===r)break;d>>>3===1?(l.resourceLogs&&l.resourceLogs.length||(l.resourceLogs=[]),l.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()))):e.skipType(d&7)}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.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 t=0;t<e.resourceLogs.length;++t){var r=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[t]);if(r)return"resourceLogs."+r}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.logs.v1.LogsData)return e;var t=new p.opentelemetry.proto.logs.v1.LogsData;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");t.resourceLogs=[];for(var r=0;r<e.resourceLogs.length;++r){if(typeof e.resourceLogs[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");t.resourceLogs[r]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[r])}}return t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){r.resourceLogs=[];for(var c=0;c<e.resourceLogs.length;++c)r.resourceLogs[c]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[c],t)}return r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.LogsData"},a})(),s.ResourceLogs=(function(){function a(u){if(this.scopeLogs=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.resource=null,a.prototype.scopeLogs=f.emptyArray,a.prototype.schemaUrl=null,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeLogs!=null&&e.scopeLogs.length)for(var r=0;r<e.scopeLogs.length;++r)p.opentelemetry.proto.logs.v1.ScopeLogs.encode(e.scopeLogs[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.logs.v1.ResourceLogs;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.resource=p.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{l.scopeLogs&&l.scopeLogs.length||(l.scopeLogs=[]),l.scopeLogs.push(p.opentelemetry.proto.logs.v1.ScopeLogs.decode(e,e.uint32()));break}case 3:{l.schemaUrl=e.string();break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=p.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeLogs!=null&&e.hasOwnProperty("scopeLogs")){if(!Array.isArray(e.scopeLogs))return"scopeLogs: array expected";for(var r=0;r<e.scopeLogs.length;++r){var t=p.opentelemetry.proto.logs.v1.ScopeLogs.verify(e.scopeLogs[r]);if(t)return"scopeLogs."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!f.isString(e.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.logs.v1.ResourceLogs)return e;var t=new p.opentelemetry.proto.logs.v1.ResourceLogs;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");t.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeLogs){if(!Array.isArray(e.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");t.scopeLogs=[];for(var r=0;r<e.scopeLogs.length;++r){if(typeof e.scopeLogs[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");t.scopeLogs[r]=p.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(e.scopeLogs[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeLogs=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeLogs&&e.scopeLogs.length){r.scopeLogs=[];for(var c=0;c<e.scopeLogs.length;++c)r.scopeLogs[c]=p.opentelemetry.proto.logs.v1.ScopeLogs.toObject(e.scopeLogs[c],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.ResourceLogs"},a})(),s.ScopeLogs=(function(){function a(u){if(this.logRecords=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.scope=null,a.prototype.logRecords=f.emptyArray,a.prototype.schemaUrl=null,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.logRecords!=null&&e.logRecords.length)for(var r=0;r<e.logRecords.length;++r)p.opentelemetry.proto.logs.v1.LogRecord.encode(e.logRecords[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.logs.v1.ScopeLogs;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{l.logRecords&&l.logRecords.length||(l.logRecords=[]),l.logRecords.push(p.opentelemetry.proto.logs.v1.LogRecord.decode(e,e.uint32()));break}case 3:{l.schemaUrl=e.string();break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.logRecords!=null&&e.hasOwnProperty("logRecords")){if(!Array.isArray(e.logRecords))return"logRecords: array expected";for(var r=0;r<e.logRecords.length;++r){var t=p.opentelemetry.proto.logs.v1.LogRecord.verify(e.logRecords[r]);if(t)return"logRecords."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!f.isString(e.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.logs.v1.ScopeLogs)return e;var t=new p.opentelemetry.proto.logs.v1.ScopeLogs;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");t.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.logRecords){if(!Array.isArray(e.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");t.logRecords=[];for(var r=0;r<e.logRecords.length;++r){if(typeof e.logRecords[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");t.logRecords[r]=p.opentelemetry.proto.logs.v1.LogRecord.fromObject(e.logRecords[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.logRecords=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.logRecords&&e.logRecords.length){r.logRecords=[];for(var c=0;c<e.logRecords.length;++c)r.logRecords[c]=p.opentelemetry.proto.logs.v1.LogRecord.toObject(e.logRecords[c],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.ScopeLogs"},a})(),s.SeverityNumber=(function(){var a={},u=Object.create(a);return u[a[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,u[a[1]="SEVERITY_NUMBER_TRACE"]=1,u[a[2]="SEVERITY_NUMBER_TRACE2"]=2,u[a[3]="SEVERITY_NUMBER_TRACE3"]=3,u[a[4]="SEVERITY_NUMBER_TRACE4"]=4,u[a[5]="SEVERITY_NUMBER_DEBUG"]=5,u[a[6]="SEVERITY_NUMBER_DEBUG2"]=6,u[a[7]="SEVERITY_NUMBER_DEBUG3"]=7,u[a[8]="SEVERITY_NUMBER_DEBUG4"]=8,u[a[9]="SEVERITY_NUMBER_INFO"]=9,u[a[10]="SEVERITY_NUMBER_INFO2"]=10,u[a[11]="SEVERITY_NUMBER_INFO3"]=11,u[a[12]="SEVERITY_NUMBER_INFO4"]=12,u[a[13]="SEVERITY_NUMBER_WARN"]=13,u[a[14]="SEVERITY_NUMBER_WARN2"]=14,u[a[15]="SEVERITY_NUMBER_WARN3"]=15,u[a[16]="SEVERITY_NUMBER_WARN4"]=16,u[a[17]="SEVERITY_NUMBER_ERROR"]=17,u[a[18]="SEVERITY_NUMBER_ERROR2"]=18,u[a[19]="SEVERITY_NUMBER_ERROR3"]=19,u[a[20]="SEVERITY_NUMBER_ERROR4"]=20,u[a[21]="SEVERITY_NUMBER_FATAL"]=21,u[a[22]="SEVERITY_NUMBER_FATAL2"]=22,u[a[23]="SEVERITY_NUMBER_FATAL3"]=23,u[a[24]="SEVERITY_NUMBER_FATAL4"]=24,u})(),s.LogRecordFlags=(function(){var a={},u=Object.create(a);return u[a[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,u[a[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,u})(),s.LogRecord=(function(){function a(u){if(this.attributes=[],u)for(var e=Object.keys(u),t=0;t<e.length;++t)u[e[t]]!=null&&(this[e[t]]=u[e[t]])}return a.prototype.timeUnixNano=null,a.prototype.observedTimeUnixNano=null,a.prototype.severityNumber=null,a.prototype.severityText=null,a.prototype.body=null,a.prototype.attributes=f.emptyArray,a.prototype.droppedAttributesCount=null,a.prototype.flags=null,a.prototype.traceId=null,a.prototype.spanId=null,a.prototype.eventName=null,a.create=function(e){return new a(e)},a.encode=function(e,t){if(t||(t=O.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(9).fixed64(e.timeUnixNano),e.severityNumber!=null&&Object.hasOwnProperty.call(e,"severityNumber")&&t.uint32(16).int32(e.severityNumber),e.severityText!=null&&Object.hasOwnProperty.call(e,"severityText")&&t.uint32(26).string(e.severityText),e.body!=null&&Object.hasOwnProperty.call(e,"body")&&p.opentelemetry.proto.common.v1.AnyValue.encode(e.body,t.uint32(42).fork()).ldelim(),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(50).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(56).uint32(e.droppedAttributesCount),e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(69).fixed32(e.flags),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&t.uint32(74).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&t.uint32(82).bytes(e.spanId),e.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"observedTimeUnixNano")&&t.uint32(89).fixed64(e.observedTimeUnixNano),e.eventName!=null&&Object.hasOwnProperty.call(e,"eventName")&&t.uint32(98).string(e.eventName),t},a.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},a.decode=function(e,t,r){e instanceof m||(e=m.create(e));for(var c=t===void 0?e.len:e.pos+t,l=new p.opentelemetry.proto.logs.v1.LogRecord;e.pos<c;){var d=e.uint32();if(d===r)break;switch(d>>>3){case 1:{l.timeUnixNano=e.fixed64();break}case 11:{l.observedTimeUnixNano=e.fixed64();break}case 2:{l.severityNumber=e.int32();break}case 3:{l.severityText=e.string();break}case 5:{l.body=p.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32());break}case 6:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 7:{l.droppedAttributesCount=e.uint32();break}case 8:{l.flags=e.fixed32();break}case 9:{l.traceId=e.bytes();break}case 10:{l.spanId=e.bytes();break}case 12:{l.eventName=e.string();break}default:e.skipType(d&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.observedTimeUnixNano!=null&&e.hasOwnProperty("observedTimeUnixNano")&&!f.isInteger(e.observedTimeUnixNano)&&!(e.observedTimeUnixNano&&f.isInteger(e.observedTimeUnixNano.low)&&f.isInteger(e.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(e.severityNumber!=null&&e.hasOwnProperty("severityNumber"))switch(e.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(e.severityText!=null&&e.hasOwnProperty("severityText")&&!f.isString(e.severityText))return"severityText: string expected";if(e.body!=null&&e.hasOwnProperty("body")){var t=p.opentelemetry.proto.common.v1.AnyValue.verify(e.body);if(t)return"body."+t}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 t=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[r]);if(t)return"attributes."+t}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":e.flags!=null&&e.hasOwnProperty("flags")&&!f.isInteger(e.flags)?"flags: integer expected":e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||f.isString(e.traceId))?"traceId: buffer expected":e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||f.isString(e.spanId))?"spanId: buffer expected":e.eventName!=null&&e.hasOwnProperty("eventName")&&!f.isString(e.eventName)?"eventName: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.logs.v1.LogRecord)return e;var t=new p.opentelemetry.proto.logs.v1.LogRecord;switch(e.timeUnixNano!=null&&(f.Long?(t.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?t.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?t.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(t.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.observedTimeUnixNano!=null&&(f.Long?(t.observedTimeUnixNano=f.Long.fromValue(e.observedTimeUnixNano)).unsigned=!1:typeof e.observedTimeUnixNano=="string"?t.observedTimeUnixNano=parseInt(e.observedTimeUnixNano,10):typeof e.observedTimeUnixNano=="number"?t.observedTimeUnixNano=e.observedTimeUnixNano:typeof e.observedTimeUnixNano=="object"&&(t.observedTimeUnixNano=new f.LongBits(e.observedTimeUnixNano.low>>>0,e.observedTimeUnixNano.high>>>0).toNumber())),e.severityNumber){default:if(typeof e.severityNumber=="number"){t.severityNumber=e.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:t.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:t.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:t.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:t.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:t.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:t.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:t.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:t.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:t.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:t.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:t.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:t.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:t.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:t.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:t.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:t.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:t.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:t.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:t.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:t.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:t.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:t.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:t.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:t.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:t.severityNumber=24;break}if(e.severityText!=null&&(t.severityText=String(e.severityText)),e.body!=null){if(typeof e.body!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");t.body=p.opentelemetry.proto.common.v1.AnyValue.fromObject(e.body)}if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");t.attributes[r]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}return e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),e.flags!=null&&(t.flags=e.flags>>>0),e.traceId!=null&&(typeof e.traceId=="string"?f.base64.decode(e.traceId,t.traceId=f.newBuffer(f.base64.length(e.traceId)),0):e.traceId.length>=0&&(t.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?f.base64.decode(e.spanId,t.spanId=f.newBuffer(f.base64.length(e.spanId)),0):e.spanId.length>=0&&(t.spanId=e.spanId)),e.eventName!=null&&(t.eventName=String(e.eventName)),t},a.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[]),t.defaults){if(f.Long){var c=new f.Long(0,0,!1);r.timeUnixNano=t.longs===String?c.toString():t.longs===Number?c.toNumber():c}else r.timeUnixNano=t.longs===String?"0":0;if(r.severityNumber=t.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,r.severityText="",r.body=null,r.droppedAttributesCount=0,r.flags=0,t.bytes===String?r.traceId="":(r.traceId=[],t.bytes!==Array&&(r.traceId=f.newBuffer(r.traceId))),t.bytes===String?r.spanId="":(r.spanId=[],t.bytes!==Array&&(r.spanId=f.newBuffer(r.spanId))),f.Long){var c=new f.Long(0,0,!1);r.observedTimeUnixNano=t.longs===String?c.toString():t.longs===Number?c.toNumber():c}else r.observedTimeUnixNano=t.longs===String?"0":0;r.eventName=""}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?r.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:r.timeUnixNano=t.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.severityNumber!=null&&e.hasOwnProperty("severityNumber")&&(r.severityNumber=t.enums===String?p.opentelemetry.proto.logs.v1.SeverityNumber[e.severityNumber]===void 0?e.severityNumber:p.opentelemetry.proto.logs.v1.SeverityNumber[e.severityNumber]:e.severityNumber),e.severityText!=null&&e.hasOwnProperty("severityText")&&(r.severityText=e.severityText),e.body!=null&&e.hasOwnProperty("body")&&(r.body=p.opentelemetry.proto.common.v1.AnyValue.toObject(e.body,t)),e.attributes&&e.attributes.length){r.attributes=[];for(var l=0;l<e.attributes.length;++l)r.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[l],t)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),e.flags!=null&&e.hasOwnProperty("flags")&&(r.flags=e.flags),e.traceId!=null&&e.hasOwnProperty("traceId")&&(r.traceId=t.bytes===String?f.base64.encode(e.traceId,0,e.traceId.length):t.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(r.spanId=t.bytes===String?f.base64.encode(e.spanId,0,e.spanId.length):t.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.observedTimeUnixNano!=null&&e.hasOwnProperty("observedTimeUnixNano")&&(typeof e.observedTimeUnixNano=="number"?r.observedTimeUnixNano=t.longs===String?String(e.observedTimeUnixNano):e.observedTimeUnixNano:r.observedTimeUnixNano=t.longs===String?f.Long.prototype.toString.call(e.observedTimeUnixNano):t.longs===Number?new f.LongBits(e.observedTimeUnixNano.low>>>0,e.observedTimeUnixNano.high>>>0).toNumber():e.observedTimeUnixNano),e.eventName!=null&&e.hasOwnProperty("eventName")&&(r.eventName=e.eventName),r},a.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.LogRecord"},a})(),s})(),i})(),n})(),o})();pu.exports=p});var Wp={};var Io=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};var Tt="1.9.0";var Co=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function Uc(o){var n=new Set([o]),i=new Set,s=o.match(Co);if(!s)return function(){return!1};var a={major:+s[1],minor:+s[2],patch:+s[3],prerelease:s[4]};if(a.prerelease!=null)return function(r){return r===o};function u(t){return i.add(t),!1}function e(t){return n.add(t),!0}return function(r){if(n.has(r))return!0;if(i.has(r))return!1;var c=r.match(Co);if(!c)return u(r);var l={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return l.prerelease!=null||a.major!==l.major?u(r):a.major===0?a.minor===l.minor&&a.patch<=l.patch?e(r):u(r):a.minor<=l.minor?e(r):u(r)}}var wo=Uc(Tt);var Mc=Tt.split(".")[0],ue=Symbol.for("opentelemetry.js.api."+Mc),ce=Io;function at(o,n,i,s){var a;s===void 0&&(s=!1);var u=ce[ue]=(a=ce[ue])!==null&&a!==void 0?a:{version:Tt};if(!s&&u[o]){var e=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+o);return i.error(e.stack||e.message),!1}if(u.version!==Tt){var e=new Error("@opentelemetry/api: Registration of version v"+u.version+" for "+o+" does not match previously registered API v"+Tt);return i.error(e.stack||e.message),!1}return u[o]=n,i.debug("@opentelemetry/api: Registered a global for "+o+" v"+Tt+"."),!0}function z(o){var n,i,s=(n=ce[ue])===null||n===void 0?void 0:n.version;if(!(!s||!wo(s)))return(i=ce[ue])===null||i===void 0?void 0:i[o]}function ut(o,n){n.debug("@opentelemetry/api: Unregistering a global for "+o+" v"+Tt+".");var i=ce[ue];i&&delete i[o]}var Dc=function(o,n){var i=typeof Symbol=="function"&&o[Symbol.iterator];if(!i)return o;var s=i.call(o),a,u=[],e;try{for(;(n===void 0||n-- >0)&&!(a=s.next()).done;)u.push(a.value)}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}return u},Vc=function(o,n,i){if(i||arguments.length===2)for(var s=0,a=n.length,u;s<a;s++)(u||!(s in n))&&(u||(u=Array.prototype.slice.call(n,0,s)),u[s]=n[s]);return o.concat(u||Array.prototype.slice.call(n))},Uo=(function(){function o(n){this._namespace=n.namespace||"DiagComponentLogger"}return o.prototype.debug=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return se("debug",this._namespace,n)},o.prototype.error=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return se("error",this._namespace,n)},o.prototype.info=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return se("info",this._namespace,n)},o.prototype.warn=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return se("warn",this._namespace,n)},o.prototype.verbose=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return se("verbose",this._namespace,n)},o})();function se(o,n,i){var s=z("diag");if(s)return i.unshift(n),s[o].apply(s,Vc([],Dc(i),!1))}var G;(function(o){o[o.NONE=0]="NONE",o[o.ERROR=30]="ERROR",o[o.WARN=50]="WARN",o[o.INFO=60]="INFO",o[o.DEBUG=70]="DEBUG",o[o.VERBOSE=80]="VERBOSE",o[o.ALL=9999]="ALL"})(G||(G={}));function Mo(o,n){o<G.NONE?o=G.NONE:o>G.ALL&&(o=G.ALL),n=n||{};function i(s,a){var u=n[s];return typeof u=="function"&&o>=a?u.bind(n):function(){}}return{error:i("error",G.ERROR),warn:i("warn",G.WARN),info:i("info",G.INFO),debug:i("debug",G.DEBUG),verbose:i("verbose",G.VERBOSE)}}var kc=function(o,n){var i=typeof Symbol=="function"&&o[Symbol.iterator];if(!i)return o;var s=i.call(o),a,u=[],e;try{for(;(n===void 0||n-- >0)&&!(a=s.next()).done;)u.push(a.value)}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}return u},Bc=function(o,n,i){if(i||arguments.length===2)for(var s=0,a=n.length,u;s<a;s++)(u||!(s in n))&&(u||(u=Array.prototype.slice.call(n,0,s)),u[s]=n[s]);return o.concat(u||Array.prototype.slice.call(n))},Hc="diag",K=(function(){function o(){function n(a){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];var t=z("diag");if(t)return t[a].apply(t,Bc([],kc(u),!1))}}var i=this,s=function(a,u){var e,t,r;if(u===void 0&&(u={logLevel:G.INFO}),a===i){var c=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return i.error((e=c.stack)!==null&&e!==void 0?e:c.message),!1}typeof u=="number"&&(u={logLevel:u});var l=z("diag"),d=Mo((t=u.logLevel)!==null&&t!==void 0?t:G.INFO,a);if(l&&!u.suppressOverrideMessage){var y=(r=new Error().stack)!==null&&r!==void 0?r:"<failed to generate stacktrace>";l.warn("Current logger will be overwritten from "+y),d.warn("Current logger will overwrite one already registered from "+y)}return at("diag",d,i,!0)};i.setLogger=s,i.disable=function(){ut(Hc,i)},i.createComponentLogger=function(a){return new Uo(a)},i.verbose=n("verbose"),i.debug=n("debug"),i.info=n("info"),i.warn=n("warn"),i.error=n("error")}return o.instance=function(){return this._instance||(this._instance=new o),this._instance},o})();var Gc=function(o,n){var i=typeof Symbol=="function"&&o[Symbol.iterator];if(!i)return o;var s=i.call(o),a,u=[],e;try{for(;(n===void 0||n-- >0)&&!(a=s.next()).done;)u.push(a.value)}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}return u},Fc=function(o){var n=typeof Symbol=="function"&&Symbol.iterator,i=n&&o[n],s=0;if(i)return i.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&s>=o.length&&(o=void 0),{value:o&&o[s++],done:!o}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Do=(function(){function o(n){this._entries=n?new Map(n):new Map}return o.prototype.getEntry=function(n){var i=this._entries.get(n);if(i)return Object.assign({},i)},o.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(n){var i=Gc(n,2),s=i[0],a=i[1];return[s,a]})},o.prototype.setEntry=function(n,i){var s=new o(this._entries);return s._entries.set(n,i),s},o.prototype.removeEntry=function(n){var i=new o(this._entries);return i._entries.delete(n),i},o.prototype.removeEntries=function(){for(var n,i,s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var u=new o(this._entries);try{for(var e=Fc(s),t=e.next();!t.done;t=e.next()){var r=t.value;u._entries.delete(r)}}catch(c){n={error:c}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}}return u},o.prototype.clear=function(){return new o},o})();var Vo=Symbol("BaggageEntryMetadata");var Kc=K.instance();function ko(o){return o===void 0&&(o={}),new Do(new Map(Object.entries(o)))}function pn(o){return typeof o!="string"&&(Kc.error("Cannot create baggage metadata from unknown type: "+typeof o),o=""),{__TYPE__:Vo,toString:function(){return o}}}function Z(o){return Symbol.for(o)}var jc=(function(){function o(n){var i=this;i._currentContext=n?new Map(n):new Map,i.getValue=function(s){return i._currentContext.get(s)},i.setValue=function(s,a){var u=new o(i._currentContext);return u._currentContext.set(s,a),u},i.deleteValue=function(s){var a=new o(i._currentContext);return a._currentContext.delete(s),a}}return o})(),tt=new jc;var fn=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],dn=(function(){function o(){function n(s){return function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];if(console){var e=console[s];if(typeof e!="function"&&(e=console.log),typeof e=="function")return e.apply(console,a)}}}for(var i=0;i<fn.length;i++)this[fn[i].n]=n(fn[i].c)}return o})();var wt=(function(){var o=function(n,i){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(s[u]=a[u])},o(n,i)};return function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");o(n,i);function s(){this.constructor=n}n.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}})(),Yc=(function(){function o(){}return o.prototype.createGauge=function(n,i){return ts},o.prototype.createHistogram=function(n,i){return es},o.prototype.createCounter=function(n,i){return Zc},o.prototype.createUpDownCounter=function(n,i){return rs},o.prototype.createObservableGauge=function(n,i){return os},o.prototype.createObservableCounter=function(n,i){return ns},o.prototype.createObservableUpDownCounter=function(n,i){return is},o.prototype.addBatchObservableCallback=function(n,i){},o.prototype.removeBatchObservableCallback=function(n){},o})();var tr=(function(){function o(){}return o})();var zc=(function(o){wt(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n.prototype.add=function(i,s){},n})(tr);var qc=(function(o){wt(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n.prototype.add=function(i,s){},n})(tr);var Wc=(function(o){wt(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n.prototype.record=function(i,s){},n})(tr);var Jc=(function(o){wt(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n.prototype.record=function(i,s){},n})(tr);var mn=(function(){function o(){}return o.prototype.addCallback=function(n){},o.prototype.removeCallback=function(n){},o})();var $c=(function(o){wt(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n})(mn);var Xc=(function(o){wt(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n})(mn);var Qc=(function(o){wt(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n})(mn);var Bo=new Yc,Zc=new zc,ts=new Wc,es=new Jc,rs=new qc,ns=new $c,os=new Xc,is=new Qc;var Ho={get:function(o,n){if(o!=null)return o[n]},keys:function(o){return o==null?[]:Object.keys(o)}},Go={set:function(o,n,i){o!=null&&(o[n]=i)}};var as=function(o,n){var i=typeof Symbol=="function"&&o[Symbol.iterator];if(!i)return o;var s=i.call(o),a,u=[],e;try{for(;(n===void 0||n-- >0)&&!(a=s.next()).done;)u.push(a.value)}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}return u},us=function(o,n,i){if(i||arguments.length===2)for(var s=0,a=n.length,u;s<a;s++)(u||!(s in n))&&(u||(u=Array.prototype.slice.call(n,0,s)),u[s]=n[s]);return o.concat(u||Array.prototype.slice.call(n))},Fo=(function(){function o(){}return o.prototype.active=function(){return tt},o.prototype.with=function(n,i,s){for(var a=[],u=3;u<arguments.length;u++)a[u-3]=arguments[u];return i.call.apply(i,us([s],as(a),!1))},o.prototype.bind=function(n,i){return i},o.prototype.enable=function(){return this},o.prototype.disable=function(){return this},o})();var cs=function(o,n){var i=typeof Symbol=="function"&&o[Symbol.iterator];if(!i)return o;var s=i.call(o),a,u=[],e;try{for(;(n===void 0||n-- >0)&&!(a=s.next()).done;)u.push(a.value)}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}return u},ss=function(o,n,i){if(i||arguments.length===2)for(var s=0,a=n.length,u;s<a;s++)(u||!(s in n))&&(u||(u=Array.prototype.slice.call(n,0,s)),u[s]=n[s]);return o.concat(u||Array.prototype.slice.call(n))},hn="context",ls=new Fo,At=(function(){function o(){}return o.getInstance=function(){return this._instance||(this._instance=new o),this._instance},o.prototype.setGlobalContextManager=function(n){return at(hn,n,K.instance())},o.prototype.active=function(){return this._getContextManager().active()},o.prototype.with=function(n,i,s){for(var a,u=[],e=3;e<arguments.length;e++)u[e-3]=arguments[e];return(a=this._getContextManager()).with.apply(a,ss([n,i,s],cs(u),!1))},o.prototype.bind=function(n,i){return this._getContextManager().bind(n,i)},o.prototype._getContextManager=function(){return z(hn)||ls},o.prototype.disable=function(){this._getContextManager().disable(),ut(hn,K.instance())},o})();var k;(function(o){o[o.NONE=0]="NONE",o[o.SAMPLED=1]="SAMPLED"})(k||(k={}));var er="0000000000000000",rr="00000000000000000000000000000000",le={traceId:rr,spanId:er,traceFlags:k.NONE};var gt=(function(){function o(n){n===void 0&&(n=le),this._spanContext=n}return o.prototype.spanContext=function(){return this._spanContext},o.prototype.setAttribute=function(n,i){return this},o.prototype.setAttributes=function(n){return this},o.prototype.addEvent=function(n,i){return this},o.prototype.addLink=function(n){return this},o.prototype.addLinks=function(n){return this},o.prototype.setStatus=function(n){return this},o.prototype.updateName=function(n){return this},o.prototype.end=function(n){},o.prototype.isRecording=function(){return!1},o.prototype.recordException=function(n,i){},o})();var yn=Z("OpenTelemetry Context Key SPAN");function nr(o){return o.getValue(yn)||void 0}function Ko(){return nr(At.getInstance().active())}function pe(o,n){return o.setValue(yn,n)}function jo(o){return o.deleteValue(yn)}function Yo(o,n){return pe(o,new gt(n))}function or(o){var n;return(n=nr(o))===null||n===void 0?void 0:n.spanContext()}var ps=/^([0-9a-f]{32})$/i,fs=/^[0-9a-f]{16}$/i;function ir(o){return ps.test(o)&&o!==rr}function zo(o){return fs.test(o)&&o!==er}function q(o){return ir(o.traceId)&&zo(o.spanId)}function qo(o){return new gt(o)}var Tn=At.getInstance(),ar=(function(){function o(){}return o.prototype.startSpan=function(n,i,s){s===void 0&&(s=Tn.active());var a=!!i?.root;if(a)return new gt;var u=s&&or(s);return ds(u)&&q(u)?new gt(u):new gt},o.prototype.startActiveSpan=function(n,i,s,a){var u,e,t;if(!(arguments.length<2)){arguments.length===2?t=i:arguments.length===3?(u=i,t=s):(u=i,e=s,t=a);var r=e??Tn.active(),c=this.startSpan(n,u,r),l=pe(r,c);return Tn.with(l,t,void 0,c)}},o})();function ds(o){return typeof o=="object"&&typeof o.spanId=="string"&&typeof o.traceId=="string"&&typeof o.traceFlags=="number"}var ms=new ar,Wo=(function(){function o(n,i,s,a){this._provider=n,this.name=i,this.version=s,this.options=a}return o.prototype.startSpan=function(n,i,s){return this._getTracer().startSpan(n,i,s)},o.prototype.startActiveSpan=function(n,i,s,a){var u=this._getTracer();return Reflect.apply(u.startActiveSpan,u,arguments)},o.prototype._getTracer=function(){if(this._delegate)return this._delegate;var n=this._provider.getDelegateTracer(this.name,this.version,this.options);return n?(this._delegate=n,this._delegate):ms},o})();var Jo=(function(){function o(){}return o.prototype.getTracer=function(n,i,s){return new ar},o})();var hs=new Jo,_n=(function(){function o(){}return o.prototype.getTracer=function(n,i,s){var a;return(a=this.getDelegateTracer(n,i,s))!==null&&a!==void 0?a:new Wo(this,n,i,s)},o.prototype.getDelegate=function(){var n;return(n=this._delegate)!==null&&n!==void 0?n:hs},o.prototype.setDelegate=function(n){this._delegate=n},o.prototype.getDelegateTracer=function(n,i,s){var a;return(a=this._delegate)===null||a===void 0?void 0:a.getTracer(n,i,s)},o})();var qt;(function(o){o[o.NOT_RECORD=0]="NOT_RECORD",o[o.RECORD=1]="RECORD",o[o.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(qt||(qt={}));var _t;(function(o){o[o.INTERNAL=0]="INTERNAL",o[o.SERVER=1]="SERVER",o[o.CLIENT=2]="CLIENT",o[o.PRODUCER=3]="PRODUCER",o[o.CONSUMER=4]="CONSUMER"})(_t||(_t={}));var ct;(function(o){o[o.UNSET=0]="UNSET",o[o.OK=1]="OK",o[o.ERROR=2]="ERROR"})(ct||(ct={}));var En="[_0-9a-z-*/]",ys="[a-z]"+En+"{0,255}",Ts="[a-z0-9]"+En+"{0,240}@[a-z]"+En+"{0,13}",_s=new RegExp("^(?:"+ys+"|"+Ts+")$"),Es=/^[ -~]{0,255}[!-~]$/,Ss=/,|=/;function $o(o){return _s.test(o)}function Xo(o){return Es.test(o)&&!Ss.test(o)}var Qo=32,vs=512,Zo=",",ti="=",ei=(function(){function o(n){this._internalState=new Map,n&&this._parse(n)}return o.prototype.set=function(n,i){var s=this._clone();return s._internalState.has(n)&&s._internalState.delete(n),s._internalState.set(n,i),s},o.prototype.unset=function(n){var i=this._clone();return i._internalState.delete(n),i},o.prototype.get=function(n){return this._internalState.get(n)},o.prototype.serialize=function(){var n=this;return this._keys().reduce(function(i,s){return i.push(s+ti+n.get(s)),i},[]).join(Zo)},o.prototype._parse=function(n){n.length>vs||(this._internalState=n.split(Zo).reverse().reduce(function(i,s){var a=s.trim(),u=a.indexOf(ti);if(u!==-1){var e=a.slice(0,u),t=a.slice(u+1,s.length);$o(e)&&Xo(t)&&i.set(e,t)}return i},new Map),this._internalState.size>Qo&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Qo))))},o.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},o.prototype._clone=function(){var n=new o;return n._internalState=new Map(this._internalState),n},o})();function ur(o){return new ei(o)}var x=At.getInstance();var _=K.instance();var xs=(function(){function o(){}return o.prototype.getMeter=function(n,i,s){return Bo},o})();var ri=new xs;var Sn="metrics",ni=(function(){function o(){}return o.getInstance=function(){return this._instance||(this._instance=new o),this._instance},o.prototype.setGlobalMeterProvider=function(n){return at(Sn,n,K.instance())},o.prototype.getMeterProvider=function(){return z(Sn)||ri},o.prototype.getMeter=function(n,i,s){return this.getMeterProvider().getMeter(n,i,s)},o.prototype.disable=function(){ut(Sn,K.instance())},o})();var fe=ni.getInstance();var oi=(function(){function o(){}return o.prototype.inject=function(n,i){},o.prototype.extract=function(n,i){return n},o.prototype.fields=function(){return[]},o})();var vn=Z("OpenTelemetry Baggage Key");function xn(o){return o.getValue(vn)||void 0}function ii(){return xn(At.getInstance().active())}function ai(o,n){return o.setValue(vn,n)}function ui(o){return o.deleteValue(vn)}var On="propagation",Os=new oi,ci=(function(){function o(){this.createBaggage=ko,this.getBaggage=xn,this.getActiveBaggage=ii,this.setBaggage=ai,this.deleteBaggage=ui}return o.getInstance=function(){return this._instance||(this._instance=new o),this._instance},o.prototype.setGlobalPropagator=function(n){return at(On,n,K.instance())},o.prototype.inject=function(n,i,s){return s===void 0&&(s=Go),this._getGlobalPropagator().inject(n,i,s)},o.prototype.extract=function(n,i,s){return s===void 0&&(s=Ho),this._getGlobalPropagator().extract(n,i,s)},o.prototype.fields=function(){return this._getGlobalPropagator().fields()},o.prototype.disable=function(){ut(On,K.instance())},o.prototype._getGlobalPropagator=function(){return z(On)||Os},o})();var B=ci.getInstance();var An="trace",si=(function(){function o(){this._proxyTracerProvider=new _n,this.wrapSpanContext=qo,this.isSpanContextValid=q,this.deleteSpan=jo,this.getSpan=nr,this.getActiveSpan=Ko,this.getSpanContext=or,this.setSpan=pe,this.setSpanContext=Yo}return o.getInstance=function(){return this._instance||(this._instance=new o),this._instance},o.prototype.setGlobalTracerProvider=function(n){var i=at(An,this._proxyTracerProvider,K.instance());return i&&this._proxyTracerProvider.setDelegate(n),i},o.prototype.getTracerProvider=function(){return z(An)||this._proxyTracerProvider},o.prototype.getTracer=function(n,i){return this.getTracerProvider().getTracer(n,i)},o.prototype.disable=function(){ut(An,K.instance()),this._proxyTracerProvider=new _n},o})();var g=si.getInstance();var As=Z("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function li(o){return o.getValue(As)===!0}var gs="service.name";var bs="service.version";var pi=gs;var fi=bs;var de="error.type";var cr="exception.message",di="exception.stacktrace",sr="exception.type";var lr="http.request.method";var pr="http.request.method_original";var fr="http.response.status_code";var dr="server.address",mr="server.port",mi="service.name";var me="telemetry.sdk.language";var hi="webjs",he="telemetry.sdk.name",ye="telemetry.sdk.version";var bt="url.full";var yi="user_agent.original";var st=performance;var Ns=9,Rs=6,Ps=Math.pow(10,Rs),Ti=Math.pow(10,Ns);function gn(o){let n=o/1e3,i=Math.trunc(n),s=Math.round(o%1e3*Ps);return[i,s]}function bn(o){let n=gn(st.timeOrigin),i=gn(typeof o=="number"?o:st.now());return _i(n,i)}function _i(o,n){let i=[o[0]+n[0],o[1]+n[1]];return i[1]>=Ti&&(i[1]-=Ti,i[0]+=1),i}var Nn="[_0-9a-z-*/]",Ls=`[a-z]${Nn}{0,255}`,Is=`[a-z0-9]${Nn}{0,240}@[a-z]${Nn}{0,13}`,Cs=new RegExp(`^(?:${Ls}|${Is})$`),ws=/^[ -~]{0,255}[!-~]$/,Us=/,|=/;function Ei(o){return Cs.test(o)}function Si(o){return ws.test(o)&&!Us.test(o)}var vi=32,Ms=512,xi=",",Oi="=",hr=class o{constructor(n){h(this,"_internalState",new Map);n&&this._parse(n)}set(n,i){let s=this._clone();return s._internalState.has(n)&&s._internalState.delete(n),s._internalState.set(n,i),s}unset(n){let i=this._clone();return i._internalState.delete(n),i}get(n){return this._internalState.get(n)}serialize(){return this._keys().reduce((n,i)=>(n.push(i+Oi+this.get(i)),n),[]).join(xi)}_parse(n){n.length>Ms||(this._internalState=n.split(xi).reverse().reduce((i,s)=>{let a=s.trim(),u=a.indexOf(Oi);if(u!==-1){let e=a.slice(0,u),t=a.slice(u+1,s.length);Ei(e)&&Si(t)&&i.set(e,t)}return i},new Map),this._internalState.size>vi&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,vi))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let n=new o;return n._internalState=new Map(this._internalState),n}};var Jt="traceparent",yr="tracestate",Ds="00",Vs="(?!ff)[\\da-f]{2}",ks="(?![0]{32})[\\da-f]{32}",Bs="(?![0]{16})[\\da-f]{16}",Hs="[\\da-f]{2}",Gs=new RegExp(`^\\s?(${Vs})-(${ks})-(${Bs})-(${Hs})(-.*)?\\s?$`);function Ai(o){let n=Gs.exec(o);return!n||n[1]==="00"&&n[5]?null:{traceId:n[2],spanId:n[3],traceFlags:parseInt(n[4],16)}}var Te=class{inject(n,i,s){let a=g.getSpanContext(n);if(!a||li(n)||!q(a))return;let u=`${Ds}-${a.traceId}-${a.spanId}-0${Number(a.traceFlags||k.NONE).toString(16)}`;s.set(i,Jt,u),a.traceState&&s.set(i,yr,a.traceState.serialize())}extract(n,i,s){let a=s.get(i,Jt);if(!a)return n;let u=Array.isArray(a)?a[0]:a;if(typeof u!="string")return n;let e=Ai(u);if(!e)return n;e.isRemote=!0;let t=s.get(i,yr);if(t){let r=Array.isArray(t)?t.join(","):t;e.traceState=new hr(typeof r=="string"?r:void 0)}return g.setSpanContext(n,e)}fields(){return[Jt,yr]}};var gi=Z("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function _e(o){return o.setValue(gi,!0)}function Rn(o){return o.getValue(gi)===!0}function Ut(o){let n={};if(typeof o!="object"||o==null)return n;for(let i in o){if(!Object.prototype.hasOwnProperty.call(o,i))continue;if(!Fs(i)){_.warn(`Invalid attribute key: ${i}`);continue}let s=o[i];if(!Tr(s)){_.warn(`Invalid attribute value set for key: ${i}`);continue}Array.isArray(s)?n[i]=s.slice():n[i]=s}return n}function Fs(o){return typeof o=="string"&&o!==""}function Tr(o){return o==null?!0:Array.isArray(o)?Ks(o):bi(typeof o)}function Ks(o){let n;for(let i of o){if(i==null)continue;let s=typeof i;if(s!==n){if(!n){if(bi(s)){n=s;continue}return!1}return!1}}return!0}function bi(o){switch(o){case"number":case"boolean":case"string":return!0}return!1}function Ni(){return o=>{_.error(js(o))}}function js(o){return typeof o=="string"?o:JSON.stringify(Ys(o))}function Ys(o){let n={},i=o;for(;i!==null;)Object.getOwnPropertyNames(i).forEach(s=>{if(n[s])return;let a=i[s];a&&(n[s]=String(a))}),i=Object.getPrototypeOf(i);return n}var zs=Ni();function W(o){try{zs(o)}catch{}}var lt=performance;var qs=9,Ws=6,Js=Math.pow(10,Ws),Pn=Math.pow(10,qs);function Nt(o){let n=o/1e3,i=Math.trunc(n),s=Math.round(o%1e3*Js);return[i,s]}function _r(){let o=lt.timeOrigin;if(typeof o!="number"){let n=lt;o=n.timing&&n.timing.fetchStart}return o}function Ln(o){let n=Nt(_r()),i=Nt(typeof o=="number"?o:lt.now());return xr(n,i)}function In(o,n){let i=n[0]-o[0],s=n[1]-o[1];return s<0&&(i-=1,s+=Pn),[i,s]}function Er(o){return o[0]*1e6+o[1]/1e3}function Sr(o){return Array.isArray(o)&&o.length===2&&typeof o[0]=="number"&&typeof o[1]=="number"}function vr(o){return Sr(o)||typeof o=="number"||o instanceof Date}function xr(o,n){let i=[o[0]+n[0],o[1]+n[1]];return i[1]>=Pn&&(i[1]-=Pn,i[0]+=1),i}var Et;(function(o){o[o.SUCCESS=0]="SUCCESS",o[o.FAILED=1]="FAILED"})(Et||(Et={}));var $s="[object Object]",Xs="[object Null]",Qs="[object Undefined]",Zs=Function.prototype,Ri=Zs.toString,tl=Ri.call(Object),el=Object.getPrototypeOf,Pi=Object.prototype,Li=Pi.hasOwnProperty,Mt=Symbol?Symbol.toStringTag:void 0,Ii=Pi.toString;function Cn(o){if(!rl(o)||nl(o)!==$s)return!1;let n=el(o);if(n===null)return!0;let i=Li.call(n,"constructor")&&n.constructor;return typeof i=="function"&&i instanceof i&&Ri.call(i)===tl}function rl(o){return o!=null&&typeof o=="object"}function nl(o){return o==null?o===void 0?Qs:Xs:Mt&&Mt in Object(o)?ol(o):il(o)}function ol(o){let n=Li.call(o,Mt),i=o[Mt],s=!1;try{o[Mt]=void 0,s=!0}catch{}let a=Ii.call(o);return s&&(n?o[Mt]=i:delete o[Mt]),a}function il(o){return Ii.call(o)}var al=20;function Un(...o){let n=o.shift(),i=new WeakMap;for(;o.length>0;)n=wi(n,o.shift(),0,i);return n}function wn(o){return Ar(o)?o.slice():o}function wi(o,n,i=0,s){let a;if(!(i>al)){if(i++,Or(o)||Or(n)||Ui(n))a=wn(n);else if(Ar(o)){if(a=o.slice(),Ar(n))for(let u=0,e=n.length;u<e;u++)a.push(wn(n[u]));else if(Ee(n)){let u=Object.keys(n);for(let e=0,t=u.length;e<t;e++){let r=u[e];a[r]=wn(n[r])}}}else if(Ee(o))if(Ee(n)){if(!ul(o,n))return n;a=Object.assign({},o);let u=Object.keys(n);for(let e=0,t=u.length;e<t;e++){let r=u[e],c=n[r];if(Or(c))typeof c>"u"?delete a[r]:a[r]=c;else{let l=a[r],d=c;if(Ci(o,r,s)||Ci(n,r,s))delete a[r];else{if(Ee(l)&&Ee(d)){let y=s.get(l)||[],A=s.get(d)||[];y.push({obj:o,key:r}),A.push({obj:n,key:r}),s.set(l,y),s.set(d,A)}a[r]=wi(a[r],c,i,s)}}}}else a=n;return a}}function Ci(o,n,i){let s=i.get(o[n])||[];for(let a=0,u=s.length;a<u;a++){let e=s[a];if(e.key===n&&e.obj===o)return!0}return!1}function Ar(o){return Array.isArray(o)}function Ui(o){return typeof o=="function"}function Ee(o){return!Or(o)&&!Ar(o)&&!Ui(o)&&typeof o=="object"}function Or(o){return typeof o=="string"||typeof o=="number"||typeof o=="boolean"||typeof o>"u"||o instanceof Date||o instanceof RegExp||o===null}function ul(o,n){return!(!Cn(o)||!Cn(n))}var gr=class{constructor(){h(this,"_promise");h(this,"_resolve");h(this,"_reject");this._promise=new Promise((n,i)=>{this._resolve=n,this._reject=i})}get promise(){return this._promise}resolve(n){this._resolve(n)}reject(n){this._reject(n)}};var Dt=class{constructor(n,i){h(this,"_callback");h(this,"_that");h(this,"_isCalled",!1);h(this,"_deferred",new gr);this._callback=n,this._that=i}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(i=>this._deferred.resolve(i),i=>this._deferred.reject(i))}catch(i){this._deferred.reject(i)}}return this._deferred.promise}};function Mi(o,n){return new Promise(i=>{x.with(_e(x.active()),()=>{o.export(n,s=>{i(s)})})})}var Di={_export:Mi};var Vi="2.2.0";var ki="process.runtime.name";var $t={[he]:"opentelemetry",[ki]:"browser",[me]:hi,[ye]:Vi};function Mn(){return"unknown_service"}var Xt=o=>o!==null&&typeof o=="object"&&typeof o.then=="function";var Dn=class o{constructor(n,i){h(this,"_rawAttributes");h(this,"_asyncAttributesPending",!1);h(this,"_schemaUrl");h(this,"_memoizedAttributes");let s=n.attributes??{};this._rawAttributes=Object.entries(s).map(([a,u])=>(Xt(u)&&(this._asyncAttributesPending=!0),[a,u])),this._rawAttributes=Bi(this._rawAttributes),this._schemaUrl=sl(i?.schemaUrl)}static FromAttributeList(n,i){let s=new o({},i);return s._rawAttributes=Bi(n),s._asyncAttributesPending=n.filter(([a,u])=>Xt(u)).length>0,s}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let n=0;n<this._rawAttributes.length;n++){let[i,s]=this._rawAttributes[n];this._rawAttributes[n]=[i,Xt(s)?await s:s]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&_.error("Accessing resource attributes before async attributes settled"),this._memoizedAttributes)return this._memoizedAttributes;let n={};for(let[i,s]of this._rawAttributes){if(Xt(s)){_.debug(`Unsettled resource attribute ${i} skipped`);continue}s!=null&&(n[i]??(n[i]=s))}return this._asyncAttributesPending||(this._memoizedAttributes=n),n}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(n){if(n==null)return this;let i=ll(this,n),s=i?{schemaUrl:i}:void 0;return o.FromAttributeList([...n.getRawAttributes(),...this.getRawAttributes()],s)}};function br(o,n){return Dn.FromAttributeList(Object.entries(o),n)}function Vn(){return br({[mi]:Mn(),[me]:$t[me],[he]:$t[he],[ye]:$t[ye]})}function Bi(o){return o.map(([n,i])=>Xt(i)?[n,i.catch(s=>{_.debug("promise rejection for resource attribute: %s - %s",n,s)})]:[n,i])}function sl(o){if(typeof o=="string"||o===void 0)return o;_.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",o)}function ll(o,n){let i=o?.schemaUrl,s=n?.schemaUrl,a=i===void 0||i==="",u=s===void 0||s==="";if(a)return s;if(u||i===s)return i;_.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',i,s)}var Hi="exception";var Nr=class{constructor(n){h(this,"_spanContext");h(this,"kind");h(this,"parentSpanContext");h(this,"attributes",{});h(this,"links",[]);h(this,"events",[]);h(this,"startTime");h(this,"resource");h(this,"instrumentationScope");h(this,"_droppedAttributesCount",0);h(this,"_droppedEventsCount",0);h(this,"_droppedLinksCount",0);h(this,"name");h(this,"status",{code:ct.UNSET});h(this,"endTime",[0,0]);h(this,"_ended",!1);h(this,"_duration",[-1,-1]);h(this,"_spanProcessor");h(this,"_spanLimits");h(this,"_attributeValueLengthLimit");h(this,"_performanceStartTime");h(this,"_performanceOffset");h(this,"_startTimeProvided");let i=Date.now();this._spanContext=n.spanContext,this._performanceStartTime=lt.now(),this._performanceOffset=i-(this._performanceStartTime+_r()),this._startTimeProvided=n.startTime!=null,this._spanLimits=n.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,this._spanProcessor=n.spanProcessor,this.name=n.name,this.parentSpanContext=n.parentSpanContext,this.kind=n.kind,this.links=n.links||[],this.startTime=this._getTime(n.startTime??i),this.resource=n.resource,this.instrumentationScope=n.scope,n.attributes!=null&&this.setAttributes(n.attributes),this._spanProcessor.onStart(this,n.context)}spanContext(){return this._spanContext}setAttribute(n,i){if(i==null||this._isSpanEnded())return this;if(n.length===0)return _.warn(`Invalid attribute key: ${n}`),this;if(!Tr(i))return _.warn(`Invalid attribute value set for key: ${n}`),this;let{attributeCountLimit:s}=this._spanLimits;return s!==void 0&&Object.keys(this.attributes).length>=s&&!Object.prototype.hasOwnProperty.call(this.attributes,n)?(this._droppedAttributesCount++,this):(this.attributes[n]=this._truncateToSize(i),this)}setAttributes(n){for(let[i,s]of Object.entries(n))this.setAttribute(i,s);return this}addEvent(n,i,s){if(this._isSpanEnded())return this;let{eventCountLimit:a}=this._spanLimits;if(a===0)return _.warn("No events allowed."),this._droppedEventsCount++,this;a!==void 0&&this.events.length>=a&&(this._droppedEventsCount===0&&_.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),vr(i)&&(vr(s)||(s=i),i=void 0);let u=Ut(i);return this.events.push({name:n,attributes:u,time:this._getTime(s),droppedAttributesCount:0}),this}addLink(n){return this.links.push(n),this}addLinks(n){return this.links.push(...n),this}setStatus(n){return this._isSpanEnded()?this:(this.status={...n},this.status.message!=null&&typeof n.message!="string"&&(_.warn(`Dropping invalid status.message of type '${typeof n.message}', expected 'string'`),delete this.status.message),this)}updateName(n){return this._isSpanEnded()?this:(this.name=n,this)}end(n){if(this._isSpanEnded()){_.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this._ended=!0,this.endTime=this._getTime(n),this._duration=In(this.startTime,this.endTime),this._duration[0]<0&&(_.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&_.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._spanProcessor.onEnd(this)}_getTime(n){if(typeof n=="number"&&n<=lt.now())return Ln(n+this._performanceOffset);if(typeof n=="number")return Nt(n);if(n instanceof Date)return Nt(n.getTime());if(Sr(n))return n;if(this._startTimeProvided)return Nt(Date.now());let i=lt.now()-this._performanceStartTime;return xr(this.startTime,Nt(i))}isRecording(){return this._ended===!1}recordException(n,i){let s={};typeof n=="string"?s[cr]=n:n&&(n.code?s[sr]=n.code.toString():n.name&&(s[sr]=n.name),n.message&&(s[cr]=n.message),n.stack&&(s[di]=n.stack)),s[sr]||s[cr]?this.addEvent(Hi,s,i):_.warn(`Failed to record an exception ${n}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){let n=new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);_.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,n)}return this._ended}_truncateToLimitUtil(n,i){return n.length<=i?n:n.substring(0,i)}_truncateToSize(n){let i=this._attributeValueLengthLimit;return i<=0?(_.warn(`Attribute value limit must be positive, got ${i}`),n):typeof n=="string"?this._truncateToLimitUtil(n,i):Array.isArray(n)?n.map(s=>typeof s=="string"?this._truncateToLimitUtil(s,i):s):n}};var J;(function(o){o[o.NOT_RECORD=0]="NOT_RECORD",o[o.RECORD=1]="RECORD",o[o.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(J||(J={}));var Rt=class{shouldSample(){return{decision:J.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};var pt=class{shouldSample(){return{decision:J.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};var Vt=class{constructor(n){h(this,"_root");h(this,"_remoteParentSampled");h(this,"_remoteParentNotSampled");h(this,"_localParentSampled");h(this,"_localParentNotSampled");this._root=n.root,this._root||(W(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new pt),this._remoteParentSampled=n.remoteParentSampled??new pt,this._remoteParentNotSampled=n.remoteParentNotSampled??new Rt,this._localParentSampled=n.localParentSampled??new pt,this._localParentNotSampled=n.localParentNotSampled??new Rt}shouldSample(n,i,s,a,u,e){let t=g.getSpanContext(n);return!t||!q(t)?this._root.shouldSample(n,i,s,a,u,e):t.isRemote?t.traceFlags&k.SAMPLED?this._remoteParentSampled.shouldSample(n,i,s,a,u,e):this._remoteParentNotSampled.shouldSample(n,i,s,a,u,e):t.traceFlags&k.SAMPLED?this._localParentSampled.shouldSample(n,i,s,a,u,e):this._localParentNotSampled.shouldSample(n,i,s,a,u,e)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};var Se=class{constructor(n=0){h(this,"_ratio");h(this,"_upperBound");this._ratio=n,this._ratio=this._normalize(n),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(n,i){return{decision:ir(i)&&this._accumulate(i)<this._upperBound?J.RECORD_AND_SAMPLED:J.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(n){return typeof n!="number"||isNaN(n)?0:n>=1?1:n<=0?0:n}_accumulate(n){let i=0;for(let s=0;s<n.length/8;s++){let a=s*8,u=parseInt(n.slice(a,a+8),16);i=(i^u)>>>0}return i}};var ft;(function(o){o.AlwaysOff="always_off",o.AlwaysOn="always_on",o.ParentBasedAlwaysOff="parentbased_always_off",o.ParentBasedAlwaysOn="parentbased_always_on",o.ParentBasedTraceIdRatio="parentbased_traceidratio",o.TraceIdRatio="traceidratio"})(ft||(ft={}));var Rr=1;function Pr(){return{sampler:kn(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:void 0??1/0,attributeCountLimit:void 0??128},spanLimits:{attributeValueLengthLimit:void 0??1/0,attributeCountLimit:void 0??128,linkCountLimit:void 0??128,eventCountLimit:void 0??128,attributePerEventCountLimit:void 0??128,attributePerLinkCountLimit:void 0??128}}}function kn(){let o=void 0??ft.ParentBasedAlwaysOn;switch(o){case ft.AlwaysOn:return new pt;case ft.AlwaysOff:return new Rt;case ft.ParentBasedAlwaysOn:return new Vt({root:new pt});case ft.ParentBasedAlwaysOff:return new Vt({root:new Rt});case ft.TraceIdRatio:return new Se(Gi());case ft.ParentBasedTraceIdRatio:return new Vt({root:new Se(Gi())});default:return _.error(`OTEL_TRACES_SAMPLER value "${o}" invalid, defaulting to "${ft.ParentBasedAlwaysOn}".`),new Vt({root:new pt})}}function Gi(){let o=void 0;return o==null?(_.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Rr}.`),Rr):o<0||o>1?(_.error(`OTEL_TRACES_SAMPLER_ARG=${o} was given, but it is out of range ([0..1]), defaulting to ${Rr}.`),Rr):o}var pl=128,fl=1/0;function Fi(o){let n={sampler:kn()},i=Pr(),s=Object.assign({},i,n,o);return s.generalLimits=Object.assign({},i.generalLimits,o.generalLimits||{}),s.spanLimits=Object.assign({},i.spanLimits,o.spanLimits||{}),s}function Ki(o){let n=Object.assign({},o.spanLimits);return n.attributeCountLimit=o.spanLimits?.attributeCountLimit??o.generalLimits?.attributeCountLimit??void 0??void 0??pl,n.attributeValueLengthLimit=o.spanLimits?.attributeValueLengthLimit??o.generalLimits?.attributeValueLengthLimit??void 0??void 0??fl,Object.assign({},o,{spanLimits:n})}var Lr=class{constructor(n,i){h(this,"_exporter");h(this,"_maxExportBatchSize");h(this,"_maxQueueSize");h(this,"_scheduledDelayMillis");h(this,"_exportTimeoutMillis");h(this,"_isExporting",!1);h(this,"_finishedSpans",[]);h(this,"_timer");h(this,"_shutdownOnce");h(this,"_droppedSpansCount",0);this._exporter=n,this._maxExportBatchSize=typeof i?.maxExportBatchSize=="number"?i.maxExportBatchSize:void 0??512,this._maxQueueSize=typeof i?.maxQueueSize=="number"?i.maxQueueSize:void 0??2048,this._scheduledDelayMillis=typeof i?.scheduledDelayMillis=="number"?i.scheduledDelayMillis:void 0??5e3,this._exportTimeoutMillis=typeof i?.exportTimeoutMillis=="number"?i.exportTimeoutMillis:void 0??3e4,this._shutdownOnce=new Dt(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(_.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(n,i){}onEnd(n){this._shutdownOnce.isCalled||(n.spanContext().traceFlags&k.SAMPLED)!==0&&this._addToBuffer(n)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(n){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&_.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(_.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(n),this._maybeStartTimer()}_flushAll(){return new Promise((n,i)=>{let s=[],a=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let u=0,e=a;u<e;u++)s.push(this._flushOneBatch());Promise.all(s).then(()=>{n()}).catch(i)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((n,i)=>{let s=setTimeout(()=>{i(new Error("Timeout"))},this._exportTimeoutMillis);x.with(_e(x.active()),()=>{let a;this._finishedSpans.length<=this._maxExportBatchSize?(a=this._finishedSpans,this._finishedSpans=[]):a=this._finishedSpans.splice(0,this._maxExportBatchSize);let u=()=>this._exporter.export(a,t=>{clearTimeout(s),t.code===Et.SUCCESS?n():i(t.error??new Error("BatchSpanProcessor: span export failed"))}),e=null;for(let t=0,r=a.length;t<r;t++){let c=a[t];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(e??(e=[]),e.push(c.resource.waitForAsyncAttributes()))}e===null?u():Promise.all(e).then(u,t=>{W(t),i(t)})})})}_maybeStartTimer(){if(this._isExporting)return;let n=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(i=>{this._isExporting=!1,W(i)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(()=>n(),this._scheduledDelayMillis),typeof this._timer!="number"&&this._timer.unref())}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};var Qt=class extends Lr{constructor(i,s){super(i,s);h(this,"_visibilityChangeListener");h(this,"_pageHideListener");this.onInit(s)}onInit(i){i?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=()=>{document.visibilityState==="hidden"&&this.forceFlush().catch(s=>{W(s)})},this._pageHideListener=()=>{this.forceFlush().catch(s=>{W(s)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))}onShutdown(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))}};var Zt=class{constructor(){h(this,"generateTraceId",ji(16));h(this,"generateSpanId",ji(8))}},Ir=Array(32);function ji(o){return function(){for(let i=0;i<o*2;i++)Ir[i]=Math.floor(Math.random()*16)+48,Ir[i]>=58&&(Ir[i]+=39);return String.fromCharCode.apply(null,Ir.slice(0,o*2))}}var Cr=class{constructor(n,i,s,a){h(this,"_sampler");h(this,"_generalLimits");h(this,"_spanLimits");h(this,"_idGenerator");h(this,"instrumentationScope");h(this,"_resource");h(this,"_spanProcessor");let u=Fi(i);this._sampler=u.sampler,this._generalLimits=u.generalLimits,this._spanLimits=u.spanLimits,this._idGenerator=i.idGenerator||new Zt,this._resource=s,this._spanProcessor=a,this.instrumentationScope=n}startSpan(n,i={},s=x.active()){i.root&&(s=g.deleteSpan(s));let a=g.getSpan(s);if(Rn(s))return _.debug("Instrumentation suppressed, returning Noop Span"),g.wrapSpanContext(le);let u=a?.spanContext(),e=this._idGenerator.generateSpanId(),t,r,c;!u||!g.isSpanContextValid(u)?r=this._idGenerator.generateTraceId():(r=u.traceId,c=u.traceState,t=u);let l=i.kind??_t.INTERNAL,d=(i.links??[]).map(T=>({context:T.context,attributes:Ut(T.attributes)})),y=Ut(i.attributes),A=this._sampler.shouldSample(s,r,n,l,y,d);c=A.traceState??c;let b=A.decision===qt.RECORD_AND_SAMPLED?k.SAMPLED:k.NONE,w={traceId:r,spanId:e,traceFlags:b,traceState:c};if(A.decision===qt.NOT_RECORD)return _.debug("Recording is off, propagating context in a non-recording span"),g.wrapSpanContext(w);let R=Ut(Object.assign(y,A.attributes));return new Nr({resource:this._resource,scope:this.instrumentationScope,context:s,spanContext:w,name:n,kind:l,links:d,parentSpanContext:t,attributes:R,startTime:i.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits})}startActiveSpan(n,i,s,a){let u,e,t;if(arguments.length<2)return;arguments.length===2?t=i:arguments.length===3?(u=i,t=s):(u=i,e=s,t=a);let r=e??x.active(),c=this.startSpan(n,u,r),l=g.setSpan(r,c);return x.with(l,t,void 0,c)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}};var wr=class{constructor(n){h(this,"_spanProcessors");this._spanProcessors=n}forceFlush(){let n=[];for(let i of this._spanProcessors)n.push(i.forceFlush());return new Promise(i=>{Promise.all(n).then(()=>{i()}).catch(s=>{W(s||new Error("MultiSpanProcessor: forceFlush failed")),i()})})}onStart(n,i){for(let s of this._spanProcessors)s.onStart(n,i)}onEnd(n){for(let i of this._spanProcessors)i.onEnd(n)}shutdown(){let n=[];for(let i of this._spanProcessors)n.push(i.shutdown());return new Promise((i,s)=>{Promise.all(n).then(()=>{i()},s)})}};var kt;(function(o){o[o.resolved=0]="resolved",o[o.timeout=1]="timeout",o[o.error=2]="error",o[o.unresolved=3]="unresolved"})(kt||(kt={}));var ve=class{constructor(n={}){h(this,"_config");h(this,"_tracers",new Map);h(this,"_resource");h(this,"_activeSpanProcessor");let i=Un({},Pr(),Ki(n));this._resource=i.resource??Vn(),this._config=Object.assign({},i,{resource:this._resource});let s=[];n.spanProcessors?.length&&s.push(...n.spanProcessors),this._activeSpanProcessor=new wr(s)}getTracer(n,i,s){let a=`${n}@${i||""}:${s?.schemaUrl||""}`;return this._tracers.has(a)||this._tracers.set(a,new Cr({name:n,version:i,schemaUrl:s?.schemaUrl},this._config,this._resource,this._activeSpanProcessor)),this._tracers.get(a)}forceFlush(){let n=this._config.forceFlushTimeoutMillis,i=this._activeSpanProcessor._spanProcessors.map(s=>new Promise(a=>{let u,e=setTimeout(()=>{a(new Error(`Span processor did not completed within timeout period of ${n} ms`)),u=kt.timeout},n);s.forceFlush().then(()=>{clearTimeout(e),u!==kt.timeout&&(u=kt.resolved,a(u))}).catch(t=>{clearTimeout(e),u=kt.error,a(t)})}));return new Promise((s,a)=>{Promise.all(i).then(u=>{let e=u.filter(t=>t!==kt.resolved);e.length>0?a(e):s()}).catch(u=>a([u]))})}shutdown(){return this._activeSpanProcessor.shutdown()}};var xe=class{export(n,i){return this._sendSpans(n,i)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(n){return{resource:{attributes:n.resource.attributes},instrumentationScope:n.instrumentationScope,traceId:n.spanContext().traceId,parentSpanContext:n.parentSpanContext,traceState:n.spanContext().traceState?.serialize(),name:n.name,id:n.spanContext().spanId,kind:n.kind,timestamp:Er(n.startTime),duration:Er(n.duration),attributes:n.attributes,status:n.status,events:n.events,links:n.links}}_sendSpans(n,i){for(let s of n)console.dir(this._exportInfo(s),{depth:3});if(i)return i({code:Et.SUCCESS})}};var Oe=class{constructor(n){h(this,"_exporter");h(this,"_shutdownOnce");h(this,"_pendingExports");this._exporter=n,this._shutdownOnce=new Dt(this._shutdown,this),this._pendingExports=new Set}async forceFlush(){await Promise.all(Array.from(this._pendingExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(n,i){}onEnd(n){if(this._shutdownOnce.isCalled||(n.spanContext().traceFlags&k.SAMPLED)===0)return;let i=this._doExport(n).catch(s=>W(s));this._pendingExports.add(i),i.finally(()=>this._pendingExports.delete(i))}async _doExport(n){n.resource.asyncAttributesPending&&await n.resource.waitForAsyncAttributes?.();let i=await Di._export(this._exporter,[n]);if(i.code!==Et.SUCCESS)throw i.error??new Error(`SimpleSpanProcessor: span export failed (status ${i})`)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};var Ur=class{constructor(){h(this,"_enabled",!1);h(this,"_currentContext",tt)}_bindFunction(n=tt,i){let s=this,a=function(...u){return s.with(n,()=>i.apply(this,u))};return Object.defineProperty(a,"length",{enumerable:!1,configurable:!0,writable:!1,value:i.length}),a}active(){return this._currentContext}bind(n,i){return n===void 0&&(n=this.active()),typeof i=="function"?this._bindFunction(n,i):i}disable(){return this._currentContext=tt,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=tt,this)}with(n,i,s,...a){let u=this._currentContext;this._currentContext=n||tt;try{return i.call(s,...a)}finally{this._currentContext=u}}};var dl=Z("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Mr(o){return o.getValue(dl)===!0}var Dr="baggage";function zi(o){return o.reduce((n,i)=>{let s=`${n}${n!==""?",":""}${i}`;return s.length>8192?n:s},"")}function qi(o){return o.getAllEntries().map(([n,i])=>{let s=`${encodeURIComponent(n)}=${encodeURIComponent(i.value)}`;return i.metadata!==void 0&&(s+=";"+i.metadata.toString()),s})}function Wi(o){let n=o.split(";");if(n.length<=0)return;let i=n.shift();if(!i)return;let s=i.indexOf("=");if(s<=0)return;let a=decodeURIComponent(i.substring(0,s).trim()),u=decodeURIComponent(i.substring(s+1).trim()),e;return n.length>0&&(e=pn(n.join(";"))),{key:a,value:u,metadata:e}}var Ae=class{inject(n,i,s){let a=B.getBaggage(n);if(!a||Mr(n))return;let u=qi(a).filter(t=>t.length<=4096).slice(0,180),e=zi(u);e.length>0&&s.set(i,Dr,e)}extract(n,i,s){let a=s.get(i,Dr),u=Array.isArray(a)?a.join(","):a;if(!u)return n;let e={};return u.length===0||(u.split(",").forEach(r=>{let c=Wi(r);if(c){let l={value:c.value};c.metadata&&(l.metadata=c.metadata),e[c.key]=l}}),Object.entries(e).length===0)?n:B.setBaggage(n,B.createBaggage(e))}fields(){return[Dr]}};var ge=performance;var yl=9,Tl=6,_l=Math.pow(10,Tl),Hn=Math.pow(10,yl);function be(o){let n=o/1e3,i=Math.trunc(n),s=Math.round(o%1e3*_l);return[i,s]}function Gn(){let o=ge.timeOrigin;if(typeof o!="number"){let n=ge;o=n.timing&&n.timing.fetchStart}return o}function Ji(o){let n=be(Gn()),i=be(typeof o=="number"?o:ge.now());return Xi(n,i)}function Bt(o){if($i(o))return o;if(typeof o=="number")return o<Gn()?Ji(o):be(o);if(o instanceof Date)return be(o.getTime());throw TypeError("Invalid input type")}function dt(o){return o[0]*Hn+o[1]}function $i(o){return Array.isArray(o)&&o.length===2&&typeof o[0]=="number"&&typeof o[1]=="number"}function Xi(o,n){let i=[o[0]+n[0],o[1]+n[1]];return i[1]>=Hn&&(i[1]-=Hn,i[0]+=1),i}var Ne=class{constructor(n={}){h(this,"_propagators");h(this,"_fields");this._propagators=n.propagators??[],this._fields=Array.from(new Set(this._propagators.map(i=>typeof i.fields=="function"?i.fields():[]).reduce((i,s)=>i.concat(s),[])))}inject(n,i,s){for(let a of this._propagators)try{a.inject(n,i,s)}catch(u){_.warn(`Failed to inject with ${a.constructor.name}. Err: ${u.message}`)}}extract(n,i,s){return this._propagators.reduce((a,u)=>{try{return u.extract(a,i,s)}catch(e){_.warn(`Failed to extract with ${u.constructor.name}. Err: ${e.message}`)}return a},n)}fields(){return this._fields.slice()}};var Fn="[_0-9a-z-*/]",El=`[a-z]${Fn}{0,255}`,Sl=`[a-z0-9]${Fn}{0,240}@[a-z]${Fn}{0,13}`,vl=new RegExp(`^(?:${El}|${Sl})$`),xl=/^[ -~]{0,255}[!-~]$/,Ol=/,|=/;function Qi(o){return vl.test(o)}function Zi(o){return xl.test(o)&&!Ol.test(o)}var ta=32,Al=512,ea=",",ra="=",Vr=class o{constructor(n){h(this,"_internalState",new Map);n&&this._parse(n)}set(n,i){let s=this._clone();return s._internalState.has(n)&&s._internalState.delete(n),s._internalState.set(n,i),s}unset(n){let i=this._clone();return i._internalState.delete(n),i}get(n){return this._internalState.get(n)}serialize(){return this._keys().reduce((n,i)=>(n.push(i+ra+this.get(i)),n),[]).join(ea)}_parse(n){n.length>Al||(this._internalState=n.split(ea).reverse().reduce((i,s)=>{let a=s.trim(),u=a.indexOf(ra);if(u!==-1){let e=a.slice(0,u),t=a.slice(u+1,s.length);Qi(e)&&Zi(t)&&i.set(e,t)}return i},new Map),this._internalState.size>ta&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,ta))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let n=new o;return n._internalState=new Map(this._internalState),n}};var kr="traceparent",Br="tracestate",gl="00",bl="(?!ff)[\\da-f]{2}",Nl="(?![0]{32})[\\da-f]{32}",Rl="(?![0]{16})[\\da-f]{16}",Pl="[\\da-f]{2}",Ll=new RegExp(`^\\s?(${bl})-(${Nl})-(${Rl})-(${Pl})(-.*)?\\s?$`);function na(o){let n=Ll.exec(o);return!n||n[1]==="00"&&n[5]?null:{traceId:n[2],spanId:n[3],traceFlags:parseInt(n[4],16)}}var Re=class{inject(n,i,s){let a=g.getSpanContext(n);if(!a||Mr(n)||!q(a))return;let u=`${gl}-${a.traceId}-${a.spanId}-0${Number(a.traceFlags||k.NONE).toString(16)}`;s.set(i,kr,u),a.traceState&&s.set(i,Br,a.traceState.serialize())}extract(n,i,s){let a=s.get(i,kr);if(!a)return n;let u=Array.isArray(a)?a[0]:a;if(typeof u!="string")return n;let e=na(u);if(!e)return n;e.isRemote=!0;let t=s.get(i,Br);if(t){let r=Array.isArray(t)?t.join(","):t;e.traceState=new Vr(typeof r=="string"?r:void 0)}return g.setSpanContext(n,e)}fields(){return[kr,Br]}};function Kn(o,n){return typeof n=="string"?o===n:!!o.match(n)}function Il(o){if(o!==null){if(o===void 0){let n=new Ur;n.enable(),x.setGlobalContextManager(n);return}o.enable(),x.setGlobalContextManager(o)}}function Cl(o){if(o!==null){if(o===void 0){B.setGlobalPropagator(new Ne({propagators:[new Re,new Ae]}));return}B.setGlobalPropagator(o)}}var Pe=class extends ve{constructor(n={}){super(n)}register(n={}){g.setGlobalTracerProvider(this),Cl(n.propagator),Il(n.contextManager)}};var v;(function(o){o.CONNECT_END="connectEnd",o.CONNECT_START="connectStart",o.DECODED_BODY_SIZE="decodedBodySize",o.DOM_COMPLETE="domComplete",o.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",o.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",o.DOM_INTERACTIVE="domInteractive",o.DOMAIN_LOOKUP_END="domainLookupEnd",o.DOMAIN_LOOKUP_START="domainLookupStart",o.ENCODED_BODY_SIZE="encodedBodySize",o.FETCH_START="fetchStart",o.LOAD_EVENT_END="loadEventEnd",o.LOAD_EVENT_START="loadEventStart",o.NAVIGATION_START="navigationStart",o.REDIRECT_END="redirectEnd",o.REDIRECT_START="redirectStart",o.REQUEST_START="requestStart",o.RESPONSE_END="responseEnd",o.RESPONSE_START="responseStart",o.SECURE_CONNECTION_START="secureConnectionStart",o.START_TIME="startTime",o.UNLOAD_EVENT_END="unloadEventEnd",o.UNLOAD_EVENT_START="unloadEventStart"})(v||(v={}));var oa="http.response_content_length",ia="http.response_content_length_uncompressed";var jn;function wl(){return jn||(jn=document.createElement("a")),jn}function St(o,n){return n in o}function D(o,n,i,s=!0){if(St(i,n)&&typeof i[n]=="number"&&!(s&&i[n]===0))return o.addEvent(n,i[n])}function mt(o,n,i=!1,s,a){if(s===void 0&&(s=n[v.START_TIME]!==0),i||(D(o,v.FETCH_START,n,s),D(o,v.DOMAIN_LOOKUP_START,n,s),D(o,v.DOMAIN_LOOKUP_END,n,s),D(o,v.CONNECT_START,n,s),D(o,v.SECURE_CONNECTION_START,n,s),D(o,v.CONNECT_END,n,s),D(o,v.REQUEST_START,n,s),D(o,v.RESPONSE_START,n,s),D(o,v.RESPONSE_END,n,s)),!a){let u=n[v.ENCODED_BODY_SIZE];u!==void 0&&o.setAttribute(oa,u);let e=n[v.DECODED_BODY_SIZE];e!==void 0&&u!==e&&o.setAttribute(ia,e)}}function aa(o){return o.slice().sort((n,i)=>{let s=n[v.FETCH_START],a=i[v.FETCH_START];return s>a?1:s<a?-1:0})}function ua(){return typeof location<"u"?location.origin:void 0}function Le(o,n,i,s,a=new WeakSet,u){let e=$(o);o=e.toString();let t=Ml(o,n,i,s,a,u);if(t.length===0)return{mainRequest:void 0};if(t.length===1)return{mainRequest:t[0]};let r=aa(t);if(e.origin!==ua()&&r.length>1){let c=r[0],l=Ul(r,c[v.RESPONSE_END],i),d=c[v.RESPONSE_END];return l[v.FETCH_START]<d&&(l=c,c=void 0),{corsPreFlightRequest:c,mainRequest:l}}else return{mainRequest:t[0]}}function Ul(o,n,i){let s=dt(i),a=dt(Bt(n)),u=o[1],e,t=o.length;for(let r=1;r<t;r++){let c=o[r],l=dt(Bt(c[v.FETCH_START])),d=dt(Bt(c[v.RESPONSE_END])),y=s-d;l>=a&&(!e||y<e)&&(e=y,u=c)}return u}function Ml(o,n,i,s,a,u){let e=dt(n),t=dt(i),r=s.filter(c=>{let l=dt(Bt(c[v.FETCH_START])),d=dt(Bt(c[v.RESPONSE_END]));return c.initiatorType.toLowerCase()===(u||"xmlhttprequest")&&c.name===o&&l>=e&&d<=t});return r.length>0&&(r=r.filter(c=>!a.has(c))),r}function $(o){if(typeof URL=="function")return new URL(o,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);let n=wl();return n.href=o,n}function Hr(o,n){if(o.nodeType===Node.DOCUMENT_NODE)return"/";let i=Vl(o,n);if(n&&i.indexOf("@id")>0)return i;let s="";return o.parentNode&&(s+=Hr(o.parentNode,!1)),s+=i,s}function Dl(o){if(!o.parentNode)return 0;let n=[o.nodeType];o.nodeType===Node.CDATA_SECTION_NODE&&n.push(Node.TEXT_NODE);let i=Array.from(o.parentNode.childNodes);return i=i.filter(s=>{let a=s.localName;return n.indexOf(s.nodeType)>=0&&a===o.localName}),i.length>=1?i.indexOf(o)+1:0}function Vl(o,n){let i=o.nodeType,s=Dl(o),a="";if(i===Node.ELEMENT_NODE){let u=o.getAttribute("id");if(n&&u)return`//*[@id="${u}"]`;a=o.localName}else if(i===Node.TEXT_NODE||i===Node.CDATA_SECTION_NODE)a="text()";else if(i===Node.COMMENT_NODE)a="comment()";else return"";return a&&s>1?`/${a}[${s}]`:`/${a}`}function Ie(o,n){let i=n||[];return(typeof i=="string"||i instanceof RegExp)&&(i=[i]),$(o).origin===ua()?!0:i.some(a=>Kn(o,a))}var Ht=class{constructor(n){h(this,"_delegate");this._delegate=n}export(n,i){this._delegate.export(n,i)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}};var Ce=class extends Error{constructor(i,s,a){super(i);h(this,"code");h(this,"name","OTLPExporterError");h(this,"data");this.data=a,this.code=s}};function Bl(o){if(Number.isFinite(o)&&o>0)return o;throw new Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${o}')`)}function ca(o){if(o!=null)return async()=>o}function sa(o,n,i){return{timeoutMillis:Bl(o.timeoutMillis??n.timeoutMillis??i.timeoutMillis),concurrencyLimit:o.concurrencyLimit??n.concurrencyLimit??i.concurrencyLimit,compression:o.compression??n.compression??i.compression}}function la(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var Yn=class{constructor(n){h(this,"_concurrencyLimit");h(this,"_sendingPromises",[]);this._concurrencyLimit=n}pushPromise(n){if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(n);let i=()=>{let s=this._sendingPromises.indexOf(n);this._sendingPromises.splice(s,1)};n.then(i,i)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}};function pa(o){return new Yn(o.concurrencyLimit)}var et;(function(o){o[o.SUCCESS=0]="SUCCESS",o[o.FAILED=1]="FAILED"})(et||(et={}));function Hl(o){return Object.prototype.hasOwnProperty.call(o,"partialSuccess")}function fa(){return{handleResponse(o){o==null||!Hl(o)||o.partialSuccess==null||Object.keys(o.partialSuccess).length===0||_.warn("Received Partial Success response:",JSON.stringify(o.partialSuccess))}}}var zn=class{constructor(n,i,s,a,u){h(this,"_transport");h(this,"_serializer");h(this,"_responseHandler");h(this,"_promiseQueue");h(this,"_timeout");h(this,"_diagLogger");this._transport=n,this._serializer=i,this._responseHandler=s,this._promiseQueue=a,this._timeout=u,this._diagLogger=_.createComponentLogger({namespace:"OTLPExportDelegate"})}export(n,i){if(this._diagLogger.debug("items to be sent",n),this._promiseQueue.hasReachedLimit()){i({code:et.FAILED,error:new Error("Concurrent export limit reached")});return}let s=this._serializer.serializeRequest(n);if(s==null){i({code:et.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(s,this._timeout).then(a=>{if(a.status==="success"){if(a.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(a.data))}catch(u){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",u,a.data)}i({code:et.SUCCESS});return}else if(a.status==="failure"&&a.error){i({code:et.FAILED,error:a.error});return}else a.status==="retryable"?i({code:et.FAILED,error:new Ce("Export failed with retryable status")}):i({code:et.FAILED,error:new Ce("Export failed with unknown error")})},a=>i({code:et.FAILED,error:a})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}};function da(o,n){return new zn(o.transport,o.serializer,fa(),o.promiseHandler,n.timeout)}function Gr(o,n,i){return da({transport:i,serializer:n,promiseHandler:pa(o)},{timeout:o.timeoutMillis})}var $l=9,Xl=6,yE=Math.pow(10,Xl),Ql=Math.pow(10,$l);function ao(o){return o[0]*Ql+o[1]}function du(o){return o>=48&&o<=57?o-48:o>=97&&o<=102?o-87:o-55}function zr(o){let n=new Uint8Array(o.length/2),i=0;for(let s=0;s<o.length;s+=2){let a=du(o.charCodeAt(s)),u=du(o.charCodeAt(s+1));n[i++]=a<<4|u}return n}function hu(o){let n=BigInt(1e9);return BigInt(Math.trunc(o[0]))*n+BigInt(Math.trunc(o[1]))}function Zl(o){let n=Number(BigInt.asUintN(32,o)),i=Number(BigInt.asUintN(32,o>>BigInt(32)));return{low:n,high:i}}function yu(o){let n=hu(o);return Zl(n)}function tp(o){return hu(o).toString()}var ep=typeof BigInt<"u"?tp:ao;function mu(o){return o}function Tu(o){if(o!==void 0)return zr(o)}var rp={encodeHrTime:yu,encodeSpanContext:zr,encodeOptionalSpanContext:Tu};function _u(o){if(o===void 0)return rp;let n=o.useLongBits??!0,i=o.useHex??!1;return{encodeHrTime:n?yu:ep,encodeSpanContext:i?mu:zr,encodeOptionalSpanContext:i?mu:Tu}}function Eu(o){let n={attributes:De(o.attributes),droppedAttributesCount:0},i=o.schemaUrl;return i&&i!==""&&(n.schemaUrl=i),n}function Su(o){return{name:o.name,version:o.version}}function De(o){return Object.keys(o).map(n=>vu(n,o[n]))}function vu(o,n){return{key:o,value:xu(n)}}function xu(o){let n=typeof o;return n==="string"?{stringValue:o}:n==="number"?Number.isInteger(o)?{intValue:o}:{doubleValue:o}:n==="boolean"?{boolValue:o}:o instanceof Uint8Array?{bytesValue:o}:Array.isArray(o)?{arrayValue:{values:o.map(xu)}}:n==="object"&&o!=null?{kvlistValue:{values:Object.entries(o).map(([i,s])=>vu(i,s))}}:{}}var uo=Cc(fu());var np=256,op=512;function Ou(o,n){let i=o&255|np;return n&&(i|=op),i}function ip(o,n){let i=o.spanContext(),s=o.status,a=o.parentSpanContext?.spanId?n.encodeSpanContext(o.parentSpanContext?.spanId):void 0;return{traceId:n.encodeSpanContext(i.traceId),spanId:n.encodeSpanContext(i.spanId),parentSpanId:a,traceState:i.traceState?.serialize(),name:o.name,kind:o.kind==null?0:o.kind+1,startTimeUnixNano:n.encodeHrTime(o.startTime),endTimeUnixNano:n.encodeHrTime(o.endTime),attributes:De(o.attributes),droppedAttributesCount:o.droppedAttributesCount,events:o.events.map(u=>up(u,n)),droppedEventsCount:o.droppedEventsCount,status:{code:s.code,message:s.message},links:o.links.map(u=>ap(u,n)),droppedLinksCount:o.droppedLinksCount,flags:Ou(i.traceFlags,o.parentSpanContext?.isRemote)}}function ap(o,n){return{attributes:o.attributes?De(o.attributes):[],spanId:n.encodeSpanContext(o.context.spanId),traceId:n.encodeSpanContext(o.context.traceId),traceState:o.context.traceState?.serialize(),droppedAttributesCount:o.droppedAttributesCount||0,flags:Ou(o.context.traceFlags,o.context.isRemote)}}function up(o,n){return{attributes:o.attributes?De(o.attributes):[],name:o.name,timeUnixNano:n.encodeHrTime(o.time),droppedAttributesCount:o.droppedAttributesCount||0}}function qr(o,n){let i=_u(n);return{resourceSpans:sp(o,i)}}function cp(o){let n=new Map;for(let i of o){let s=n.get(i.resource);s||(s=new Map,n.set(i.resource,s));let a=`${i.instrumentationScope.name}@${i.instrumentationScope.version||""}:${i.instrumentationScope.schemaUrl||""}`,u=s.get(a);u||(u=[],s.set(a,u)),u.push(i)}return n}function sp(o,n){let i=cp(o),s=[],a=i.entries(),u=a.next();for(;!u.done;){let[e,t]=u.value,r=[],c=t.values(),l=c.next();for(;!l.done;){let A=l.value;if(A.length>0){let b=A.map(w=>ip(w,n));r.push({scope:Su(A[0].instrumentationScope),spans:b,schemaUrl:A[0].instrumentationScope.schemaUrl})}l=c.next()}let d=Eu(e),y={resource:d,scopeSpans:r,schemaUrl:d.schemaUrl};s.push(y),u=a.next()}return s}var lp=uo.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,pp=uo.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,Wr={serializeRequest:o=>{let n=qr(o);return pp.encode(n).finish()},deserializeResponse:o=>lp.decode(o)};var Jr={serializeRequest:o=>{let n=qr(o,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(n))},deserializeResponse:o=>{if(o.length===0)return{};let n=new TextDecoder;return JSON.parse(n.decode(o))}};function fp(){return Math.random()*(2*.2)-.2}var co=class{constructor(n){h(this,"_transport");this._transport=n}retry(n,i,s){return new Promise((a,u)=>{setTimeout(()=>{this._transport.send(n,i).then(a,u)},s)})}async send(n,i){let s=Date.now()+i,a=await this._transport.send(n,i),u=5,e=1e3;for(;a.status==="retryable"&&u>0;){u--;let t=Math.max(Math.min(e,5e3)+fp(),0);e=e*1.5;let r=a.retryInMillis??t,c=s-Date.now();if(r>c)return a;a=await this.retry(n,c,r)}return a}shutdown(){return this._transport.shutdown()}};function $r(o){return new co(o.transport)}function Xr(o){return[429,502,503,504].includes(o)}function Qr(o){if(o==null)return;let n=Number.parseInt(o,10);if(Number.isInteger(n))return n>0?n*1e3:-1;let i=new Date(o).getTime()-Date.now();return i>=0?i:0}var so=class{constructor(n){h(this,"_parameters");this._parameters=n}async send(n,i){let s=await this._parameters.headers();return await new Promise(u=>{let e=new XMLHttpRequest;e.timeout=i,e.open("POST",this._parameters.url),Object.entries(s).forEach(([t,r])=>{e.setRequestHeader(t,r)}),e.ontimeout=t=>{u({status:"failure",error:new Error("XHR request timed out")})},e.onreadystatechange=()=>{e.status>=200&&e.status<=299?(_.debug("XHR success"),u({status:"success"})):e.status&&Xr(e.status)?u({status:"retryable",retryInMillis:Qr(e.getResponseHeader("Retry-After"))}):e.status!==0&&u({status:"failure",error:new Error("XHR request failed with non-retryable status")})},e.onabort=()=>{u({status:"failure",error:new Error("XHR request aborted")})},e.onerror=()=>{u({status:"failure",error:new Error("XHR request errored")})},e.send(n)})}shutdown(){}};function Au(o){return new so(o)}var lo=class{constructor(n){h(this,"_params");this._params=n}async send(n){let i=(await this._params.headers())["Content-Type"];return new Promise(s=>{navigator.sendBeacon(this._params.url,new Blob([n],{type:i}))?(_.debug("SendBeacon success"),s({status:"success"})):s({status:"failure",error:new Error("SendBeacon failed")})})}shutdown(){}};function gu(o){return new lo(o)}var po=class{constructor(n){h(this,"_parameters");this._parameters=n}async send(n,i){let s=new AbortController,a=setTimeout(()=>s.abort(),i);try{let u=!!globalThis.location,e=new URL(this._parameters.url),t=await fetch(e.href,{method:"POST",headers:await this._parameters.headers(),body:n,signal:s.signal,keepalive:u,mode:u?globalThis.location?.origin===e.origin?"same-origin":"cors":"no-cors"});if(t.status>=200&&t.status<=299)return _.debug("response success"),{status:"success"};if(Xr(t.status)){let r=t.headers.get("Retry-After");return{status:"retryable",retryInMillis:Qr(r)}}return{status:"failure",error:new Error("Fetch request failed with non-retryable status")}}catch(u){return u?.name==="AbortError"?{status:"failure",error:new Error("Fetch request timed out",{cause:u})}:{status:"failure",error:new Error("Fetch request errored",{cause:u})}}finally{clearTimeout(a)}}shutdown(){}};function bu(o){return new po(o)}function Nu(o,n){return Gr(o,n,$r({transport:Au(o)}))}function Ru(o,n){return Gr(o,n,$r({transport:bu(o)}))}function Pu(o,n){return Gr(o,n,$r({transport:gu({url:o.url,headers:o.headers})}))}function Lu(o){let n={};return Object.entries(o??{}).forEach(([i,s])=>{typeof s<"u"?n[i]=String(s):_.warn(`Header "${i}" has invalid value (${s}) and will be ignored`)}),n}function dp(o,n,i){return async()=>{let s={...await i()},a={};return n!=null&&Object.assign(a,await n()),o!=null&&Object.assign(a,Lu(await o())),Object.assign(a,s)}}function mp(o){if(o!=null)try{let n=globalThis.location?.href;return new URL(o,n).href}catch{throw new Error(`Configuration: Could not parse user-provided export URL: '${o}'`)}}function Iu(o,n,i){return{...sa(o,n,i),headers:dp(o.headers,n.headers,i.headers),url:mp(o.url)??n.url??i.url}}function Cu(o,n){return{...la(),headers:async()=>o,url:"http://localhost:4318/"+n}}function wu(o){return typeof o.headers=="function"?o.headers:ca(o.headers)}function Uu(o,n,i){return Iu({url:o.url,timeoutMillis:o.timeoutMillis,headers:wu(o),concurrencyLimit:o.concurrencyLimit},{},Cu(i,n))}function Ve(o,n,i,s){let a=hp(o.headers),u=Uu(o,i,s);return a(u,n)}function hp(o){return!o&&typeof navigator.sendBeacon=="function"?Pu:typeof globalThis.fetch<"u"?Ru:Nu}var ee=class extends Ht{constructor(n={}){super(Ve(n,Jr,"v1/traces",{"Content-Type":"application/json"}))}};var yp="v1/traces",re=class extends Ht{constructor(n={}){super(Ve(n,Wr,yp,{"Content-Type":"application/x-protobuf"}))}};var ke=class{emit(n){}},Mu=new ke;var fo=class{getLogger(n,i,s){return new ke}},Zr=new fo;var tn=class{constructor(n,i,s,a){this._provider=n,this.name=i,this.version=s,this.options=a}emit(n){this._getLogger().emit(n)}_getLogger(){if(this._delegate)return this._delegate;let n=this._provider._getDelegateLogger(this.name,this.version,this.options);return n?(this._delegate=n,this._delegate):Mu}};var Be=class{getLogger(n,i,s){var a;return(a=this._getDelegateLogger(n,i,s))!==null&&a!==void 0?a:new tn(this,n,i,s)}_getDelegate(){var n;return(n=this._delegate)!==null&&n!==void 0?n:Zr}_setDelegate(n){this._delegate=n}_getDelegateLogger(n,i,s){var a;return(a=this._delegate)===null||a===void 0?void 0:a.getLogger(n,i,s)}};var mo=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};var He=Symbol.for("io.opentelemetry.js.api.logs"),ne=mo;function Du(o,n,i){return s=>s===o?n:i}var ho=1;var en=class o{constructor(){this._proxyLoggerProvider=new Be}static getInstance(){return this._instance||(this._instance=new o),this._instance}setGlobalLoggerProvider(n){return ne[He]?this.getLoggerProvider():(ne[He]=Du(ho,n,Zr),this._proxyLoggerProvider._setDelegate(n),n)}getLoggerProvider(){var n,i;return(i=(n=ne[He])===null||n===void 0?void 0:n.call(ne,ho))!==null&&i!==void 0?i:this._proxyLoggerProvider}getLogger(n,i,s){return this.getLoggerProvider().getLogger(n,i,s)}disable(){delete ne[He],this._proxyLoggerProvider=new Be}};var rn=en.getInstance();function Vu(o,n,i,s){for(let a=0,u=o.length;a<u;a++){let e=o[a];n&&e.setTracerProvider(n),i&&e.setMeterProvider(i),s&&e.setLoggerProvider&&e.setLoggerProvider(s),e.getConfig().enabled||e.enable()}}function ku(o){o.forEach(n=>n.disable())}function yo(o){let n=o.tracerProvider||g.getTracerProvider(),i=o.meterProvider||fe.getMeterProvider(),s=o.loggerProvider||rn.getLoggerProvider(),a=o.instrumentations?.flat()??[];return Vu(a,n,i,s),()=>{ku(a)}}var j=console.error.bind(console);function Ge(o,n,i){let s=!!o[n]&&Object.prototype.propertyIsEnumerable.call(o,n);Object.defineProperty(o,n,{configurable:!0,enumerable:s,writable:!0,value:i})}var nn=(o,n,i)=>{if(!o||!o[n]){j("no original function "+String(n)+" to wrap");return}if(!i){j("no wrapper function"),j(new Error().stack);return}let s=o[n];if(typeof s!="function"||typeof i!="function"){j("original object and wrapper must be functions");return}let a=i(s,n);return Ge(a,"__original",s),Ge(a,"__unwrap",()=>{o[n]===a&&Ge(o,n,s)}),Ge(a,"__wrapped",!0),Ge(o,n,a),a},To=(o,n,i)=>{if(o)Array.isArray(o)||(o=[o]);else{j("must provide one or more modules to patch"),j(new Error().stack);return}if(!(n&&Array.isArray(n))){j("must provide one or more functions to wrap on modules");return}o.forEach(s=>{n.forEach(a=>{nn(s,a,i)})})},on=(o,n)=>{if(!o||!o[n]){j("no function to unwrap."),j(new Error().stack);return}let i=o[n];if(!i.__unwrap)j("no original to unwrap to -- has "+String(n)+" already been unwrapped?");else{i.__unwrap();return}},_o=(o,n)=>{if(o)Array.isArray(o)||(o=[o]);else{j("must provide one or more modules to patch"),j(new Error().stack);return}if(!(n&&Array.isArray(n))){j("must provide one or more functions to unwrap on modules");return}o.forEach(i=>{n.forEach(s=>{on(i,s)})})};function Fe(o){o&&o.logger&&(typeof o.logger!="function"?j("new logger isn't a function, not replacing"):j=o.logger)}Fe.wrap=nn;Fe.massWrap=To;Fe.unwrap=on;Fe.massUnwrap=_o;var an=class{constructor(n,i,s){h(this,"instrumentationName");h(this,"instrumentationVersion");h(this,"_config",{});h(this,"_tracer");h(this,"_meter");h(this,"_logger");h(this,"_diag");h(this,"_wrap",nn);h(this,"_unwrap",on);h(this,"_massWrap",To);h(this,"_massUnwrap",_o);this.instrumentationName=n,this.instrumentationVersion=i,this.setConfig(s),this._diag=_.createComponentLogger({namespace:n}),this._tracer=g.getTracer(n,i),this._meter=fe.getMeter(n,i),this._logger=rn.getLogger(n,i),this._updateMetricInstruments()}get meter(){return this._meter}setMeterProvider(n){this._meter=n.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(n){this._logger=n.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let n=this.init()??[];return Array.isArray(n)?n:[n]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(n){this._config={enabled:!0,...n}}setTracerProvider(n){this._tracer=n.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(n,i,s,a){if(n)try{n(s,a)}catch(u){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:i},u)}}};var Q=class extends an{constructor(n,i,s){super(n,i,s),this._config.enabled&&this.enable()}};function vt(o,n,i){let s,a;try{a=o()}catch(u){s=u}finally{if(n(s,a),s&&!i)throw s;return a}}function U(o){return typeof o=="function"&&typeof o.__original=="function"&&typeof o.__unwrap=="function"&&o.__wrapped===!0}var N;(function(o){o[o.STABLE=1]="STABLE",o[o.OLD=2]="OLD",o[o.DUPLICATE=3]="DUPLICATE"})(N||(N={}));function Kt(o,n){let i=N.OLD,s=n?.split(",").map(a=>a.trim()).filter(a=>a!=="");for(let a of s??[])if(a.toLowerCase()===o+"/dup"){i=N.DUPLICATE;break}else a.toLowerCase()===o&&(i=N.STABLE);return i}var jt;(function(o){o.DOCUMENT_LOAD="documentLoad",o.DOCUMENT_FETCH="documentFetch",o.RESOURCE_FETCH="resourceFetch"})(jt||(jt={}));var Bu="0.54.0",Hu="@opentelemetry/instrumentation-document-load";var un="http.url",Gu="http.user_agent";var Ke;(function(o){o.FIRST_PAINT="firstPaint",o.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Ke||(Ke={}));var Ku=()=>{let o={},n=st.getEntriesByType?.("navigation")[0];if(n)Object.values(v).forEach(s=>{if(St(n,s)){let a=n[s];typeof a=="number"&&(o[s]=a)}});else{let s=st.timing;s&&Object.values(v).forEach(u=>{if(St(s,u)){let e=s[u];typeof e=="number"&&(o[u]=e)}})}return o},Fu={"first-paint":Ke.FIRST_PAINT,"first-contentful-paint":Ke.FIRST_CONTENTFUL_PAINT},ju=o=>{let n=st.getEntriesByType?.("paint");n&&n.forEach(({name:i,startTime:s})=>{St(Fu,i)&&o.addEvent(Fu[i],s)})};var je=class extends Q{constructor(i={}){super(Hu,Bu,i);h(this,"component","document-load");h(this,"version","1");h(this,"moduleName",this.component);h(this,"_semconvStability");this._semconvStability=Kt("http",i?.semconvStabilityOptIn)}init(){}_onDocumentLoaded(){window.setTimeout(()=>{this._collectPerformance()})}_addResourcesSpans(i){let s=st.getEntriesByType?.("resource");s&&s.forEach(a=>{this._initResourceSpan(a,i)})}_collectPerformance(){let i=Array.from(document.getElementsByTagName("meta")).find(u=>u.getAttribute("name")===Jt),s=Ku(),a=i&&i.content||"";x.with(B.extract(tt,{traceparent:a}),()=>{let u=this._startSpan(jt.DOCUMENT_LOAD,v.FETCH_START,s);u&&(x.with(g.setSpan(x.active(),u),()=>{let e=this._startSpan(jt.DOCUMENT_FETCH,v.FETCH_START,s);e&&(this._semconvStability&N.OLD&&e.setAttribute(un,location.href),this._semconvStability&N.STABLE&&e.setAttribute(bt,location.href),x.with(g.setSpan(x.active(),e),()=>{let t=!(this._semconvStability&N.OLD);mt(e,s,this.getConfig().ignoreNetworkEvents,void 0,t),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentFetch),this._endSpan(e,v.RESPONSE_END,s)}))}),this._semconvStability&N.OLD&&(u.setAttribute(un,location.href),u.setAttribute(Gu,navigator.userAgent)),this._semconvStability&N.STABLE&&(u.setAttribute(bt,location.href),u.setAttribute(yi,navigator.userAgent)),this._addResourcesSpans(u),this.getConfig().ignoreNetworkEvents||(D(u,v.FETCH_START,s),D(u,v.UNLOAD_EVENT_START,s),D(u,v.UNLOAD_EVENT_END,s),D(u,v.DOM_INTERACTIVE,s),D(u,v.DOM_CONTENT_LOADED_EVENT_START,s),D(u,v.DOM_CONTENT_LOADED_EVENT_END,s),D(u,v.DOM_COMPLETE,s),D(u,v.LOAD_EVENT_START,s),D(u,v.LOAD_EVENT_END,s)),this.getConfig().ignorePerformancePaintEvents||ju(u),this._addCustomAttributesOnSpan(u,this.getConfig().applyCustomAttributesOnSpan?.documentLoad),this._endSpan(u,v.LOAD_EVENT_END,s))})}_endSpan(i,s,a){i&&(St(a,s)?i.end(a[s]):i.end())}_initResourceSpan(i,s){let a=this._startSpan(jt.RESOURCE_FETCH,v.FETCH_START,i,s);if(a){this._semconvStability&N.OLD&&a.setAttribute(un,i.name),this._semconvStability&N.STABLE&&a.setAttribute(bt,i.name);let u=!(this._semconvStability&N.OLD);mt(a,i,this.getConfig().ignoreNetworkEvents,void 0,u),this._addCustomAttributesOnResourceSpan(a,i,this.getConfig().applyCustomAttributesOnSpan?.resourceFetch),this._endSpan(a,v.RESPONSE_END,i)}}_startSpan(i,s,a,u){if(St(a,s)&&typeof a[s]=="number")return this.tracer.startSpan(i,{startTime:a[s]},u?g.setSpan(x.active(),u):void 0)}_waitForPageLoad(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))}_addCustomAttributesOnSpan(i,s){s&&vt(()=>s(i),a=>{a&&this._diag.error("addCustomAttributesOnSpan",a)},!0)}_addCustomAttributesOnResourceSpan(i,s,a){a&&vt(()=>a(i,s),u=>{u&&this._diag.error("addCustomAttributesOnResourceSpan",u)},!0)}enable(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()}disable(){window.removeEventListener("load",this._onDocumentLoaded)}};var oe=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};var ie=performance;var _p=9,Ep=6,Sp=Math.pow(10,Ep),Yu=Math.pow(10,_p);function Ye(o){let n=o/1e3,i=Math.trunc(n),s=Math.round(o%1e3*Sp);return[i,s]}function zu(){let o=ie.timeOrigin;if(typeof o!="number"){let n=ie;o=n.timing&&n.timing.fetchStart}return o}function cn(o){let n=Ye(zu()),i=Ye(typeof o=="number"?o:ie.now());return qu(n,i)}function qu(o,n){let i=[o[0]+n[0],o[1]+n[1]];return i[1]>=Yu&&(i[1]-=Yu,i[0]+=1),i}function Wu(o,n){return typeof n=="string"?o===n:!!o.match(n)}function Eo(o,n){if(!n)return!1;for(let i of n)if(Wu(o,i))return!0;return!1}var ze;(function(o){o.COMPONENT="component",o.HTTP_STATUS_TEXT="http.status_text"})(ze||(ze={}));var Ju="http.host",$u="http.method",Xu="http.request.body.size",Qu="http.request_content_length_uncompressed";var Zu="http.scheme",tc="http.status_code",ec="http.url",rc="http.user_agent";var nc=_.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function oc(...o){if(o[0]instanceof URL||typeof o[0]=="string"){let n=o[1];if(!n?.body)return Promise.resolve();if(n.body instanceof ReadableStream){let{body:i,length:s}=xp(n.body);return n.body=i,s}else return Promise.resolve(Ap(n.body))}else{let n=o[0];return n?.body?n.clone().text().then(i=>So(i)):Promise.resolve()}}function xp(o){if(!o.pipeThrough)return nc.warn("Platform has ReadableStream but not pipeThrough!"),{body:o,length:Promise.resolve(void 0)};let n=0,i,s=new Promise(u=>{i=u}),a=new TransformStream({start(){},async transform(u,e){let t=await u;n+=t.byteLength,e.enqueue(u)},flush(){i(n)}});return{body:o.pipeThrough(a),length:s}}function Op(o){return typeof Document<"u"&&o instanceof Document}function Ap(o){if(Op(o))return new XMLSerializer().serializeToString(document).length;if(typeof o=="string")return So(o);if(o instanceof Blob)return o.size;if(o instanceof FormData)return bp(o);if(o instanceof URLSearchParams)return So(o.toString());if(o.byteLength!==void 0)return o.byteLength;nc.warn("unknown body type")}var gp=new TextEncoder;function So(o){return gp.encode(o).byteLength}function bp(o){let n=0;for(let[i,s]of o.entries())n+=i.length,s instanceof Blob?n+=s.size:n+=s.length;return n}function ic(o){let n=Rp(),i=o.toUpperCase();return i in n?i:"_OTHER"}var Np={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0},qe;function Rp(){if(qe===void 0){let o=void 0;o&&o.length>0?(qe={},o.forEach(n=>{qe[n]=!0})):qe=Np}return qe}var Pp={"https:":"443","http:":"80"};function ac(o){let n=Number(o.port||Pp[o.protocol]);if(n&&!isNaN(n))return n}var vo="0.208.0";var Lp=300,uc=typeof process=="object"&&process.release?.name==="node",We=class extends Q{constructor(i={}){super("@opentelemetry/instrumentation-fetch",vo,i);h(this,"component","fetch");h(this,"version",vo);h(this,"moduleName",this.component);h(this,"_usedResources",new WeakSet);h(this,"_tasksCount",0);h(this,"_semconvStability");this._semconvStability=Kt("http",i?.semconvStabilityOptIn)}init(){}_addChildSpan(i,s){let a=this.tracer.startSpan("CORS Preflight",{startTime:s[v.FETCH_START]},g.setSpan(x.active(),i)),u=!(this._semconvStability&N.OLD);mt(a,s,this.getConfig().ignoreNetworkEvents,void 0,u),a.end(s[v.RESPONSE_END])}_addFinalSpanAttributes(i,s){let a=$(s.url);if(this._semconvStability&N.OLD&&(i.setAttribute(tc,s.status),s.statusText!=null&&i.setAttribute(ze.HTTP_STATUS_TEXT,s.statusText),i.setAttribute(Ju,a.host),i.setAttribute(Zu,a.protocol.replace(":","")),typeof navigator<"u"&&i.setAttribute(rc,navigator.userAgent)),this._semconvStability&N.STABLE){i.setAttribute(fr,s.status),i.setAttribute(dr,a.hostname);let u=ac(a);u&&i.setAttribute(mr,u)}}_addHeaders(i,s){if(!Ie(s,this.getConfig().propagateTraceHeaderCorsUrls)){let a={};B.inject(x.active(),a),Object.keys(a).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(i instanceof Request)B.inject(x.active(),i.headers,{set:(a,u,e)=>a.set(u,typeof e=="string"?e:String(e))});else if(i.headers instanceof Headers)B.inject(x.active(),i.headers,{set:(a,u,e)=>a.set(u,typeof e=="string"?e:String(e))});else if(i.headers instanceof Map)B.inject(x.active(),i.headers,{set:(a,u,e)=>a.set(u,typeof e=="string"?e:String(e))});else{let a={};B.inject(x.active(),a),i.headers=Object.assign({},a,i.headers||{})}}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}_createSpan(i,s={}){if(Eo(i,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}let a="",u={};if(this._semconvStability&N.OLD){let e=(s.method||"GET").toUpperCase();a=`HTTP ${e}`,u[ze.COMPONENT]=this.moduleName,u[$u]=e,u[ec]=i}if(this._semconvStability&N.STABLE){let e=s.method,t=ic(s.method||"GET");a||(a=t),u[lr]=t,t!==e&&(u[pr]=e),u[bt]=i}return this.tracer.startSpan(a,{kind:_t.CLIENT,attributes:u})}_findResourceAndAddNetworkEvents(i,s,a){let u=s.entries;if(!u.length){if(!performance.getEntriesByType)return;u=performance.getEntriesByType("resource")}let e=Le(s.spanUrl,s.startTime,a,u,this._usedResources,"fetch");if(e.mainRequest){let t=e.mainRequest;this._markResourceAsUsed(t);let r=e.corsPreFlightRequest;r&&(this._addChildSpan(i,r),this._markResourceAsUsed(r));let c=!(this._semconvStability&N.OLD);mt(i,t,this.getConfig().ignoreNetworkEvents,void 0,c)}}_markResourceAsUsed(i){this._usedResources.add(i)}_endSpan(i,s,a){let u=Ye(Date.now()),e=cn();this._addFinalSpanAttributes(i,a),this._semconvStability&N.STABLE&&a.status>=400&&(i.setStatus({code:ct.ERROR}),i.setAttribute(de,String(a.status))),setTimeout(()=>{s.observer?.disconnect(),this._findResourceAndAddNetworkEvents(i,s,e),this._tasksCount--,this._clearResources(),i.end(u)},Lp)}_patchConstructor(){return i=>{let s=this;return function(...u){let e=this,t=$(u[0]instanceof Request?u[0].url:String(u[0])).href,r=u[0]instanceof Request?u[0]:u[1]||{},c=s._createSpan(t,r);if(!c)return i.apply(this,u);let l=s._prepareSpanData(t);s.getConfig().measureRequestSize&&oc(...u).then(R=>{R&&(s._semconvStability&N.OLD&&c.setAttribute(Qu,R),s._semconvStability&N.STABLE&&c.setAttribute(Xu,R))}).catch(R=>{s._diag.warn("getFetchBodyLength",R)});function d(R,L){s._applyAttributesAfterFetch(R,r,L),s._endSpan(R,l,{status:L.status||0,statusText:L.message,url:t})}function y(R,L){s._applyAttributesAfterFetch(R,r,L),L.status>=200&&L.status<400?s._endSpan(R,l,L):s._endSpan(R,l,{status:L.status,statusText:L.statusText,url:t})}function A(R,L){if(!R)return null;let T=R.getReader();return new ReadableStream({async pull(P){try{let{value:C,done:H}=await T.read();H?(T.releaseLock(),P.close()):P.enqueue(C)}catch(C){P.error(C),T.cancel(C).catch(H=>{});try{T.releaseLock()}catch{}}},cancel(P){return L.cancel(P).catch(C=>{}),T.cancel(P)}})}function b(R,L,T){let P=null;try{let H=T.clone().body;if(H){let Ct=H.getReader(),it=T.status===204||T.status===205||T.status===304?null:A(T.body,Ct);P=new Response(it,{status:T.status,statusText:T.statusText,headers:T.headers});let ae=()=>{Ct.read().then(({done:zt})=>{zt?y(R,T):ae()},zt=>{d(R,zt)})};ae()}else y(R,T)}finally{L(P??T)}}function w(R,L,T){try{d(R,T)}finally{L(T)}}return new Promise((R,L)=>x.with(g.setSpan(x.active(),c),()=>(s._addHeaders(r,t),s._callRequestHook(c,r),s._tasksCount++,i.apply(e,r instanceof Request?[r]:[t,r]).then(b.bind(e,c,R),w.bind(e,c,L)))))}}}_applyAttributesAfterFetch(i,s,a){let u=this.getConfig().applyCustomAttributesOnSpan;u&&vt(()=>u(i,s,a),e=>{e&&this._diag.error("applyCustomAttributesOnSpan",e)},!0)}_callRequestHook(i,s){let a=this.getConfig().requestHook;a&&vt(()=>a(i,s),u=>{u&&this._diag.error("requestHook",u)},!0)}_prepareSpanData(i){let s=cn(),a=[];if(typeof PerformanceObserver!="function")return{entries:a,startTime:s,spanUrl:i};let u=new PerformanceObserver(e=>{e.getEntries().forEach(r=>{r.initiatorType==="fetch"&&r.name===i&&a.push(r)})});return u.observe({entryTypes:["resource"]}),{entries:a,observer:u,startTime:s,spanUrl:i}}enable(){if(uc){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}U(fetch)&&(this._unwrap(oe,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(oe,"fetch",this._patchConstructor())}disable(){uc||(this._unwrap(oe,"fetch"),this._usedResources=new WeakSet)}};var Yt;(function(o){o.EVENT_TYPE="event_type",o.TARGET_ELEMENT="target_element",o.TARGET_XPATH="target_xpath",o.HTTP_URL="http.url"})(Yt||(Yt={}));var xo="0.53.0",cc="@opentelemetry/instrumentation-user-interaction";var Ip="OT_ZONE_CONTEXT",Cp="Navigation:",wp=["click"];function Up(){return!1}var Je=class extends Q{constructor(i={}){super(cc,xo,i);h(this,"version",xo);h(this,"moduleName","user-interaction");h(this,"_spansData",new WeakMap);h(this,"_wrappedListeners",new WeakMap);h(this,"_eventsSpanMap",new WeakMap);h(this,"_eventNames");h(this,"_shouldPreventSpanCreation");this._eventNames=new Set(i?.eventNames??wp),this._shouldPreventSpanCreation=typeof i?.shouldPreventSpanCreation=="function"?i.shouldPreventSpanCreation:Up}init(){}_checkForTimeout(i,s){let a=this._spansData.get(s);a&&(i.source==="setTimeout"?a.hrTimeLastTimeout=bn():i.source!=="Promise.then"&&i.source!=="setTimeout"&&(a.hrTimeLastTimeout=void 0))}_allowEventName(i){return this._eventNames.has(i)}_createSpan(i,s,a){if(!(i instanceof HTMLElement)||!i.getAttribute||i.hasAttribute("disabled")||!this._allowEventName(s))return;let u=Hr(i,!0);try{let e=this.tracer.startSpan(s,{attributes:{[Yt.EVENT_TYPE]:s,[Yt.TARGET_ELEMENT]:i.tagName,[Yt.TARGET_XPATH]:u,[Yt.HTTP_URL]:window.location.href}},a?g.setSpan(x.active(),a):void 0);return this._shouldPreventSpanCreation(s,i,e)===!0?void 0:(this._spansData.set(e,{taskCount:0}),e)}catch(e){this._diag.error("failed to start create new user interaction span",e)}}_decrementTask(i){let s=this._spansData.get(i);s&&(s.taskCount--,s.taskCount===0&&this._tryToEndSpan(i,s.hrTimeLastTimeout))}_getCurrentSpan(i){let s=i.get(Ip);return s&&g.getSpan(s)}_incrementTask(i){let s=this._spansData.get(i);s&&s.taskCount++}addPatchedListener(i,s,a,u){let e=this._wrappedListeners.get(a);e||(e=new Map,this._wrappedListeners.set(a,e));let t=e.get(s);return t||(t=new Map,e.set(s,t)),t.has(i)?!1:(t.set(i,u),!0)}removePatchedListener(i,s,a){let u=this._wrappedListeners.get(a);if(!u)return;let e=u.get(s);if(!e)return;let t=e.get(i);return t&&(e.delete(i),e.size===0&&(u.delete(s),u.size===0&&this._wrappedListeners.delete(a))),t}_invokeListener(i,s,a){return typeof i=="function"?i.apply(s,a):i.handleEvent(a[0])}_patchAddEventListener(){let i=this;return s=>function(u,e,t){if(!e)return s.call(this,u,e,t);let r=t&&typeof t=="object"&&t.once,c=function(...l){let d,y=l[0],A=y?.target;y&&(d=i._eventsSpanMap.get(y)),r&&i.removePatchedListener(this,u,e);let b=i._createSpan(A,u,d);return b?(y&&i._eventsSpanMap.set(y,b),x.with(g.setSpan(x.active(),b),()=>{let w=i._invokeListener(e,this,l);return b.end(),w})):i._invokeListener(e,this,l)};if(i.addPatchedListener(this,u,e,c))return s.call(this,u,c,t)}}_patchRemoveEventListener(){let i=this;return s=>function(u,e,t){let r=i.removePatchedListener(this,u,e);return r?s.call(this,u,r,t):s.call(this,u,e,t)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())}_patchHistoryMethod(){let i=this;return s=>function(...u){let e=`${location.pathname}${location.hash}${location.search}`,t=s.apply(this,u),r=`${location.pathname}${location.hash}${location.search}`;return e!==r&&i._updateInteractionName(r),t}}_unpatchHistoryApi(){U(history.replaceState)&&this._unwrap(history,"replaceState"),U(history.pushState)&&this._unwrap(history,"pushState"),U(history.back)&&this._unwrap(history,"back"),U(history.forward)&&this._unwrap(history,"forward"),U(history.go)&&this._unwrap(history,"go")}_updateInteractionName(i){let s=g.getSpan(x.active());s&&typeof s.updateName=="function"&&s.updateName(`${Cp} ${i}`)}_patchZoneCancelTask(){let i=this;return s=>function(u){let e=Zone.current,t=i._getCurrentSpan(e);return t&&i._shouldCountTask(u,e)&&i._decrementTask(t),s.call(this,u)}}_patchZoneScheduleTask(){let i=this;return s=>function(u){let e=Zone.current,t=i._getCurrentSpan(e);return t&&i._shouldCountTask(u,e)&&(i._incrementTask(t),i._checkForTimeout(u,t)),s.call(this,u)}}_patchZoneRunTask(){let i=this;return s=>function(u,e,t){let c=(Array.isArray(t)&&t[0]instanceof Event?t[0]:void 0)?.target,l,d=this;if(c){if(l=i._createSpan(c,u.eventName),l)return i._incrementTask(l),d.run(()=>{try{return x.with(g.setSpan(x.active(),l),()=>{let y=Zone.current;return u._zone=y,s.call(y,u,e,t)})}finally{i._decrementTask(l)}})}else l=i._getCurrentSpan(d);try{return s.call(d,u,e,t)}finally{l&&i._shouldCountTask(u,d)&&i._decrementTask(l)}}}_shouldCountTask(i,s){if(i._zone&&(s=i._zone),!s||!i.data||i.data.isPeriodic)return!1;let a=this._getCurrentSpan(s);return!a||!this._spansData.get(a)?!1:i.type==="macroTask"||i.type==="microTask"}_tryToEndSpan(i,s){i&&this._spansData.get(i)&&(i.end(s),this._spansData.delete(i))}enable(){let i=this._getZoneWithPrototype();this._diag.debug("applying patch to",this.moduleName,this.version,"zone:",!!i),i?(U(i.prototype.runTask)&&(this._unwrap(i.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),U(i.prototype.scheduleTask)&&(this._unwrap(i.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),U(i.prototype.cancelTask)&&(this._unwrap(i.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(i.prototype,"runTask",this._patchZoneRunTask()),this._wrap(i.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(i.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(a=>{U(a.addEventListener)&&(this._unwrap(a,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),U(a.removeEventListener)&&(this._unwrap(a,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(a,"addEventListener",this._patchAddEventListener()),this._wrap(a,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){let i=this._getZoneWithPrototype();this._diag.debug("removing patch from",this.moduleName,this.version,"zone:",!!i),i&&this._zonePatched?(U(i.prototype.runTask)&&this._unwrap(i.prototype,"runTask"),U(i.prototype.scheduleTask)&&this._unwrap(i.prototype,"scheduleTask"),U(i.prototype.cancelTask)&&this._unwrap(i.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(a=>{U(a.addEventListener)&&this._unwrap(a,"addEventListener"),U(a.removeEventListener)&&this._unwrap(a,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};var xt=performance;var Mp=9,Dp=6,Vp=Math.pow(10,Dp),sc=Math.pow(10,Mp);function Oo(o){let n=o/1e3,i=Math.trunc(n),s=Math.round(o%1e3*Vp);return[i,s]}function lc(){let o=xt.timeOrigin;if(typeof o!="number"){let n=xt;o=n.timing&&n.timing.fetchStart}return o}function sn(o){let n=Oo(lc()),i=Oo(typeof o=="number"?o:xt.now());return pc(n,i)}function pc(o,n){let i=[o[0]+n[0],o[1]+n[1]];return i[1]>=sc&&(i[1]-=sc,i[0]+=1),i}function fc(o,n){return typeof n=="string"?o===n:!!o.match(n)}function Ao(o,n){if(!n)return!1;for(let i of n)if(fc(o,i))return!0;return!1}var dc="http.host",mc="http.method",hc="http.request.body.size",yc="http.request_content_length_uncompressed";var Tc="http.scheme",_c="http.status_code",Ec="http.url",Sc="http.user_agent";var yt;(function(o){o.METHOD_OPEN="open",o.METHOD_SEND="send",o.EVENT_ABORT="abort",o.EVENT_ERROR="error",o.EVENT_LOAD="loaded",o.EVENT_TIMEOUT="timeout"})(yt||(yt={}));var kp=_.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function Bp(o){return typeof Document<"u"&&o instanceof Document}function xc(o){if(Bp(o))return new XMLSerializer().serializeToString(document).length;if(typeof o=="string")return vc(o);if(o instanceof Blob)return o.size;if(o instanceof FormData)return Gp(o);if(o instanceof URLSearchParams)return vc(o.toString());if(o.byteLength!==void 0)return o.byteLength;kp.warn("unknown body type")}var Hp=new TextEncoder;function vc(o){return Hp.encode(o).byteLength}function Gp(o){let n=0;for(let[i,s]of o.entries())n+=i.length,s instanceof Blob?n+=s.size:n+=s.length;return n}function Oc(o){let n=Kp(),i=o.toUpperCase();return i in n?i:"_OTHER"}var Fp={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0},$e;function Kp(){if($e===void 0){let o=void 0;o&&o.length>0?($e={},o.forEach(n=>{$e[n]=!0})):$e=Fp}return $e}var jp={"https:":"443","http:":"80"};function Ac(o){let n=Number(o.port||jp[o.protocol]);if(n&&!isNaN(n))return n}var go="0.208.0";var ln;(function(o){o.HTTP_STATUS_TEXT="http.status_text"})(ln||(ln={}));var Yp=300,Xe=class extends Q{constructor(i={}){super("@opentelemetry/instrumentation-xml-http-request",go,i);h(this,"component","xml-http-request");h(this,"version",go);h(this,"moduleName",this.component);h(this,"_tasksCount",0);h(this,"_xhrMem",new WeakMap);h(this,"_usedResources",new WeakSet);h(this,"_semconvStability");this._semconvStability=Kt("http",i?.semconvStabilityOptIn)}init(){}_addHeaders(i,s){let a=$(s).href;if(!Ie(a,this.getConfig().propagateTraceHeaderCorsUrls)){let e={};B.inject(x.active(),e),Object.keys(e).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}let u={};B.inject(x.active(),u),Object.keys(u).forEach(e=>{i.setRequestHeader(e,String(u[e]))})}_addChildSpan(i,s){x.with(g.setSpan(x.active(),i),()=>{let a=this.tracer.startSpan("CORS Preflight",{startTime:s[v.FETCH_START]}),u=!(this._semconvStability&N.OLD);mt(a,s,this.getConfig().ignoreNetworkEvents,void 0,u),a.end(s[v.RESPONSE_END])})}_addFinalSpanAttributes(i,s,a){if(this._semconvStability&N.OLD){if(s.status!==void 0&&i.setAttribute(_c,s.status),s.statusText!==void 0&&i.setAttribute(ln.HTTP_STATUS_TEXT,s.statusText),typeof a=="string"){let u=$(a);i.setAttribute(dc,u.host),i.setAttribute(Tc,u.protocol.replace(":",""))}i.setAttribute(Sc,navigator.userAgent)}this._semconvStability&N.STABLE&&s.status&&i.setAttribute(fr,s.status)}_applyAttributesAfterXHR(i,s){let a=this.getConfig().applyCustomAttributesOnSpan;typeof a=="function"&&vt(()=>a(i,s),u=>{u&&this._diag.error("applyCustomAttributesOnSpan",u)},!0)}_addResourceObserver(i,s){let a=this._xhrMem.get(i);!a||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(a.createdResources={observer:new PerformanceObserver(u=>{let e=u.getEntries(),t=$(s);e.forEach(r=>{r.initiatorType==="xmlhttprequest"&&r.name===t.href&&a.createdResources&&a.createdResources.entries.push(r)})}),entries:[]},a.createdResources.observer.observe({entryTypes:["resource"]}))}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(xt.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)}_findResourceAndAddNetworkEvents(i,s,a,u,e){if(!a||!u||!e||!i.createdResources)return;let t=i.createdResources.entries;(!t||!t.length)&&(t=xt.getEntriesByType("resource"));let r=Le($(a).href,u,e,t,this._usedResources);if(r.mainRequest){let c=r.mainRequest;this._markResourceAsUsed(c);let l=r.corsPreFlightRequest;l&&(this._addChildSpan(s,l),this._markResourceAsUsed(l));let d=!(this._semconvStability&N.OLD);mt(s,c,this.getConfig().ignoreNetworkEvents,void 0,d)}}_cleanPreviousSpanInformation(i){let s=this._xhrMem.get(i);if(s){let a=s.callbackToRemoveEvents;a&&a(),this._xhrMem.delete(i)}}_createSpan(i,s,a){if(Ao(s,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}let u="",e=$(s),t={};if(this._semconvStability&N.OLD&&(u=a.toUpperCase(),t[mc]=a,t[Ec]=e.toString()),this._semconvStability&N.STABLE){let c=a,l=Oc(a);u||(u=l),t[lr]=l,l!==c&&(t[pr]=c),t[bt]=e.toString(),t[dr]=e.hostname;let d=Ac(e);d&&(t[mr]=d)}let r=this.tracer.startSpan(u,{kind:_t.CLIENT,attributes:t});return r.addEvent(yt.METHOD_OPEN),this._cleanPreviousSpanInformation(i),this._xhrMem.set(i,{span:r,spanUrl:s}),r}_markResourceAsUsed(i){this._usedResources.add(i)}_patchOpen(){return i=>{let s=this;return function(...u){let e=u[0],t=u[1];return s._createSpan(this,t,e),i.apply(this,u)}}}_patchSend(){let i=this;function s(l,d,y,A){let b=d.callbackToRemoveEvents;typeof b=="function"&&b();let{span:w,spanUrl:R,sendStartTime:L}=d;w&&(i._findResourceAndAddNetworkEvents(d,w,R,L,y),w.addEvent(l,A),i._addFinalSpanAttributes(w,d,R),w.end(A),i._tasksCount--),i._clearResources()}function a(l,d,y,A){let b=i._xhrMem.get(d);if(!b)return;if(b.status=d.status,b.statusText=d.statusText,i._xhrMem.delete(d),b.span){let L=b.span;i._applyAttributesAfterXHR(L,d),i._semconvStability&N.STABLE&&(y?A&&(L.setStatus({code:ct.ERROR,message:A}),L.setAttribute(de,A)):b.status&&b.status>=400&&(L.setStatus({code:ct.ERROR}),L.setAttribute(de,String(b.status))))}let w=sn(),R=Date.now();setTimeout(()=>{s(l,b,w,R)},Yp)}function u(){a(yt.EVENT_ERROR,this,!0,"error")}function e(){a(yt.EVENT_ABORT,this,!1)}function t(){a(yt.EVENT_TIMEOUT,this,!0,"timeout")}function r(){this.status<299?a(yt.EVENT_LOAD,this,!1):a(yt.EVENT_ERROR,this,!1)}function c(l){l.removeEventListener("abort",e),l.removeEventListener("error",u),l.removeEventListener("load",r),l.removeEventListener("timeout",t);let d=i._xhrMem.get(l);d&&(d.callbackToRemoveEvents=void 0)}return l=>function(...y){let A=i._xhrMem.get(this);if(!A)return l.apply(this,y);let b=A.span,w=A.spanUrl;if(b&&w){if(i.getConfig().measureRequestSize&&y?.[0]){let R=y[0],L=xc(R);L!==void 0&&(i._semconvStability&N.OLD&&b.setAttribute(yc,L),i._semconvStability&N.STABLE&&b.setAttribute(hc,L))}x.with(g.setSpan(x.active(),b),()=>{i._tasksCount++,A.sendStartTime=sn(),b.addEvent(yt.METHOD_SEND),this.addEventListener("abort",e),this.addEventListener("error",u),this.addEventListener("load",r),this.addEventListener("timeout",t),A.callbackToRemoveEvents=()=>{c(this),A.createdResources&&A.createdResources.observer.disconnect()},i._addHeaders(this,w),i._addResourceObserver(this,w)})}return l.apply(this,y)}}enable(){this._diag.debug("applying patch to",this.moduleName,this.version),U(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),U(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())}disable(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet}};var gc="v1/traces",zp="tracestate";function qp(o){let n=o.trim().toLowerCase();return/^[0-9a-f]{32}$/.test(n)&&n!=="00000000000000000000000000000000"}function bo(o){let n=new Uint8Array(o);crypto.getRandomValues(n);let i="";for(let s=0;s<n.length;s++){let a=n[s];i+=a.toString(16).padStart(2,"0")}return i}function Qe(o){let n=o.trim().toLowerCase();return qp(n)?n:bo(16)}var No=class{constructor(n){h(this,"fixedTraceId");n&&String(n).trim()?this.fixedTraceId=Qe(String(n)):this.fixedTraceId=null}setTraceId(n){let i=String(n??"").trim();if(!i){this.fixedTraceId=null;return}this.fixedTraceId=Qe(i)}clearMcpTraceId(){this.fixedTraceId=null}isMcpFixedTraceId(){return this.fixedTraceId!==null}getTraceId(){return this.fixedTraceId??void 0}generateTraceId(){return this.fixedTraceId!==null?this.fixedTraceId:bo(16)}generateSpanId(){return bo(8)}},Ro=class{constructor(n){h(this,"base",new Te);h(this,"getTraceState");this.getTraceState=n}inject(n,i,s){this.base.inject(n,i,s);let a=this.getTraceState()?.trim();a&&s.set(i,zp,a)}extract(n,i,s){let a=this.base.extract(n,i,s),u=this.getTraceState()?.trim();if(!u)return a;let e=g.getSpanContext(a);if(!e||!q(e))return a;try{return g.setSpanContext(a,{...e,traceState:ur(u)})}catch{return a}}fields(){return this.base.fields()}},Po=class{constructor(n){h(this,"getTraceState");this.getTraceState=n}shouldSample(n,i,s,a,u,e){let t=this.getTraceState()?.trim();return{decision:J.RECORD_AND_SAMPLED,traceState:t?ur(t):void 0}}toString(){return"McpTraceStateSampler"}};(function(){let n=globalThis;n.__MCP_DEVTOOLS__||(n.__MCP_DEVTOOLS__={});let i=n.__MCP_DEVTOOLS__;if(n.__mcpOtel)return;let s=null,a=!1,u;function e(T){T===!0&&_.setLogger(new dn,G.DEBUG)}function t(T){let P=[];if(T.exporter.type==="none")return P;if(T.exporter.type==="console"){let C=new xe,H=new Oe(C);return P.push(H),P}else if(T.exporter.type==="otlp/http"){let C=T.exporter.url.endsWith("/")?`${T.exporter.url}${gc}`:`${T.exporter.url}/${gc}`,H=T.exporter.headers,Ot=(T.exporter.traceFormat==="protobuf"?"protobuf":"json")==="protobuf"?new re({url:C,headers:H}):new ee({url:C,headers:H}),it=new Qt(Ot);return P.push(it),P}throw new Error(`Not supported exporter type: ${T.exporter.type}`)}function r(T){let P=T.trim();if(!P)return[];let C=P.startsWith("/")?P:"/"+P,H=C.endsWith("/")?C:C+"/";return[new RegExp(`^${H.replace(/\//g,"\\/")}`),new RegExp(`${H.replace(/\//g,"\\/")}`)]}function c(T,P,C){let H=C?r(C):[],Ct=P??{},Ot=new We({ignoreUrls:H}),it=new Xe({ignoreUrls:H}),ae=new je,zt=new Je({eventNames:Ct.userInteractionEvents||["click"]});yo({tracerProvider:T,instrumentations:[Ot,it,ae,zt]});try{Ot.enable?.()}catch{}try{it.enable?.()}catch{}try{ae.enable?.()}catch{}try{zt.enable?.()}catch{}}function l(T){try{if(n.__MCP_DEVTOOLS__||(n.__MCP_DEVTOOLS__={}),i.otelInitialized===!0){if(s){let it=typeof T.traceId=="string"?T.traceId.trim():void 0;it?(s.setTraceId(it),n.__MCP_TRACE_ID__=Qe(it)):(s.clearMcpTraceId(),delete n.__MCP_TRACE_ID__)}n.__MCP_TRACE_STATE__=typeof T.traceState=="string"&&T.traceState.trim()?T.traceState.trim():void 0,a=!0,u=void 0;return}e(T.debug);let P=T.traceId&&T.traceId.trim()?Qe(T.traceId):null;s=new No(P);let C=br({[pi]:T.serviceName,...T.serviceVersion?{[fi]:T.serviceVersion}:{}}),H=t(T),Ct=new Po(()=>b()),Ot=new Pe({resource:C,idGenerator:s,sampler:Ct,spanProcessors:H});Ot.register({propagator:new Ro(()=>b())}),c(Ot,T.instrumentation??{},T.exporter.url),g.getTracer(T.serviceName),i.otelInitialized=!0,i.otelInitError=void 0,P?n.__MCP_TRACE_ID__=P:delete n.__MCP_TRACE_ID__,n.__MCP_TRACE_STATE__=typeof T.traceState=="string"&&T.traceState.trim()?T.traceState.trim():void 0,a=!0,u=void 0}catch(P){let C=String(P?.message??P);i.otelInitialized=!1,i.otelInitError=C,a=!1,u=C}}function d(T){let P=String(T??"").trim();if(!P){s&&s.clearMcpTraceId(),delete n.__MCP_TRACE_ID__;return}let C=Qe(P);s&&s.setTraceId(C),n.__MCP_TRACE_ID__=C}function y(){if(s&&s.isMcpFixedTraceId())return s.getTraceId();if(typeof n.__MCP_TRACE_ID__=="string"&&n.__MCP_TRACE_ID__.trim())return String(n.__MCP_TRACE_ID__).toLowerCase()}function A(T){let P=String(T??"").trim();n.__MCP_TRACE_STATE__=P||void 0}function b(){let T=n.__MCP_TRACE_STATE__;if(typeof T=="string"&&T.trim())return T.trim()}function w(){return i.otelInitialized===!0&&a===!0}function R(){let T=i.otelInitError??u;if(typeof T=="string"&&T.trim())return T}let L={init:T=>{l(T)},setTraceId:T=>{d(T)},getTraceId:()=>y(),setTraceState:T=>{A(T)},getTraceState:()=>b(),isInitialized:()=>w(),getInitError:()=>R()};n.__mcpOtel=L})();return wc(Wp);})();
|