UNPKG

solarwinds-apm

Version:

OpenTelemetry-based SolarWinds APM library

28 lines 464 kB
var nE=Object.create;var ra=Object.defineProperty;var oE=Object.getOwnPropertyDescriptor;var iE=Object.getOwnPropertyNames;var sE=Object.getPrototypeOf,aE=Object.prototype.hasOwnProperty;var c=(n,e)=>ra(n,"name",{value:e,configurable:!0});var _t=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var cE=(n,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of iE(e))!aE.call(n,s)&&s!==o&&ra(n,s,{get:()=>e[s],enumerable:!(a=oE(e,s))||a.enumerable});return n};var sr=(n,e,o)=>(o=n!=null?nE(sE(n)):{},cE(e||!n||!n.__esModule?ra(o,"default",{value:n,enumerable:!0}):o,n));var ql=_t((rN,Wl)=>{"use strict";function Fa(n){return typeof n=="function"}c(Fa,"isFunction");var wt=console.error.bind(console);function Xn(n,e,o){var a=!!n[e]&&n.propertyIsEnumerable(e);Object.defineProperty(n,e,{configurable:!0,enumerable:a,writable:!0,value:o})}c(Xn,"defineProperty");function Jn(n){n&&n.logger&&(Fa(n.logger)?wt=n.logger:wt("new logger isn't a function, not replacing"))}c(Jn,"shimmer");function Kl(n,e,o){if(!n||!n[e]){wt("no original function "+e+" to wrap");return}if(!o){wt("no wrapper function"),wt(new Error().stack);return}if(!Fa(n[e])||!Fa(o)){wt("original object and wrapper must be functions");return}var a=n[e],s=o(a,e);return Xn(s,"__original",a),Xn(s,"__unwrap",function(){n[e]===s&&Xn(n,e,a)}),Xn(s,"__wrapped",!0),Xn(n,e,s),s}c(Kl,"wrap");function _d(n,e,o){if(n)Array.isArray(n)||(n=[n]);else{wt("must provide one or more modules to patch"),wt(new Error().stack);return}if(!(e&&Array.isArray(e))){wt("must provide one or more functions to wrap on modules");return}n.forEach(function(a){e.forEach(function(s){Kl(a,s,o)})})}c(_d,"massWrap");function jl(n,e){if(!n||!n[e]){wt("no function to unwrap."),wt(new Error().stack);return}if(!n[e].__unwrap)wt("no original to unwrap to -- has "+e+" already been unwrapped?");else return n[e].__unwrap()}c(jl,"unwrap");function fd(n,e){if(n)Array.isArray(n)||(n=[n]);else{wt("must provide one or more modules to patch"),wt(new Error().stack);return}if(!(e&&Array.isArray(e))){wt("must provide one or more functions to unwrap on modules");return}n.forEach(function(o){e.forEach(function(a){jl(o,a)})})}c(fd,"massUnwrap");Jn.wrap=Kl;Jn.massWrap=_d;Jn.unwrap=jl;Jn.massUnwrap=fd;Wl.exports=Jn});var Cp=_t(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.ATTR_HTTP_USER_AGENT=At.ATTR_HTTP_URL=At.ATTR_HTTP_STATUS_CODE=At.ATTR_HTTP_SCHEME=At.ATTR_HTTP_RESPONSE_CONTENT_LENGTH=At.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED=At.ATTR_HTTP_REQUEST_BODY_SIZE=At.ATTR_HTTP_METHOD=At.ATTR_HTTP_HOST=void 0;At.ATTR_HTTP_HOST="http.host";At.ATTR_HTTP_METHOD="http.method";At.ATTR_HTTP_REQUEST_BODY_SIZE="http.request.body.size";At.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED="http.request_content_length_uncompressed";At.ATTR_HTTP_RESPONSE_CONTENT_LENGTH="http.response_content_length";At.ATTR_HTTP_SCHEME="http.scheme";At.ATTR_HTTP_STATUS_CODE="http.status_code";At.ATTR_HTTP_URL="http.url";At.ATTR_HTTP_USER_AGENT="http.user_agent"});var Ts=_t(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.unref=uS;Es.load=lS;function uS(n){return typeof n=="object"&&n.unref(),n}c(uS,"unref");async function lS(n){let e=await import(n);return"default"in e&&["module.exports","__esModule"].reduce((s,u)=>u in e?s-1:s,Object.keys(e).length)===1?e.default:e}c(lS,"load")});var m_=_t((MU,A_)=>{"use strict";A_.exports=LS;function LS(n,e){for(var o=new Array(arguments.length-1),a=0,s=2,u=!0;s<arguments.length;)o[a++]=arguments[s++];return new Promise(c(function(t,i){o[a]=c(function(p){if(u)if(u=!1,p)i(p);else{for(var E=new Array(arguments.length-1),y=0;y<E.length;)E[y++]=arguments[y];t.apply(null,E)}},"callback");try{n.apply(e||null,o)}catch(l){u&&(u=!1,i(l))}},"executor"))}c(LS,"asPromise")});var N_=_t(R_=>{"use strict";var ys=R_;ys.length=c(function(e){var o=e.length;if(!o)return 0;for(var a=0;--o%4>1&&e.charAt(o)==="=";)++a;return Math.ceil(e.length*3)/4-a},"length");var Tn=new Array(64),O_=new Array(123);for(pe=0;pe<64;)O_[Tn[pe]=pe<26?pe+65:pe<52?pe+71:pe<62?pe-4:pe-59|43]=pe++;var pe;ys.encode=c(function(e,o,a){for(var s=null,u=[],r=0,t=0,i;o<a;){var l=e[o++];switch(t){case 0:u[r++]=Tn[l>>2],i=(l&3)<<4,t=1;break;case 1:u[r++]=Tn[i|l>>4],i=(l&15)<<2,t=2;break;case 2:u[r++]=Tn[i|l>>6],u[r++]=Tn[l&63],t=0;break}r>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,u)),r=0)}return t&&(u[r++]=Tn[i],u[r++]=61,t===1&&(u[r++]=61)),s?(r&&s.push(String.fromCharCode.apply(String,u.slice(0,r))),s.join("")):String.fromCharCode.apply(String,u.slice(0,r))},"encode");var y_="invalid encoding";ys.decode=c(function(e,o,a){for(var s=a,u=0,r,t=0;t<e.length;){var i=e.charCodeAt(t++);if(i===61&&u>1)break;if((i=O_[i])===void 0)throw Error(y_);switch(u){case 0:r=i,u=1;break;case 1:o[a++]=r<<2|(i&48)>>4,r=i,u=2;break;case 2:o[a++]=(r&15)<<4|(i&60)>>2,r=i,u=3;break;case 3:o[a++]=(r&3)<<6|i,u=0;break}}if(u===1)throw Error(y_);return a-s},"decode");ys.test=c(function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)},"test")});var g_=_t((kU,x_)=>{"use strict";x_.exports=Os;function Os(){this._listeners={}}c(Os,"EventEmitter");Os.prototype.on=c(function(e,o,a){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:o,ctx:a||this}),this},"on");Os.prototype.off=c(function(e,o){if(e===void 0)this._listeners={};else if(o===void 0)this._listeners[e]=[];else for(var a=this._listeners[e],s=0;s<a.length;)a[s].fn===o?a.splice(s,1):++s;return this},"off");Os.prototype.emit=c(function(e){var o=this._listeners[e];if(o){for(var a=[],s=1;s<arguments.length;)a.push(arguments[s++]);for(s=0;s<o.length;)o[s].fn.apply(o[s++].ctx,a)}return this},"emit")});var U_=_t((GU,C_)=>{"use strict";C_.exports=v_(v_);function v_(n){return typeof Float32Array<"u"?function(){var e=new Float32Array([-0]),o=new Uint8Array(e.buffer),a=o[3]===128;function s(i,l,p){e[0]=i,l[p]=o[0],l[p+1]=o[1],l[p+2]=o[2],l[p+3]=o[3]}c(s,"writeFloat_f32_cpy");function u(i,l,p){e[0]=i,l[p]=o[3],l[p+1]=o[2],l[p+2]=o[1],l[p+3]=o[0]}c(u,"writeFloat_f32_rev"),n.writeFloatLE=a?s:u,n.writeFloatBE=a?u:s;function r(i,l){return o[0]=i[l],o[1]=i[l+1],o[2]=i[l+2],o[3]=i[l+3],e[0]}c(r,"readFloat_f32_cpy");function t(i,l){return o[3]=i[l],o[2]=i[l+1],o[1]=i[l+2],o[0]=i[l+3],e[0]}c(t,"readFloat_f32_rev"),n.readFloatLE=a?r:t,n.readFloatBE=a?t:r}():function(){function e(a,s,u,r){var t=s<0?1:0;if(t&&(s=-s),s===0)a(1/s>0?0:2147483648,u,r);else if(isNaN(s))a(2143289344,u,r);else if(s>34028234663852886e22)a((t<<31|2139095040)>>>0,u,r);else if(s<11754943508222875e-54)a((t<<31|Math.round(s/1401298464324817e-60))>>>0,u,r);else{var i=Math.floor(Math.log(s)/Math.LN2),l=Math.round(s*Math.pow(2,-i)*8388608)&8388607;a((t<<31|i+127<<23|l)>>>0,u,r)}}c(e,"writeFloat_ieee754"),n.writeFloatLE=e.bind(null,L_),n.writeFloatBE=e.bind(null,I_);function o(a,s,u){var r=a(s,u),t=(r>>31)*2+1,i=r>>>23&255,l=r&8388607;return i===255?l?NaN:t*(1/0):i===0?t*1401298464324817e-60*l:t*Math.pow(2,i-150)*(l+8388608)}c(o,"readFloat_ieee754"),n.readFloatLE=o.bind(null,b_),n.readFloatBE=o.bind(null,P_)}(),typeof Float64Array<"u"?function(){var e=new Float64Array([-0]),o=new Uint8Array(e.buffer),a=o[7]===128;function s(i,l,p){e[0]=i,l[p]=o[0],l[p+1]=o[1],l[p+2]=o[2],l[p+3]=o[3],l[p+4]=o[4],l[p+5]=o[5],l[p+6]=o[6],l[p+7]=o[7]}c(s,"writeDouble_f64_cpy");function u(i,l,p){e[0]=i,l[p]=o[7],l[p+1]=o[6],l[p+2]=o[5],l[p+3]=o[4],l[p+4]=o[3],l[p+5]=o[2],l[p+6]=o[1],l[p+7]=o[0]}c(u,"writeDouble_f64_rev"),n.writeDoubleLE=a?s:u,n.writeDoubleBE=a?u:s;function r(i,l){return o[0]=i[l],o[1]=i[l+1],o[2]=i[l+2],o[3]=i[l+3],o[4]=i[l+4],o[5]=i[l+5],o[6]=i[l+6],o[7]=i[l+7],e[0]}c(r,"readDouble_f64_cpy");function t(i,l){return o[7]=i[l],o[6]=i[l+1],o[5]=i[l+2],o[4]=i[l+3],o[3]=i[l+4],o[2]=i[l+5],o[1]=i[l+6],o[0]=i[l+7],e[0]}c(t,"readDouble_f64_rev"),n.readDoubleLE=a?r:t,n.readDoubleBE=a?t:r}():function(){function e(a,s,u,r,t,i){var l=r<0?1:0;if(l&&(r=-r),r===0)a(0,t,i+s),a(1/r>0?0:2147483648,t,i+u);else if(isNaN(r))a(0,t,i+s),a(2146959360,t,i+u);else if(r>17976931348623157e292)a(0,t,i+s),a((l<<31|2146435072)>>>0,t,i+u);else{var p;if(r<22250738585072014e-324)p=r/5e-324,a(p>>>0,t,i+s),a((l<<31|p/4294967296)>>>0,t,i+u);else{var E=Math.floor(Math.log(r)/Math.LN2);E===1024&&(E=1023),p=r*Math.pow(2,-E),a(p*4503599627370496>>>0,t,i+s),a((l<<31|E+1023<<20|p*1048576&1048575)>>>0,t,i+u)}}}c(e,"writeDouble_ieee754"),n.writeDoubleLE=e.bind(null,L_,0,4),n.writeDoubleBE=e.bind(null,I_,4,0);function o(a,s,u,r,t){var i=a(r,t+s),l=a(r,t+u),p=(l>>31)*2+1,E=l>>>20&2047,y=4294967296*(l&1048575)+i;return E===2047?y?NaN:p*(1/0):E===0?p*5e-324*y:p*Math.pow(2,E-1075)*(y+4503599627370496)}c(o,"readDouble_ieee754"),n.readDoubleLE=o.bind(null,b_,0,4),n.readDoubleBE=o.bind(null,P_,4,0)}(),n}c(v_,"factory");function L_(n,e,o){e[o]=n&255,e[o+1]=n>>>8&255,e[o+2]=n>>>16&255,e[o+3]=n>>>24}c(L_,"writeUintLE");function I_(n,e,o){e[o]=n>>>24,e[o+1]=n>>>16&255,e[o+2]=n>>>8&255,e[o+3]=n&255}c(I_,"writeUintBE");function b_(n,e){return(n[e]|n[e+1]<<8|n[e+2]<<16|n[e+3]<<24)>>>0}c(b_,"readUintLE");function P_(n,e){return(n[e]<<24|n[e+1]<<16|n[e+2]<<8|n[e+3])>>>0}c(P_,"readUintBE")});var M_=_t((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(n){}return null}c(inquire,"inquire")});var w_=_t(D_=>{"use strict";var Lc=D_;Lc.length=c(function(e){for(var o=0,a=0,s=0;s<e.length;++s)a=e.charCodeAt(s),a<128?o+=1:a<2048?o+=2:(a&64512)===55296&&(e.charCodeAt(s+1)&64512)===56320?(++s,o+=4):o+=3;return o},"utf8_length");Lc.read=c(function(e,o,a){var s=a-o;if(s<1)return"";for(var u=null,r=[],t=0,i;o<a;)i=e[o++],i<128?r[t++]=i:i>191&&i<224?r[t++]=(i&31)<<6|e[o++]&63:i>239&&i<365?(i=((i&7)<<18|(e[o++]&63)<<12|(e[o++]&63)<<6|e[o++]&63)-65536,r[t++]=55296+(i>>10),r[t++]=56320+(i&1023)):r[t++]=(i&15)<<12|(e[o++]&63)<<6|e[o++]&63,t>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,r)),t=0);return u?(t&&u.push(String.fromCharCode.apply(String,r.slice(0,t))),u.join("")):String.fromCharCode.apply(String,r.slice(0,t))},"utf8_read");Lc.write=c(function(e,o,a){for(var s=a,u,r,t=0;t<e.length;++t)u=e.charCodeAt(t),u<128?o[a++]=u:u<2048?(o[a++]=u>>6|192,o[a++]=u&63|128):(u&64512)===55296&&((r=e.charCodeAt(t+1))&64512)===56320?(u=65536+((u&1023)<<10)+(r&1023),++t,o[a++]=u>>18|240,o[a++]=u>>12&63|128,o[a++]=u>>6&63|128,o[a++]=u&63|128):(o[a++]=u>>12|224,o[a++]=u>>6&63|128,o[a++]=u&63|128);return a-s},"utf8_write")});var k_=_t((jU,V_)=>{"use strict";V_.exports=IS;function IS(n,e,o){var a=o||8192,s=a>>>1,u=null,r=a;return c(function(i){if(i<1||i>s)return n(i);r+i>a&&(u=n(a),r=0);var l=e.call(u,r,r+=i);return r&7&&(r=(r|7)+1),l},"pool_alloc")}c(IS,"pool")});var G_=_t((qU,B_)=>{"use strict";B_.exports=vt;var vo=tr();function vt(n,e){this.lo=n>>>0,this.hi=e>>>0}c(vt,"LongBits");var xr=vt.zero=new vt(0,0);xr.toNumber=function(){return 0};xr.zzEncode=xr.zzDecode=function(){return this};xr.length=function(){return 1};var bS=vt.zeroHash="\0\0\0\0\0\0\0\0";vt.fromNumber=c(function(e){if(e===0)return xr;var o=e<0;o&&(e=-e);var a=e>>>0,s=(e-a)/4294967296>>>0;return o&&(s=~s>>>0,a=~a>>>0,++a>4294967295&&(a=0,++s>4294967295&&(s=0))),new vt(a,s)},"fromNumber");vt.from=c(function(e){if(typeof e=="number")return vt.fromNumber(e);if(vo.isString(e))if(vo.Long)e=vo.Long.fromString(e);else return vt.fromNumber(parseInt(e,10));return e.low||e.high?new vt(e.low>>>0,e.high>>>0):xr},"from");vt.prototype.toNumber=c(function(e){if(!e&&this.hi>>>31){var o=~this.lo+1>>>0,a=~this.hi>>>0;return o||(a=a+1>>>0),-(o+a*4294967296)}return this.lo+this.hi*4294967296},"toNumber");vt.prototype.toLong=c(function(e){return vo.Long?new vo.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}},"toLong");var Qe=String.prototype.charCodeAt;vt.fromHash=c(function(e){return e===bS?xr:new vt((Qe.call(e,0)|Qe.call(e,1)<<8|Qe.call(e,2)<<16|Qe.call(e,3)<<24)>>>0,(Qe.call(e,4)|Qe.call(e,5)<<8|Qe.call(e,6)<<16|Qe.call(e,7)<<24)>>>0)},"fromHash");vt.prototype.toHash=c(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)},"toHash");vt.prototype.zzEncode=c(function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},"zzEncode");vt.prototype.zzDecode=c(function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},"zzDecode");vt.prototype.length=c(function(){var e=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,a=this.hi>>>24;return a===0?o===0?e<16384?e<128?1:2:e<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:a<128?9:10},"length")});var tr=_t(Ic=>{"use strict";var b=Ic;b.asPromise=m_();b.base64=N_();b.EventEmitter=g_();b.float=U_();b.inquire=M_();b.utf8=w_();b.pool=k_();b.LongBits=G_();b.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);b.global=b.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||Ic;b.emptyArray=Object.freeze?Object.freeze([]):[];b.emptyObject=Object.freeze?Object.freeze({}):{};b.isInteger=Number.isInteger||c(function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},"isInteger");b.isString=c(function(e){return typeof e=="string"||e instanceof String},"isString");b.isObject=c(function(e){return e&&typeof e=="object"},"isObject");b.isset=b.isSet=c(function(e,o){var a=e[o];return a!=null&&e.hasOwnProperty(o)?typeof a!="object"||(Array.isArray(a)?a.length:Object.keys(a).length)>0:!1},"isSet");b.Buffer=function(){try{var n=b.inquire("buffer").Buffer;return n.prototype.utf8Write?n:null}catch{return null}}();b._Buffer_from=null;b._Buffer_allocUnsafe=null;b.newBuffer=c(function(e){return typeof e=="number"?b.Buffer?b._Buffer_allocUnsafe(e):new b.Array(e):b.Buffer?b._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)},"newBuffer");b.Array=typeof Uint8Array<"u"?Uint8Array:Array;b.Long=b.global.dcodeIO&&b.global.dcodeIO.Long||b.global.Long||b.inquire("long");b.key2Re=/^true|false|0|1$/;b.key32Re=/^-?(?:0|[1-9][0-9]*)$/;b.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;b.longToHash=c(function(e){return e?b.LongBits.from(e).toHash():b.LongBits.zeroHash},"longToHash");b.longFromHash=c(function(e,o){var a=b.LongBits.fromHash(e);return b.Long?b.Long.fromBits(a.lo,a.hi,o):a.toNumber(!!o)},"longFromHash");function H_(n,e,o){for(var a=Object.keys(e),s=0;s<a.length;++s)(n[a[s]]===void 0||!o)&&(n[a[s]]=e[a[s]]);return n}c(H_,"merge");b.merge=H_;b.lcFirst=c(function(e){return e.charAt(0).toLowerCase()+e.substring(1)},"lcFirst");function Y_(n){function e(o,a){if(!(this instanceof e))return new e(o,a);Object.defineProperty(this,"message",{get:c(function(){return o},"get")}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:new Error().stack||""}),a&&H_(this,a)}return c(e,"CustomError"),e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:c(function(){return n},"get"),set:void 0,enumerable:!1,configurable:!0},toString:{value:c(function(){return this.name+": "+this.message},"value"),writable:!0,enumerable:!1,configurable:!0}}),e}c(Y_,"newError");b.newError=Y_;b.ProtocolError=Y_("ProtocolError");b.oneOfGetter=c(function(e){for(var o={},a=0;a<e.length;++a)o[e[a]]=1;return function(){for(var s=Object.keys(this),u=s.length-1;u>-1;--u)if(o[s[u]]===1&&this[s[u]]!==void 0&&this[s[u]]!==null)return s[u]}},"getOneOf");b.oneOfSetter=c(function(e){return function(o){for(var a=0;a<e.length;++a)e[a]!==o&&delete this[e[a]]}},"setOneOf");b.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};b._configure=function(){var n=b.Buffer;if(!n){b._Buffer_from=b._Buffer_allocUnsafe=null;return}b._Buffer_from=n.from!==Uint8Array.from&&n.from||c(function(o,a){return new n(o,a)},"Buffer_from"),b._Buffer_allocUnsafe=n.allocUnsafe||c(function(o){return new n(o)},"Buffer_allocUnsafe")}});var wc=_t((JU,W_)=>{"use strict";W_.exports=Q;var ne=tr(),bc,Rs=ne.LongBits,F_=ne.base64,K_=ne.utf8;function Lo(n,e,o){this.fn=n,this.len=e,this.next=void 0,this.val=o}c(Lo,"Op");function Cc(){}c(Cc,"noop");function PS(n){this.head=n.head,this.tail=n.tail,this.len=n.len,this.next=n.states}c(PS,"State");function Q(){this.len=0,this.head=new Lo(Cc,0,0),this.tail=this.head,this.states=null}c(Q,"Writer");var j_=c(function(){return ne.Buffer?c(function(){return(Q.create=c(function(){return new bc},"create_buffer"))()},"create_buffer_setup"):c(function(){return new Q},"create_array")},"create");Q.create=j_();Q.alloc=c(function(e){return new ne.Array(e)},"alloc");ne.Array!==Array&&(Q.alloc=ne.pool(Q.alloc,ne.Array.prototype.subarray));Q.prototype._push=c(function(e,o,a){return this.tail=this.tail.next=new Lo(e,o,a),this.len+=o,this},"push");function Uc(n,e,o){e[o]=n&255}c(Uc,"writeByte");function CS(n,e,o){for(;n>127;)e[o++]=n&127|128,n>>>=7;e[o]=n}c(CS,"writeVarint32");function Mc(n,e){this.len=n,this.next=void 0,this.val=e}c(Mc,"VarintOp");Mc.prototype=Object.create(Lo.prototype);Mc.prototype.fn=CS;Q.prototype.uint32=c(function(e){return this.len+=(this.tail=this.tail.next=new Mc((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},"write_uint32");Q.prototype.int32=c(function(e){return e<0?this._push(Dc,10,Rs.fromNumber(e)):this.uint32(e)},"write_int32");Q.prototype.sint32=c(function(e){return this.uint32((e<<1^e>>31)>>>0)},"write_sint32");function Dc(n,e,o){for(;n.hi;)e[o++]=n.lo&127|128,n.lo=(n.lo>>>7|n.hi<<25)>>>0,n.hi>>>=7;for(;n.lo>127;)e[o++]=n.lo&127|128,n.lo=n.lo>>>7;e[o++]=n.lo}c(Dc,"writeVarint64");Q.prototype.uint64=c(function(e){var o=Rs.from(e);return this._push(Dc,o.length(),o)},"write_uint64");Q.prototype.int64=Q.prototype.uint64;Q.prototype.sint64=c(function(e){var o=Rs.from(e).zzEncode();return this._push(Dc,o.length(),o)},"write_sint64");Q.prototype.bool=c(function(e){return this._push(Uc,1,e?1:0)},"write_bool");function Pc(n,e,o){e[o]=n&255,e[o+1]=n>>>8&255,e[o+2]=n>>>16&255,e[o+3]=n>>>24}c(Pc,"writeFixed32");Q.prototype.fixed32=c(function(e){return this._push(Pc,4,e>>>0)},"write_fixed32");Q.prototype.sfixed32=Q.prototype.fixed32;Q.prototype.fixed64=c(function(e){var o=Rs.from(e);return this._push(Pc,4,o.lo)._push(Pc,4,o.hi)},"write_fixed64");Q.prototype.sfixed64=Q.prototype.fixed64;Q.prototype.float=c(function(e){return this._push(ne.float.writeFloatLE,4,e)},"write_float");Q.prototype.double=c(function(e){return this._push(ne.float.writeDoubleLE,8,e)},"write_double");var US=ne.Array.prototype.set?c(function(e,o,a){o.set(e,a)},"writeBytes_set"):c(function(e,o,a){for(var s=0;s<e.length;++s)o[a+s]=e[s]},"writeBytes_for");Q.prototype.bytes=c(function(e){var o=e.length>>>0;if(!o)return this._push(Uc,1,0);if(ne.isString(e)){var a=Q.alloc(o=F_.length(e));F_.decode(e,a,0),e=a}return this.uint32(o)._push(US,o,e)},"write_bytes");Q.prototype.string=c(function(e){var o=K_.length(e);return o?this.uint32(o)._push(K_.write,o,e):this._push(Uc,1,0)},"write_string");Q.prototype.fork=c(function(){return this.states=new PS(this),this.head=this.tail=new Lo(Cc,0,0),this.len=0,this},"fork");Q.prototype.reset=c(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 Lo(Cc,0,0),this.len=0),this},"reset");Q.prototype.ldelim=c(function(){var e=this.head,o=this.tail,a=this.len;return this.reset().uint32(a),a&&(this.tail.next=e.next,this.tail=o,this.len+=a),this},"ldelim");Q.prototype.finish=c(function(){for(var e=this.head.next,o=this.constructor.alloc(this.len),a=0;e;)e.fn(e.val,o,a),a+=e.len,e=e.next;return o},"finish");Q._configure=function(n){bc=n,Q.create=j_(),bc._configure()}});var $_=_t((QU,z_)=>{"use strict";z_.exports=xe;var q_=wc();(xe.prototype=Object.create(q_.prototype)).constructor=xe;var er=tr();function xe(){q_.call(this)}c(xe,"BufferWriter");xe._configure=function(){xe.alloc=er._Buffer_allocUnsafe,xe.writeBytesBuffer=er.Buffer&&er.Buffer.prototype instanceof Uint8Array&&er.Buffer.prototype.set.name==="set"?c(function(e,o,a){o.set(e,a)},"writeBytesBuffer_set"):c(function(e,o,a){if(e.copy)e.copy(o,a,0,e.length);else for(var s=0;s<e.length;)o[a++]=e[s++]},"writeBytesBuffer_copy")};xe.prototype.bytes=c(function(e){er.isString(e)&&(e=er._Buffer_from(e,"base64"));var o=e.length>>>0;return this.uint32(o),o&&this._push(xe.writeBytesBuffer,o,e),this},"write_bytes_buffer");function MS(n,e,o){n.length<40?er.utf8.write(n,e,o):e.utf8Write?e.utf8Write(n,o):e.write(n,o)}c(MS,"writeStringBuffer");xe.prototype.string=c(function(e){var o=er.Buffer.byteLength(e);return this.uint32(o),o&&this._push(MS,o,e),this},"write_string_buffer");xe._configure()});var Bc=_t((eM,tf)=>{"use strict";tf.exports=St;var _e=tr(),kc,Z_=_e.LongBits,DS=_e.utf8;function fe(n,e){return RangeError("index out of range: "+n.pos+" + "+(e||1)+" > "+n.len)}c(fe,"indexOutOfRange");function St(n){this.buf=n,this.pos=0,this.len=n.length}c(St,"Reader");var X_=typeof Uint8Array<"u"?c(function(e){if(e instanceof Uint8Array||Array.isArray(e))return new St(e);throw Error("illegal buffer")},"create_typed_array"):c(function(e){if(Array.isArray(e))return new St(e);throw Error("illegal buffer")},"create_array"),Q_=c(function(){return _e.Buffer?c(function(o){return(St.create=c(function(s){return _e.Buffer.isBuffer(s)?new kc(s):X_(s)},"create_buffer"))(o)},"create_buffer_setup"):X_},"create");St.create=Q_();St.prototype._slice=_e.Array.prototype.subarray||_e.Array.prototype.slice;St.prototype.uint32=c(function(){var e=4294967295;return c(function(){if(e=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(e=(e|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,fe(this,10);return e},"read_uint32")},"read_uint32_setup")();St.prototype.int32=c(function(){return this.uint32()|0},"read_int32");St.prototype.sint32=c(function(){var e=this.uint32();return e>>>1^-(e&1)|0},"read_sint32");function Vc(){var n=new Z_(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(n.lo=(n.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return n;if(n.lo=(n.lo|(this.buf[this.pos]&127)<<28)>>>0,n.hi=(n.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return n;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw fe(this);if(n.lo=(n.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return n}return n.lo=(n.lo|(this.buf[this.pos++]&127)<<e*7)>>>0,n}if(this.len-this.pos>4){for(;e<5;++e)if(n.hi=(n.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return n}else for(;e<5;++e){if(this.pos>=this.len)throw fe(this);if(n.hi=(n.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return n}throw Error("invalid varint encoding")}c(Vc,"readLongVarint");St.prototype.bool=c(function(){return this.uint32()!==0},"read_bool");function Ns(n,e){return(n[e-4]|n[e-3]<<8|n[e-2]<<16|n[e-1]<<24)>>>0}c(Ns,"readFixed32_end");St.prototype.fixed32=c(function(){if(this.pos+4>this.len)throw fe(this,4);return Ns(this.buf,this.pos+=4)},"read_fixed32");St.prototype.sfixed32=c(function(){if(this.pos+4>this.len)throw fe(this,4);return Ns(this.buf,this.pos+=4)|0},"read_sfixed32");function J_(){if(this.pos+8>this.len)throw fe(this,8);return new Z_(Ns(this.buf,this.pos+=4),Ns(this.buf,this.pos+=4))}c(J_,"readFixed64");St.prototype.float=c(function(){if(this.pos+4>this.len)throw fe(this,4);var e=_e.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},"read_float");St.prototype.double=c(function(){if(this.pos+8>this.len)throw fe(this,4);var e=_e.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},"read_double");St.prototype.bytes=c(function(){var e=this.uint32(),o=this.pos,a=this.pos+e;if(a>this.len)throw fe(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(o,a);if(o===a){var s=_e.Buffer;return s?s.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,a)},"read_bytes");St.prototype.string=c(function(){var e=this.bytes();return DS.read(e,0,e.length)},"read_string");St.prototype.skip=c(function(e){if(typeof e=="number"){if(this.pos+e>this.len)throw fe(this,e);this.pos+=e}else do if(this.pos>=this.len)throw fe(this);while(this.buf[this.pos++]&128);return this},"skip");St.prototype.skipType=function(n){switch(n){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(n=this.uint32()&7)!==4;)this.skipType(n);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+n+" at offset "+this.pos)}return this};St._configure=function(n){kc=n,St.create=Q_(),kc._configure();var e=_e.Long?"toLong":"toNumber";_e.merge(St.prototype,{int64:c(function(){return Vc.call(this)[e](!1)},"read_int64"),uint64:c(function(){return Vc.call(this)[e](!0)},"read_uint64"),sint64:c(function(){return Vc.call(this).zzDecode()[e](!1)},"read_sint64"),fixed64:c(function(){return J_.call(this)[e](!0)},"read_fixed64"),sfixed64:c(function(){return J_.call(this)[e](!1)},"read_sfixed64")})}});var of=_t((nM,nf)=>{"use strict";nf.exports=gr;var rf=Bc();(gr.prototype=Object.create(rf.prototype)).constructor=gr;var ef=tr();function gr(n){rf.call(this,n)}c(gr,"BufferReader");gr._configure=function(){ef.Buffer&&(gr.prototype._slice=ef.Buffer.prototype.slice)};gr.prototype.string=c(function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},"read_string_buffer");gr._configure()});var af=_t((iM,sf)=>{"use strict";sf.exports=Io;var Gc=tr();(Io.prototype=Object.create(Gc.EventEmitter.prototype)).constructor=Io;function Io(n,e,o){if(typeof n!="function")throw TypeError("rpcImpl must be a function");Gc.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=!!e,this.responseDelimited=!!o}c(Io,"Service");Io.prototype.rpcCall=c(function n(e,o,a,s,u){if(!s)throw TypeError("request must be specified");var r=this;if(!u)return Gc.asPromise(n,r,e,o,a,s);if(!r.rpcImpl){setTimeout(function(){u(Error("already ended"))},0);return}try{return r.rpcImpl(e,o[r.requestDelimited?"encodeDelimited":"encode"](s).finish(),c(function(i,l){if(i)return r.emit("error",i,e),u(i);if(l===null){r.end(!0);return}if(!(l instanceof a))try{l=a[r.responseDelimited?"decodeDelimited":"decode"](l)}catch(p){return r.emit("error",p,e),u(p)}return r.emit("data",l,e),u(null,l)},"rpcCallback"))}catch(t){r.emit("error",t,e),setTimeout(function(){u(t)},0);return}},"rpcCall");Io.prototype.end=c(function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},"end")});var uf=_t(cf=>{"use strict";var wS=cf;wS.Service=af()});var pf=_t((cM,lf)=>{"use strict";lf.exports={}});var Ef=_t(ff=>{"use strict";var Ht=ff;Ht.build="minimal";Ht.Writer=wc();Ht.BufferWriter=$_();Ht.Reader=Bc();Ht.BufferReader=of();Ht.util=tr();Ht.rpc=uf();Ht.roots=pf();Ht.configure=_f;function _f(){Ht.util._configure(),Ht.Writer._configure(Ht.BufferWriter),Ht.Reader._configure(Ht.BufferReader)}c(_f,"configure");_f()});var df=_t((pM,Tf)=>{"use strict";Tf.exports=Ef()});var Hc=_t((_M,Sf)=>{"use strict";var U=df(),T=U.Reader,K=U.Writer,f=U.util,_=U.roots.default||(U.roots.default={});_.opentelemetry=function(){var n={};return n.proto=function(){var e={};return e.common=function(){var o={};return o.v1=function(){var a={};return a.AnyValue=function(){function s(r){if(r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}c(s,"AnyValue"),s.prototype.stringValue=null,s.prototype.boolValue=null,s.prototype.intValue=null,s.prototype.doubleValue=null,s.prototype.arrayValue=null,s.prototype.kvlistValue=null,s.prototype.bytesValue=null;var u;return Object.defineProperty(s.prototype,"value",{get:f.oneOfGetter(u=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:f.oneOfSetter(u)}),s.create=c(function(t){return new s(t)},"create"),s.encode=c(function(t,i){return i||(i=K.create()),t.stringValue!=null&&Object.hasOwnProperty.call(t,"stringValue")&&i.uint32(10).string(t.stringValue),t.boolValue!=null&&Object.hasOwnProperty.call(t,"boolValue")&&i.uint32(16).bool(t.boolValue),t.intValue!=null&&Object.hasOwnProperty.call(t,"intValue")&&i.uint32(24).int64(t.intValue),t.doubleValue!=null&&Object.hasOwnProperty.call(t,"doubleValue")&&i.uint32(33).double(t.doubleValue),t.arrayValue!=null&&Object.hasOwnProperty.call(t,"arrayValue")&&_.opentelemetry.proto.common.v1.ArrayValue.encode(t.arrayValue,i.uint32(42).fork()).ldelim(),t.kvlistValue!=null&&Object.hasOwnProperty.call(t,"kvlistValue")&&_.opentelemetry.proto.common.v1.KeyValueList.encode(t.kvlistValue,i.uint32(50).fork()).ldelim(),t.bytesValue!=null&&Object.hasOwnProperty.call(t,"bytesValue")&&i.uint32(58).bytes(t.bytesValue),i},"encode"),s.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),s.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.common.v1.AnyValue;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.stringValue=t.string();break}case 2:{p.boolValue=t.bool();break}case 3:{p.intValue=t.int64();break}case 4:{p.doubleValue=t.double();break}case 5:{p.arrayValue=_.opentelemetry.proto.common.v1.ArrayValue.decode(t,t.uint32());break}case 6:{p.kvlistValue=_.opentelemetry.proto.common.v1.KeyValueList.decode(t,t.uint32());break}case 7:{p.bytesValue=t.bytes();break}default:t.skipType(E&7);break}}return p},"decode"),s.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),s.verify=c(function(t){if(typeof t!="object"||t===null)return"object expected";var i={};if(t.stringValue!=null&&t.hasOwnProperty("stringValue")&&(i.value=1,!f.isString(t.stringValue)))return"stringValue: string expected";if(t.boolValue!=null&&t.hasOwnProperty("boolValue")){if(i.value===1)return"value: multiple values";if(i.value=1,typeof t.boolValue!="boolean")return"boolValue: boolean expected"}if(t.intValue!=null&&t.hasOwnProperty("intValue")){if(i.value===1)return"value: multiple values";if(i.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(i.value===1)return"value: multiple values";if(i.value=1,typeof t.doubleValue!="number")return"doubleValue: number expected"}if(t.arrayValue!=null&&t.hasOwnProperty("arrayValue")){if(i.value===1)return"value: multiple values";i.value=1;{var l=_.opentelemetry.proto.common.v1.ArrayValue.verify(t.arrayValue);if(l)return"arrayValue."+l}}if(t.kvlistValue!=null&&t.hasOwnProperty("kvlistValue")){if(i.value===1)return"value: multiple values";i.value=1;{var l=_.opentelemetry.proto.common.v1.KeyValueList.verify(t.kvlistValue);if(l)return"kvlistValue."+l}}if(t.bytesValue!=null&&t.hasOwnProperty("bytesValue")){if(i.value===1)return"value: multiple values";if(i.value=1,!(t.bytesValue&&typeof t.bytesValue.length=="number"||f.isString(t.bytesValue)))return"bytesValue: buffer expected"}return null},"verify"),s.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.common.v1.AnyValue)return t;var i=new _.opentelemetry.proto.common.v1.AnyValue;if(t.stringValue!=null&&(i.stringValue=String(t.stringValue)),t.boolValue!=null&&(i.boolValue=!!t.boolValue),t.intValue!=null&&(f.Long?(i.intValue=f.Long.fromValue(t.intValue)).unsigned=!1:typeof t.intValue=="string"?i.intValue=parseInt(t.intValue,10):typeof t.intValue=="number"?i.intValue=t.intValue:typeof t.intValue=="object"&&(i.intValue=new f.LongBits(t.intValue.low>>>0,t.intValue.high>>>0).toNumber())),t.doubleValue!=null&&(i.doubleValue=Number(t.doubleValue)),t.arrayValue!=null){if(typeof t.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");i.arrayValue=_.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");i.kvlistValue=_.opentelemetry.proto.common.v1.KeyValueList.fromObject(t.kvlistValue)}return t.bytesValue!=null&&(typeof t.bytesValue=="string"?f.base64.decode(t.bytesValue,i.bytesValue=f.newBuffer(f.base64.length(t.bytesValue)),0):t.bytesValue.length>=0&&(i.bytesValue=t.bytesValue)),i},"fromObject"),s.toObject=c(function(t,i){i||(i={});var l={};return t.stringValue!=null&&t.hasOwnProperty("stringValue")&&(l.stringValue=t.stringValue,i.oneofs&&(l.value="stringValue")),t.boolValue!=null&&t.hasOwnProperty("boolValue")&&(l.boolValue=t.boolValue,i.oneofs&&(l.value="boolValue")),t.intValue!=null&&t.hasOwnProperty("intValue")&&(typeof t.intValue=="number"?l.intValue=i.longs===String?String(t.intValue):t.intValue:l.intValue=i.longs===String?f.Long.prototype.toString.call(t.intValue):i.longs===Number?new f.LongBits(t.intValue.low>>>0,t.intValue.high>>>0).toNumber():t.intValue,i.oneofs&&(l.value="intValue")),t.doubleValue!=null&&t.hasOwnProperty("doubleValue")&&(l.doubleValue=i.json&&!isFinite(t.doubleValue)?String(t.doubleValue):t.doubleValue,i.oneofs&&(l.value="doubleValue")),t.arrayValue!=null&&t.hasOwnProperty("arrayValue")&&(l.arrayValue=_.opentelemetry.proto.common.v1.ArrayValue.toObject(t.arrayValue,i),i.oneofs&&(l.value="arrayValue")),t.kvlistValue!=null&&t.hasOwnProperty("kvlistValue")&&(l.kvlistValue=_.opentelemetry.proto.common.v1.KeyValueList.toObject(t.kvlistValue,i),i.oneofs&&(l.value="kvlistValue")),t.bytesValue!=null&&t.hasOwnProperty("bytesValue")&&(l.bytesValue=i.bytes===String?f.base64.encode(t.bytesValue,0,t.bytesValue.length):i.bytes===Array?Array.prototype.slice.call(t.bytesValue):t.bytesValue,i.oneofs&&(l.value="bytesValue")),l},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.AnyValue"},"getTypeUrl"),s}(),a.ArrayValue=function(){function s(u){if(this.values=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"ArrayValue"),s.prototype.values=f.emptyArray,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.values!=null&&r.values.length)for(var i=0;i<r.values.length;++i)_.opentelemetry.proto.common.v1.AnyValue.encode(r.values[i],t.uint32(10).fork()).ldelim();return t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.common.v1.ArrayValue;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.values&&l.values.length||(l.values=[]),l.values.push(_.opentelemetry.proto.common.v1.AnyValue.decode(r,r.uint32()));break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.values!=null&&r.hasOwnProperty("values")){if(!Array.isArray(r.values))return"values: array expected";for(var t=0;t<r.values.length;++t){var i=_.opentelemetry.proto.common.v1.AnyValue.verify(r.values[t]);if(i)return"values."+i}}return null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.common.v1.ArrayValue)return r;var t=new _.opentelemetry.proto.common.v1.ArrayValue;if(r.values){if(!Array.isArray(r.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");t.values=[];for(var i=0;i<r.values.length;++i){if(typeof r.values[i]!="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");t.values[i]=_.opentelemetry.proto.common.v1.AnyValue.fromObject(r.values[i])}}return t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.values=[]),r.values&&r.values.length){i.values=[];for(var l=0;l<r.values.length;++l)i.values[l]=_.opentelemetry.proto.common.v1.AnyValue.toObject(r.values[l],t)}return i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.common.v1.ArrayValue"},"getTypeUrl"),s}(),a.KeyValueList=function(){function s(u){if(this.values=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"KeyValueList"),s.prototype.values=f.emptyArray,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.values!=null&&r.values.length)for(var i=0;i<r.values.length;++i)_.opentelemetry.proto.common.v1.KeyValue.encode(r.values[i],t.uint32(10).fork()).ldelim();return t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.common.v1.KeyValueList;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.values&&l.values.length||(l.values=[]),l.values.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.values!=null&&r.hasOwnProperty("values")){if(!Array.isArray(r.values))return"values: array expected";for(var t=0;t<r.values.length;++t){var i=_.opentelemetry.proto.common.v1.KeyValue.verify(r.values[t]);if(i)return"values."+i}}return null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.common.v1.KeyValueList)return r;var t=new _.opentelemetry.proto.common.v1.KeyValueList;if(r.values){if(!Array.isArray(r.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");t.values=[];for(var i=0;i<r.values.length;++i){if(typeof r.values[i]!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");t.values[i]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(r.values[i])}}return t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.values=[]),r.values&&r.values.length){i.values=[];for(var l=0;l<r.values.length;++l)i.values[l]=_.opentelemetry.proto.common.v1.KeyValue.toObject(r.values[l],t)}return i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.common.v1.KeyValueList"},"getTypeUrl"),s}(),a.KeyValue=function(){function s(u){if(u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"KeyValue"),s.prototype.key=null,s.prototype.value=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){return t||(t=K.create()),r.key!=null&&Object.hasOwnProperty.call(r,"key")&&t.uint32(10).string(r.key),r.value!=null&&Object.hasOwnProperty.call(r,"value")&&_.opentelemetry.proto.common.v1.AnyValue.encode(r.value,t.uint32(18).fork()).ldelim(),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.common.v1.KeyValue;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.key=r.string();break}case 2:{l.value=_.opentelemetry.proto.common.v1.AnyValue.decode(r,r.uint32());break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.key!=null&&r.hasOwnProperty("key")&&!f.isString(r.key))return"key: string expected";if(r.value!=null&&r.hasOwnProperty("value")){var t=_.opentelemetry.proto.common.v1.AnyValue.verify(r.value);if(t)return"value."+t}return null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.common.v1.KeyValue)return r;var t=new _.opentelemetry.proto.common.v1.KeyValue;if(r.key!=null&&(t.key=String(r.key)),r.value!=null){if(typeof r.value!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");t.value=_.opentelemetry.proto.common.v1.AnyValue.fromObject(r.value)}return t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};return t.defaults&&(i.key="",i.value=null),r.key!=null&&r.hasOwnProperty("key")&&(i.key=r.key),r.value!=null&&r.hasOwnProperty("value")&&(i.value=_.opentelemetry.proto.common.v1.AnyValue.toObject(r.value,t)),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.common.v1.KeyValue"},"getTypeUrl"),s}(),a.InstrumentationScope=function(){function s(u){if(this.attributes=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"InstrumentationScope"),s.prototype.name=null,s.prototype.version=null,s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.name!=null&&Object.hasOwnProperty.call(r,"name")&&t.uint32(10).string(r.name),r.version!=null&&Object.hasOwnProperty.call(r,"version")&&t.uint32(18).string(r.version),r.attributes!=null&&r.attributes.length)for(var i=0;i<r.attributes.length;++i)_.opentelemetry.proto.common.v1.KeyValue.encode(r.attributes[i],t.uint32(26).fork()).ldelim();return r.droppedAttributesCount!=null&&Object.hasOwnProperty.call(r,"droppedAttributesCount")&&t.uint32(32).uint32(r.droppedAttributesCount),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.common.v1.InstrumentationScope;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.name=r.string();break}case 2:{l.version=r.string();break}case 3:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 4:{l.droppedAttributesCount=r.uint32();break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.name!=null&&r.hasOwnProperty("name")&&!f.isString(r.name))return"name: string expected";if(r.version!=null&&r.hasOwnProperty("version")&&!f.isString(r.version))return"version: string expected";if(r.attributes!=null&&r.hasOwnProperty("attributes")){if(!Array.isArray(r.attributes))return"attributes: array expected";for(var t=0;t<r.attributes.length;++t){var i=_.opentelemetry.proto.common.v1.KeyValue.verify(r.attributes[t]);if(i)return"attributes."+i}}return r.droppedAttributesCount!=null&&r.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(r.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.common.v1.InstrumentationScope)return r;var t=new _.opentelemetry.proto.common.v1.InstrumentationScope;if(r.name!=null&&(t.name=String(r.name)),r.version!=null&&(t.version=String(r.version)),r.attributes){if(!Array.isArray(r.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");t.attributes=[];for(var i=0;i<r.attributes.length;++i){if(typeof r.attributes[i]!="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");t.attributes[i]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(r.attributes[i])}}return r.droppedAttributesCount!=null&&(t.droppedAttributesCount=r.droppedAttributesCount>>>0),t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.attributes=[]),t.defaults&&(i.name="",i.version="",i.droppedAttributesCount=0),r.name!=null&&r.hasOwnProperty("name")&&(i.name=r.name),r.version!=null&&r.hasOwnProperty("version")&&(i.version=r.version),r.attributes&&r.attributes.length){i.attributes=[];for(var l=0;l<r.attributes.length;++l)i.attributes[l]=_.opentelemetry.proto.common.v1.KeyValue.toObject(r.attributes[l],t)}return r.droppedAttributesCount!=null&&r.hasOwnProperty("droppedAttributesCount")&&(i.droppedAttributesCount=r.droppedAttributesCount),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.common.v1.InstrumentationScope"},"getTypeUrl"),s}(),a}(),o}(),e.resource=function(){var o={};return o.v1=function(){var a={};return a.Resource=function(){function s(u){if(this.attributes=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"Resource"),s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.attributes!=null&&r.attributes.length)for(var i=0;i<r.attributes.length;++i)_.opentelemetry.proto.common.v1.KeyValue.encode(r.attributes[i],t.uint32(10).fork()).ldelim();return r.droppedAttributesCount!=null&&Object.hasOwnProperty.call(r,"droppedAttributesCount")&&t.uint32(16).uint32(r.droppedAttributesCount),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.resource.v1.Resource;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 2:{l.droppedAttributesCount=r.uint32();break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.attributes!=null&&r.hasOwnProperty("attributes")){if(!Array.isArray(r.attributes))return"attributes: array expected";for(var t=0;t<r.attributes.length;++t){var i=_.opentelemetry.proto.common.v1.KeyValue.verify(r.attributes[t]);if(i)return"attributes."+i}}return r.droppedAttributesCount!=null&&r.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(r.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.resource.v1.Resource)return r;var t=new _.opentelemetry.proto.resource.v1.Resource;if(r.attributes){if(!Array.isArray(r.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");t.attributes=[];for(var i=0;i<r.attributes.length;++i){if(typeof r.attributes[i]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");t.attributes[i]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(r.attributes[i])}}return r.droppedAttributesCount!=null&&(t.droppedAttributesCount=r.droppedAttributesCount>>>0),t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.attributes=[]),t.defaults&&(i.droppedAttributesCount=0),r.attributes&&r.attributes.length){i.attributes=[];for(var l=0;l<r.attributes.length;++l)i.attributes[l]=_.opentelemetry.proto.common.v1.KeyValue.toObject(r.attributes[l],t)}return r.droppedAttributesCount!=null&&r.hasOwnProperty("droppedAttributesCount")&&(i.droppedAttributesCount=r.droppedAttributesCount),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.resource.v1.Resource"},"getTypeUrl"),s}(),a}(),o}(),e.trace=function(){var o={};return o.v1=function(){var a={};return a.TracesData=function(){function s(u){if(this.resourceSpans=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"TracesData"),s.prototype.resourceSpans=f.emptyArray,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.resourceSpans!=null&&r.resourceSpans.length)for(var i=0;i<r.resourceSpans.length;++i)_.opentelemetry.proto.trace.v1.ResourceSpans.encode(r.resourceSpans[i],t.uint32(10).fork()).ldelim();return t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.trace.v1.TracesData;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.resourceSpans&&l.resourceSpans.length||(l.resourceSpans=[]),l.resourceSpans.push(_.opentelemetry.proto.trace.v1.ResourceSpans.decode(r,r.uint32()));break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.resourceSpans!=null&&r.hasOwnProperty("resourceSpans")){if(!Array.isArray(r.resourceSpans))return"resourceSpans: array expected";for(var t=0;t<r.resourceSpans.length;++t){var i=_.opentelemetry.proto.trace.v1.ResourceSpans.verify(r.resourceSpans[t]);if(i)return"resourceSpans."+i}}return null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.trace.v1.TracesData)return r;var t=new _.opentelemetry.proto.trace.v1.TracesData;if(r.resourceSpans){if(!Array.isArray(r.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");t.resourceSpans=[];for(var i=0;i<r.resourceSpans.length;++i){if(typeof r.resourceSpans[i]!="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");t.resourceSpans[i]=_.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(r.resourceSpans[i])}}return t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.resourceSpans=[]),r.resourceSpans&&r.resourceSpans.length){i.resourceSpans=[];for(var l=0;l<r.resourceSpans.length;++l)i.resourceSpans[l]=_.opentelemetry.proto.trace.v1.ResourceSpans.toObject(r.resourceSpans[l],t)}return i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.trace.v1.TracesData"},"getTypeUrl"),s}(),a.ResourceSpans=function(){function s(u){if(this.scopeSpans=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"ResourceSpans"),s.prototype.resource=null,s.prototype.scopeSpans=f.emptyArray,s.prototype.schemaUrl=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.resource!=null&&Object.hasOwnProperty.call(r,"resource")&&_.opentelemetry.proto.resource.v1.Resource.encode(r.resource,t.uint32(10).fork()).ldelim(),r.scopeSpans!=null&&r.scopeSpans.length)for(var i=0;i<r.scopeSpans.length;++i)_.opentelemetry.proto.trace.v1.ScopeSpans.encode(r.scopeSpans[i],t.uint32(18).fork()).ldelim();return r.schemaUrl!=null&&Object.hasOwnProperty.call(r,"schemaUrl")&&t.uint32(26).string(r.schemaUrl),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.trace.v1.ResourceSpans;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.resource=_.opentelemetry.proto.resource.v1.Resource.decode(r,r.uint32());break}case 2:{l.scopeSpans&&l.scopeSpans.length||(l.scopeSpans=[]),l.scopeSpans.push(_.opentelemetry.proto.trace.v1.ScopeSpans.decode(r,r.uint32()));break}case 3:{l.schemaUrl=r.string();break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.resource!=null&&r.hasOwnProperty("resource")){var t=_.opentelemetry.proto.resource.v1.Resource.verify(r.resource);if(t)return"resource."+t}if(r.scopeSpans!=null&&r.hasOwnProperty("scopeSpans")){if(!Array.isArray(r.scopeSpans))return"scopeSpans: array expected";for(var i=0;i<r.scopeSpans.length;++i){var t=_.opentelemetry.proto.trace.v1.ScopeSpans.verify(r.scopeSpans[i]);if(t)return"scopeSpans."+t}}return r.schemaUrl!=null&&r.hasOwnProperty("schemaUrl")&&!f.isString(r.schemaUrl)?"schemaUrl: string expected":null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.trace.v1.ResourceSpans)return r;var t=new _.opentelemetry.proto.trace.v1.ResourceSpans;if(r.resource!=null){if(typeof r.resource!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");t.resource=_.opentelemetry.proto.resource.v1.Resource.fromObject(r.resource)}if(r.scopeSpans){if(!Array.isArray(r.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");t.scopeSpans=[];for(var i=0;i<r.scopeSpans.length;++i){if(typeof r.scopeSpans[i]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");t.scopeSpans[i]=_.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(r.scopeSpans[i])}}return r.schemaUrl!=null&&(t.schemaUrl=String(r.schemaUrl)),t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.scopeSpans=[]),t.defaults&&(i.resource=null,i.schemaUrl=""),r.resource!=null&&r.hasOwnProperty("resource")&&(i.resource=_.opentelemetry.proto.resource.v1.Resource.toObject(r.resource,t)),r.scopeSpans&&r.scopeSpans.length){i.scopeSpans=[];for(var l=0;l<r.scopeSpans.length;++l)i.scopeSpans[l]=_.opentelemetry.proto.trace.v1.ScopeSpans.toObject(r.scopeSpans[l],t)}return r.schemaUrl!=null&&r.hasOwnProperty("schemaUrl")&&(i.schemaUrl=r.schemaUrl),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.trace.v1.ResourceSpans"},"getTypeUrl"),s}(),a.ScopeSpans=function(){function s(u){if(this.spans=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"ScopeSpans"),s.prototype.scope=null,s.prototype.spans=f.emptyArray,s.prototype.schemaUrl=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.scope!=null&&Object.hasOwnProperty.call(r,"scope")&&_.opentelemetry.proto.common.v1.InstrumentationScope.encode(r.scope,t.uint32(10).fork()).ldelim(),r.spans!=null&&r.spans.length)for(var i=0;i<r.spans.length;++i)_.opentelemetry.proto.trace.v1.Span.encode(r.spans[i],t.uint32(18).fork()).ldelim();return r.schemaUrl!=null&&Object.hasOwnProperty.call(r,"schemaUrl")&&t.uint32(26).string(r.schemaUrl),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.trace.v1.ScopeSpans;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.decode(r,r.uint32());break}case 2:{l.spans&&l.spans.length||(l.spans=[]),l.spans.push(_.opentelemetry.proto.trace.v1.Span.decode(r,r.uint32()));break}case 3:{l.schemaUrl=r.string();break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.scope!=null&&r.hasOwnProperty("scope")){var t=_.opentelemetry.proto.common.v1.InstrumentationScope.verify(r.scope);if(t)return"scope."+t}if(r.spans!=null&&r.hasOwnProperty("spans")){if(!Array.isArray(r.spans))return"spans: array expected";for(var i=0;i<r.spans.length;++i){var t=_.opentelemetry.proto.trace.v1.Span.verify(r.spans[i]);if(t)return"spans."+t}}return r.schemaUrl!=null&&r.hasOwnProperty("schemaUrl")&&!f.isString(r.schemaUrl)?"schemaUrl: string expected":null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.trace.v1.ScopeSpans)return r;var t=new _.opentelemetry.proto.trace.v1.ScopeSpans;if(r.scope!=null){if(typeof r.scope!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");t.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(r.scope)}if(r.spans){if(!Array.isArray(r.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");t.spans=[];for(var i=0;i<r.spans.length;++i){if(typeof r.spans[i]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");t.spans[i]=_.opentelemetry.proto.trace.v1.Span.fromObject(r.spans[i])}}return r.schemaUrl!=null&&(t.schemaUrl=String(r.schemaUrl)),t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.spans=[]),t.defaults&&(i.scope=null,i.schemaUrl=""),r.scope!=null&&r.hasOwnProperty("scope")&&(i.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.toObject(r.scope,t)),r.spans&&r.spans.length){i.spans=[];for(var l=0;l<r.spans.length;++l)i.spans[l]=_.opentelemetry.proto.trace.v1.Span.toObject(r.spans[l],t)}return r.schemaUrl!=null&&r.hasOwnProperty("schemaUrl")&&(i.schemaUrl=r.schemaUrl),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.trace.v1.ScopeSpans"},"getTypeUrl"),s}(),a.Span=function(){function s(u){if(this.attributes=[],this.events=[],this.links=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"Span"),s.prototype.traceId=null,s.prototype.spanId=null,s.prototype.traceState=null,s.prototype.parentSpanId=null,s.prototype.name=null,s.prototype.kind=null,s.prototype.startTimeUnixNano=null,s.prototype.endTimeUnixNano=null,s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.prototype.events=f.emptyArray,s.prototype.droppedEventsCount=null,s.prototype.links=f.emptyArray,s.prototype.droppedLinksCount=null,s.prototype.status=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.traceId!=null&&Object.hasOwnProperty.call(r,"traceId")&&t.uint32(10).bytes(r.traceId),r.spanId!=null&&Object.hasOwnProperty.call(r,"spanId")&&t.uint32(18).bytes(r.spanId),r.traceState!=null&&Object.hasOwnProperty.call(r,"traceState")&&t.uint32(26).string(r.traceState),r.parentSpanId!=null&&Object.hasOwnProperty.call(r,"parentSpanId")&&t.uint32(34).bytes(r.parentSpanId),r.name!=null&&Object.hasOwnProperty.call(r,"name")&&t.uint32(42).string(r.name),r.kind!=null&&Object.hasOwnProperty.call(r,"kind")&&t.uint32(48).int32(r.kind),r.startTimeUnixNano!=null&&Object.hasOwnProperty.call(r,"startTimeUnixNano")&&t.uint32(57).fixed64(r.startTimeUnixNano),r.endTimeUnixNano!=null&&Object.hasOwnProperty.call(r,"endTimeUnixNano")&&t.uint32(65).fixed64(r.endTimeUnixNano),r.attributes!=null&&r.attributes.length)for(var i=0;i<r.attributes.length;++i)_.opentelemetry.proto.common.v1.KeyValue.encode(r.attributes[i],t.uint32(74).fork()).ldelim();if(r.droppedAttributesCount!=null&&Object.hasOwnProperty.call(r,"droppedAttributesCount")&&t.uint32(80).uint32(r.droppedAttributesCount),r.events!=null&&r.events.length)for(var i=0;i<r.events.length;++i)_.opentelemetry.proto.trace.v1.Span.Event.encode(r.events[i],t.uint32(90).fork()).ldelim();if(r.droppedEventsCount!=null&&Object.hasOwnProperty.call(r,"droppedEventsCount")&&t.uint32(96).uint32(r.droppedEventsCount),r.links!=null&&r.links.length)for(var i=0;i<r.links.length;++i)_.opentelemetry.proto.trace.v1.Span.Link.encode(r.links[i],t.uint32(106).fork()).ldelim();return r.droppedLinksCount!=null&&Object.hasOwnProperty.call(r,"droppedLinksCount")&&t.uint32(112).uint32(r.droppedLinksCount),r.status!=null&&Object.hasOwnProperty.call(r,"status")&&_.opentelemetry.proto.trace.v1.Status.encode(r.status,t.uint32(122).fork()).ldelim(),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.trace.v1.Span;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.traceId=r.bytes();break}case 2:{l.spanId=r.bytes();break}case 3:{l.traceState=r.string();break}case 4:{l.parentSpanId=r.bytes();break}case 5:{l.name=r.string();break}case 6:{l.kind=r.int32();break}case 7:{l.startTimeUnixNano=r.fixed64();break}case 8:{l.endTimeUnixNano=r.fixed64();break}case 9:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 10:{l.droppedAttributesCount=r.uint32();break}case 11:{l.events&&l.events.length||(l.events=[]),l.events.push(_.opentelemetry.proto.trace.v1.Span.Event.decode(r,r.uint32()));break}case 12:{l.droppedEventsCount=r.uint32();break}case 13:{l.links&&l.links.length||(l.links=[]),l.links.push(_.opentelemetry.proto.trace.v1.Span.Link.decode(r,r.uint32()));break}case 14:{l.droppedLinksCount=r.uint32();break}case 15:{l.status=_.opentelemetry.proto.trace.v1.Status.decode(r,r.uint32());break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.traceId!=null&&r.hasOwnProperty("traceId")&&!(r.traceId&&typeof r.traceId.length=="number"||f.isString(r.traceId)))return"traceId: buffer expected";if(r.spanId!=null&&r.hasOwnProperty("spanId")&&!(r.spanId&&typeof r.spanId.length=="number"||f.isString(r.spanId)))return"spanId: buffer expected";if(r.traceState!=null&&r.hasOwnProperty("traceState")&&!f.isString(r.traceState))return"traceState: string expected";if(r.parentSpanId!=null&&r.hasOwnProperty("parentSpanId")&&!(r.parentSpanId&&typeof r.parentSpanId.length=="number"||f.isString(r.parentSpanId)))return"parentSpanId: buffer expected";if(r.name!=null&&r.hasOwnProperty("name")&&!f.isString(r.name))return"name: string expected";if(r.kind!=null&&r.hasOwnProperty("kind"))switch(r.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(r.startTimeUnixNano!=null&&r.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(r.startTimeUnixNano)&&!(r.startTimeUnixNano&&f.isInteger(r.startTimeUnixNano.low)&&f.isInteger(r.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(r.endTimeUnixNano!=null&&r.hasOwnProperty("endTimeUnixNano")&&!f.isInteger(r.endTimeUnixNano)&&!(r.endTimeUnixNano&&f.isInteger(r.endTimeUnixNano.low)&&f.isInteger(r.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(r.attributes!=null&&r.hasOwnProperty("attributes")){if(!Array.isArray(r.attributes))return"attributes: array expected";for(var t=0;t<r.attributes.length;++t){var i=_.opentelemetry.proto.common.v1.KeyValue.verify(r.attributes[t]);if(i)return"attributes."+i}}if(r.droppedAttributesCount!=null&&r.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(r.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(r.events!=null&&r.hasOwnProperty("events")){if(!Array.isArray(r.events))return"events: array expected";for(var t=0;t<r.events.length;++t){var i=_.opentelemetry.proto.trace.v1.Span.Event.verify(r.events[t]);if(i)return"events."+i}}if(r.droppedEventsCount!=null&&r.hasOwnProperty("droppedEventsCount")&&!f.isInteger(r.droppedEventsCount))return"droppedEventsCount: integer expected";if(r.links!=null&&r.hasOwnProperty("links")){if(!Array.isArray(r.links))return"links: array expected";for(var t=0;t<r.links.length;++t){var i=_.opentelemetry.proto.trace.v1.Span.Link.verify(r.links[t]);if(i)return"links."+i}}if(r.droppedLinksCount!=null&&r.hasOwnProperty("droppedLinksCount")&&!f.isInteger(r.droppedLinksCount))return"droppedLinksCount: integer expected";if(r.status!=null&&r.hasOwnProperty("status")){var i=_.opentelemetry.proto.trace.v1.Status.verify(r.status);if(i)return"status."+i}return null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.trace.v1.Span)return r;var t=new _.opentelemetry.proto.trace.v1.Span;switch(r.traceId!=null&&(typeof r.traceId=="string"?f.base64.decode(r.traceId,t.traceId=f.newBuffer(f.base64.length(r.traceId)),0):r.traceId.length>=0&&(t.traceId=r.traceId)),r.spanId!=null&&(typeof r.spanId=="string"?f.base64.decode(r.spanId,t.spanId=f.newBuffer(f.base64.length(r.spanId)),0):r.spanId.length>=0&&(t.spanId=r.spanId)),r.traceState!=null&&(t.traceState=String(r.traceState)),r.parentSpanId!=null&&(typeof r.parentSpanId=="string"?f.base64.decode(r.parentSpanId,t.parentSpanId=f.newBuffer(f.base64.length(r.parentSpanId)),0):r.parentSpanId.length>=0&&(t.parentSpanId=r.parentSpanId)),r.name!=null&&(t.name=String(r.name)),r.kind){default:if(typeof r.kind=="number"){t.kind=r.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(r.startTimeUnixNano!=null&&(f.Long?(t.startTimeUnixNano=f.Long.fromValue(r.startTimeUnixNano)).unsigned=!1:typeof r.startTimeUnixNano=="string"?t.startTimeUnixNano=parseInt(r.startTimeUnixNano,10):typeof r.startTimeUnixNano=="number"?t.startTimeUnixNano=r.startTimeUnixNano:typeof r.startTimeUnixNano=="object"&&(t.startTimeUnixNano=new f.LongBits(r.startTimeUnixNano.low>>>0,r.startTimeUnixNano.high>>>0).toNumber())),r.endTimeUnixNano!=null&&(f.Long?(t.endTimeUnixNano=f.Long.fromValue(r.endTimeUnixNano)).unsigned=!1:typeof r.endTimeUnixNano=="string"?t.endTimeUnixNano=parseInt(r.endTimeUnixNano,10):typeof r.endTimeUnixNano=="number"?t.endTimeUnixNano=r.endTimeUnixNano:typeof r.endTimeUnixNano=="object"&&(t.endTimeUnixNano=new f.LongBits(r.endTimeUnixNano.low>>>0,r.endTimeUnixNano.high>>>0).toNumber())),r.attributes){if(!Array.isArray(r.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");t.attributes=[];for(var i=0;i<r.attributes.length;++i){if(typeof r.attributes[i]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");t.attributes[i]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(r.attributes[i])}}if(r.droppedAttributesCount!=null&&(t.droppedAttributesCount=r.droppedAttributesCount>>>0),r.events){if(!Array.isArray(r.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");t.events=[];for(var i=0;i<r.events.length;++i){if(typeof r.events[i]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");t.events[i]=_.opentelemetry.proto.trace.v1.Span.Event.fromObject(r.events[i])}}if(r.droppedEventsCount!=null&&(t.droppedEventsCount=r.droppedEventsCount>>>0),r.links){if(!Array.isArray(r.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");t.links=[];for(var i=0;i<r.links.length;++i){if(typeof r.links[i]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");t.links[i]=_.opentelemetry.proto.trace.v1.Span.Link.fromObject(r.links[i])}}if(r.droppedLinksCount!=null&&(t.droppedLinksCount=r.droppedLinksCount>>>0),r.status!=null){if(typeof r.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");t.status=_.opentelemetry.proto.trace.v1.Status.fromObject(r.status)}return t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.attributes=[],i.events=[],i.links=[]),t.defaults){if(t.bytes===String?i.traceId="":(i.traceId=[],t.bytes!==Array&&(i.traceId=f.newBuffer(i.traceId))),t.bytes===String?i.spanId="":(i.spanId=[],t.bytes!==Array&&(i.spanId=f.newBuffer(i.spanId))),i.traceState="",t.bytes===String?i.parentSpanId="":(i.parentSpanId=[],t.bytes!==Array&&(i.parentSpanId=f.newBuffer(i.parentSpanId))),i.name="",i.kind=t.enums===String?"SPAN_KIND_UNSPECIFIED":0,f.Long){var l=new f.Long(0,0,!1);i.startTimeUnixNano=t.longs===String?l.toString():t.longs===Number?l.toNumber():l}else i.startTimeUnixNano=t.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);i.endTimeUnixNano=t.longs===String?l.toString():t.longs===Number?l.toNumber():l}else i.endTimeUnixNano=t.longs===String?"0":0;i.droppedAttributesCount=0,i.droppedEventsCount=0,i.droppedLinksCount=0,i.status=null}if(r.traceId!=null&&r.hasOwnProperty("traceId")&&(i.traceId=t.bytes===String?f.base64.encode(r.traceId,0,r.traceId.length):t.bytes===Array?Array.prototype.slice.call(r.traceId):r.traceId),r.spanId!=null&&r.hasOwnProperty("spanId")&&(i.spanId=t.bytes===String?f.base64.encode(r.spanId,0,r.spanId.length):t.bytes===Array?Array.prototype.slice.call(r.spanId):r.spanId),r.traceState!=null&&r.hasOwnProperty("traceState")&&(i.traceState=r.traceState),r.parentSpanId!=null&&r.hasOwnProperty("parentSpanId")&&(i.parentSpanId=t.bytes===String?f.base64.encode(r.parentSpanId,0,r.parentSpanId.length):t.bytes===Array?Array.prototype.slice.call(r.parentSpanId):r.parentSpanId),r.name!=null&&r.hasOwnProperty("name")&&(i.name=r.name),r.kind!=null&&r.hasOwnProperty("kind")&&(i.kind=t.enums===String?_.opentelemetry.proto.trace.v1.Span.SpanKind[r.kind]===void 0?r.kind:_.opentelemetry.proto.trace.v1.Span.SpanKind[r.kind]:r.kind),r.startTimeUnixNano!=null&&r.hasOwnProperty("startTimeUnixNano")&&(typeof r.startTimeUnixNano=="number"?i.startTimeUnixNano=t.longs===String?String(r.startTimeUnixNano):r.startTimeUnixNano:i.startTimeUnixNano=t.longs===String?f.Long.prototype.toString.call(r.startTimeUnixNano):t.longs===Number?new f.LongBits(r.startTimeUnixNano.low>>>0,r.startTimeUnixNano.high>>>0).toNumber():r.startTimeUnixNano),r.endTimeUnixNano!=null&&r.hasOwnProperty("endTimeUnixNano")&&(typeof r.endTimeUnixNano=="number"?i.endTimeUnixNano=t.longs===String?String(r.endTimeUnixNano):r.endTimeUnixNano:i.endTimeUnixNano=t.longs===String?f.Long.prototype.toString.call(r.endTimeUnixNano):t.longs===Number?new f.LongBits(r.endTimeUnixNano.low>>>0,r.endTimeUnixNano.high>>>0).toNumber():r.endTimeUnixNano),r.attributes&&r.attributes.length){i.attributes=[];for(var p=0;p<r.attributes.length;++p)i.attributes[p]=_.opentelemetry.proto.common.v1.KeyValue.toObject(r.attributes[p],t)}if(r.droppedAttributesCount!=null&&r.hasOwnProperty("droppedAttributesCount")&&(i.droppedAttributesCount=r.droppedAttributesCount),r.events&&r.events.length){i.events=[];for(var p=0;p<r.events.length;++p)i.events[p]=_.opentelemetry.proto.trace.v1.Span.Event.toObject(r.events[p],t)}if(r.droppedEventsCount!=null&&r.hasOwnProperty("droppedEventsCount")&&(i.droppedEventsCount=r.droppedEventsCount),r.links&&r.links.length){i.links=[];for(var p=0;p<r.links.length;++p)i.links[p]=_.opentelemetry.proto.trace.v1.Span.Link.toObject(r.links[p],t)}return r.droppedLinksCount!=null&&r.hasOwnProperty("droppedLinksCount")&&(i.droppedLinksCount=r.droppedLinksCount),r.status!=null&&r.hasOwnProperty("status")&&(i.status=_.opentelemetry.proto.trace.v1.Status.toObject(r.status,t)),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.trace.v1.Span"},"getTypeUrl"),s.SpanKind=function(){var u={},r=Object.create(u);return r[u[0]="SPAN_KIND_UNSPECIFIED"]=0,r[u[1]="SPAN_KIND_INTERNAL"]=1,r[u[2]="SPAN_KIND_SERVER"]=2,r[u[3]="SPAN_KIND_CLIENT"]=3,r[u[4]="SPAN_KIND_PRODUCER"]=4,r[u[5]="SPAN_KIND_CONSUMER"]=5,r}(),s.Event=function(){function u(r){if(this.attributes=[],r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}return c(u,"Event"),u.prototype.timeUnixNano=null,u.prototype.name=null,u.prototype.attributes=f.emptyArray,u.prototype.droppedAttributesCount=null,u.create=c(function(t){return new u(t)},"create"),u.encode=c(function(t,i){if(i||(i=K.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&i.uint32(9).fixed64(t.timeUnixNano),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&i.uint32(18).string(t.name),t.attributes!=null&&t.attributes.length)for(var l=0;l<t.attributes.length;++l)_.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[l],i.uint32(26).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&i.uint32(32).uint32(t.droppedAttributesCount),i},"encode"),u.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),u.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.trace.v1.Span.Event;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.timeUnixNano=t.fixed64();break}case 2:{p.name=t.string();break}case 3:{p.attributes&&p.attributes.length||(p.attributes=[]),p.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{p.droppedAttributesCount=t.uint32();break}default:t.skipType(E&7);break}}return p},"decode"),u.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),u.verify=c(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 i=0;i<t.attributes.length;++i){var l=_.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[i]);if(l)return"attributes."+l}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},"verify"),u.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.trace.v1.Span.Event)return t;var i=new _.opentelemetry.proto.trace.v1.Span.Event;if(t.timeUnixNano!=null&&(f.Long?(i.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?i.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?i.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(i.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.name!=null&&(i.name=String(t.name)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");i.attributes=[];for(var l=0;l<t.attributes.length;++l){if(typeof t.attributes[l]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");i.attributes[l]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[l])}}return t.droppedAttributesCount!=null&&(i.droppedAttributesCount=t.droppedAttributesCount>>>0),i},"fromObject"),u.toObject=c(function(t,i){i||(i={});var l={};if((i.arrays||i.defaults)&&(l.attributes=[]),i.defaults){if(f.Long){var p=new f.Long(0,0,!1);l.timeUnixNano=i.longs===String?p.toString():i.longs===Number?p.toNumber():p}else l.timeUnixNano=i.longs===String?"0":0;l.name="",l.droppedAttributesCount=0}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?l.timeUnixNano=i.longs===String?String(t.timeUnixNano):t.timeUnixNano:l.timeUnixNano=i.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):i.longs===Number?new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.name!=null&&t.hasOwnProperty("name")&&(l.name=t.name),t.attributes&&t.attributes.length){l.attributes=[];for(var E=0;E<t.attributes.length;++E)l.attributes[E]=_.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[E],i)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(l.droppedAttributesCount=t.droppedAttributesCount),l},"toObject"),u.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),u.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span.Event"},"getTypeUrl"),u}(),s.Link=function(){function u(r){if(this.attributes=[],r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}return c(u,"Link"),u.prototype.traceId=null,u.prototype.spanId=null,u.prototype.traceState=null,u.prototype.attributes=f.emptyArray,u.prototype.droppedAttributesCount=null,u.create=c(function(t){return new u(t)},"create"),u.encode=c(function(t,i){if(i||(i=K.create()),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&i.uint32(10).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&i.uint32(18).bytes(t.spanId),t.traceState!=null&&Object.hasOwnProperty.call(t,"traceState")&&i.uint32(26).string(t.traceState),t.attributes!=null&&t.attributes.length)for(var l=0;l<t.attributes.length;++l)_.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[l],i.uint32(34).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&i.uint32(40).uint32(t.droppedAttributesCount),i},"encode"),u.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),u.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.trace.v1.Span.Link;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.traceId=t.bytes();break}case 2:{p.spanId=t.bytes();break}case 3:{p.traceState=t.string();break}case 4:{p.attributes&&p.attributes.length||(p.attributes=[]),p.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 5:{p.droppedAttributesCount=t.uint32();break}default:t.skipType(E&7);break}}return p},"decode"),u.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),u.verify=c(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 i=0;i<t.attributes.length;++i){var l=_.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[i]);if(l)return"attributes."+l}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},"verify"),u.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.trace.v1.Span.Link)return t;var i=new _.opentelemetry.proto.trace.v1.Span.Link;if(t.traceId!=null&&(typeof t.traceId=="string"?f.base64.decode(t.traceId,i.traceId=f.newBuffer(f.base64.length(t.traceId)),0):t.traceId.length>=0&&(i.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?f.base64.decode(t.spanId,i.spanId=f.newBuffer(f.base64.length(t.spanId)),0):t.spanId.length>=0&&(i.spanId=t.spanId)),t.traceState!=null&&(i.traceState=String(t.traceState)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");i.attributes=[];for(var l=0;l<t.attributes.length;++l){if(typeof t.attributes[l]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");i.attributes[l]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[l])}}return t.droppedAttributesCount!=null&&(i.droppedAttributesCount=t.droppedAttributesCount>>>0),i},"fromObject"),u.toObject=c(function(t,i){i||(i={});var l={};if((i.arrays||i.defaults)&&(l.attributes=[]),i.defaults&&(i.bytes===String?l.traceId="":(l.traceId=[],i.bytes!==Array&&(l.traceId=f.newBuffer(l.traceId))),i.bytes===String?l.spanId="":(l.spanId=[],i.bytes!==Array&&(l.spanId=f.newBuffer(l.spanId))),l.traceState="",l.droppedAttributesCount=0),t.traceId!=null&&t.hasOwnProperty("traceId")&&(l.traceId=i.bytes===String?f.base64.encode(t.traceId,0,t.traceId.length):i.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(l.spanId=i.bytes===String?f.base64.encode(t.spanId,0,t.spanId.length):i.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceState!=null&&t.hasOwnProperty("traceState")&&(l.traceState=t.traceState),t.attributes&&t.attributes.length){l.attributes=[];for(var p=0;p<t.attributes.length;++p)l.attributes[p]=_.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[p],i)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(l.droppedAttributesCount=t.droppedAttributesCount),l},"toObject"),u.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),u.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span.Link"},"getTypeUrl"),u}(),s}(),a.Status=function(){function s(u){if(u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"Status"),s.prototype.message=null,s.prototype.code=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){return t||(t=K.create()),r.message!=null&&Object.hasOwnProperty.call(r,"message")&&t.uint32(18).string(r.message),r.code!=null&&Object.hasOwnProperty.call(r,"code")&&t.uint32(24).int32(r.code),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.trace.v1.Status;r.pos<i;){var p=r.uint32();switch(p>>>3){case 2:{l.message=r.string();break}case 3:{l.code=r.int32();break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.message!=null&&r.hasOwnProperty("message")&&!f.isString(r.message))return"message: string expected";if(r.code!=null&&r.hasOwnProperty("code"))switch(r.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.trace.v1.Status)return r;var t=new _.opentelemetry.proto.trace.v1.Status;switch(r.message!=null&&(t.message=String(r.message)),r.code){default:if(typeof r.code=="number"){t.code=r.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},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};return t.defaults&&(i.message="",i.code=t.enums===String?"STATUS_CODE_UNSET":0),r.message!=null&&r.hasOwnProperty("message")&&(i.message=r.message),r.code!=null&&r.hasOwnProperty("code")&&(i.code=t.enums===String?_.opentelemetry.proto.trace.v1.Status.StatusCode[r.code]===void 0?r.code:_.opentelemetry.proto.trace.v1.Status.StatusCode[r.code]:r.code),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.trace.v1.Status"},"getTypeUrl"),s.StatusCode=function(){var u={},r=Object.create(u);return r[u[0]="STATUS_CODE_UNSET"]=0,r[u[1]="STATUS_CODE_OK"]=1,r[u[2]="STATUS_CODE_ERROR"]=2,r}(),s}(),a}(),o}(),e.collector=function(){var o={};return o.trace=function(){var a={};return a.v1=function(){var s={};return s.TraceService=function(){function u(r,t,i){U.rpc.Service.call(this,r,t,i)}return c(u,"TraceService"),(u.prototype=Object.create(U.rpc.Service.prototype)).constructor=u,u.create=c(function(t,i,l){return new this(t,i,l)},"create"),Object.defineProperty(u.prototype.export=c(function r(t,i){return this.rpcCall(r,_.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,_.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,t,i)},"export_"),"name",{value:"Export"}),u}(),s.ExportTraceServiceRequest=function(){function u(r){if(this.resourceSpans=[],r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}return c(u,"ExportTraceServiceRequest"),u.prototype.resourceSpans=f.emptyArray,u.create=c(function(t){return new u(t)},"create"),u.encode=c(function(t,i){if(i||(i=K.create()),t.resourceSpans!=null&&t.resourceSpans.length)for(var l=0;l<t.resourceSpans.length;++l)_.opentelemetry.proto.trace.v1.ResourceSpans.encode(t.resourceSpans[l],i.uint32(10).fork()).ldelim();return i},"encode"),u.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),u.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.resourceSpans&&p.resourceSpans.length||(p.resourceSpans=[]),p.resourceSpans.push(_.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(E&7);break}}return p},"decode"),u.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),u.verify=c(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 i=0;i<t.resourceSpans.length;++i){var l=_.opentelemetry.proto.trace.v1.ResourceSpans.verify(t.resourceSpans[i]);if(l)return"resourceSpans."+l}}return null},"verify"),u.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return t;var i=new _.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");i.resourceSpans=[];for(var l=0;l<t.resourceSpans.length;++l){if(typeof t.resourceSpans[l]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");i.resourceSpans[l]=_.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(t.resourceSpans[l])}}return i},"fromObject"),u.toObject=c(function(t,i){i||(i={});var l={};if((i.arrays||i.defaults)&&(l.resourceSpans=[]),t.resourceSpans&&t.resourceSpans.length){l.resourceSpans=[];for(var p=0;p<t.resourceSpans.length;++p)l.resourceSpans[p]=_.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[p],i)}return l},"toObject"),u.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),u.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},"getTypeUrl"),u}(),s.ExportTraceServiceResponse=function(){function u(r){if(r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}return c(u,"ExportTraceServiceResponse"),u.prototype.partialSuccess=null,u.create=c(function(t){return new u(t)},"create"),u.encode=c(function(t,i){return i||(i=K.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&_.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(t.partialSuccess,i.uint32(10).fork()).ldelim(),i},"encode"),u.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),u.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.partialSuccess=_.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(t,t.uint32());break}default:t.skipType(E&7);break}}return p},"decode"),u.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),u.verify=c(function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var i=_.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(t.partialSuccess);if(i)return"partialSuccess."+i}return null},"verify"),u.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return t;var i=new _.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");i.partialSuccess=_.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(t.partialSuccess)}return i},"fromObject"),u.toObject=c(function(t,i){i||(i={});var l={};return i.defaults&&(l.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(l.partialSuccess=_.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(t.partialSuccess,i)),l},"toObject"),u.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),u.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},"getTypeUrl"),u}(),s.ExportTracePartialSuccess=function(){function u(r){if(r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}return c(u,"ExportTracePartialSuccess"),u.prototype.rejectedSpans=null,u.prototype.errorMessage=null,u.create=c(function(t){return new u(t)},"create"),u.encode=c(function(t,i){return i||(i=K.create()),t.rejectedSpans!=null&&Object.hasOwnProperty.call(t,"rejectedSpans")&&i.uint32(8).int64(t.rejectedSpans),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&i.uint32(18).string(t.errorMessage),i},"encode"),u.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),u.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.rejectedSpans=t.int64();break}case 2:{p.errorMessage=t.string();break}default:t.skipType(E&7);break}}return p},"decode"),u.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),u.verify=c(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},"verify"),u.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return t;var i=new _.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return t.rejectedSpans!=null&&(f.Long?(i.rejectedSpans=f.Long.fromValue(t.rejectedSpans)).unsigned=!1:typeof t.rejectedSpans=="string"?i.rejectedSpans=parseInt(t.rejectedSpans,10):typeof t.rejectedSpans=="number"?i.rejectedSpans=t.rejectedSpans:typeof t.rejectedSpans=="object"&&(i.rejectedSpans=new f.LongBits(t.rejectedSpans.low>>>0,t.rejectedSpans.high>>>0).toNumber())),t.errorMessage!=null&&(i.errorMessage=String(t.errorMessage)),i},"fromObject"),u.toObject=c(function(t,i){i||(i={});var l={};if(i.defaults){if(f.Long){var p=new f.Long(0,0,!1);l.rejectedSpans=i.longs===String?p.toString():i.longs===Number?p.toNumber():p}else l.rejectedSpans=i.longs===String?"0":0;l.errorMessage=""}return t.rejectedSpans!=null&&t.hasOwnProperty("rejectedSpans")&&(typeof t.rejectedSpans=="number"?l.rejectedSpans=i.longs===String?String(t.rejectedSpans):t.rejectedSpans:l.rejectedSpans=i.longs===String?f.Long.prototype.toString.call(t.rejectedSpans):i.longs===Number?new f.LongBits(t.rejectedSpans.low>>>0,t.rejectedSpans.high>>>0).toNumber():t.rejectedSpans),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(l.errorMessage=t.errorMessage),l},"toObject"),u.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),u.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},"getTypeUrl"),u}(),s}(),a}(),o.metrics=function(){var a={};return a.v1=function(){var s={};return s.MetricsService=function(){function u(r,t,i){U.rpc.Service.call(this,r,t,i)}return c(u,"MetricsService"),(u.prototype=Object.create(U.rpc.Service.prototype)).constructor=u,u.create=c(function(t,i,l){return new this(t,i,l)},"create"),Object.defineProperty(u.prototype.export=c(function r(t,i){return this.rpcCall(r,_.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,_.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,t,i)},"export_"),"name",{value:"Export"}),u}(),s.ExportMetricsServiceRequest=function(){function u(r){if(this.resourceMetrics=[],r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}return c(u,"ExportMetricsServiceRequest"),u.prototype.resourceMetrics=f.emptyArray,u.create=c(function(t){return new u(t)},"create"),u.encode=c(function(t,i){if(i||(i=K.create()),t.resourceMetrics!=null&&t.resourceMetrics.length)for(var l=0;l<t.resourceMetrics.length;++l)_.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(t.resourceMetrics[l],i.uint32(10).fork()).ldelim();return i},"encode"),u.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),u.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.resourceMetrics&&p.resourceMetrics.length||(p.resourceMetrics=[]),p.resourceMetrics.push(_.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(E&7);break}}return p},"decode"),u.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),u.verify=c(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 i=0;i<t.resourceMetrics.length;++i){var l=_.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(t.resourceMetrics[i]);if(l)return"resourceMetrics."+l}}return null},"verify"),u.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return t;var i=new _.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");i.resourceMetrics=[];for(var l=0;l<t.resourceMetrics.length;++l){if(typeof t.resourceMetrics[l]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");i.resourceMetrics[l]=_.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(t.resourceMetrics[l])}}return i},"fromObject"),u.toObject=c(function(t,i){i||(i={});var l={};if((i.arrays||i.defaults)&&(l.resourceMetrics=[]),t.resourceMetrics&&t.resourceMetrics.length){l.resourceMetrics=[];for(var p=0;p<t.resourceMetrics.length;++p)l.resourceMetrics[p]=_.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[p],i)}return l},"toObject"),u.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),u.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},"getTypeUrl"),u}(),s.ExportMetricsServiceResponse=function(){function u(r){if(r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}return c(u,"ExportMetricsServiceResponse"),u.prototype.partialSuccess=null,u.create=c(function(t){return new u(t)},"create"),u.encode=c(function(t,i){return i||(i=K.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&_.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(t.partialSuccess,i.uint32(10).fork()).ldelim(),i},"encode"),u.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),u.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.partialSuccess=_.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(t,t.uint32());break}default:t.skipType(E&7);break}}return p},"decode"),u.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),u.verify=c(function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var i=_.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(t.partialSuccess);if(i)return"partialSuccess."+i}return null},"verify"),u.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return t;var i=new _.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");i.partialSuccess=_.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(t.partialSuccess)}return i},"fromObject"),u.toObject=c(function(t,i){i||(i={});var l={};return i.defaults&&(l.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(l.partialSuccess=_.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(t.partialSuccess,i)),l},"toObject"),u.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),u.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},"getTypeUrl"),u}(),s.ExportMetricsPartialSuccess=function(){function u(r){if(r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}return c(u,"ExportMetricsPartialSuccess"),u.prototype.rejectedDataPoints=null,u.prototype.errorMessage=null,u.create=c(function(t){return new u(t)},"create"),u.encode=c(function(t,i){return i||(i=K.create()),t.rejectedDataPoints!=null&&Object.hasOwnProperty.call(t,"rejectedDataPoints")&&i.uint32(8).int64(t.rejectedDataPoints),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&i.uint32(18).string(t.errorMessage),i},"encode"),u.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),u.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.rejectedDataPoints=t.int64();break}case 2:{p.errorMessage=t.string();break}default:t.skipType(E&7);break}}return p},"decode"),u.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),u.verify=c(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},"verify"),u.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return t;var i=new _.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return t.rejectedDataPoints!=null&&(f.Long?(i.rejectedDataPoints=f.Long.fromValue(t.rejectedDataPoints)).unsigned=!1:typeof t.rejectedDataPoints=="string"?i.rejectedDataPoints=parseInt(t.rejectedDataPoints,10):typeof t.rejectedDataPoints=="number"?i.rejectedDataPoints=t.rejectedDataPoints:typeof t.rejectedDataPoints=="object"&&(i.rejectedDataPoints=new f.LongBits(t.rejectedDataPoints.low>>>0,t.rejectedDataPoints.high>>>0).toNumber())),t.errorMessage!=null&&(i.errorMessage=String(t.errorMessage)),i},"fromObject"),u.toObject=c(function(t,i){i||(i={});var l={};if(i.defaults){if(f.Long){var p=new f.Long(0,0,!1);l.rejectedDataPoints=i.longs===String?p.toString():i.longs===Number?p.toNumber():p}else l.rejectedDataPoints=i.longs===String?"0":0;l.errorMessage=""}return t.rejectedDataPoints!=null&&t.hasOwnProperty("rejectedDataPoints")&&(typeof t.rejectedDataPoints=="number"?l.rejectedDataPoints=i.longs===String?String(t.rejectedDataPoints):t.rejectedDataPoints:l.rejectedDataPoints=i.longs===String?f.Long.prototype.toString.call(t.rejectedDataPoints):i.longs===Number?new f.LongBits(t.rejectedDataPoints.low>>>0,t.rejectedDataPoints.high>>>0).toNumber():t.rejectedDataPoints),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(l.errorMessage=t.errorMessage),l},"toObject"),u.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),u.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},"getTypeUrl"),u}(),s}(),a}(),o.logs=function(){var a={};return a.v1=function(){var s={};return s.LogsService=function(){function u(r,t,i){U.rpc.Service.call(this,r,t,i)}return c(u,"LogsService"),(u.prototype=Object.create(U.rpc.Service.prototype)).constructor=u,u.create=c(function(t,i,l){return new this(t,i,l)},"create"),Object.defineProperty(u.prototype.export=c(function r(t,i){return this.rpcCall(r,_.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,_.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,t,i)},"export_"),"name",{value:"Export"}),u}(),s.ExportLogsServiceRequest=function(){function u(r){if(this.resourceLogs=[],r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}return c(u,"ExportLogsServiceRequest"),u.prototype.resourceLogs=f.emptyArray,u.create=c(function(t){return new u(t)},"create"),u.encode=c(function(t,i){if(i||(i=K.create()),t.resourceLogs!=null&&t.resourceLogs.length)for(var l=0;l<t.resourceLogs.length;++l)_.opentelemetry.proto.logs.v1.ResourceLogs.encode(t.resourceLogs[l],i.uint32(10).fork()).ldelim();return i},"encode"),u.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),u.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.resourceLogs&&p.resourceLogs.length||(p.resourceLogs=[]),p.resourceLogs.push(_.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(E&7);break}}return p},"decode"),u.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),u.verify=c(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 i=0;i<t.resourceLogs.length;++i){var l=_.opentelemetry.proto.logs.v1.ResourceLogs.verify(t.resourceLogs[i]);if(l)return"resourceLogs."+l}}return null},"verify"),u.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return t;var i=new _.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");i.resourceLogs=[];for(var l=0;l<t.resourceLogs.length;++l){if(typeof t.resourceLogs[l]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");i.resourceLogs[l]=_.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(t.resourceLogs[l])}}return i},"fromObject"),u.toObject=c(function(t,i){i||(i={});var l={};if((i.arrays||i.defaults)&&(l.resourceLogs=[]),t.resourceLogs&&t.resourceLogs.length){l.resourceLogs=[];for(var p=0;p<t.resourceLogs.length;++p)l.resourceLogs[p]=_.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[p],i)}return l},"toObject"),u.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),u.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},"getTypeUrl"),u}(),s.ExportLogsServiceResponse=function(){function u(r){if(r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}return c(u,"ExportLogsServiceResponse"),u.prototype.partialSuccess=null,u.create=c(function(t){return new u(t)},"create"),u.encode=c(function(t,i){return i||(i=K.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&_.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(t.partialSuccess,i.uint32(10).fork()).ldelim(),i},"encode"),u.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),u.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.partialSuccess=_.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(t,t.uint32());break}default:t.skipType(E&7);break}}return p},"decode"),u.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),u.verify=c(function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var i=_.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(t.partialSuccess);if(i)return"partialSuccess."+i}return null},"verify"),u.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return t;var i=new _.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");i.partialSuccess=_.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(t.partialSuccess)}return i},"fromObject"),u.toObject=c(function(t,i){i||(i={});var l={};return i.defaults&&(l.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(l.partialSuccess=_.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(t.partialSuccess,i)),l},"toObject"),u.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),u.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},"getTypeUrl"),u}(),s.ExportLogsPartialSuccess=function(){function u(r){if(r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}return c(u,"ExportLogsPartialSuccess"),u.prototype.rejectedLogRecords=null,u.prototype.errorMessage=null,u.create=c(function(t){return new u(t)},"create"),u.encode=c(function(t,i){return i||(i=K.create()),t.rejectedLogRecords!=null&&Object.hasOwnProperty.call(t,"rejectedLogRecords")&&i.uint32(8).int64(t.rejectedLogRecords),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&i.uint32(18).string(t.errorMessage),i},"encode"),u.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),u.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.rejectedLogRecords=t.int64();break}case 2:{p.errorMessage=t.string();break}default:t.skipType(E&7);break}}return p},"decode"),u.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),u.verify=c(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},"verify"),u.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return t;var i=new _.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return t.rejectedLogRecords!=null&&(f.Long?(i.rejectedLogRecords=f.Long.fromValue(t.rejectedLogRecords)).unsigned=!1:typeof t.rejectedLogRecords=="string"?i.rejectedLogRecords=parseInt(t.rejectedLogRecords,10):typeof t.rejectedLogRecords=="number"?i.rejectedLogRecords=t.rejectedLogRecords:typeof t.rejectedLogRecords=="object"&&(i.rejectedLogRecords=new f.LongBits(t.rejectedLogRecords.low>>>0,t.rejectedLogRecords.high>>>0).toNumber())),t.errorMessage!=null&&(i.errorMessage=String(t.errorMessage)),i},"fromObject"),u.toObject=c(function(t,i){i||(i={});var l={};if(i.defaults){if(f.Long){var p=new f.Long(0,0,!1);l.rejectedLogRecords=i.longs===String?p.toString():i.longs===Number?p.toNumber():p}else l.rejectedLogRecords=i.longs===String?"0":0;l.errorMessage=""}return t.rejectedLogRecords!=null&&t.hasOwnProperty("rejectedLogRecords")&&(typeof t.rejectedLogRecords=="number"?l.rejectedLogRecords=i.longs===String?String(t.rejectedLogRecords):t.rejectedLogRecords:l.rejectedLogRecords=i.longs===String?f.Long.prototype.toString.call(t.rejectedLogRecords):i.longs===Number?new f.LongBits(t.rejectedLogRecords.low>>>0,t.rejectedLogRecords.high>>>0).toNumber():t.rejectedLogRecords),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(l.errorMessage=t.errorMessage),l},"toObject"),u.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),u.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},"getTypeUrl"),u}(),s}(),a}(),o}(),e.metrics=function(){var o={};return o.v1=function(){var a={};return a.MetricsData=function(){function s(u){if(this.resourceMetrics=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"MetricsData"),s.prototype.resourceMetrics=f.emptyArray,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.resourceMetrics!=null&&r.resourceMetrics.length)for(var i=0;i<r.resourceMetrics.length;++i)_.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(r.resourceMetrics[i],t.uint32(10).fork()).ldelim();return t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.metrics.v1.MetricsData;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.resourceMetrics&&l.resourceMetrics.length||(l.resourceMetrics=[]),l.resourceMetrics.push(_.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(r,r.uint32()));break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.resourceMetrics!=null&&r.hasOwnProperty("resourceMetrics")){if(!Array.isArray(r.resourceMetrics))return"resourceMetrics: array expected";for(var t=0;t<r.resourceMetrics.length;++t){var i=_.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(r.resourceMetrics[t]);if(i)return"resourceMetrics."+i}}return null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.MetricsData)return r;var t=new _.opentelemetry.proto.metrics.v1.MetricsData;if(r.resourceMetrics){if(!Array.isArray(r.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");t.resourceMetrics=[];for(var i=0;i<r.resourceMetrics.length;++i){if(typeof r.resourceMetrics[i]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");t.resourceMetrics[i]=_.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(r.resourceMetrics[i])}}return t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.resourceMetrics=[]),r.resourceMetrics&&r.resourceMetrics.length){i.resourceMetrics=[];for(var l=0;l<r.resourceMetrics.length;++l)i.resourceMetrics[l]=_.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(r.resourceMetrics[l],t)}return i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.MetricsData"},"getTypeUrl"),s}(),a.ResourceMetrics=function(){function s(u){if(this.scopeMetrics=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"ResourceMetrics"),s.prototype.resource=null,s.prototype.scopeMetrics=f.emptyArray,s.prototype.schemaUrl=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.resource!=null&&Object.hasOwnProperty.call(r,"resource")&&_.opentelemetry.proto.resource.v1.Resource.encode(r.resource,t.uint32(10).fork()).ldelim(),r.scopeMetrics!=null&&r.scopeMetrics.length)for(var i=0;i<r.scopeMetrics.length;++i)_.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(r.scopeMetrics[i],t.uint32(18).fork()).ldelim();return r.schemaUrl!=null&&Object.hasOwnProperty.call(r,"schemaUrl")&&t.uint32(26).string(r.schemaUrl),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.metrics.v1.ResourceMetrics;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.resource=_.opentelemetry.proto.resource.v1.Resource.decode(r,r.uint32());break}case 2:{l.scopeMetrics&&l.scopeMetrics.length||(l.scopeMetrics=[]),l.scopeMetrics.push(_.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(r,r.uint32()));break}case 3:{l.schemaUrl=r.string();break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.resource!=null&&r.hasOwnProperty("resource")){var t=_.opentelemetry.proto.resource.v1.Resource.verify(r.resource);if(t)return"resource."+t}if(r.scopeMetrics!=null&&r.hasOwnProperty("scopeMetrics")){if(!Array.isArray(r.scopeMetrics))return"scopeMetrics: array expected";for(var i=0;i<r.scopeMetrics.length;++i){var t=_.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(r.scopeMetrics[i]);if(t)return"scopeMetrics."+t}}return r.schemaUrl!=null&&r.hasOwnProperty("schemaUrl")&&!f.isString(r.schemaUrl)?"schemaUrl: string expected":null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.ResourceMetrics)return r;var t=new _.opentelemetry.proto.metrics.v1.ResourceMetrics;if(r.resource!=null){if(typeof r.resource!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");t.resource=_.opentelemetry.proto.resource.v1.Resource.fromObject(r.resource)}if(r.scopeMetrics){if(!Array.isArray(r.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");t.scopeMetrics=[];for(var i=0;i<r.scopeMetrics.length;++i){if(typeof r.scopeMetrics[i]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");t.scopeMetrics[i]=_.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(r.scopeMetrics[i])}}return r.schemaUrl!=null&&(t.schemaUrl=String(r.schemaUrl)),t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.scopeMetrics=[]),t.defaults&&(i.resource=null,i.schemaUrl=""),r.resource!=null&&r.hasOwnProperty("resource")&&(i.resource=_.opentelemetry.proto.resource.v1.Resource.toObject(r.resource,t)),r.scopeMetrics&&r.scopeMetrics.length){i.scopeMetrics=[];for(var l=0;l<r.scopeMetrics.length;++l)i.scopeMetrics[l]=_.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(r.scopeMetrics[l],t)}return r.schemaUrl!=null&&r.hasOwnProperty("schemaUrl")&&(i.schemaUrl=r.schemaUrl),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},"getTypeUrl"),s}(),a.ScopeMetrics=function(){function s(u){if(this.metrics=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"ScopeMetrics"),s.prototype.scope=null,s.prototype.metrics=f.emptyArray,s.prototype.schemaUrl=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.scope!=null&&Object.hasOwnProperty.call(r,"scope")&&_.opentelemetry.proto.common.v1.InstrumentationScope.encode(r.scope,t.uint32(10).fork()).ldelim(),r.metrics!=null&&r.metrics.length)for(var i=0;i<r.metrics.length;++i)_.opentelemetry.proto.metrics.v1.Metric.encode(r.metrics[i],t.uint32(18).fork()).ldelim();return r.schemaUrl!=null&&Object.hasOwnProperty.call(r,"schemaUrl")&&t.uint32(26).string(r.schemaUrl),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.metrics.v1.ScopeMetrics;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.decode(r,r.uint32());break}case 2:{l.metrics&&l.metrics.length||(l.metrics=[]),l.metrics.push(_.opentelemetry.proto.metrics.v1.Metric.decode(r,r.uint32()));break}case 3:{l.schemaUrl=r.string();break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.scope!=null&&r.hasOwnProperty("scope")){var t=_.opentelemetry.proto.common.v1.InstrumentationScope.verify(r.scope);if(t)return"scope."+t}if(r.metrics!=null&&r.hasOwnProperty("metrics")){if(!Array.isArray(r.metrics))return"metrics: array expected";for(var i=0;i<r.metrics.length;++i){var t=_.opentelemetry.proto.metrics.v1.Metric.verify(r.metrics[i]);if(t)return"metrics."+t}}return r.schemaUrl!=null&&r.hasOwnProperty("schemaUrl")&&!f.isString(r.schemaUrl)?"schemaUrl: string expected":null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.ScopeMetrics)return r;var t=new _.opentelemetry.proto.metrics.v1.ScopeMetrics;if(r.scope!=null){if(typeof r.scope!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");t.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(r.scope)}if(r.metrics){if(!Array.isArray(r.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");t.metrics=[];for(var i=0;i<r.metrics.length;++i){if(typeof r.metrics[i]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");t.metrics[i]=_.opentelemetry.proto.metrics.v1.Metric.fromObject(r.metrics[i])}}return r.schemaUrl!=null&&(t.schemaUrl=String(r.schemaUrl)),t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.metrics=[]),t.defaults&&(i.scope=null,i.schemaUrl=""),r.scope!=null&&r.hasOwnProperty("scope")&&(i.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.toObject(r.scope,t)),r.metrics&&r.metrics.length){i.metrics=[];for(var l=0;l<r.metrics.length;++l)i.metrics[l]=_.opentelemetry.proto.metrics.v1.Metric.toObject(r.metrics[l],t)}return r.schemaUrl!=null&&r.hasOwnProperty("schemaUrl")&&(i.schemaUrl=r.schemaUrl),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},"getTypeUrl"),s}(),a.Metric=function(){function s(r){if(r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}c(s,"Metric"),s.prototype.name=null,s.prototype.description=null,s.prototype.unit=null,s.prototype.gauge=null,s.prototype.sum=null,s.prototype.histogram=null,s.prototype.exponentialHistogram=null,s.prototype.summary=null;var u;return Object.defineProperty(s.prototype,"data",{get:f.oneOfGetter(u=["gauge","sum","histogram","exponentialHistogram","summary"]),set:f.oneOfSetter(u)}),s.create=c(function(t){return new s(t)},"create"),s.encode=c(function(t,i){return i||(i=K.create()),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&i.uint32(10).string(t.name),t.description!=null&&Object.hasOwnProperty.call(t,"description")&&i.uint32(18).string(t.description),t.unit!=null&&Object.hasOwnProperty.call(t,"unit")&&i.uint32(26).string(t.unit),t.gauge!=null&&Object.hasOwnProperty.call(t,"gauge")&&_.opentelemetry.proto.metrics.v1.Gauge.encode(t.gauge,i.uint32(42).fork()).ldelim(),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&_.opentelemetry.proto.metrics.v1.Sum.encode(t.sum,i.uint32(58).fork()).ldelim(),t.histogram!=null&&Object.hasOwnProperty.call(t,"histogram")&&_.opentelemetry.proto.metrics.v1.Histogram.encode(t.histogram,i.uint32(74).fork()).ldelim(),t.exponentialHistogram!=null&&Object.hasOwnProperty.call(t,"exponentialHistogram")&&_.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(t.exponentialHistogram,i.uint32(82).fork()).ldelim(),t.summary!=null&&Object.hasOwnProperty.call(t,"summary")&&_.opentelemetry.proto.metrics.v1.Summary.encode(t.summary,i.uint32(90).fork()).ldelim(),i},"encode"),s.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),s.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.metrics.v1.Metric;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.name=t.string();break}case 2:{p.description=t.string();break}case 3:{p.unit=t.string();break}case 5:{p.gauge=_.opentelemetry.proto.metrics.v1.Gauge.decode(t,t.uint32());break}case 7:{p.sum=_.opentelemetry.proto.metrics.v1.Sum.decode(t,t.uint32());break}case 9:{p.histogram=_.opentelemetry.proto.metrics.v1.Histogram.decode(t,t.uint32());break}case 10:{p.exponentialHistogram=_.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(t,t.uint32());break}case 11:{p.summary=_.opentelemetry.proto.metrics.v1.Summary.decode(t,t.uint32());break}default:t.skipType(E&7);break}}return p},"decode"),s.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),s.verify=c(function(t){if(typeof t!="object"||t===null)return"object expected";var i={};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")){i.data=1;{var l=_.opentelemetry.proto.metrics.v1.Gauge.verify(t.gauge);if(l)return"gauge."+l}}if(t.sum!=null&&t.hasOwnProperty("sum")){if(i.data===1)return"data: multiple values";i.data=1;{var l=_.opentelemetry.proto.metrics.v1.Sum.verify(t.sum);if(l)return"sum."+l}}if(t.histogram!=null&&t.hasOwnProperty("histogram")){if(i.data===1)return"data: multiple values";i.data=1;{var l=_.opentelemetry.proto.metrics.v1.Histogram.verify(t.histogram);if(l)return"histogram."+l}}if(t.exponentialHistogram!=null&&t.hasOwnProperty("exponentialHistogram")){if(i.data===1)return"data: multiple values";i.data=1;{var l=_.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(t.exponentialHistogram);if(l)return"exponentialHistogram."+l}}if(t.summary!=null&&t.hasOwnProperty("summary")){if(i.data===1)return"data: multiple values";i.data=1;{var l=_.opentelemetry.proto.metrics.v1.Summary.verify(t.summary);if(l)return"summary."+l}}return null},"verify"),s.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.metrics.v1.Metric)return t;var i=new _.opentelemetry.proto.metrics.v1.Metric;if(t.name!=null&&(i.name=String(t.name)),t.description!=null&&(i.description=String(t.description)),t.unit!=null&&(i.unit=String(t.unit)),t.gauge!=null){if(typeof t.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");i.gauge=_.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");i.sum=_.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");i.histogram=_.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");i.exponentialHistogram=_.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");i.summary=_.opentelemetry.proto.metrics.v1.Summary.fromObject(t.summary)}return i},"fromObject"),s.toObject=c(function(t,i){i||(i={});var l={};return i.defaults&&(l.name="",l.description="",l.unit=""),t.name!=null&&t.hasOwnProperty("name")&&(l.name=t.name),t.description!=null&&t.hasOwnProperty("description")&&(l.description=t.description),t.unit!=null&&t.hasOwnProperty("unit")&&(l.unit=t.unit),t.gauge!=null&&t.hasOwnProperty("gauge")&&(l.gauge=_.opentelemetry.proto.metrics.v1.Gauge.toObject(t.gauge,i),i.oneofs&&(l.data="gauge")),t.sum!=null&&t.hasOwnProperty("sum")&&(l.sum=_.opentelemetry.proto.metrics.v1.Sum.toObject(t.sum,i),i.oneofs&&(l.data="sum")),t.histogram!=null&&t.hasOwnProperty("histogram")&&(l.histogram=_.opentelemetry.proto.metrics.v1.Histogram.toObject(t.histogram,i),i.oneofs&&(l.data="histogram")),t.exponentialHistogram!=null&&t.hasOwnProperty("exponentialHistogram")&&(l.exponentialHistogram=_.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(t.exponentialHistogram,i),i.oneofs&&(l.data="exponentialHistogram")),t.summary!=null&&t.hasOwnProperty("summary")&&(l.summary=_.opentelemetry.proto.metrics.v1.Summary.toObject(t.summary,i),i.oneofs&&(l.data="summary")),l},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Metric"},"getTypeUrl"),s}(),a.Gauge=function(){function s(u){if(this.dataPoints=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"Gauge"),s.prototype.dataPoints=f.emptyArray,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.dataPoints!=null&&r.dataPoints.length)for(var i=0;i<r.dataPoints.length;++i)_.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(r.dataPoints[i],t.uint32(10).fork()).ldelim();return t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.metrics.v1.Gauge;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(_.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(r,r.uint32()));break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.dataPoints!=null&&r.hasOwnProperty("dataPoints")){if(!Array.isArray(r.dataPoints))return"dataPoints: array expected";for(var t=0;t<r.dataPoints.length;++t){var i=_.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(r.dataPoints[t]);if(i)return"dataPoints."+i}}return null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.Gauge)return r;var t=new _.opentelemetry.proto.metrics.v1.Gauge;if(r.dataPoints){if(!Array.isArray(r.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");t.dataPoints=[];for(var i=0;i<r.dataPoints.length;++i){if(typeof r.dataPoints[i]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");t.dataPoints[i]=_.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(r.dataPoints[i])}}return t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.dataPoints=[]),r.dataPoints&&r.dataPoints.length){i.dataPoints=[];for(var l=0;l<r.dataPoints.length;++l)i.dataPoints[l]=_.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(r.dataPoints[l],t)}return i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.Gauge"},"getTypeUrl"),s}(),a.Sum=function(){function s(u){if(this.dataPoints=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"Sum"),s.prototype.dataPoints=f.emptyArray,s.prototype.aggregationTemporality=null,s.prototype.isMonotonic=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.dataPoints!=null&&r.dataPoints.length)for(var i=0;i<r.dataPoints.length;++i)_.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(r.dataPoints[i],t.uint32(10).fork()).ldelim();return r.aggregationTemporality!=null&&Object.hasOwnProperty.call(r,"aggregationTemporality")&&t.uint32(16).int32(r.aggregationTemporality),r.isMonotonic!=null&&Object.hasOwnProperty.call(r,"isMonotonic")&&t.uint32(24).bool(r.isMonotonic),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.metrics.v1.Sum;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(_.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(r,r.uint32()));break}case 2:{l.aggregationTemporality=r.int32();break}case 3:{l.isMonotonic=r.bool();break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.dataPoints!=null&&r.hasOwnProperty("dataPoints")){if(!Array.isArray(r.dataPoints))return"dataPoints: array expected";for(var t=0;t<r.dataPoints.length;++t){var i=_.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(r.dataPoints[t]);if(i)return"dataPoints."+i}}if(r.aggregationTemporality!=null&&r.hasOwnProperty("aggregationTemporality"))switch(r.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return r.isMonotonic!=null&&r.hasOwnProperty("isMonotonic")&&typeof r.isMonotonic!="boolean"?"isMonotonic: boolean expected":null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.Sum)return r;var t=new _.opentelemetry.proto.metrics.v1.Sum;if(r.dataPoints){if(!Array.isArray(r.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");t.dataPoints=[];for(var i=0;i<r.dataPoints.length;++i){if(typeof r.dataPoints[i]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");t.dataPoints[i]=_.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(r.dataPoints[i])}}switch(r.aggregationTemporality){default:if(typeof r.aggregationTemporality=="number"){t.aggregationTemporality=r.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 r.isMonotonic!=null&&(t.isMonotonic=!!r.isMonotonic),t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.dataPoints=[]),t.defaults&&(i.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,i.isMonotonic=!1),r.dataPoints&&r.dataPoints.length){i.dataPoints=[];for(var l=0;l<r.dataPoints.length;++l)i.dataPoints[l]=_.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(r.dataPoints[l],t)}return r.aggregationTemporality!=null&&r.hasOwnProperty("aggregationTemporality")&&(i.aggregationTemporality=t.enums===String?_.opentelemetry.proto.metrics.v1.AggregationTemporality[r.aggregationTemporality]===void 0?r.aggregationTemporality:_.opentelemetry.proto.metrics.v1.AggregationTemporality[r.aggregationTemporality]:r.aggregationTemporality),r.isMonotonic!=null&&r.hasOwnProperty("isMonotonic")&&(i.isMonotonic=r.isMonotonic),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.Sum"},"getTypeUrl"),s}(),a.Histogram=function(){function s(u){if(this.dataPoints=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"Histogram"),s.prototype.dataPoints=f.emptyArray,s.prototype.aggregationTemporality=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.dataPoints!=null&&r.dataPoints.length)for(var i=0;i<r.dataPoints.length;++i)_.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(r.dataPoints[i],t.uint32(10).fork()).ldelim();return r.aggregationTemporality!=null&&Object.hasOwnProperty.call(r,"aggregationTemporality")&&t.uint32(16).int32(r.aggregationTemporality),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.metrics.v1.Histogram;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(_.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(r,r.uint32()));break}case 2:{l.aggregationTemporality=r.int32();break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.dataPoints!=null&&r.hasOwnProperty("dataPoints")){if(!Array.isArray(r.dataPoints))return"dataPoints: array expected";for(var t=0;t<r.dataPoints.length;++t){var i=_.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(r.dataPoints[t]);if(i)return"dataPoints."+i}}if(r.aggregationTemporality!=null&&r.hasOwnProperty("aggregationTemporality"))switch(r.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.Histogram)return r;var t=new _.opentelemetry.proto.metrics.v1.Histogram;if(r.dataPoints){if(!Array.isArray(r.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");t.dataPoints=[];for(var i=0;i<r.dataPoints.length;++i){if(typeof r.dataPoints[i]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");t.dataPoints[i]=_.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(r.dataPoints[i])}}switch(r.aggregationTemporality){default:if(typeof r.aggregationTemporality=="number"){t.aggregationTemporality=r.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},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.dataPoints=[]),t.defaults&&(i.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),r.dataPoints&&r.dataPoints.length){i.dataPoints=[];for(var l=0;l<r.dataPoints.length;++l)i.dataPoints[l]=_.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(r.dataPoints[l],t)}return r.aggregationTemporality!=null&&r.hasOwnProperty("aggregationTemporality")&&(i.aggregationTemporality=t.enums===String?_.opentelemetry.proto.metrics.v1.AggregationTemporality[r.aggregationTemporality]===void 0?r.aggregationTemporality:_.opentelemetry.proto.metrics.v1.AggregationTemporality[r.aggregationTemporality]:r.aggregationTemporality),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.Histogram"},"getTypeUrl"),s}(),a.ExponentialHistogram=function(){function s(u){if(this.dataPoints=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"ExponentialHistogram"),s.prototype.dataPoints=f.emptyArray,s.prototype.aggregationTemporality=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.dataPoints!=null&&r.dataPoints.length)for(var i=0;i<r.dataPoints.length;++i)_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(r.dataPoints[i],t.uint32(10).fork()).ldelim();return r.aggregationTemporality!=null&&Object.hasOwnProperty.call(r,"aggregationTemporality")&&t.uint32(16).int32(r.aggregationTemporality),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.metrics.v1.ExponentialHistogram;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(r,r.uint32()));break}case 2:{l.aggregationTemporality=r.int32();break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.dataPoints!=null&&r.hasOwnProperty("dataPoints")){if(!Array.isArray(r.dataPoints))return"dataPoints: array expected";for(var t=0;t<r.dataPoints.length;++t){var i=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(r.dataPoints[t]);if(i)return"dataPoints."+i}}if(r.aggregationTemporality!=null&&r.hasOwnProperty("aggregationTemporality"))switch(r.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.ExponentialHistogram)return r;var t=new _.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(r.dataPoints){if(!Array.isArray(r.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");t.dataPoints=[];for(var i=0;i<r.dataPoints.length;++i){if(typeof r.dataPoints[i]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");t.dataPoints[i]=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(r.dataPoints[i])}}switch(r.aggregationTemporality){default:if(typeof r.aggregationTemporality=="number"){t.aggregationTemporality=r.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},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.dataPoints=[]),t.defaults&&(i.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),r.dataPoints&&r.dataPoints.length){i.dataPoints=[];for(var l=0;l<r.dataPoints.length;++l)i.dataPoints[l]=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(r.dataPoints[l],t)}return r.aggregationTemporality!=null&&r.hasOwnProperty("aggregationTemporality")&&(i.aggregationTemporality=t.enums===String?_.opentelemetry.proto.metrics.v1.AggregationTemporality[r.aggregationTemporality]===void 0?r.aggregationTemporality:_.opentelemetry.proto.metrics.v1.AggregationTemporality[r.aggregationTemporality]:r.aggregationTemporality),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},"getTypeUrl"),s}(),a.Summary=function(){function s(u){if(this.dataPoints=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"Summary"),s.prototype.dataPoints=f.emptyArray,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.dataPoints!=null&&r.dataPoints.length)for(var i=0;i<r.dataPoints.length;++i)_.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(r.dataPoints[i],t.uint32(10).fork()).ldelim();return t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.metrics.v1.Summary;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(_.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(r,r.uint32()));break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.dataPoints!=null&&r.hasOwnProperty("dataPoints")){if(!Array.isArray(r.dataPoints))return"dataPoints: array expected";for(var t=0;t<r.dataPoints.length;++t){var i=_.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(r.dataPoints[t]);if(i)return"dataPoints."+i}}return null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.Summary)return r;var t=new _.opentelemetry.proto.metrics.v1.Summary;if(r.dataPoints){if(!Array.isArray(r.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");t.dataPoints=[];for(var i=0;i<r.dataPoints.length;++i){if(typeof r.dataPoints[i]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");t.dataPoints[i]=_.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(r.dataPoints[i])}}return t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.dataPoints=[]),r.dataPoints&&r.dataPoints.length){i.dataPoints=[];for(var l=0;l<r.dataPoints.length;++l)i.dataPoints[l]=_.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(r.dataPoints[l],t)}return i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.Summary"},"getTypeUrl"),s}(),a.AggregationTemporality=function(){var s={},u=Object.create(s);return u[s[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,u[s[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,u[s[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,u}(),a.DataPointFlags=function(){var s={},u=Object.create(s);return u[s[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,u[s[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,u}(),a.NumberDataPoint=function(){function s(r){if(this.attributes=[],this.exemplars=[],r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}c(s,"NumberDataPoint"),s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.asDouble=null,s.prototype.asInt=null,s.prototype.exemplars=f.emptyArray,s.prototype.flags=null;var u;return Object.defineProperty(s.prototype,"value",{get:f.oneOfGetter(u=["asDouble","asInt"]),set:f.oneOfSetter(u)}),s.create=c(function(t){return new s(t)},"create"),s.encode=c(function(t,i){if(i||(i=K.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&i.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&i.uint32(25).fixed64(t.timeUnixNano),t.asDouble!=null&&Object.hasOwnProperty.call(t,"asDouble")&&i.uint32(33).double(t.asDouble),t.exemplars!=null&&t.exemplars.length)for(var l=0;l<t.exemplars.length;++l)_.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[l],i.uint32(42).fork()).ldelim();if(t.asInt!=null&&Object.hasOwnProperty.call(t,"asInt")&&i.uint32(49).sfixed64(t.asInt),t.attributes!=null&&t.attributes.length)for(var l=0;l<t.attributes.length;++l)_.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[l],i.uint32(58).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&i.uint32(64).uint32(t.flags),i},"encode"),s.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),s.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.metrics.v1.NumberDataPoint;t.pos<l;){var E=t.uint32();switch(E>>>3){case 7:{p.attributes&&p.attributes.length||(p.attributes=[]),p.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{p.startTimeUnixNano=t.fixed64();break}case 3:{p.timeUnixNano=t.fixed64();break}case 4:{p.asDouble=t.double();break}case 6:{p.asInt=t.sfixed64();break}case 5:{p.exemplars&&p.exemplars.length||(p.exemplars=[]),p.exemplars.push(_.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 8:{p.flags=t.uint32();break}default:t.skipType(E&7);break}}return p},"decode"),s.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),s.verify=c(function(t){if(typeof t!="object"||t===null)return"object expected";var i={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var l=0;l<t.attributes.length;++l){var p=_.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[l]);if(p)return"attributes."+p}}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")&&(i.value=1,typeof t.asDouble!="number"))return"asDouble: number expected";if(t.asInt!=null&&t.hasOwnProperty("asInt")){if(i.value===1)return"value: multiple values";if(i.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 l=0;l<t.exemplars.length;++l){var p=_.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[l]);if(p)return"exemplars."+p}}return t.flags!=null&&t.hasOwnProperty("flags")&&!f.isInteger(t.flags)?"flags: integer expected":null},"verify"),s.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.metrics.v1.NumberDataPoint)return t;var i=new _.opentelemetry.proto.metrics.v1.NumberDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");i.attributes=[];for(var l=0;l<t.attributes.length;++l){if(typeof t.attributes[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");i.attributes[l]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[l])}}if(t.startTimeUnixNano!=null&&(f.Long?(i.startTimeUnixNano=f.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?i.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?i.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(i.startTimeUnixNano=new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(f.Long?(i.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?i.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?i.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(i.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.asDouble!=null&&(i.asDouble=Number(t.asDouble)),t.asInt!=null&&(f.Long?(i.asInt=f.Long.fromValue(t.asInt)).unsigned=!1:typeof t.asInt=="string"?i.asInt=parseInt(t.asInt,10):typeof t.asInt=="number"?i.asInt=t.asInt:typeof t.asInt=="object"&&(i.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");i.exemplars=[];for(var l=0;l<t.exemplars.length;++l){if(typeof t.exemplars[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");i.exemplars[l]=_.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[l])}}return t.flags!=null&&(i.flags=t.flags>>>0),i},"fromObject"),s.toObject=c(function(t,i){i||(i={});var l={};if((i.arrays||i.defaults)&&(l.exemplars=[],l.attributes=[]),i.defaults){if(f.Long){var p=new f.Long(0,0,!1);l.startTimeUnixNano=i.longs===String?p.toString():i.longs===Number?p.toNumber():p}else l.startTimeUnixNano=i.longs===String?"0":0;if(f.Long){var p=new f.Long(0,0,!1);l.timeUnixNano=i.longs===String?p.toString():i.longs===Number?p.toNumber():p}else l.timeUnixNano=i.longs===String?"0":0;l.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?l.startTimeUnixNano=i.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:l.startTimeUnixNano=i.longs===String?f.Long.prototype.toString.call(t.startTimeUnixNano):i.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"?l.timeUnixNano=i.longs===String?String(t.timeUnixNano):t.timeUnixNano:l.timeUnixNano=i.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):i.longs===Number?new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(l.asDouble=i.json&&!isFinite(t.asDouble)?String(t.asDouble):t.asDouble,i.oneofs&&(l.value="asDouble")),t.exemplars&&t.exemplars.length){l.exemplars=[];for(var E=0;E<t.exemplars.length;++E)l.exemplars[E]=_.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[E],i)}if(t.asInt!=null&&t.hasOwnProperty("asInt")&&(typeof t.asInt=="number"?l.asInt=i.longs===String?String(t.asInt):t.asInt:l.asInt=i.longs===String?f.Long.prototype.toString.call(t.asInt):i.longs===Number?new f.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber():t.asInt,i.oneofs&&(l.value="asInt")),t.attributes&&t.attributes.length){l.attributes=[];for(var E=0;E<t.attributes.length;++E)l.attributes[E]=_.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[E],i)}return t.flags!=null&&t.hasOwnProperty("flags")&&(l.flags=t.flags),l},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},"getTypeUrl"),s}(),a.HistogramDataPoint=function(){function s(r){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}c(s,"HistogramDataPoint"),s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.bucketCounts=f.emptyArray,s.prototype.explicitBounds=f.emptyArray,s.prototype.exemplars=f.emptyArray,s.prototype.flags=null,s.prototype.min=null,s.prototype.max=null;var u;return Object.defineProperty(s.prototype,"_sum",{get:f.oneOfGetter(u=["sum"]),set:f.oneOfSetter(u)}),Object.defineProperty(s.prototype,"_min",{get:f.oneOfGetter(u=["min"]),set:f.oneOfSetter(u)}),Object.defineProperty(s.prototype,"_max",{get:f.oneOfGetter(u=["max"]),set:f.oneOfSetter(u)}),s.create=c(function(t){return new s(t)},"create"),s.encode=c(function(t,i){if(i||(i=K.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&i.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&i.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&i.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&i.uint32(41).double(t.sum),t.bucketCounts!=null&&t.bucketCounts.length){i.uint32(50).fork();for(var l=0;l<t.bucketCounts.length;++l)i.fixed64(t.bucketCounts[l]);i.ldelim()}if(t.explicitBounds!=null&&t.explicitBounds.length){i.uint32(58).fork();for(var l=0;l<t.explicitBounds.length;++l)i.double(t.explicitBounds[l]);i.ldelim()}if(t.exemplars!=null&&t.exemplars.length)for(var l=0;l<t.exemplars.length;++l)_.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[l],i.uint32(66).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var l=0;l<t.attributes.length;++l)_.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[l],i.uint32(74).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&i.uint32(80).uint32(t.flags),t.min!=null&&Object.hasOwnProperty.call(t,"min")&&i.uint32(89).double(t.min),t.max!=null&&Object.hasOwnProperty.call(t,"max")&&i.uint32(97).double(t.max),i},"encode"),s.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),s.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.metrics.v1.HistogramDataPoint;t.pos<l;){var E=t.uint32();switch(E>>>3){case 9:{p.attributes&&p.attributes.length||(p.attributes=[]),p.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{p.startTimeUnixNano=t.fixed64();break}case 3:{p.timeUnixNano=t.fixed64();break}case 4:{p.count=t.fixed64();break}case 5:{p.sum=t.double();break}case 6:{if(p.bucketCounts&&p.bucketCounts.length||(p.bucketCounts=[]),(E&7)===2)for(var y=t.uint32()+t.pos;t.pos<y;)p.bucketCounts.push(t.fixed64());else p.bucketCounts.push(t.fixed64());break}case 7:{if(p.explicitBounds&&p.explicitBounds.length||(p.explicitBounds=[]),(E&7)===2)for(var y=t.uint32()+t.pos;t.pos<y;)p.explicitBounds.push(t.double());else p.explicitBounds.push(t.double());break}case 8:{p.exemplars&&p.exemplars.length||(p.exemplars=[]),p.exemplars.push(_.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 10:{p.flags=t.uint32();break}case 11:{p.min=t.double();break}case 12:{p.max=t.double();break}default:t.skipType(E&7);break}}return p},"decode"),s.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),s.verify=c(function(t){if(typeof t!="object"||t===null)return"object expected";var i={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var l=0;l<t.attributes.length;++l){var p=_.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[l]);if(p)return"attributes."+p}}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")&&(i._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 l=0;l<t.bucketCounts.length;++l)if(!f.isInteger(t.bucketCounts[l])&&!(t.bucketCounts[l]&&f.isInteger(t.bucketCounts[l].low)&&f.isInteger(t.bucketCounts[l].high)))return"bucketCounts: integer|Long[] expected"}if(t.explicitBounds!=null&&t.hasOwnProperty("explicitBounds")){if(!Array.isArray(t.explicitBounds))return"explicitBounds: array expected";for(var l=0;l<t.explicitBounds.length;++l)if(typeof t.explicitBounds[l]!="number")return"explicitBounds: number[] expected"}if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var l=0;l<t.exemplars.length;++l){var p=_.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[l]);if(p)return"exemplars."+p}}return t.flags!=null&&t.hasOwnProperty("flags")&&!f.isInteger(t.flags)?"flags: integer expected":t.min!=null&&t.hasOwnProperty("min")&&(i._min=1,typeof t.min!="number")?"min: number expected":t.max!=null&&t.hasOwnProperty("max")&&(i._max=1,typeof t.max!="number")?"max: number expected":null},"verify"),s.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.metrics.v1.HistogramDataPoint)return t;var i=new _.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");i.attributes=[];for(var l=0;l<t.attributes.length;++l){if(typeof t.attributes[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");i.attributes[l]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[l])}}if(t.startTimeUnixNano!=null&&(f.Long?(i.startTimeUnixNano=f.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?i.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?i.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(i.startTimeUnixNano=new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(f.Long?(i.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?i.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?i.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(i.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(f.Long?(i.count=f.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?i.count=parseInt(t.count,10):typeof t.count=="number"?i.count=t.count:typeof t.count=="object"&&(i.count=new f.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(i.sum=Number(t.sum)),t.bucketCounts){if(!Array.isArray(t.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");i.bucketCounts=[];for(var l=0;l<t.bucketCounts.length;++l)f.Long?(i.bucketCounts[l]=f.Long.fromValue(t.bucketCounts[l])).unsigned=!1:typeof t.bucketCounts[l]=="string"?i.bucketCounts[l]=parseInt(t.bucketCounts[l],10):typeof t.bucketCounts[l]=="number"?i.bucketCounts[l]=t.bucketCounts[l]:typeof t.bucketCounts[l]=="object"&&(i.bucketCounts[l]=new f.LongBits(t.bucketCounts[l].low>>>0,t.bucketCounts[l].high>>>0).toNumber())}if(t.explicitBounds){if(!Array.isArray(t.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");i.explicitBounds=[];for(var l=0;l<t.explicitBounds.length;++l)i.explicitBounds[l]=Number(t.explicitBounds[l])}if(t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");i.exemplars=[];for(var l=0;l<t.exemplars.length;++l){if(typeof t.exemplars[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");i.exemplars[l]=_.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[l])}}return t.flags!=null&&(i.flags=t.flags>>>0),t.min!=null&&(i.min=Number(t.min)),t.max!=null&&(i.max=Number(t.max)),i},"fromObject"),s.toObject=c(function(t,i){i||(i={});var l={};if((i.arrays||i.defaults)&&(l.bucketCounts=[],l.explicitBounds=[],l.exemplars=[],l.attributes=[]),i.defaults){if(f.Long){var p=new f.Long(0,0,!1);l.startTimeUnixNano=i.longs===String?p.toString():i.longs===Number?p.toNumber():p}else l.startTimeUnixNano=i.longs===String?"0":0;if(f.Long){var p=new f.Long(0,0,!1);l.timeUnixNano=i.longs===String?p.toString():i.longs===Number?p.toNumber():p}else l.timeUnixNano=i.longs===String?"0":0;if(f.Long){var p=new f.Long(0,0,!1);l.count=i.longs===String?p.toString():i.longs===Number?p.toNumber():p}else l.count=i.longs===String?"0":0;l.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?l.startTimeUnixNano=i.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:l.startTimeUnixNano=i.longs===String?f.Long.prototype.toString.call(t.startTimeUnixNano):i.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"?l.timeUnixNano=i.longs===String?String(t.timeUnixNano):t.timeUnixNano:l.timeUnixNano=i.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):i.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"?l.count=i.longs===String?String(t.count):t.count:l.count=i.longs===String?f.Long.prototype.toString.call(t.count):i.longs===Number?new f.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(l.sum=i.json&&!isFinite(t.sum)?String(t.sum):t.sum,i.oneofs&&(l._sum="sum")),t.bucketCounts&&t.bucketCounts.length){l.bucketCounts=[];for(var E=0;E<t.bucketCounts.length;++E)typeof t.bucketCounts[E]=="number"?l.bucketCounts[E]=i.longs===String?String(t.bucketCounts[E]):t.bucketCounts[E]:l.bucketCounts[E]=i.longs===String?f.Long.prototype.toString.call(t.bucketCounts[E]):i.longs===Number?new f.LongBits(t.bucketCounts[E].low>>>0,t.bucketCounts[E].high>>>0).toNumber():t.bucketCounts[E]}if(t.explicitBounds&&t.explicitBounds.length){l.explicitBounds=[];for(var E=0;E<t.explicitBounds.length;++E)l.explicitBounds[E]=i.json&&!isFinite(t.explicitBounds[E])?String(t.explicitBounds[E]):t.explicitBounds[E]}if(t.exemplars&&t.exemplars.length){l.exemplars=[];for(var E=0;E<t.exemplars.length;++E)l.exemplars[E]=_.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[E],i)}if(t.attributes&&t.attributes.length){l.attributes=[];for(var E=0;E<t.attributes.length;++E)l.attributes[E]=_.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[E],i)}return t.flags!=null&&t.hasOwnProperty("flags")&&(l.flags=t.flags),t.min!=null&&t.hasOwnProperty("min")&&(l.min=i.json&&!isFinite(t.min)?String(t.min):t.min,i.oneofs&&(l._min="min")),t.max!=null&&t.hasOwnProperty("max")&&(l.max=i.json&&!isFinite(t.max)?String(t.max):t.max,i.oneofs&&(l._max="max")),l},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},"getTypeUrl"),s}(),a.ExponentialHistogramDataPoint=function(){function s(r){if(this.attributes=[],this.exemplars=[],r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}c(s,"ExponentialHistogramDataPoint"),s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.scale=null,s.prototype.zeroCount=null,s.prototype.positive=null,s.prototype.negative=null,s.prototype.flags=null,s.prototype.exemplars=f.emptyArray,s.prototype.min=null,s.prototype.max=null,s.prototype.zeroThreshold=null;var u;return Object.defineProperty(s.prototype,"_sum",{get:f.oneOfGetter(u=["sum"]),set:f.oneOfSetter(u)}),Object.defineProperty(s.prototype,"_min",{get:f.oneOfGetter(u=["min"]),set:f.oneOfSetter(u)}),Object.defineProperty(s.prototype,"_max",{get:f.oneOfGetter(u=["max"]),set:f.oneOfSetter(u)}),s.create=c(function(t){return new s(t)},"create"),s.encode=c(function(t,i){if(i||(i=K.create()),t.attributes!=null&&t.attributes.length)for(var l=0;l<t.attributes.length;++l)_.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[l],i.uint32(10).fork()).ldelim();if(t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&i.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&i.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&i.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&i.uint32(41).double(t.sum),t.scale!=null&&Object.hasOwnProperty.call(t,"scale")&&i.uint32(48).sint32(t.scale),t.zeroCount!=null&&Object.hasOwnProperty.call(t,"zeroCount")&&i.uint32(57).fixed64(t.zeroCount),t.positive!=null&&Object.hasOwnProperty.call(t,"positive")&&_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(t.positive,i.uint32(66).fork()).ldelim(),t.negative!=null&&Object.hasOwnProperty.call(t,"negative")&&_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(t.negative,i.uint32(74).fork()).ldelim(),t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&i.uint32(80).uint32(t.flags),t.exemplars!=null&&t.exemplars.length)for(var l=0;l<t.exemplars.length;++l)_.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[l],i.uint32(90).fork()).ldelim();return t.min!=null&&Object.hasOwnProperty.call(t,"min")&&i.uint32(97).double(t.min),t.max!=null&&Object.hasOwnProperty.call(t,"max")&&i.uint32(105).double(t.max),t.zeroThreshold!=null&&Object.hasOwnProperty.call(t,"zeroThreshold")&&i.uint32(113).double(t.zeroThreshold),i},"encode"),s.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),s.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.attributes&&p.attributes.length||(p.attributes=[]),p.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{p.startTimeUnixNano=t.fixed64();break}case 3:{p.timeUnixNano=t.fixed64();break}case 4:{p.count=t.fixed64();break}case 5:{p.sum=t.double();break}case 6:{p.scale=t.sint32();break}case 7:{p.zeroCount=t.fixed64();break}case 8:{p.positive=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(t,t.uint32());break}case 9:{p.negative=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(t,t.uint32());break}case 10:{p.flags=t.uint32();break}case 11:{p.exemplars&&p.exemplars.length||(p.exemplars=[]),p.exemplars.push(_.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 12:{p.min=t.double();break}case 13:{p.max=t.double();break}case 14:{p.zeroThreshold=t.double();break}default:t.skipType(E&7);break}}return p},"decode"),s.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),s.verify=c(function(t){if(typeof t!="object"||t===null)return"object expected";var i={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var l=0;l<t.attributes.length;++l){var p=_.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[l]);if(p)return"attributes."+p}}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")&&(i._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 p=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(t.positive);if(p)return"positive."+p}if(t.negative!=null&&t.hasOwnProperty("negative")){var p=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(t.negative);if(p)return"negative."+p}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 l=0;l<t.exemplars.length;++l){var p=_.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[l]);if(p)return"exemplars."+p}}return t.min!=null&&t.hasOwnProperty("min")&&(i._min=1,typeof t.min!="number")?"min: number expected":t.max!=null&&t.hasOwnProperty("max")&&(i._max=1,typeof t.max!="number")?"max: number expected":t.zeroThreshold!=null&&t.hasOwnProperty("zeroThreshold")&&typeof t.zeroThreshold!="number"?"zeroThreshold: number expected":null},"verify"),s.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return t;var i=new _.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");i.attributes=[];for(var l=0;l<t.attributes.length;++l){if(typeof t.attributes[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");i.attributes[l]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[l])}}if(t.startTimeUnixNano!=null&&(f.Long?(i.startTimeUnixNano=f.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?i.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?i.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(i.startTimeUnixNano=new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(f.Long?(i.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?i.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?i.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(i.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(f.Long?(i.count=f.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?i.count=parseInt(t.count,10):typeof t.count=="number"?i.count=t.count:typeof t.count=="object"&&(i.count=new f.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(i.sum=Number(t.sum)),t.scale!=null&&(i.scale=t.scale|0),t.zeroCount!=null&&(f.Long?(i.zeroCount=f.Long.fromValue(t.zeroCount)).unsigned=!1:typeof t.zeroCount=="string"?i.zeroCount=parseInt(t.zeroCount,10):typeof t.zeroCount=="number"?i.zeroCount=t.zeroCount:typeof t.zeroCount=="object"&&(i.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");i.positive=_.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");i.negative=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(t.negative)}if(t.flags!=null&&(i.flags=t.flags>>>0),t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");i.exemplars=[];for(var l=0;l<t.exemplars.length;++l){if(typeof t.exemplars[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");i.exemplars[l]=_.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[l])}}return t.min!=null&&(i.min=Number(t.min)),t.max!=null&&(i.max=Number(t.max)),t.zeroThreshold!=null&&(i.zeroThreshold=Number(t.zeroThreshold)),i},"fromObject"),s.toObject=c(function(t,i){i||(i={});var l={};if((i.arrays||i.defaults)&&(l.attributes=[],l.exemplars=[]),i.defaults){if(f.Long){var p=new f.Long(0,0,!1);l.startTimeUnixNano=i.longs===String?p.toString():i.longs===Number?p.toNumber():p}else l.startTimeUnixNano=i.longs===String?"0":0;if(f.Long){var p=new f.Long(0,0,!1);l.timeUnixNano=i.longs===String?p.toString():i.longs===Number?p.toNumber():p}else l.timeUnixNano=i.longs===String?"0":0;if(f.Long){var p=new f.Long(0,0,!1);l.count=i.longs===String?p.toString():i.longs===Number?p.toNumber():p}else l.count=i.longs===String?"0":0;if(l.scale=0,f.Long){var p=new f.Long(0,0,!1);l.zeroCount=i.longs===String?p.toString():i.longs===Number?p.toNumber():p}else l.zeroCount=i.longs===String?"0":0;l.positive=null,l.negative=null,l.flags=0,l.zeroThreshold=0}if(t.attributes&&t.attributes.length){l.attributes=[];for(var E=0;E<t.attributes.length;++E)l.attributes[E]=_.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[E],i)}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?l.startTimeUnixNano=i.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:l.startTimeUnixNano=i.longs===String?f.Long.prototype.toString.call(t.startTimeUnixNano):i.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"?l.timeUnixNano=i.longs===String?String(t.timeUnixNano):t.timeUnixNano:l.timeUnixNano=i.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):i.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"?l.count=i.longs===String?String(t.count):t.count:l.count=i.longs===String?f.Long.prototype.toString.call(t.count):i.longs===Number?new f.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(l.sum=i.json&&!isFinite(t.sum)?String(t.sum):t.sum,i.oneofs&&(l._sum="sum")),t.scale!=null&&t.hasOwnProperty("scale")&&(l.scale=t.scale),t.zeroCount!=null&&t.hasOwnProperty("zeroCount")&&(typeof t.zeroCount=="number"?l.zeroCount=i.longs===String?String(t.zeroCount):t.zeroCount:l.zeroCount=i.longs===String?f.Long.prototype.toString.call(t.zeroCount):i.longs===Number?new f.LongBits(t.zeroCount.low>>>0,t.zeroCount.high>>>0).toNumber():t.zeroCount),t.positive!=null&&t.hasOwnProperty("positive")&&(l.positive=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(t.positive,i)),t.negative!=null&&t.hasOwnProperty("negative")&&(l.negative=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(t.negative,i)),t.flags!=null&&t.hasOwnProperty("flags")&&(l.flags=t.flags),t.exemplars&&t.exemplars.length){l.exemplars=[];for(var E=0;E<t.exemplars.length;++E)l.exemplars[E]=_.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[E],i)}return t.min!=null&&t.hasOwnProperty("min")&&(l.min=i.json&&!isFinite(t.min)?String(t.min):t.min,i.oneofs&&(l._min="min")),t.max!=null&&t.hasOwnProperty("max")&&(l.max=i.json&&!isFinite(t.max)?String(t.max):t.max,i.oneofs&&(l._max="max")),t.zeroThreshold!=null&&t.hasOwnProperty("zeroThreshold")&&(l.zeroThreshold=i.json&&!isFinite(t.zeroThreshold)?String(t.zeroThreshold):t.zeroThreshold),l},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},"getTypeUrl"),s.Buckets=function(){function r(t){if(this.bucketCounts=[],t)for(var i=Object.keys(t),l=0;l<i.length;++l)t[i[l]]!=null&&(this[i[l]]=t[i[l]])}return c(r,"Buckets"),r.prototype.offset=null,r.prototype.bucketCounts=f.emptyArray,r.create=c(function(i){return new r(i)},"create"),r.encode=c(function(i,l){if(l||(l=K.create()),i.offset!=null&&Object.hasOwnProperty.call(i,"offset")&&l.uint32(8).sint32(i.offset),i.bucketCounts!=null&&i.bucketCounts.length){l.uint32(18).fork();for(var p=0;p<i.bucketCounts.length;++p)l.uint64(i.bucketCounts[p]);l.ldelim()}return l},"encode"),r.encodeDelimited=c(function(i,l){return this.encode(i,l).ldelim()},"encodeDelimited"),r.decode=c(function(i,l){i instanceof T||(i=T.create(i));for(var p=l===void 0?i.len:i.pos+l,E=new _.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;i.pos<p;){var y=i.uint32();switch(y>>>3){case 1:{E.offset=i.sint32();break}case 2:{if(E.bucketCounts&&E.bucketCounts.length||(E.bucketCounts=[]),(y&7)===2)for(var g=i.uint32()+i.pos;i.pos<g;)E.bucketCounts.push(i.uint64());else E.bucketCounts.push(i.uint64());break}default:i.skipType(y&7);break}}return E},"decode"),r.decodeDelimited=c(function(i){return i instanceof T||(i=new T(i)),this.decode(i,i.uint32())},"decodeDelimited"),r.verify=c(function(i){if(typeof i!="object"||i===null)return"object expected";if(i.offset!=null&&i.hasOwnProperty("offset")&&!f.isInteger(i.offset))return"offset: integer expected";if(i.bucketCounts!=null&&i.hasOwnProperty("bucketCounts")){if(!Array.isArray(i.bucketCounts))return"bucketCounts: array expected";for(var l=0;l<i.bucketCounts.length;++l)if(!f.isInteger(i.bucketCounts[l])&&!(i.bucketCounts[l]&&f.isInteger(i.bucketCounts[l].low)&&f.isInteger(i.bucketCounts[l].high)))return"bucketCounts: integer|Long[] expected"}return null},"verify"),r.fromObject=c(function(i){if(i instanceof _.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return i;var l=new _.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(i.offset!=null&&(l.offset=i.offset|0),i.bucketCounts){if(!Array.isArray(i.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");l.bucketCounts=[];for(var p=0;p<i.bucketCounts.length;++p)f.Long?(l.bucketCounts[p]=f.Long.fromValue(i.bucketCounts[p])).unsigned=!0:typeof i.bucketCounts[p]=="string"?l.bucketCounts[p]=parseInt(i.bucketCounts[p],10):typeof i.bucketCounts[p]=="number"?l.bucketCounts[p]=i.bucketCounts[p]:typeof i.bucketCounts[p]=="object"&&(l.bucketCounts[p]=new f.LongBits(i.bucketCounts[p].low>>>0,i.bucketCounts[p].high>>>0).toNumber(!0))}return l},"fromObject"),r.toObject=c(function(i,l){l||(l={});var p={};if((l.arrays||l.defaults)&&(p.bucketCounts=[]),l.defaults&&(p.offset=0),i.offset!=null&&i.hasOwnProperty("offset")&&(p.offset=i.offset),i.bucketCounts&&i.bucketCounts.length){p.bucketCounts=[];for(var E=0;E<i.bucketCounts.length;++E)typeof i.bucketCounts[E]=="number"?p.bucketCounts[E]=l.longs===String?String(i.bucketCounts[E]):i.bucketCounts[E]:p.bucketCounts[E]=l.longs===String?f.Long.prototype.toString.call(i.bucketCounts[E]):l.longs===Number?new f.LongBits(i.bucketCounts[E].low>>>0,i.bucketCounts[E].high>>>0).toNumber(!0):i.bucketCounts[E]}return p},"toObject"),r.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),r.getTypeUrl=c(function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},"getTypeUrl"),r}(),s}(),a.SummaryDataPoint=function(){function s(u){if(this.attributes=[],this.quantileValues=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"SummaryDataPoint"),s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.quantileValues=f.emptyArray,s.prototype.flags=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.startTimeUnixNano!=null&&Object.hasOwnProperty.call(r,"startTimeUnixNano")&&t.uint32(17).fixed64(r.startTimeUnixNano),r.timeUnixNano!=null&&Object.hasOwnProperty.call(r,"timeUnixNano")&&t.uint32(25).fixed64(r.timeUnixNano),r.count!=null&&Object.hasOwnProperty.call(r,"count")&&t.uint32(33).fixed64(r.count),r.sum!=null&&Object.hasOwnProperty.call(r,"sum")&&t.uint32(41).double(r.sum),r.quantileValues!=null&&r.quantileValues.length)for(var i=0;i<r.quantileValues.length;++i)_.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(r.quantileValues[i],t.uint32(50).fork()).ldelim();if(r.attributes!=null&&r.attributes.length)for(var i=0;i<r.attributes.length;++i)_.opentelemetry.proto.common.v1.KeyValue.encode(r.attributes[i],t.uint32(58).fork()).ldelim();return r.flags!=null&&Object.hasOwnProperty.call(r,"flags")&&t.uint32(64).uint32(r.flags),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.metrics.v1.SummaryDataPoint;r.pos<i;){var p=r.uint32();switch(p>>>3){case 7:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 2:{l.startTimeUnixNano=r.fixed64();break}case 3:{l.timeUnixNano=r.fixed64();break}case 4:{l.count=r.fixed64();break}case 5:{l.sum=r.double();break}case 6:{l.quantileValues&&l.quantileValues.length||(l.quantileValues=[]),l.quantileValues.push(_.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(r,r.uint32()));break}case 8:{l.flags=r.uint32();break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.attributes!=null&&r.hasOwnProperty("attributes")){if(!Array.isArray(r.attributes))return"attributes: array expected";for(var t=0;t<r.attributes.length;++t){var i=_.opentelemetry.proto.common.v1.KeyValue.verify(r.attributes[t]);if(i)return"attributes."+i}}if(r.startTimeUnixNano!=null&&r.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(r.startTimeUnixNano)&&!(r.startTimeUnixNano&&f.isInteger(r.startTimeUnixNano.low)&&f.isInteger(r.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&!f.isInteger(r.timeUnixNano)&&!(r.timeUnixNano&&f.isInteger(r.timeUnixNano.low)&&f.isInteger(r.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(r.count!=null&&r.hasOwnProperty("count")&&!f.isInteger(r.count)&&!(r.count&&f.isInteger(r.count.low)&&f.isInteger(r.count.high)))return"count: integer|Long expected";if(r.sum!=null&&r.hasOwnProperty("sum")&&typeof r.sum!="number")return"sum: number expected";if(r.quantileValues!=null&&r.hasOwnProperty("quantileValues")){if(!Array.isArray(r.quantileValues))return"quantileValues: array expected";for(var t=0;t<r.quantileValues.length;++t){var i=_.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(r.quantileValues[t]);if(i)return"quantileValues."+i}}return r.flags!=null&&r.hasOwnProperty("flags")&&!f.isInteger(r.flags)?"flags: integer expected":null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.SummaryDataPoint)return r;var t=new _.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(r.attributes){if(!Array.isArray(r.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");t.attributes=[];for(var i=0;i<r.attributes.length;++i){if(typeof r.attributes[i]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");t.attributes[i]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(r.attributes[i])}}if(r.startTimeUnixNano!=null&&(f.Long?(t.startTimeUnixNano=f.Long.fromValue(r.startTimeUnixNano)).unsigned=!1:typeof r.startTimeUnixNano=="string"?t.startTimeUnixNano=parseInt(r.startTimeUnixNano,10):typeof r.startTimeUnixNano=="number"?t.startTimeUnixNano=r.startTimeUnixNano:typeof r.startTimeUnixNano=="object"&&(t.startTimeUnixNano=new f.LongBits(r.startTimeUnixNano.low>>>0,r.startTimeUnixNano.high>>>0).toNumber())),r.timeUnixNano!=null&&(f.Long?(t.timeUnixNano=f.Long.fromValue(r.timeUnixNano)).unsigned=!1:typeof r.timeUnixNano=="string"?t.timeUnixNano=parseInt(r.timeUnixNano,10):typeof r.timeUnixNano=="number"?t.timeUnixNano=r.timeUnixNano:typeof r.timeUnixNano=="object"&&(t.timeUnixNano=new f.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber())),r.count!=null&&(f.Long?(t.count=f.Long.fromValue(r.count)).unsigned=!1:typeof r.count=="string"?t.count=parseInt(r.count,10):typeof r.count=="number"?t.count=r.count:typeof r.count=="object"&&(t.count=new f.LongBits(r.count.low>>>0,r.count.high>>>0).toNumber())),r.sum!=null&&(t.sum=Number(r.sum)),r.quantileValues){if(!Array.isArray(r.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");t.quantileValues=[];for(var i=0;i<r.quantileValues.length;++i){if(typeof r.quantileValues[i]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");t.quantileValues[i]=_.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(r.quantileValues[i])}}return r.flags!=null&&(t.flags=r.flags>>>0),t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.quantileValues=[],i.attributes=[]),t.defaults){if(f.Long){var l=new f.Long(0,0,!1);i.startTimeUnixNano=t.longs===String?l.toString():t.longs===Number?l.toNumber():l}else i.startTimeUnixNano=t.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);i.timeUnixNano=t.longs===String?l.toString():t.longs===Number?l.toNumber():l}else i.timeUnixNano=t.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);i.count=t.longs===String?l.toString():t.longs===Number?l.toNumber():l}else i.count=t.longs===String?"0":0;i.sum=0,i.flags=0}if(r.startTimeUnixNano!=null&&r.hasOwnProperty("startTimeUnixNano")&&(typeof r.startTimeUnixNano=="number"?i.startTimeUnixNano=t.longs===String?String(r.startTimeUnixNano):r.startTimeUnixNano:i.startTimeUnixNano=t.longs===String?f.Long.prototype.toString.call(r.startTimeUnixNano):t.longs===Number?new f.LongBits(r.startTimeUnixNano.low>>>0,r.startTimeUnixNano.high>>>0).toNumber():r.startTimeUnixNano),r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&(typeof r.timeUnixNano=="number"?i.timeUnixNano=t.longs===String?String(r.timeUnixNano):r.timeUnixNano:i.timeUnixNano=t.longs===String?f.Long.prototype.toString.call(r.timeUnixNano):t.longs===Number?new f.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber():r.timeUnixNano),r.count!=null&&r.hasOwnProperty("count")&&(typeof r.count=="number"?i.count=t.longs===String?String(r.count):r.count:i.count=t.longs===String?f.Long.prototype.toString.call(r.count):t.longs===Number?new f.LongBits(r.count.low>>>0,r.count.high>>>0).toNumber():r.count),r.sum!=null&&r.hasOwnProperty("sum")&&(i.sum=t.json&&!isFinite(r.sum)?String(r.sum):r.sum),r.quantileValues&&r.quantileValues.length){i.quantileValues=[];for(var p=0;p<r.quantileValues.length;++p)i.quantileValues[p]=_.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(r.quantileValues[p],t)}if(r.attributes&&r.attributes.length){i.attributes=[];for(var p=0;p<r.attributes.length;++p)i.attributes[p]=_.opentelemetry.proto.common.v1.KeyValue.toObject(r.attributes[p],t)}return r.flags!=null&&r.hasOwnProperty("flags")&&(i.flags=r.flags),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},"getTypeUrl"),s.ValueAtQuantile=function(){function u(r){if(r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}return c(u,"ValueAtQuantile"),u.prototype.quantile=null,u.prototype.value=null,u.create=c(function(t){return new u(t)},"create"),u.encode=c(function(t,i){return i||(i=K.create()),t.quantile!=null&&Object.hasOwnProperty.call(t,"quantile")&&i.uint32(9).double(t.quantile),t.value!=null&&Object.hasOwnProperty.call(t,"value")&&i.uint32(17).double(t.value),i},"encode"),u.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),u.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;t.pos<l;){var E=t.uint32();switch(E>>>3){case 1:{p.quantile=t.double();break}case 2:{p.value=t.double();break}default:t.skipType(E&7);break}}return p},"decode"),u.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),u.verify=c(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},"verify"),u.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return t;var i=new _.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return t.quantile!=null&&(i.quantile=Number(t.quantile)),t.value!=null&&(i.value=Number(t.value)),i},"fromObject"),u.toObject=c(function(t,i){i||(i={});var l={};return i.defaults&&(l.quantile=0,l.value=0),t.quantile!=null&&t.hasOwnProperty("quantile")&&(l.quantile=i.json&&!isFinite(t.quantile)?String(t.quantile):t.quantile),t.value!=null&&t.hasOwnProperty("value")&&(l.value=i.json&&!isFinite(t.value)?String(t.value):t.value),l},"toObject"),u.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),u.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},"getTypeUrl"),u}(),s}(),a.Exemplar=function(){function s(r){if(this.filteredAttributes=[],r)for(var t=Object.keys(r),i=0;i<t.length;++i)r[t[i]]!=null&&(this[t[i]]=r[t[i]])}c(s,"Exemplar"),s.prototype.filteredAttributes=f.emptyArray,s.prototype.timeUnixNano=null,s.prototype.asDouble=null,s.prototype.asInt=null,s.prototype.spanId=null,s.prototype.traceId=null;var u;return Object.defineProperty(s.prototype,"value",{get:f.oneOfGetter(u=["asDouble","asInt"]),set:f.oneOfSetter(u)}),s.create=c(function(t){return new s(t)},"create"),s.encode=c(function(t,i){if(i||(i=K.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&i.uint32(17).fixed64(t.timeUnixNano),t.asDouble!=null&&Object.hasOwnProperty.call(t,"asDouble")&&i.uint32(25).double(t.asDouble),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&i.uint32(34).bytes(t.spanId),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&i.uint32(42).bytes(t.traceId),t.asInt!=null&&Object.hasOwnProperty.call(t,"asInt")&&i.uint32(49).sfixed64(t.asInt),t.filteredAttributes!=null&&t.filteredAttributes.length)for(var l=0;l<t.filteredAttributes.length;++l)_.opentelemetry.proto.common.v1.KeyValue.encode(t.filteredAttributes[l],i.uint32(58).fork()).ldelim();return i},"encode"),s.encodeDelimited=c(function(t,i){return this.encode(t,i).ldelim()},"encodeDelimited"),s.decode=c(function(t,i){t instanceof T||(t=T.create(t));for(var l=i===void 0?t.len:t.pos+i,p=new _.opentelemetry.proto.metrics.v1.Exemplar;t.pos<l;){var E=t.uint32();switch(E>>>3){case 7:{p.filteredAttributes&&p.filteredAttributes.length||(p.filteredAttributes=[]),p.filteredAttributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{p.timeUnixNano=t.fixed64();break}case 3:{p.asDouble=t.double();break}case 6:{p.asInt=t.sfixed64();break}case 4:{p.spanId=t.bytes();break}case 5:{p.traceId=t.bytes();break}default:t.skipType(E&7);break}}return p},"decode"),s.decodeDelimited=c(function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},"decodeDelimited"),s.verify=c(function(t){if(typeof t!="object"||t===null)return"object expected";var i={};if(t.filteredAttributes!=null&&t.hasOwnProperty("filteredAttributes")){if(!Array.isArray(t.filteredAttributes))return"filteredAttributes: array expected";for(var l=0;l<t.filteredAttributes.length;++l){var p=_.opentelemetry.proto.common.v1.KeyValue.verify(t.filteredAttributes[l]);if(p)return"filteredAttributes."+p}}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")&&(i.value=1,typeof t.asDouble!="number"))return"asDouble: number expected";if(t.asInt!=null&&t.hasOwnProperty("asInt")){if(i.value===1)return"value: multiple values";if(i.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},"verify"),s.fromObject=c(function(t){if(t instanceof _.opentelemetry.proto.metrics.v1.Exemplar)return t;var i=new _.opentelemetry.proto.metrics.v1.Exemplar;if(t.filteredAttributes){if(!Array.isArray(t.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");i.filteredAttributes=[];for(var l=0;l<t.filteredAttributes.length;++l){if(typeof t.filteredAttributes[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");i.filteredAttributes[l]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(t.filteredAttributes[l])}}return t.timeUnixNano!=null&&(f.Long?(i.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?i.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?i.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(i.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.asDouble!=null&&(i.asDouble=Number(t.asDouble)),t.asInt!=null&&(f.Long?(i.asInt=f.Long.fromValue(t.asInt)).unsigned=!1:typeof t.asInt=="string"?i.asInt=parseInt(t.asInt,10):typeof t.asInt=="number"?i.asInt=t.asInt:typeof t.asInt=="object"&&(i.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,i.spanId=f.newBuffer(f.base64.length(t.spanId)),0):t.spanId.length>=0&&(i.spanId=t.spanId)),t.traceId!=null&&(typeof t.traceId=="string"?f.base64.decode(t.traceId,i.traceId=f.newBuffer(f.base64.length(t.traceId)),0):t.traceId.length>=0&&(i.traceId=t.traceId)),i},"fromObject"),s.toObject=c(function(t,i){i||(i={});var l={};if((i.arrays||i.defaults)&&(l.filteredAttributes=[]),i.defaults){if(f.Long){var p=new f.Long(0,0,!1);l.timeUnixNano=i.longs===String?p.toString():i.longs===Number?p.toNumber():p}else l.timeUnixNano=i.longs===String?"0":0;i.bytes===String?l.spanId="":(l.spanId=[],i.bytes!==Array&&(l.spanId=f.newBuffer(l.spanId))),i.bytes===String?l.traceId="":(l.traceId=[],i.bytes!==Array&&(l.traceId=f.newBuffer(l.traceId)))}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?l.timeUnixNano=i.longs===String?String(t.timeUnixNano):t.timeUnixNano:l.timeUnixNano=i.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):i.longs===Number?new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(l.asDouble=i.json&&!isFinite(t.asDouble)?String(t.asDouble):t.asDouble,i.oneofs&&(l.value="asDouble")),t.spanId!=null&&t.hasOwnProperty("spanId")&&(l.spanId=i.bytes===String?f.base64.encode(t.spanId,0,t.spanId.length):i.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceId!=null&&t.hasOwnProperty("traceId")&&(l.traceId=i.bytes===String?f.base64.encode(t.traceId,0,t.traceId.length):i.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.asInt!=null&&t.hasOwnProperty("asInt")&&(typeof t.asInt=="number"?l.asInt=i.longs===String?String(t.asInt):t.asInt:l.asInt=i.longs===String?f.Long.prototype.toString.call(t.asInt):i.longs===Number?new f.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber():t.asInt,i.oneofs&&(l.value="asInt")),t.filteredAttributes&&t.filteredAttributes.length){l.filteredAttributes=[];for(var E=0;E<t.filteredAttributes.length;++E)l.filteredAttributes[E]=_.opentelemetry.proto.common.v1.KeyValue.toObject(t.filteredAttributes[E],i)}return l},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Exemplar"},"getTypeUrl"),s}(),a}(),o}(),e.logs=function(){var o={};return o.v1=function(){var a={};return a.LogsData=function(){function s(u){if(this.resourceLogs=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"LogsData"),s.prototype.resourceLogs=f.emptyArray,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.resourceLogs!=null&&r.resourceLogs.length)for(var i=0;i<r.resourceLogs.length;++i)_.opentelemetry.proto.logs.v1.ResourceLogs.encode(r.resourceLogs[i],t.uint32(10).fork()).ldelim();return t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.logs.v1.LogsData;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.resourceLogs&&l.resourceLogs.length||(l.resourceLogs=[]),l.resourceLogs.push(_.opentelemetry.proto.logs.v1.ResourceLogs.decode(r,r.uint32()));break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.resourceLogs!=null&&r.hasOwnProperty("resourceLogs")){if(!Array.isArray(r.resourceLogs))return"resourceLogs: array expected";for(var t=0;t<r.resourceLogs.length;++t){var i=_.opentelemetry.proto.logs.v1.ResourceLogs.verify(r.resourceLogs[t]);if(i)return"resourceLogs."+i}}return null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.logs.v1.LogsData)return r;var t=new _.opentelemetry.proto.logs.v1.LogsData;if(r.resourceLogs){if(!Array.isArray(r.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");t.resourceLogs=[];for(var i=0;i<r.resourceLogs.length;++i){if(typeof r.resourceLogs[i]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");t.resourceLogs[i]=_.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(r.resourceLogs[i])}}return t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.resourceLogs=[]),r.resourceLogs&&r.resourceLogs.length){i.resourceLogs=[];for(var l=0;l<r.resourceLogs.length;++l)i.resourceLogs[l]=_.opentelemetry.proto.logs.v1.ResourceLogs.toObject(r.resourceLogs[l],t)}return i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.logs.v1.LogsData"},"getTypeUrl"),s}(),a.ResourceLogs=function(){function s(u){if(this.scopeLogs=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"ResourceLogs"),s.prototype.resource=null,s.prototype.scopeLogs=f.emptyArray,s.prototype.schemaUrl=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.resource!=null&&Object.hasOwnProperty.call(r,"resource")&&_.opentelemetry.proto.resource.v1.Resource.encode(r.resource,t.uint32(10).fork()).ldelim(),r.scopeLogs!=null&&r.scopeLogs.length)for(var i=0;i<r.scopeLogs.length;++i)_.opentelemetry.proto.logs.v1.ScopeLogs.encode(r.scopeLogs[i],t.uint32(18).fork()).ldelim();return r.schemaUrl!=null&&Object.hasOwnProperty.call(r,"schemaUrl")&&t.uint32(26).string(r.schemaUrl),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.logs.v1.ResourceLogs;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.resource=_.opentelemetry.proto.resource.v1.Resource.decode(r,r.uint32());break}case 2:{l.scopeLogs&&l.scopeLogs.length||(l.scopeLogs=[]),l.scopeLogs.push(_.opentelemetry.proto.logs.v1.ScopeLogs.decode(r,r.uint32()));break}case 3:{l.schemaUrl=r.string();break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.resource!=null&&r.hasOwnProperty("resource")){var t=_.opentelemetry.proto.resource.v1.Resource.verify(r.resource);if(t)return"resource."+t}if(r.scopeLogs!=null&&r.hasOwnProperty("scopeLogs")){if(!Array.isArray(r.scopeLogs))return"scopeLogs: array expected";for(var i=0;i<r.scopeLogs.length;++i){var t=_.opentelemetry.proto.logs.v1.ScopeLogs.verify(r.scopeLogs[i]);if(t)return"scopeLogs."+t}}return r.schemaUrl!=null&&r.hasOwnProperty("schemaUrl")&&!f.isString(r.schemaUrl)?"schemaUrl: string expected":null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.logs.v1.ResourceLogs)return r;var t=new _.opentelemetry.proto.logs.v1.ResourceLogs;if(r.resource!=null){if(typeof r.resource!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");t.resource=_.opentelemetry.proto.resource.v1.Resource.fromObject(r.resource)}if(r.scopeLogs){if(!Array.isArray(r.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");t.scopeLogs=[];for(var i=0;i<r.scopeLogs.length;++i){if(typeof r.scopeLogs[i]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");t.scopeLogs[i]=_.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(r.scopeLogs[i])}}return r.schemaUrl!=null&&(t.schemaUrl=String(r.schemaUrl)),t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.scopeLogs=[]),t.defaults&&(i.resource=null,i.schemaUrl=""),r.resource!=null&&r.hasOwnProperty("resource")&&(i.resource=_.opentelemetry.proto.resource.v1.Resource.toObject(r.resource,t)),r.scopeLogs&&r.scopeLogs.length){i.scopeLogs=[];for(var l=0;l<r.scopeLogs.length;++l)i.scopeLogs[l]=_.opentelemetry.proto.logs.v1.ScopeLogs.toObject(r.scopeLogs[l],t)}return r.schemaUrl!=null&&r.hasOwnProperty("schemaUrl")&&(i.schemaUrl=r.schemaUrl),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.logs.v1.ResourceLogs"},"getTypeUrl"),s}(),a.ScopeLogs=function(){function s(u){if(this.logRecords=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"ScopeLogs"),s.prototype.scope=null,s.prototype.logRecords=f.emptyArray,s.prototype.schemaUrl=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.scope!=null&&Object.hasOwnProperty.call(r,"scope")&&_.opentelemetry.proto.common.v1.InstrumentationScope.encode(r.scope,t.uint32(10).fork()).ldelim(),r.logRecords!=null&&r.logRecords.length)for(var i=0;i<r.logRecords.length;++i)_.opentelemetry.proto.logs.v1.LogRecord.encode(r.logRecords[i],t.uint32(18).fork()).ldelim();return r.schemaUrl!=null&&Object.hasOwnProperty.call(r,"schemaUrl")&&t.uint32(26).string(r.schemaUrl),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.logs.v1.ScopeLogs;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.decode(r,r.uint32());break}case 2:{l.logRecords&&l.logRecords.length||(l.logRecords=[]),l.logRecords.push(_.opentelemetry.proto.logs.v1.LogRecord.decode(r,r.uint32()));break}case 3:{l.schemaUrl=r.string();break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.scope!=null&&r.hasOwnProperty("scope")){var t=_.opentelemetry.proto.common.v1.InstrumentationScope.verify(r.scope);if(t)return"scope."+t}if(r.logRecords!=null&&r.hasOwnProperty("logRecords")){if(!Array.isArray(r.logRecords))return"logRecords: array expected";for(var i=0;i<r.logRecords.length;++i){var t=_.opentelemetry.proto.logs.v1.LogRecord.verify(r.logRecords[i]);if(t)return"logRecords."+t}}return r.schemaUrl!=null&&r.hasOwnProperty("schemaUrl")&&!f.isString(r.schemaUrl)?"schemaUrl: string expected":null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.logs.v1.ScopeLogs)return r;var t=new _.opentelemetry.proto.logs.v1.ScopeLogs;if(r.scope!=null){if(typeof r.scope!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");t.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(r.scope)}if(r.logRecords){if(!Array.isArray(r.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");t.logRecords=[];for(var i=0;i<r.logRecords.length;++i){if(typeof r.logRecords[i]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");t.logRecords[i]=_.opentelemetry.proto.logs.v1.LogRecord.fromObject(r.logRecords[i])}}return r.schemaUrl!=null&&(t.schemaUrl=String(r.schemaUrl)),t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.logRecords=[]),t.defaults&&(i.scope=null,i.schemaUrl=""),r.scope!=null&&r.hasOwnProperty("scope")&&(i.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.toObject(r.scope,t)),r.logRecords&&r.logRecords.length){i.logRecords=[];for(var l=0;l<r.logRecords.length;++l)i.logRecords[l]=_.opentelemetry.proto.logs.v1.LogRecord.toObject(r.logRecords[l],t)}return r.schemaUrl!=null&&r.hasOwnProperty("schemaUrl")&&(i.schemaUrl=r.schemaUrl),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.logs.v1.ScopeLogs"},"getTypeUrl"),s}(),a.SeverityNumber=function(){var s={},u=Object.create(s);return u[s[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,u[s[1]="SEVERITY_NUMBER_TRACE"]=1,u[s[2]="SEVERITY_NUMBER_TRACE2"]=2,u[s[3]="SEVERITY_NUMBER_TRACE3"]=3,u[s[4]="SEVERITY_NUMBER_TRACE4"]=4,u[s[5]="SEVERITY_NUMBER_DEBUG"]=5,u[s[6]="SEVERITY_NUMBER_DEBUG2"]=6,u[s[7]="SEVERITY_NUMBER_DEBUG3"]=7,u[s[8]="SEVERITY_NUMBER_DEBUG4"]=8,u[s[9]="SEVERITY_NUMBER_INFO"]=9,u[s[10]="SEVERITY_NUMBER_INFO2"]=10,u[s[11]="SEVERITY_NUMBER_INFO3"]=11,u[s[12]="SEVERITY_NUMBER_INFO4"]=12,u[s[13]="SEVERITY_NUMBER_WARN"]=13,u[s[14]="SEVERITY_NUMBER_WARN2"]=14,u[s[15]="SEVERITY_NUMBER_WARN3"]=15,u[s[16]="SEVERITY_NUMBER_WARN4"]=16,u[s[17]="SEVERITY_NUMBER_ERROR"]=17,u[s[18]="SEVERITY_NUMBER_ERROR2"]=18,u[s[19]="SEVERITY_NUMBER_ERROR3"]=19,u[s[20]="SEVERITY_NUMBER_ERROR4"]=20,u[s[21]="SEVERITY_NUMBER_FATAL"]=21,u[s[22]="SEVERITY_NUMBER_FATAL2"]=22,u[s[23]="SEVERITY_NUMBER_FATAL3"]=23,u[s[24]="SEVERITY_NUMBER_FATAL4"]=24,u}(),a.LogRecordFlags=function(){var s={},u=Object.create(s);return u[s[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,u[s[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,u}(),a.LogRecord=function(){function s(u){if(this.attributes=[],u)for(var r=Object.keys(u),t=0;t<r.length;++t)u[r[t]]!=null&&(this[r[t]]=u[r[t]])}return c(s,"LogRecord"),s.prototype.timeUnixNano=null,s.prototype.observedTimeUnixNano=null,s.prototype.severityNumber=null,s.prototype.severityText=null,s.prototype.body=null,s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.prototype.flags=null,s.prototype.traceId=null,s.prototype.spanId=null,s.create=c(function(r){return new s(r)},"create"),s.encode=c(function(r,t){if(t||(t=K.create()),r.timeUnixNano!=null&&Object.hasOwnProperty.call(r,"timeUnixNano")&&t.uint32(9).fixed64(r.timeUnixNano),r.severityNumber!=null&&Object.hasOwnProperty.call(r,"severityNumber")&&t.uint32(16).int32(r.severityNumber),r.severityText!=null&&Object.hasOwnProperty.call(r,"severityText")&&t.uint32(26).string(r.severityText),r.body!=null&&Object.hasOwnProperty.call(r,"body")&&_.opentelemetry.proto.common.v1.AnyValue.encode(r.body,t.uint32(42).fork()).ldelim(),r.attributes!=null&&r.attributes.length)for(var i=0;i<r.attributes.length;++i)_.opentelemetry.proto.common.v1.KeyValue.encode(r.attributes[i],t.uint32(50).fork()).ldelim();return r.droppedAttributesCount!=null&&Object.hasOwnProperty.call(r,"droppedAttributesCount")&&t.uint32(56).uint32(r.droppedAttributesCount),r.flags!=null&&Object.hasOwnProperty.call(r,"flags")&&t.uint32(69).fixed32(r.flags),r.traceId!=null&&Object.hasOwnProperty.call(r,"traceId")&&t.uint32(74).bytes(r.traceId),r.spanId!=null&&Object.hasOwnProperty.call(r,"spanId")&&t.uint32(82).bytes(r.spanId),r.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(r,"observedTimeUnixNano")&&t.uint32(89).fixed64(r.observedTimeUnixNano),t},"encode"),s.encodeDelimited=c(function(r,t){return this.encode(r,t).ldelim()},"encodeDelimited"),s.decode=c(function(r,t){r instanceof T||(r=T.create(r));for(var i=t===void 0?r.len:r.pos+t,l=new _.opentelemetry.proto.logs.v1.LogRecord;r.pos<i;){var p=r.uint32();switch(p>>>3){case 1:{l.timeUnixNano=r.fixed64();break}case 11:{l.observedTimeUnixNano=r.fixed64();break}case 2:{l.severityNumber=r.int32();break}case 3:{l.severityText=r.string();break}case 5:{l.body=_.opentelemetry.proto.common.v1.AnyValue.decode(r,r.uint32());break}case 6:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 7:{l.droppedAttributesCount=r.uint32();break}case 8:{l.flags=r.fixed32();break}case 9:{l.traceId=r.bytes();break}case 10:{l.spanId=r.bytes();break}default:r.skipType(p&7);break}}return l},"decode"),s.decodeDelimited=c(function(r){return r instanceof T||(r=new T(r)),this.decode(r,r.uint32())},"decodeDelimited"),s.verify=c(function(r){if(typeof r!="object"||r===null)return"object expected";if(r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&!f.isInteger(r.timeUnixNano)&&!(r.timeUnixNano&&f.isInteger(r.timeUnixNano.low)&&f.isInteger(r.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(r.observedTimeUnixNano!=null&&r.hasOwnProperty("observedTimeUnixNano")&&!f.isInteger(r.observedTimeUnixNano)&&!(r.observedTimeUnixNano&&f.isInteger(r.observedTimeUnixNano.low)&&f.isInteger(r.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(r.severityNumber!=null&&r.hasOwnProperty("severityNumber"))switch(r.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(r.severityText!=null&&r.hasOwnProperty("severityText")&&!f.isString(r.severityText))return"severityText: string expected";if(r.body!=null&&r.hasOwnProperty("body")){var t=_.opentelemetry.proto.common.v1.AnyValue.verify(r.body);if(t)return"body."+t}if(r.attributes!=null&&r.hasOwnProperty("attributes")){if(!Array.isArray(r.attributes))return"attributes: array expected";for(var i=0;i<r.attributes.length;++i){var t=_.opentelemetry.proto.common.v1.KeyValue.verify(r.attributes[i]);if(t)return"attributes."+t}}return r.droppedAttributesCount!=null&&r.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(r.droppedAttributesCount)?"droppedAttributesCount: integer expected":r.flags!=null&&r.hasOwnProperty("flags")&&!f.isInteger(r.flags)?"flags: integer expected":r.traceId!=null&&r.hasOwnProperty("traceId")&&!(r.traceId&&typeof r.traceId.length=="number"||f.isString(r.traceId))?"traceId: buffer expected":r.spanId!=null&&r.hasOwnProperty("spanId")&&!(r.spanId&&typeof r.spanId.length=="number"||f.isString(r.spanId))?"spanId: buffer expected":null},"verify"),s.fromObject=c(function(r){if(r instanceof _.opentelemetry.proto.logs.v1.LogRecord)return r;var t=new _.opentelemetry.proto.logs.v1.LogRecord;switch(r.timeUnixNano!=null&&(f.Long?(t.timeUnixNano=f.Long.fromValue(r.timeUnixNano)).unsigned=!1:typeof r.timeUnixNano=="string"?t.timeUnixNano=parseInt(r.timeUnixNano,10):typeof r.timeUnixNano=="number"?t.timeUnixNano=r.timeUnixNano:typeof r.timeUnixNano=="object"&&(t.timeUnixNano=new f.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber())),r.observedTimeUnixNano!=null&&(f.Long?(t.observedTimeUnixNano=f.Long.fromValue(r.observedTimeUnixNano)).unsigned=!1:typeof r.observedTimeUnixNano=="string"?t.observedTimeUnixNano=parseInt(r.observedTimeUnixNano,10):typeof r.observedTimeUnixNano=="number"?t.observedTimeUnixNano=r.observedTimeUnixNano:typeof r.observedTimeUnixNano=="object"&&(t.observedTimeUnixNano=new f.LongBits(r.observedTimeUnixNano.low>>>0,r.observedTimeUnixNano.high>>>0).toNumber())),r.severityNumber){default:if(typeof r.severityNumber=="number"){t.severityNumber=r.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(r.severityText!=null&&(t.severityText=String(r.severityText)),r.body!=null){if(typeof r.body!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");t.body=_.opentelemetry.proto.common.v1.AnyValue.fromObject(r.body)}if(r.attributes){if(!Array.isArray(r.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");t.attributes=[];for(var i=0;i<r.attributes.length;++i){if(typeof r.attributes[i]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");t.attributes[i]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(r.attributes[i])}}return r.droppedAttributesCount!=null&&(t.droppedAttributesCount=r.droppedAttributesCount>>>0),r.flags!=null&&(t.flags=r.flags>>>0),r.traceId!=null&&(typeof r.traceId=="string"?f.base64.decode(r.traceId,t.traceId=f.newBuffer(f.base64.length(r.traceId)),0):r.traceId.length>=0&&(t.traceId=r.traceId)),r.spanId!=null&&(typeof r.spanId=="string"?f.base64.decode(r.spanId,t.spanId=f.newBuffer(f.base64.length(r.spanId)),0):r.spanId.length>=0&&(t.spanId=r.spanId)),t},"fromObject"),s.toObject=c(function(r,t){t||(t={});var i={};if((t.arrays||t.defaults)&&(i.attributes=[]),t.defaults){if(f.Long){var l=new f.Long(0,0,!1);i.timeUnixNano=t.longs===String?l.toString():t.longs===Number?l.toNumber():l}else i.timeUnixNano=t.longs===String?"0":0;if(i.severityNumber=t.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,i.severityText="",i.body=null,i.droppedAttributesCount=0,i.flags=0,t.bytes===String?i.traceId="":(i.traceId=[],t.bytes!==Array&&(i.traceId=f.newBuffer(i.traceId))),t.bytes===String?i.spanId="":(i.spanId=[],t.bytes!==Array&&(i.spanId=f.newBuffer(i.spanId))),f.Long){var l=new f.Long(0,0,!1);i.observedTimeUnixNano=t.longs===String?l.toString():t.longs===Number?l.toNumber():l}else i.observedTimeUnixNano=t.longs===String?"0":0}if(r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&(typeof r.timeUnixNano=="number"?i.timeUnixNano=t.longs===String?String(r.timeUnixNano):r.timeUnixNano:i.timeUnixNano=t.longs===String?f.Long.prototype.toString.call(r.timeUnixNano):t.longs===Number?new f.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber():r.timeUnixNano),r.severityNumber!=null&&r.hasOwnProperty("severityNumber")&&(i.severityNumber=t.enums===String?_.opentelemetry.proto.logs.v1.SeverityNumber[r.severityNumber]===void 0?r.severityNumber:_.opentelemetry.proto.logs.v1.SeverityNumber[r.severityNumber]:r.severityNumber),r.severityText!=null&&r.hasOwnProperty("severityText")&&(i.severityText=r.severityText),r.body!=null&&r.hasOwnProperty("body")&&(i.body=_.opentelemetry.proto.common.v1.AnyValue.toObject(r.body,t)),r.attributes&&r.attributes.length){i.attributes=[];for(var p=0;p<r.attributes.length;++p)i.attributes[p]=_.opentelemetry.proto.common.v1.KeyValue.toObject(r.attributes[p],t)}return r.droppedAttributesCount!=null&&r.hasOwnProperty("droppedAttributesCount")&&(i.droppedAttributesCount=r.droppedAttributesCount),r.flags!=null&&r.hasOwnProperty("flags")&&(i.flags=r.flags),r.traceId!=null&&r.hasOwnProperty("traceId")&&(i.traceId=t.bytes===String?f.base64.encode(r.traceId,0,r.traceId.length):t.bytes===Array?Array.prototype.slice.call(r.traceId):r.traceId),r.spanId!=null&&r.hasOwnProperty("spanId")&&(i.spanId=t.bytes===String?f.base64.encode(r.spanId,0,r.spanId.length):t.bytes===Array?Array.prototype.slice.call(r.spanId):r.spanId),r.observedTimeUnixNano!=null&&r.hasOwnProperty("observedTimeUnixNano")&&(typeof r.observedTimeUnixNano=="number"?i.observedTimeUnixNano=t.longs===String?String(r.observedTimeUnixNano):r.observedTimeUnixNano:i.observedTimeUnixNano=t.longs===String?f.Long.prototype.toString.call(r.observedTimeUnixNano):t.longs===Number?new f.LongBits(r.observedTimeUnixNano.low>>>0,r.observedTimeUnixNano.high>>>0).toNumber():r.observedTimeUnixNano),i},"toObject"),s.prototype.toJSON=c(function(){return this.constructor.toObject(this,U.util.toJSONOptions)},"toJSON"),s.getTypeUrl=c(function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.logs.v1.LogRecord"},"getTypeUrl"),s}(),a}(),o}(),e}(),n}();Sf.exports=_});var Su=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};var ge="1.9.0";var hu=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function uE(n){var e=new Set([n]),o=new Set,a=n.match(hu);if(!a)return function(){return!1};var s={major:+a[1],minor:+a[2],patch:+a[3],prerelease:a[4]};if(s.prerelease!=null)return c(function(i){return i===n},"isExactmatch");function u(t){return o.add(t),!1}c(u,"_reject");function r(t){return e.add(t),!0}return c(r,"_accept"),c(function(i){if(e.has(i))return!0;if(o.has(i))return!1;var l=i.match(hu);if(!l)return u(i);var p={major:+l[1],minor:+l[2],patch:+l[3],prerelease:l[4]};return p.prerelease!=null||s.major!==p.major?u(i):s.major===0?s.minor===p.minor&&s.patch<=p.patch?r(i):u(i):s.minor<=p.minor?r(i):u(i)},"isCompatible")}c(uE,"_makeCompatibilityCheck");var Au=uE(ge);var lE=ge.split(".")[0],xn=Symbol.for("opentelemetry.js.api."+lE),gn=Su;function de(n,e,o,a){var s;a===void 0&&(a=!1);var u=gn[xn]=(s=gn[xn])!==null&&s!==void 0?s:{version:ge};if(!a&&u[n]){var r=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+n);return o.error(r.stack||r.message),!1}if(u.version!==ge){var r=new Error("@opentelemetry/api: Registration of version v"+u.version+" for "+n+" does not match previously registered API v"+ge);return o.error(r.stack||r.message),!1}return u[n]=e,o.debug("@opentelemetry/api: Registered a global for "+n+" v"+ge+"."),!0}c(de,"registerGlobal");function Kt(n){var e,o,a=(e=gn[xn])===null||e===void 0?void 0:e.version;if(!(!a||!Au(a)))return(o=gn[xn])===null||o===void 0?void 0:o[n]}c(Kt,"getGlobal");function Se(n,e){e.debug("@opentelemetry/api: Unregistering a global for "+n+" v"+ge+".");var o=gn[xn];o&&delete o[n]}c(Se,"unregisterGlobal");var pE=function(n,e){var o=typeof Symbol=="function"&&n[Symbol.iterator];if(!o)return n;var a=o.call(n),s,u=[],r;try{for(;(e===void 0||e-- >0)&&!(s=a.next()).done;)u.push(s.value)}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return u},_E=function(n,e,o){if(o||arguments.length===2)for(var a=0,s=e.length,u;a<s;a++)(u||!(a in e))&&(u||(u=Array.prototype.slice.call(e,0,a)),u[a]=e[a]);return n.concat(u||Array.prototype.slice.call(e))},mu=function(){function n(e){this._namespace=e.namespace||"DiagComponentLogger"}return c(n,"DiagComponentLogger"),n.prototype.debug=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return vn("debug",this._namespace,e)},n.prototype.error=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return vn("error",this._namespace,e)},n.prototype.info=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return vn("info",this._namespace,e)},n.prototype.warn=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return vn("warn",this._namespace,e)},n.prototype.verbose=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return vn("verbose",this._namespace,e)},n}();function vn(n,e,o){var a=Kt("diag");if(a)return o.unshift(e),a[n].apply(a,_E([],pE(o),!1))}c(vn,"logProxy");var ut;(function(n){n[n.NONE=0]="NONE",n[n.ERROR=30]="ERROR",n[n.WARN=50]="WARN",n[n.INFO=60]="INFO",n[n.DEBUG=70]="DEBUG",n[n.VERBOSE=80]="VERBOSE",n[n.ALL=9999]="ALL"})(ut||(ut={}));function yu(n,e){n<ut.NONE?n=ut.NONE:n>ut.ALL&&(n=ut.ALL),e=e||{};function o(a,s){var u=e[a];return typeof u=="function"&&n>=s?u.bind(e):function(){}}return c(o,"_filterFunc"),{error:o("error",ut.ERROR),warn:o("warn",ut.WARN),info:o("info",ut.INFO),debug:o("debug",ut.DEBUG),verbose:o("verbose",ut.VERBOSE)}}c(yu,"createLogLevelDiagLogger");var fE=function(n,e){var o=typeof Symbol=="function"&&n[Symbol.iterator];if(!o)return n;var a=o.call(n),s,u=[],r;try{for(;(e===void 0||e-- >0)&&!(s=a.next()).done;)u.push(s.value)}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return u},EE=function(n,e,o){if(o||arguments.length===2)for(var a=0,s=e.length,u;a<s;a++)(u||!(a in e))&&(u||(u=Array.prototype.slice.call(e,0,a)),u[a]=e[a]);return n.concat(u||Array.prototype.slice.call(e))},TE="diag",bt=function(){function n(){function e(s){return function(){for(var u=[],r=0;r<arguments.length;r++)u[r]=arguments[r];var t=Kt("diag");if(t)return t[s].apply(t,EE([],fE(u),!1))}}c(e,"_logProxy");var o=this,a=c(function(s,u){var r,t,i;if(u===void 0&&(u={logLevel:ut.INFO}),s===o){var l=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return o.error((r=l.stack)!==null&&r!==void 0?r:l.message),!1}typeof u=="number"&&(u={logLevel:u});var p=Kt("diag"),E=yu((t=u.logLevel)!==null&&t!==void 0?t:ut.INFO,s);if(p&&!u.suppressOverrideMessage){var y=(i=new Error().stack)!==null&&i!==void 0?i:"<failed to generate stacktrace>";p.warn("Current logger will be overwritten from "+y),E.warn("Current logger will overwrite one already registered from "+y)}return de("diag",E,o,!0)},"setLogger");o.setLogger=a,o.disable=function(){Se(TE,o)},o.createComponentLogger=function(s){return new mu(s)},o.verbose=e("verbose"),o.debug=e("debug"),o.info=e("info"),o.warn=e("warn"),o.error=e("error")}return c(n,"DiagAPI"),n.instance=function(){return this._instance||(this._instance=new n),this._instance},n}();var dE=function(n,e){var o=typeof Symbol=="function"&&n[Symbol.iterator];if(!o)return n;var a=o.call(n),s,u=[],r;try{for(;(e===void 0||e-- >0)&&!(s=a.next()).done;)u.push(s.value)}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return u},SE=function(n){var e=typeof Symbol=="function"&&Symbol.iterator,o=e&&n[e],a=0;if(o)return o.call(n);if(n&&typeof n.length=="number")return{next:c(function(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ou=function(){function n(e){this._entries=e?new Map(e):new Map}return c(n,"BaggageImpl"),n.prototype.getEntry=function(e){var o=this._entries.get(e);if(o)return Object.assign({},o)},n.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var o=dE(e,2),a=o[0],s=o[1];return[a,s]})},n.prototype.setEntry=function(e,o){var a=new n(this._entries);return a._entries.set(e,o),a},n.prototype.removeEntry=function(e){var o=new n(this._entries);return o._entries.delete(e),o},n.prototype.removeEntries=function(){for(var e,o,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var u=new n(this._entries);try{for(var r=SE(a),t=r.next();!t.done;t=r.next()){var i=t.value;u._entries.delete(i)}}catch(l){e={error:l}}finally{try{t&&!t.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return u},n.prototype.clear=function(){return new n},n}();var Ru=Symbol("BaggageEntryMetadata");var hE=bt.instance();function Nu(n){return n===void 0&&(n={}),new Ou(new Map(Object.entries(n)))}c(Nu,"createBaggage");function na(n){return typeof n!="string"&&(hE.error("Cannot create baggage metadata from unknown type: "+typeof n),n=""),{__TYPE__:Ru,toString:c(function(){return n},"toString")}}c(na,"baggageEntryMetadataFromString");function ve(n){return Symbol.for(n)}c(ve,"createContextKey");var AE=function(){function n(e){var o=this;o._currentContext=e?new Map(e):new Map,o.getValue=function(a){return o._currentContext.get(a)},o.setValue=function(a,s){var u=new n(o._currentContext);return u._currentContext.set(a,s),u},o.deleteValue=function(a){var s=new n(o._currentContext);return s._currentContext.delete(a),s}}return c(n,"BaseContext"),n}(),Dt=new AE;var ar=function(){var n=c(function(e,o){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(a[u]=s[u])},n(e,o)},"extendStatics");return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");n(e,o);function a(){this.constructor=e}c(a,"__"),e.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}}(),mE=function(){function n(){}return c(n,"NoopMeter"),n.prototype.createGauge=function(e,o){return IE},n.prototype.createHistogram=function(e,o){return bE},n.prototype.createCounter=function(e,o){return LE},n.prototype.createUpDownCounter=function(e,o){return PE},n.prototype.createObservableGauge=function(e,o){return UE},n.prototype.createObservableCounter=function(e,o){return CE},n.prototype.createObservableUpDownCounter=function(e,o){return ME},n.prototype.addBatchObservableCallback=function(e,o){},n.prototype.removeBatchObservableCallback=function(e){},n}();var Vo=function(){function n(){}return c(n,"NoopMetric"),n}();var yE=function(n){ar(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return c(e,"NoopCounterMetric"),e.prototype.add=function(o,a){},e}(Vo);var OE=function(n){ar(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return c(e,"NoopUpDownCounterMetric"),e.prototype.add=function(o,a){},e}(Vo);var RE=function(n){ar(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return c(e,"NoopGaugeMetric"),e.prototype.record=function(o,a){},e}(Vo);var NE=function(n){ar(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return c(e,"NoopHistogramMetric"),e.prototype.record=function(o,a){},e}(Vo);var oa=function(){function n(){}return c(n,"NoopObservableMetric"),n.prototype.addCallback=function(e){},n.prototype.removeCallback=function(e){},n}();var xE=function(n){ar(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return c(e,"NoopObservableCounterMetric"),e}(oa);var gE=function(n){ar(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return c(e,"NoopObservableGaugeMetric"),e}(oa);var vE=function(n){ar(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return c(e,"NoopObservableUpDownCounterMetric"),e}(oa);var ia=new mE,LE=new yE,IE=new RE,bE=new NE,PE=new OE,CE=new xE,UE=new gE,ME=new vE;function sa(){return ia}c(sa,"createNoopMeter");var ft;(function(n){n[n.INT=0]="INT",n[n.DOUBLE=1]="DOUBLE"})(ft||(ft={}));var xu={get:c(function(n,e){if(n!=null)return n[e]},"get"),keys:c(function(n){return n==null?[]:Object.keys(n)},"keys")},gu={set:c(function(n,e,o){n!=null&&(n[e]=o)},"set")};var DE=function(n,e){var o=typeof Symbol=="function"&&n[Symbol.iterator];if(!o)return n;var a=o.call(n),s,u=[],r;try{for(;(e===void 0||e-- >0)&&!(s=a.next()).done;)u.push(s.value)}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return u},wE=function(n,e,o){if(o||arguments.length===2)for(var a=0,s=e.length,u;a<s;a++)(u||!(a in e))&&(u||(u=Array.prototype.slice.call(e,0,a)),u[a]=e[a]);return n.concat(u||Array.prototype.slice.call(e))},vu=function(){function n(){}return c(n,"NoopContextManager"),n.prototype.active=function(){return Dt},n.prototype.with=function(e,o,a){for(var s=[],u=3;u<arguments.length;u++)s[u-3]=arguments[u];return o.call.apply(o,wE([a],DE(s),!1))},n.prototype.bind=function(e,o){return o},n.prototype.enable=function(){return this},n.prototype.disable=function(){return this},n}();var VE=function(n,e){var o=typeof Symbol=="function"&&n[Symbol.iterator];if(!o)return n;var a=o.call(n),s,u=[],r;try{for(;(e===void 0||e-- >0)&&!(s=a.next()).done;)u.push(s.value)}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return u},kE=function(n,e,o){if(o||arguments.length===2)for(var a=0,s=e.length,u;a<s;a++)(u||!(a in e))&&(u||(u=Array.prototype.slice.call(e,0,a)),u[a]=e[a]);return n.concat(u||Array.prototype.slice.call(e))},aa="context",BE=new vu,Ye=function(){function n(){}return c(n,"ContextAPI"),n.getInstance=function(){return this._instance||(this._instance=new n),this._instance},n.prototype.setGlobalContextManager=function(e){return de(aa,e,bt.instance())},n.prototype.active=function(){return this._getContextManager().active()},n.prototype.with=function(e,o,a){for(var s,u=[],r=3;r<arguments.length;r++)u[r-3]=arguments[r];return(s=this._getContextManager()).with.apply(s,kE([e,o,a],VE(u),!1))},n.prototype.bind=function(e,o){return this._getContextManager().bind(e,o)},n.prototype._getContextManager=function(){return Kt(aa)||BE},n.prototype.disable=function(){this._getContextManager().disable(),Se(aa,bt.instance())},n}();var Nt;(function(n){n[n.NONE=0]="NONE",n[n.SAMPLED=1]="SAMPLED"})(Nt||(Nt={}));var ko="0000000000000000",Bo="00000000000000000000000000000000",Ln={traceId:Bo,spanId:ko,traceFlags:Nt.NONE};var Fe=function(){function n(e){e===void 0&&(e=Ln),this._spanContext=e}return c(n,"NonRecordingSpan"),n.prototype.spanContext=function(){return this._spanContext},n.prototype.setAttribute=function(e,o){return this},n.prototype.setAttributes=function(e){return this},n.prototype.addEvent=function(e,o){return this},n.prototype.addLink=function(e){return this},n.prototype.addLinks=function(e){return this},n.prototype.setStatus=function(e){return this},n.prototype.updateName=function(e){return this},n.prototype.end=function(e){},n.prototype.isRecording=function(){return!1},n.prototype.recordException=function(e,o){},n}();var ca=ve("OpenTelemetry Context Key SPAN");function Go(n){return n.getValue(ca)||void 0}c(Go,"getSpan");function Lu(){return Go(Ye.getInstance().active())}c(Lu,"getActiveSpan");function In(n,e){return n.setValue(ca,e)}c(In,"setSpan");function Iu(n){return n.deleteValue(ca)}c(Iu,"deleteSpan");function bu(n,e){return In(n,new Fe(e))}c(bu,"setSpanContext");function Ho(n){var e;return(e=Go(n))===null||e===void 0?void 0:e.spanContext()}c(Ho,"getSpanContext");var GE=/^([0-9a-f]{32})$/i,HE=/^[0-9a-f]{16}$/i;function Yo(n){return GE.test(n)&&n!==Bo}c(Yo,"isValidTraceId");function Pu(n){return HE.test(n)&&n!==ko}c(Pu,"isValidSpanId");function se(n){return Yo(n.traceId)&&Pu(n.spanId)}c(se,"isSpanContextValid");function Cu(n){return new Fe(n)}c(Cu,"wrapSpanContext");var ua=Ye.getInstance(),Fo=function(){function n(){}return c(n,"NoopTracer"),n.prototype.startSpan=function(e,o,a){a===void 0&&(a=ua.active());var s=!!o?.root;if(s)return new Fe;var u=a&&Ho(a);return YE(u)&&se(u)?new Fe(u):new Fe},n.prototype.startActiveSpan=function(e,o,a,s){var u,r,t;if(!(arguments.length<2)){arguments.length===2?t=o:arguments.length===3?(u=o,t=a):(u=o,r=a,t=s);var i=r??ua.active(),l=this.startSpan(e,u,i),p=In(i,l);return ua.with(p,t,void 0,l)}},n}();function YE(n){return typeof n=="object"&&typeof n.spanId=="string"&&typeof n.traceId=="string"&&typeof n.traceFlags=="number"}c(YE,"isSpanContext");var FE=new Fo,Uu=function(){function n(e,o,a,s){this._provider=e,this.name=o,this.version=a,this.options=s}return c(n,"ProxyTracer"),n.prototype.startSpan=function(e,o,a){return this._getTracer().startSpan(e,o,a)},n.prototype.startActiveSpan=function(e,o,a,s){var u=this._getTracer();return Reflect.apply(u.startActiveSpan,u,arguments)},n.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):FE},n}();var Mu=function(){function n(){}return c(n,"NoopTracerProvider"),n.prototype.getTracer=function(e,o,a){return new Fo},n}();var KE=new Mu,la=function(){function n(){}return c(n,"ProxyTracerProvider"),n.prototype.getTracer=function(e,o,a){var s;return(s=this.getDelegateTracer(e,o,a))!==null&&s!==void 0?s:new Uu(this,e,o,a)},n.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:KE},n.prototype.setDelegate=function(e){this._delegate=e},n.prototype.getDelegateTracer=function(e,o,a){var s;return(s=this._delegate)===null||s===void 0?void 0:s.getTracer(e,o,a)},n}();var Cr;(function(n){n[n.NOT_RECORD=0]="NOT_RECORD",n[n.RECORD=1]="RECORD",n[n.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Cr||(Cr={}));var Pt;(function(n){n[n.INTERNAL=0]="INTERNAL",n[n.SERVER=1]="SERVER",n[n.CLIENT=2]="CLIENT",n[n.PRODUCER=3]="PRODUCER",n[n.CONSUMER=4]="CONSUMER"})(Pt||(Pt={}));var zt;(function(n){n[n.UNSET=0]="UNSET",n[n.OK=1]="OK",n[n.ERROR=2]="ERROR"})(zt||(zt={}));var pa="[_0-9a-z-*/]",jE="[a-z]"+pa+"{0,255}",WE="[a-z0-9]"+pa+"{0,240}@[a-z]"+pa+"{0,13}",qE=new RegExp("^(?:"+jE+"|"+WE+")$"),zE=/^[ -~]{0,255}[!-~]$/,$E=/,|=/;function Du(n){return qE.test(n)}c(Du,"validateKey");function wu(n){return zE.test(n)&&!$E.test(n)}c(wu,"validateValue");var Vu=32,XE=512,ku=",",Bu="=",Gu=function(){function n(e){this._internalState=new Map,e&&this._parse(e)}return c(n,"TraceStateImpl"),n.prototype.set=function(e,o){var a=this._clone();return a._internalState.has(e)&&a._internalState.delete(e),a._internalState.set(e,o),a},n.prototype.unset=function(e){var o=this._clone();return o._internalState.delete(e),o},n.prototype.get=function(e){return this._internalState.get(e)},n.prototype.serialize=function(){var e=this;return this._keys().reduce(function(o,a){return o.push(a+Bu+e.get(a)),o},[]).join(ku)},n.prototype._parse=function(e){e.length>XE||(this._internalState=e.split(ku).reverse().reduce(function(o,a){var s=a.trim(),u=s.indexOf(Bu);if(u!==-1){var r=s.slice(0,u),t=s.slice(u+1,a.length);Du(r)&&wu(t)&&o.set(r,t)}return o},new Map),this._internalState.size>Vu&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Vu))))},n.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},n.prototype._clone=function(){var e=new n;return e._internalState=new Map(this._internalState),e},n}();function _a(n){return new Gu(n)}c(_a,"createTraceState");var D=Ye.getInstance();var m=bt.instance();var JE=function(){function n(){}return c(n,"NoopMeterProvider"),n.prototype.getMeter=function(e,o,a){return ia},n}();var Hu=new JE;var fa="metrics",Yu=function(){function n(){}return c(n,"MetricsAPI"),n.getInstance=function(){return this._instance||(this._instance=new n),this._instance},n.prototype.setGlobalMeterProvider=function(e){return de(fa,e,bt.instance())},n.prototype.getMeterProvider=function(){return Kt(fa)||Hu},n.prototype.getMeter=function(e,o,a){return this.getMeterProvider().getMeter(e,o,a)},n.prototype.disable=function(){Se(fa,bt.instance())},n}();var ae=Yu.getInstance();var Fu=function(){function n(){}return c(n,"NoopTextMapPropagator"),n.prototype.inject=function(e,o){},n.prototype.extract=function(e,o){return e},n.prototype.fields=function(){return[]},n}();var Ea=ve("OpenTelemetry Baggage Key");function Ta(n){return n.getValue(Ea)||void 0}c(Ta,"getBaggage");function Ku(){return Ta(Ye.getInstance().active())}c(Ku,"getActiveBaggage");function ju(n,e){return n.setValue(Ea,e)}c(ju,"setBaggage");function Wu(n){return n.deleteValue(Ea)}c(Wu,"deleteBaggage");var da="propagation",ZE=new Fu,qu=function(){function n(){this.createBaggage=Nu,this.getBaggage=Ta,this.getActiveBaggage=Ku,this.setBaggage=ju,this.deleteBaggage=Wu}return c(n,"PropagationAPI"),n.getInstance=function(){return this._instance||(this._instance=new n),this._instance},n.prototype.setGlobalPropagator=function(e){return de(da,e,bt.instance())},n.prototype.inject=function(e,o,a){return a===void 0&&(a=gu),this._getGlobalPropagator().inject(e,o,a)},n.prototype.extract=function(e,o,a){return a===void 0&&(a=xu),this._getGlobalPropagator().extract(e,o,a)},n.prototype.fields=function(){return this._getGlobalPropagator().fields()},n.prototype.disable=function(){Se(da,bt.instance())},n.prototype._getGlobalPropagator=function(){return Kt(da)||ZE},n}();var mt=qu.getInstance();var Sa="trace",zu=function(){function n(){this._proxyTracerProvider=new la,this.wrapSpanContext=Cu,this.isSpanContextValid=se,this.deleteSpan=Iu,this.getSpan=Go,this.getActiveSpan=Lu,this.getSpanContext=Ho,this.setSpan=In,this.setSpanContext=bu}return c(n,"TraceAPI"),n.getInstance=function(){return this._instance||(this._instance=new n),this._instance},n.prototype.setGlobalTracerProvider=function(e){var o=de(Sa,this._proxyTracerProvider,bt.instance());return o&&this._proxyTracerProvider.setDelegate(e),o},n.prototype.getTracerProvider=function(){return Kt(Sa)||this._proxyTracerProvider},n.prototype.getTracer=function(e,o){return this.getTracerProvider().getTracer(e,o)},n.prototype.disable=function(){Se(Sa,bt.instance()),this._proxyTracerProvider=new la},n}();var H=zu.getInstance();var Ur=class{static{c(this,"NoopLogger")}emit(e){}},bn=new Ur;var ha=class{static{c(this,"NoopLoggerProvider")}getLogger(e,o,a){return new Ur}},Ko=new ha;var jo=class{static{c(this,"ProxyLogger")}constructor(e,o,a,s){this._provider=e,this.name=o,this.version=a,this.options=s}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):bn}};var Pn=class{static{c(this,"ProxyLoggerProvider")}getLogger(e,o,a){var s;return(s=this.getDelegateLogger(e,o,a))!==null&&s!==void 0?s:new jo(this,e,o,a)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:Ko}setDelegate(e){this._delegate=e}getDelegateLogger(e,o,a){var s;return(s=this._delegate)===null||s===void 0?void 0:s.getLogger(e,o,a)}};var Aa=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};var Cn=Symbol.for("io.opentelemetry.js.api.logs"),Mr=Aa;function $u(n,e,o){return a=>a===n?e:o}c($u,"makeGetter");var ma=1;var Wo=class n{static{c(this,"LogsAPI")}constructor(){this._proxyLoggerProvider=new Pn}static getInstance(){return this._instance||(this._instance=new n),this._instance}setGlobalLoggerProvider(e){return Mr[Cn]?this.getLoggerProvider():(Mr[Cn]=$u(ma,e,Ko),this._proxyLoggerProvider.setDelegate(e),e)}getLoggerProvider(){var e,o;return(o=(e=Mr[Cn])===null||e===void 0?void 0:e.call(Mr,ma))!==null&&o!==void 0?o:this._proxyLoggerProvider}getLogger(e,o,a){return this.getLoggerProvider().getLogger(e,o,a)}disable(){delete Mr[Cn],this._proxyLoggerProvider=new Pn}};var Dr=Wo.getInstance();function Xu(n){return typeof n=="object"&&n!==null&&"addEventListener"in n&&typeof n.addEventListener=="function"&&"removeEventListener"in n&&typeof n.removeEventListener=="function"}c(Xu,"isListenerObject");var Ju="OT_ZONE_CONTEXT",wr=class{static{c(this,"ZoneContextManager")}_enabled=!1;_zoneCounter=0;_activeContextFromZone(e){return e&&e.get(Ju)||Dt}_bindFunction(e,o){let a=this,s=c(function(...u){return a.with(e,()=>o.apply(this,u))},"contextWrapper");return Object.defineProperty(s,"length",{enumerable:!1,configurable:!0,writable:!1,value:o.length}),s}_bindListener(e,o){let a=o;return a.__ot_listeners!==void 0||(a.__ot_listeners={},typeof a.addEventListener=="function"&&(a.addEventListener=this._patchAddEventListener(a,a.addEventListener,e)),typeof a.removeEventListener=="function"&&(a.removeEventListener=this._patchRemoveEventListener(a,a.removeEventListener))),o}_createZoneName(){this._zoneCounter++;let e=Math.random();return`${this._zoneCounter}-${e}`}_createZone(e,o){return Zone.current.fork({name:e,properties:{[Ju]:o}})}_getActiveZone(){return Zone.current}_patchAddEventListener(e,o,a){let s=this;return function(u,r,t){e.__ot_listeners===void 0&&(e.__ot_listeners={});let i=e.__ot_listeners[u];i===void 0&&(i=new WeakMap,e.__ot_listeners[u]=i);let l=s.bind(a,r);return i.set(r,l),o.call(this,u,l,t)}}_patchRemoveEventListener(e,o){return function(a,s){if(e.__ot_listeners===void 0||e.__ot_listeners[a]===void 0)return o.call(this,a,s);let u=e.__ot_listeners[a],r=u.get(s);return u.delete(s),o.call(this,a,r||s)}}active(){if(!this._enabled)return Dt;let e=this._getActiveZone(),o=this._activeContextFromZone(e);return o||Dt}bind(e,o){return e===void 0&&(e=this.active()),typeof o=="function"?this._bindFunction(e,o):(Xu(o)&&this._bindListener(e,o),o)}disable(){return this._enabled=!1,this}enable(){return this._enabled=!0,this}with(e,o,a,...s){let u=this._createZoneName();return this._createZone(u,e).run(o,a,s)}};var he=globalThis;function $t(n){return(he.__Zone_symbol_prefix||"__zone_symbol__")+n}c($t,"__symbol__");function QE(){let n=he.performance;function e(X){n&&n.mark&&n.mark(X)}c(e,"mark");function o(X,h){n&&n.measure&&n.measure(X,h)}c(o,"performanceMeasure"),e("Zone");class a{static{c(this,"ZoneImpl")}static __symbol__=$t;static assertZonePatched(){if(he.Promise!==j.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let h=a.current;for(;h.parent;)h=h.parent;return h}static get current(){return V.zone}static get currentTask(){return F}static __load_patch(h,A,d=!1){if(j.hasOwnProperty(h)){let I=he[$t("forceDuplicateZoneCheck")]===!0;if(!d&&I)throw Error("Already loaded patch: "+h)}else if(!he["__Zone_disable_"+h]){let I="Zone:"+h;e(I),j[h]=A(he,a,B),o(I,I)}}get parent(){return this._parent}get name(){return this._name}_parent;_name;_properties;_zoneDelegate;constructor(h,A){this._parent=h,this._name=A?A.name||"unnamed":"<root>",this._properties=A&&A.properties||{},this._zoneDelegate=new u(this,this._parent&&this._parent._zoneDelegate,A)}get(h){let A=this.getZoneWith(h);if(A)return A._properties[h]}getZoneWith(h){let A=this;for(;A;){if(A._properties.hasOwnProperty(h))return A;A=A._parent}return null}fork(h){if(!h)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,h)}wrap(h,A){if(typeof h!="function")throw new Error("Expecting function got: "+h);let d=this._zoneDelegate.intercept(this,h,A),I=this;return function(){return I.runGuarded(d,this,arguments,A)}}run(h,A,d,I){V={parent:V,zone:this};try{return this._zoneDelegate.invoke(this,h,A,d,I)}finally{V=V.parent}}runGuarded(h,A=null,d,I){V={parent:V,zone:this};try{try{return this._zoneDelegate.invoke(this,h,A,d,I)}catch(nt){if(this._zoneDelegate.handleError(this,nt))throw nt}}finally{V=V.parent}}runTask(h,A,d){if(h.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(h.zone||$).name+"; Execution: "+this.name+")");let I=h,{type:nt,data:{isPeriodic:Ft=!1,isRefreshable:J=!1}={}}=h;if(h.state===lt&&(nt===ct||nt===P))return;let Ge=h.state!=Z;Ge&&I._transitionTo(Z,x);let ir=F;F=I,V={parent:V,zone:this};try{nt==P&&h.data&&!Ft&&!J&&(h.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,I,A,d)}catch(Gt){if(this._zoneDelegate.handleError(this,Gt))throw Gt}}finally{let Gt=h.state;if(Gt!==lt&&Gt!==Tt)if(nt==ct||Ft||J&&Gt===L)Ge&&I._transitionTo(x,Z,L);else{let Ir=I._zoneDelegates;this._updateTaskCount(I,-1),Ge&&I._transitionTo(lt,Z,lt),J&&(I._zoneDelegates=Ir)}V=V.parent,F=ir}}scheduleTask(h){if(h.zone&&h.zone!==this){let d=this;for(;d;){if(d===h.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${h.zone.name}`);d=d.parent}}h._transitionTo(L,lt);let A=[];h._zoneDelegates=A,h._zone=this;try{h=this._zoneDelegate.scheduleTask(this,h)}catch(d){throw h._transitionTo(Tt,L,lt),this._zoneDelegate.handleError(this,d),d}return h._zoneDelegates===A&&this._updateTaskCount(h,1),h.state==L&&h._transitionTo(x,L),h}scheduleMicroTask(h,A,d,I){return this.scheduleTask(new r(ot,h,A,d,I,void 0))}scheduleMacroTask(h,A,d,I,nt){return this.scheduleTask(new r(P,h,A,d,I,nt))}scheduleEventTask(h,A,d,I,nt){return this.scheduleTask(new r(ct,h,A,d,I,nt))}cancelTask(h){if(h.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(h.zone||$).name+"; Execution: "+this.name+")");if(!(h.state!==x&&h.state!==Z)){h._transitionTo(tt,x,Z);try{this._zoneDelegate.cancelTask(this,h)}catch(A){throw h._transitionTo(Tt,tt),this._zoneDelegate.handleError(this,A),A}return this._updateTaskCount(h,-1),h._transitionTo(lt,tt),h.runCount=-1,h}}_updateTaskCount(h,A){let d=h._zoneDelegates;A==-1&&(h._zoneDelegates=null);for(let I=0;I<d.length;I++)d[I]._updateTaskCount(h.type,A)}}let s={name:"",onHasTask:c((X,h,A,d)=>X.hasTask(A,d),"onHasTask"),onScheduleTask:c((X,h,A,d)=>X.scheduleTask(A,d),"onScheduleTask"),onInvokeTask:c((X,h,A,d,I,nt)=>X.invokeTask(A,d,I,nt),"onInvokeTask"),onCancelTask:c((X,h,A,d)=>X.cancelTask(A,d),"onCancelTask")};class u{static{c(this,"_ZoneDelegate")}get zone(){return this._zone}_zone;_taskCounts={microTask:0,macroTask:0,eventTask:0};_parentDelegate;_forkDlgt;_forkZS;_forkCurrZone;_interceptDlgt;_interceptZS;_interceptCurrZone;_invokeDlgt;_invokeZS;_invokeCurrZone;_handleErrorDlgt;_handleErrorZS;_handleErrorCurrZone;_scheduleTaskDlgt;_scheduleTaskZS;_scheduleTaskCurrZone;_invokeTaskDlgt;_invokeTaskZS;_invokeTaskCurrZone;_cancelTaskDlgt;_cancelTaskZS;_cancelTaskCurrZone;_hasTaskDlgt;_hasTaskDlgtOwner;_hasTaskZS;_hasTaskCurrZone;constructor(h,A,d){this._zone=h,this._parentDelegate=A,this._forkZS=d&&(d&&d.onFork?d:A._forkZS),this._forkDlgt=d&&(d.onFork?A:A._forkDlgt),this._forkCurrZone=d&&(d.onFork?this._zone:A._forkCurrZone),this._interceptZS=d&&(d.onIntercept?d:A._interceptZS),this._interceptDlgt=d&&(d.onIntercept?A:A._interceptDlgt),this._interceptCurrZone=d&&(d.onIntercept?this._zone:A._interceptCurrZone),this._invokeZS=d&&(d.onInvoke?d:A._invokeZS),this._invokeDlgt=d&&(d.onInvoke?A:A._invokeDlgt),this._invokeCurrZone=d&&(d.onInvoke?this._zone:A._invokeCurrZone),this._handleErrorZS=d&&(d.onHandleError?d:A._handleErrorZS),this._handleErrorDlgt=d&&(d.onHandleError?A:A._handleErrorDlgt),this._handleErrorCurrZone=d&&(d.onHandleError?this._zone:A._handleErrorCurrZone),this._scheduleTaskZS=d&&(d.onScheduleTask?d:A._scheduleTaskZS),this._scheduleTaskDlgt=d&&(d.onScheduleTask?A:A._scheduleTaskDlgt),this._scheduleTaskCurrZone=d&&(d.onScheduleTask?this._zone:A._scheduleTaskCurrZone),this._invokeTaskZS=d&&(d.onInvokeTask?d:A._invokeTaskZS),this._invokeTaskDlgt=d&&(d.onInvokeTask?A:A._invokeTaskDlgt),this._invokeTaskCurrZone=d&&(d.onInvokeTask?this._zone:A._invokeTaskCurrZone),this._cancelTaskZS=d&&(d.onCancelTask?d:A._cancelTaskZS),this._cancelTaskDlgt=d&&(d.onCancelTask?A:A._cancelTaskDlgt),this._cancelTaskCurrZone=d&&(d.onCancelTask?this._zone:A._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let I=d&&d.onHasTask,nt=A&&A._hasTaskZS;(I||nt)&&(this._hasTaskZS=I?d:s,this._hasTaskDlgt=A,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,d.onScheduleTask||(this._scheduleTaskZS=s,this._scheduleTaskDlgt=A,this._scheduleTaskCurrZone=this._zone),d.onInvokeTask||(this._invokeTaskZS=s,this._invokeTaskDlgt=A,this._invokeTaskCurrZone=this._zone),d.onCancelTask||(this._cancelTaskZS=s,this._cancelTaskDlgt=A,this._cancelTaskCurrZone=this._zone))}fork(h,A){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,h,A):new a(h,A)}intercept(h,A,d){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,h,A,d):A}invoke(h,A,d,I,nt){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,h,A,d,I,nt):A.apply(d,I)}handleError(h,A){return this._handleErrorZS?this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,h,A):!0}scheduleTask(h,A){let d=A;if(this._scheduleTaskZS)this._hasTaskZS&&d._zoneDelegates.push(this._hasTaskDlgtOwner),d=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,h,A),d||(d=A);else if(A.scheduleFn)A.scheduleFn(A);else if(A.type==ot)v(A);else throw new Error("Task is missing scheduleFn.");return d}invokeTask(h,A,d,I){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,h,A,d,I):A.callback.apply(d,I)}cancelTask(h,A){let d;if(this._cancelTaskZS)d=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,h,A);else{if(!A.cancelFn)throw Error("Task is not cancelable");d=A.cancelFn(A)}return d}hasTask(h,A){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,h,A)}catch(d){this.handleError(h,d)}}_updateTaskCount(h,A){let d=this._taskCounts,I=d[h],nt=d[h]=I+A;if(nt<0)throw new Error("More tasks executed then were scheduled.");if(I==0||nt==0){let Ft={microTask:d.microTask>0,macroTask:d.macroTask>0,eventTask:d.eventTask>0,change:h};this.hasTask(this._zone,Ft)}}}class r{static{c(this,"ZoneTask")}type;source;invoke;callback;data;scheduleFn;cancelFn;_zone=null;runCount=0;_zoneDelegates=null;_state="notScheduled";constructor(h,A,d,I,nt,Ft){if(this.type=h,this.source=A,this.data=I,this.scheduleFn=nt,this.cancelFn=Ft,!d)throw new Error("callback is not defined");this.callback=d;let J=this;h===ct&&I&&I.useG?this.invoke=r.invokeTask:this.invoke=function(){return r.invokeTask.call(he,J,this,arguments)}}static invokeTask(h,A,d){h||(h=this),Mt++;try{return h.runCount++,h.zone.runTask(h,A,d)}finally{Mt==1&&Y(),Mt--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(lt,L)}_transitionTo(h,A,d){if(this._state===A||this._state===d)this._state=h,h==lt&&(this._zoneDelegates=null);else throw new Error(`${this.type} '${this.source}': can not transition to '${h}', expecting state '${A}'${d?" or '"+d+"'":""}, was '${this._state}'.`)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}let t=$t("setTimeout"),i=$t("Promise"),l=$t("then"),p=[],E=!1,y;function g(X){if(y||he[i]&&(y=he[i].resolve(0)),y){let h=y[l];h||(h=y.then),h.call(y,X)}else he[t](X,0)}c(g,"nativeScheduleMicroTask");function v(X){Mt===0&&p.length===0&&g(Y),X&&p.push(X)}c(v,"scheduleMicroTask");function Y(){if(!E){for(E=!0;p.length;){let X=p;p=[];for(let h=0;h<X.length;h++){let A=X[h];try{A.zone.runTask(A,null,null)}catch(d){B.onUnhandledError(d)}}}B.microtaskDrainDone(),E=!1}}c(Y,"drainMicroTaskQueue");let $={name:"NO ZONE"},lt="notScheduled",L="scheduling",x="scheduled",Z="running",tt="canceling",Tt="unknown",ot="microTask",P="macroTask",ct="eventTask",j={},B={symbol:$t,currentZoneFrame:c(()=>V,"currentZoneFrame"),onUnhandledError:pt,microtaskDrainDone:pt,scheduleMicroTask:v,showUncaughtError:c(()=>!a[$t("ignoreConsoleErrorUncaughtError")],"showUncaughtError"),patchEventTarget:c(()=>[],"patchEventTarget"),patchOnProperties:pt,patchMethod:c(()=>pt,"patchMethod"),bindArguments:c(()=>[],"bindArguments"),patchThen:c(()=>pt,"patchThen"),patchMacroTask:c(()=>pt,"patchMacroTask"),patchEventPrototype:c(()=>pt,"patchEventPrototype"),isIEOrEdge:c(()=>!1,"isIEOrEdge"),getGlobalObjects:c(()=>{},"getGlobalObjects"),ObjectDefineProperty:c(()=>pt,"ObjectDefineProperty"),ObjectGetOwnPropertyDescriptor:c(()=>{},"ObjectGetOwnPropertyDescriptor"),ObjectCreate:c(()=>{},"ObjectCreate"),ArraySlice:c(()=>[],"ArraySlice"),patchClass:c(()=>pt,"patchClass"),wrapWithCurrentZone:c(()=>pt,"wrapWithCurrentZone"),filterProperties:c(()=>[],"filterProperties"),attachOriginToPatched:c(()=>pt,"attachOriginToPatched"),_redefineProperty:c(()=>pt,"_redefineProperty"),patchCallbacks:c(()=>pt,"patchCallbacks"),nativeScheduleMicroTask:g},V={parent:null,zone:new a(null,null)},F=null,Mt=0;function pt(){}return c(pt,"noop"),o("Zone","Zone"),a}c(QE,"initZone");function tT(){let n=globalThis,e=n[$t("forceDuplicateZoneCheck")]===!0;if(n.Zone&&(e||typeof n.Zone.__symbol__!="function"))throw new Error("Zone already loaded.");return n.Zone??=QE(),n.Zone}c(tT,"loadZone");var Mn=Object.getOwnPropertyDescriptor,xa=Object.defineProperty,ga=Object.getPrototypeOf,eT=Object.create,rT=Array.prototype.slice,va="addEventListener",La="removeEventListener",ya=$t(va),Oa=$t(La),Le="true",Ie="false",Dn=$t("");function Ia(n,e){return Zone.current.wrap(n,e)}c(Ia,"wrapWithCurrentZone");function ba(n,e,o,a,s){return Zone.current.scheduleMacroTask(n,e,o,a,s)}c(ba,"scheduleMacroTaskWithCurrentZone");var et=$t,$o=typeof window<"u",wn=$o?window:void 0,yt=$o&&wn||globalThis,nT="removeAttribute";function Pa(n,e){for(let o=n.length-1;o>=0;o--)typeof n[o]=="function"&&(n[o]=Ia(n[o],e+"_"+o));return n}c(Pa,"bindArguments");function oT(n,e){let o=n.constructor.name;for(let a=0;a<e.length;a++){let s=e[a],u=n[s];if(u){let r=Mn(n,s);if(!ol(r))continue;n[s]=(t=>{let i=c(function(){return t.apply(this,Pa(arguments,o+"."+s))},"patched");return Pe(i,t),i})(u)}}}c(oT,"patchPrototype");function ol(n){return n?n.writable===!1?!1:!(typeof n.get=="function"&&typeof n.set>"u"):!0}c(ol,"isPropertyWritable");var il=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Xo=!("nw"in yt)&&typeof yt.process<"u"&&yt.process.toString()==="[object process]",Ca=!Xo&&!il&&!!($o&&wn.HTMLElement),sl=typeof yt.process<"u"&&yt.process.toString()==="[object process]"&&!il&&!!($o&&wn.HTMLElement),zo={},iT=et("enable_beforeunload"),Zu=c(function(n){if(n=n||yt.event,!n)return;let e=zo[n.type];e||(e=zo[n.type]=et("ON_PROPERTY"+n.type));let o=this||n.target||yt,a=o[e],s;if(Ca&&o===wn&&n.type==="error"){let u=n;s=a&&a.call(this,u.message,u.filename,u.lineno,u.colno,u.error),s===!0&&n.preventDefault()}else s=a&&a.apply(this,arguments),n.type==="beforeunload"&&yt[iT]&&typeof s=="string"?n.returnValue=s:s!=null&&!s&&n.preventDefault();return s},"wrapFn");function Qu(n,e,o){let a=Mn(n,e);if(!a&&o&&Mn(o,e)&&(a={enumerable:!0,configurable:!0}),!a||!a.configurable)return;let s=et("on"+e+"patched");if(n.hasOwnProperty(s)&&n[s])return;delete a.writable,delete a.value;let u=a.get,r=a.set,t=e.slice(2),i=zo[t];i||(i=zo[t]=et("ON_PROPERTY"+t)),a.set=function(l){let p=this;if(!p&&n===yt&&(p=yt),!p)return;typeof p[i]=="function"&&p.removeEventListener(t,Zu),r?.call(p,null),p[i]=l,typeof l=="function"&&p.addEventListener(t,Zu,!1)},a.get=function(){let l=this;if(!l&&n===yt&&(l=yt),!l)return null;let p=l[i];if(p)return p;if(u){let E=u.call(this);if(E)return a.set.call(this,E),typeof l[nT]=="function"&&l.removeAttribute(e),E}return null},xa(n,e,a),n[s]=!0}c(Qu,"patchProperty");function al(n,e,o){if(e)for(let a=0;a<e.length;a++)Qu(n,"on"+e[a],o);else{let a=[];for(let s in n)s.slice(0,2)=="on"&&a.push(s);for(let s=0;s<a.length;s++)Qu(n,a[s],o)}}c(al,"patchOnProperties");var ue=et("originalInstance");function Un(n){let e=yt[n];if(!e)return;yt[et(n)]=e,yt[n]=function(){let s=Pa(arguments,n);switch(s.length){case 0:this[ue]=new e;break;case 1:this[ue]=new e(s[0]);break;case 2:this[ue]=new e(s[0],s[1]);break;case 3:this[ue]=new e(s[0],s[1],s[2]);break;case 4:this[ue]=new e(s[0],s[1],s[2],s[3]);break;default:throw new Error("Arg list too long.")}},Pe(yt[n],e);let o=new e(function(){}),a;for(a in o)n==="XMLHttpRequest"&&a==="responseBlob"||function(s){typeof o[s]=="function"?yt[n].prototype[s]=function(){return this[ue][s].apply(this[ue],arguments)}:xa(yt[n].prototype,s,{set:c(function(u){typeof u=="function"?(this[ue][s]=Ia(u,n+"."+s),Pe(this[ue][s],u)):this[ue][s]=u},"set"),get:c(function(){return this[ue][s]},"get")})}(a);for(a in e)a!=="prototype"&&e.hasOwnProperty(a)&&(yt[n][a]=e[a])}c(Un,"patchClass");function be(n,e,o){let a=n;for(;a&&!a.hasOwnProperty(e);)a=ga(a);!a&&n[e]&&(a=n);let s=et(e),u=null;if(a&&(!(u=a[s])||!a.hasOwnProperty(s))){u=a[s]=a[e];let r=a&&Mn(a,e);if(ol(r)){let t=o(u,s,e);a[e]=function(){return t(this,arguments)},Pe(a[e],u)}}return u}c(be,"patchMethod");function sT(n,e,o){let a=null;function s(u){let r=u.data;return r.args[r.cbIdx]=function(){u.invoke.apply(this,arguments)},a.apply(r.target,r.args),u}c(s,"scheduleTask"),a=be(n,e,u=>function(r,t){let i=o(r,t);return i.cbIdx>=0&&typeof t[i.cbIdx]=="function"?ba(i.name,t[i.cbIdx],i,s):u.apply(r,t)})}c(sT,"patchMacroTask");function Pe(n,e){n[et("OriginalDelegate")]=e}c(Pe,"attachOriginToPatched");var tl=!1,Ra=!1;function aT(){if(tl)return Ra;tl=!0;try{let n=wn.navigator.userAgent;(n.indexOf("MSIE ")!==-1||n.indexOf("Trident/")!==-1||n.indexOf("Edge/")!==-1)&&(Ra=!0)}catch{}return Ra}c(aT,"isIEOrEdge");function el(n){return typeof n=="function"}c(el,"isFunction");function rl(n){return typeof n=="number"}c(rl,"isNumber");var cT={useG:!0},Xt={},cl={},ul=new RegExp("^"+Dn+"(\\w+)(true|false)$"),ll=et("propagationStopped");function pl(n,e){let o=(e?e(n):n)+Ie,a=(e?e(n):n)+Le,s=Dn+o,u=Dn+a;Xt[n]={},Xt[n][Ie]=s,Xt[n][Le]=u}c(pl,"prepareEventNames");function uT(n,e,o,a){let s=a&&a.add||va,u=a&&a.rm||La,r=a&&a.listeners||"eventListeners",t=a&&a.rmAll||"removeAllListeners",i=et(s),l="."+s+":",p="prependListener",E="."+p+":",y=c(function(L,x,Z){if(L.isRemoved)return;let tt=L.callback;typeof tt=="object"&&tt.handleEvent&&(L.callback=P=>tt.handleEvent(P),L.originalDelegate=tt);let Tt;try{L.invoke(L,x,[Z])}catch(P){Tt=P}let ot=L.options;if(ot&&typeof ot=="object"&&ot.once){let P=L.originalDelegate?L.originalDelegate:L.callback;x[u].call(x,Z.type,P,ot)}return Tt},"invokeTask");function g(L,x,Z){if(x=x||n.event,!x)return;let tt=L||x.target||n,Tt=tt[Xt[x.type][Z?Le:Ie]];if(Tt){let ot=[];if(Tt.length===1){let P=y(Tt[0],tt,x);P&&ot.push(P)}else{let P=Tt.slice();for(let ct=0;ct<P.length&&!(x&&x[ll]===!0);ct++){let j=y(P[ct],tt,x);j&&ot.push(j)}}if(ot.length===1)throw ot[0];for(let P=0;P<ot.length;P++){let ct=ot[P];e.nativeScheduleMicroTask(()=>{throw ct})}}}c(g,"globalCallback");let v=c(function(L){return g(this,L,!1)},"globalZoneAwareCallback"),Y=c(function(L){return g(this,L,!0)},"globalZoneAwareCaptureCallback");function $(L,x){if(!L)return!1;let Z=!0;x&&x.useG!==void 0&&(Z=x.useG);let tt=x&&x.vh,Tt=!0;x&&x.chkDup!==void 0&&(Tt=x.chkDup);let ot=!1;x&&x.rt!==void 0&&(ot=x.rt);let P=L;for(;P&&!P.hasOwnProperty(s);)P=ga(P);if(!P&&L[s]&&(P=L),!P||P[i])return!1;let ct=x&&x.eventNameToString,j={},B=P[i]=P[s],V=P[et(u)]=P[u],F=P[et(r)]=P[r],Mt=P[et(t)]=P[t],pt;x&&x.prepend&&(pt=P[et(x.prepend)]=P[x.prepend]);function X(S,R){return R?typeof S=="boolean"?{capture:S,passive:!0}:S?typeof S=="object"&&S.passive!==!1?{...S,passive:!0}:S:{passive:!0}:S}c(X,"buildEventListenerOptions");let h=c(function(S){if(!j.isExisting)return B.call(j.target,j.eventName,j.capture?Y:v,j.options)},"customScheduleGlobal"),A=c(function(S){if(!S.isRemoved){let R=Xt[S.eventName],M;R&&(M=R[S.capture?Le:Ie]);let G=M&&S.target[M];if(G){for(let C=0;C<G.length;C++)if(G[C]===S){G.splice(C,1),S.isRemoved=!0,S.removeAbortListener&&(S.removeAbortListener(),S.removeAbortListener=null),G.length===0&&(S.allRemoved=!0,S.target[M]=null);break}}}if(S.allRemoved)return V.call(S.target,S.eventName,S.capture?Y:v,S.options)},"customCancelGlobal"),d=c(function(S){return B.call(j.target,j.eventName,S.invoke,j.options)},"customScheduleNonGlobal"),I=c(function(S){return pt.call(j.target,j.eventName,S.invoke,j.options)},"customSchedulePrepend"),nt=c(function(S){return V.call(S.target,S.eventName,S.invoke,S.options)},"customCancelNonGlobal"),Ft=Z?h:d,J=Z?A:nt,Ge=c(function(S,R){let M=typeof R;return M==="function"&&S.callback===R||M==="object"&&S.originalDelegate===R},"compareTaskCallbackVsDelegate"),ir=x?.diff||Ge,Gt=Zone[et("UNPATCHED_EVENTS")],Ir=n[et("PASSIVE_EVENTS")];function N(S){if(typeof S=="object"&&S!==null){let R={...S};return S.signal&&(R.signal=S.signal),R}return S}c(N,"copyEventListenerOptions");let O=c(function(S,R,M,G,C=!1,W=!1){return function(){let q=this||n,z=arguments[0];x&&x.transferEventName&&(z=x.transferEventName(z));let it=arguments[1];if(!it)return S.apply(this,arguments);if(Xo&&z==="uncaughtException")return S.apply(this,arguments);let st=!1;if(typeof it!="function"){if(!it.handleEvent)return S.apply(this,arguments);st=!0}if(tt&&!tt(S,it,q,arguments))return;let He=!!Ir&&Ir.indexOf(z)!==-1,Ee=N(X(arguments[2],He)),br=Ee?.signal;if(br?.aborted)return;if(Gt){for(let Te=0;Te<Gt.length;Te++)if(z===Gt[Te])return He?S.call(q,z,it,Ee):S.apply(this,arguments)}let ta=Ee?typeof Ee=="boolean"?!0:Ee.capture:!1,_u=Ee&&typeof Ee=="object"?Ee.once:!1,rE=Zone.current,ea=Xt[z];ea||(pl(z,ct),ea=Xt[z]);let fu=ea[ta?Le:Ie],Pr=q[fu],Eu=!1;if(Pr){if(Eu=!0,Tt){for(let Te=0;Te<Pr.length;Te++)if(ir(Pr[Te],it))return}}else Pr=q[fu]=[];let wo,Tu=q.constructor.name,du=cl[Tu];du&&(wo=du[z]),wo||(wo=Tu+R+(ct?ct(z):z)),j.options=Ee,_u&&(j.options.once=!1),j.target=q,j.capture=ta,j.eventName=z,j.isExisting=Eu;let Nn=Z?cT:void 0;Nn&&(Nn.taskData=j),br&&(j.options.signal=void 0);let ie=rE.scheduleEventTask(wo,it,Nn,M,G);if(br){j.options.signal=br;let Te=c(()=>ie.zone.cancelTask(ie),"onAbort");S.call(br,"abort",Te,{once:!0}),ie.removeAbortListener=()=>br.removeEventListener("abort",Te)}if(j.target=null,Nn&&(Nn.taskData=null),_u&&(j.options.once=!0),typeof ie.options!="boolean"&&(ie.options=Ee),ie.target=q,ie.capture=ta,ie.eventName=z,st&&(ie.originalDelegate=it),W?Pr.unshift(ie):Pr.push(ie),C)return q}},"makeAddListener");return P[s]=O(B,l,Ft,J,ot),pt&&(P[p]=O(pt,E,I,J,ot,!0)),P[u]=function(){let S=this||n,R=arguments[0];x&&x.transferEventName&&(R=x.transferEventName(R));let M=arguments[2],G=M?typeof M=="boolean"?!0:M.capture:!1,C=arguments[1];if(!C)return V.apply(this,arguments);if(tt&&!tt(V,C,S,arguments))return;let W=Xt[R],q;W&&(q=W[G?Le:Ie]);let z=q&&S[q];if(z)for(let it=0;it<z.length;it++){let st=z[it];if(ir(st,C)){if(z.splice(it,1),st.isRemoved=!0,z.length===0&&(st.allRemoved=!0,S[q]=null,!G&&typeof R=="string")){let He=Dn+"ON_PROPERTY"+R;S[He]=null}return st.zone.cancelTask(st),ot?S:void 0}}return V.apply(this,arguments)},P[r]=function(){let S=this||n,R=arguments[0];x&&x.transferEventName&&(R=x.transferEventName(R));let M=[],G=_l(S,ct?ct(R):R);for(let C=0;C<G.length;C++){let W=G[C],q=W.originalDelegate?W.originalDelegate:W.callback;M.push(q)}return M},P[t]=function(){let S=this||n,R=arguments[0];if(R){x&&x.transferEventName&&(R=x.transferEventName(R));let M=Xt[R];if(M){let G=M[Ie],C=M[Le],W=S[G],q=S[C];if(W){let z=W.slice();for(let it=0;it<z.length;it++){let st=z[it],He=st.originalDelegate?st.originalDelegate:st.callback;this[u].call(this,R,He,st.options)}}if(q){let z=q.slice();for(let it=0;it<z.length;it++){let st=z[it],He=st.originalDelegate?st.originalDelegate:st.callback;this[u].call(this,R,He,st.options)}}}}else{let M=Object.keys(S);for(let G=0;G<M.length;G++){let C=M[G],W=ul.exec(C),q=W&&W[1];q&&q!=="removeListener"&&this[t].call(this,q)}this[t].call(this,"removeListener")}if(ot)return this},Pe(P[s],B),Pe(P[u],V),Mt&&Pe(P[t],Mt),F&&Pe(P[r],F),!0}c($,"patchEventTargetMethods");let lt=[];for(let L=0;L<o.length;L++)lt[L]=$(o[L],a);return lt}c(uT,"patchEventTarget");function _l(n,e){if(!e){let u=[];for(let r in n){let t=ul.exec(r),i=t&&t[1];if(i&&(!e||i===e)){let l=n[r];if(l)for(let p=0;p<l.length;p++)u.push(l[p])}}return u}let o=Xt[e];o||(pl(e),o=Xt[e]);let a=n[o[Ie]],s=n[o[Le]];return a?s?a.concat(s):a.slice():s?s.slice():[]}c(_l,"findEventTasks");function lT(n,e){let o=n.Event;o&&o.prototype&&e.patchMethod(o.prototype,"stopImmediatePropagation",a=>function(s,u){s[ll]=!0,a&&a.apply(s,u)})}c(lT,"patchEventPrototype");function pT(n,e){e.patchMethod(n,"queueMicrotask",o=>function(a,s){Zone.current.scheduleMicroTask("queueMicrotask",s[0])})}c(pT,"patchQueueMicrotask");var qo=et("zoneTask");function Vr(n,e,o,a){let s=null,u=null;e+=a,o+=a;let r={};function t(l){let p=l.data;p.args[0]=function(){return l.invoke.apply(this,arguments)};let E=s.apply(n,p.args);return rl(E)?p.handleId=E:(p.handle=E,p.isRefreshable=el(E.refresh)),l}c(t,"scheduleTask");function i(l){let{handle:p,handleId:E}=l.data;return u.call(n,p??E)}c(i,"clearTask"),s=be(n,e,l=>function(p,E){if(el(E[0])){let y={isRefreshable:!1,isPeriodic:a==="Interval",delay:a==="Timeout"||a==="Interval"?E[1]||0:void 0,args:E},g=E[0];E[0]=c(function(){try{return g.apply(this,arguments)}finally{let{handle:Z,handleId:tt,isPeriodic:Tt,isRefreshable:ot}=y;!Tt&&!ot&&(tt?delete r[tt]:Z&&(Z[qo]=null))}},"timer");let v=ba(e,E[0],y,t,i);if(!v)return v;let{handleId:Y,handle:$,isRefreshable:lt,isPeriodic:L}=v.data;if(Y)r[Y]=v;else if($&&($[qo]=v,lt&&!L)){let x=$.refresh;$.refresh=function(){let{zone:Z,state:tt}=v;return tt==="notScheduled"?(v._state="scheduled",Z._updateTaskCount(v,1)):tt==="running"&&(v._state="scheduling"),x.call(this)}}return $??Y??v}else return l.apply(n,E)}),u=be(n,o,l=>function(p,E){let y=E[0],g;rl(y)?(g=r[y],delete r[y]):(g=y?.[qo],g?y[qo]=null:g=y),g?.type?g.cancelFn&&g.zone.cancelTask(g):l.apply(n,E)})}c(Vr,"patchTimer");function _T(n,e){let{isBrowser:o,isMix:a}=e.getGlobalObjects();if(!o&&!a||!n.customElements||!("customElements"in n))return;let s=["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"];e.patchCallbacks(e,n.customElements,"customElements","define",s)}c(_T,"patchCustomElements");function fT(n,e){if(Zone[e.symbol("patchEventTarget")])return;let{eventNames:o,zoneSymbolEventNames:a,TRUE_STR:s,FALSE_STR:u,ZONE_SYMBOL_PREFIX:r}=e.getGlobalObjects();for(let i=0;i<o.length;i++){let l=o[i],p=l+u,E=l+s,y=r+p,g=r+E;a[l]={},a[l][u]=y,a[l][s]=g}let t=n.EventTarget;if(!(!t||!t.prototype))return e.patchEventTarget(n,e,[t&&t.prototype]),!0}c(fT,"eventTargetPatch");function ET(n,e){e.patchEventPrototype(n,e)}c(ET,"patchEvent");function fl(n,e,o){if(!o||o.length===0)return e;let a=o.filter(u=>u.target===n);if(a.length===0)return e;let s=a[0].ignoreProperties;return e.filter(u=>s.indexOf(u)===-1)}c(fl,"filterProperties");function nl(n,e,o,a){if(!n)return;let s=fl(n,e,o);al(n,s,a)}c(nl,"patchFilteredProperties");function Na(n){return Object.getOwnPropertyNames(n).filter(e=>e.startsWith("on")&&e.length>2).map(e=>e.substring(2))}c(Na,"getOnEventNames");function TT(n,e){if(Xo&&!sl||Zone[n.symbol("patchEvents")])return;let o=e.__Zone_ignore_on_properties,a=[];if(Ca){let s=window;a=a.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);let u=[];nl(s,Na(s),o&&o.concat(u),ga(s))}a=a.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let s=0;s<a.length;s++){let u=e[a[s]];u?.prototype&&nl(u.prototype,Na(u.prototype),o)}}c(TT,"propertyDescriptorPatch");function dT(n){n.__load_patch("legacy",e=>{let o=e[n.__symbol__("legacyPatch")];o&&o()}),n.__load_patch("timers",e=>{let o="set",a="clear";Vr(e,o,a,"Timeout"),Vr(e,o,a,"Interval"),Vr(e,o,a,"Immediate")}),n.__load_patch("requestAnimationFrame",e=>{Vr(e,"request","cancel","AnimationFrame"),Vr(e,"mozRequest","mozCancel","AnimationFrame"),Vr(e,"webkitRequest","webkitCancel","AnimationFrame")}),n.__load_patch("blocking",(e,o)=>{let a=["alert","prompt","confirm"];for(let s=0;s<a.length;s++){let u=a[s];be(e,u,(r,t,i)=>function(l,p){return o.current.run(r,e,p,i)})}}),n.__load_patch("EventTarget",(e,o,a)=>{ET(e,a),fT(e,a);let s=e.XMLHttpRequestEventTarget;s&&s.prototype&&a.patchEventTarget(e,a,[s.prototype])}),n.__load_patch("MutationObserver",(e,o,a)=>{Un("MutationObserver"),Un("WebKitMutationObserver")}),n.__load_patch("IntersectionObserver",(e,o,a)=>{Un("IntersectionObserver")}),n.__load_patch("FileReader",(e,o,a)=>{Un("FileReader")}),n.__load_patch("on_property",(e,o,a)=>{TT(a,e)}),n.__load_patch("customElements",(e,o,a)=>{_T(e,a)}),n.__load_patch("XHR",(e,o)=>{l(e);let a=et("xhrTask"),s=et("xhrSync"),u=et("xhrListener"),r=et("xhrScheduled"),t=et("xhrURL"),i=et("xhrErrorBeforeScheduled");function l(p){let E=p.XMLHttpRequest;if(!E)return;let y=E.prototype;function g(B){return B[a]}c(g,"findPendingTask");let v=y[ya],Y=y[Oa];if(!v){let B=p.XMLHttpRequestEventTarget;if(B){let V=B.prototype;v=V[ya],Y=V[Oa]}}let $="readystatechange",lt="scheduled";function L(B){let V=B.data,F=V.target;F[r]=!1,F[i]=!1;let Mt=F[u];v||(v=F[ya],Y=F[Oa]),Mt&&Y.call(F,$,Mt);let pt=F[u]=()=>{if(F.readyState===F.DONE)if(!V.aborted&&F[r]&&B.state===lt){let h=F[o.__symbol__("loadfalse")];if(F.status!==0&&h&&h.length>0){let A=B.invoke;B.invoke=function(){let d=F[o.__symbol__("loadfalse")];for(let I=0;I<d.length;I++)d[I]===B&&d.splice(I,1);!V.aborted&&B.state===lt&&A.call(B)},h.push(B)}else B.invoke()}else!V.aborted&&F[r]===!1&&(F[i]=!0)};return v.call(F,$,pt),F[a]||(F[a]=B),ct.apply(F,V.args),F[r]=!0,B}c(L,"scheduleTask");function x(){}c(x,"placeholderCallback");function Z(B){let V=B.data;return V.aborted=!0,j.apply(V.target,V.args)}c(Z,"clearTask");let tt=be(y,"open",()=>function(B,V){return B[s]=V[2]==!1,B[t]=V[1],tt.apply(B,V)}),Tt="XMLHttpRequest.send",ot=et("fetchTaskAborting"),P=et("fetchTaskScheduling"),ct=be(y,"send",()=>function(B,V){if(o.current[P]===!0||B[s])return ct.apply(B,V);{let F={target:B,url:B[t],isPeriodic:!1,args:V,aborted:!1},Mt=ba(Tt,x,F,L,Z);B&&B[i]===!0&&!F.aborted&&Mt.state===lt&&Mt.invoke()}}),j=be(y,"abort",()=>function(B,V){let F=g(B);if(F&&typeof F.type=="string"){if(F.cancelFn==null||F.data&&F.data.aborted)return;F.zone.cancelTask(F)}else if(o.current[ot]===!0)return j.apply(B,V)})}c(l,"patchXHR")}),n.__load_patch("geolocation",e=>{e.navigator&&e.navigator.geolocation&&oT(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),n.__load_patch("PromiseRejectionEvent",(e,o)=>{function a(s){return function(u){_l(e,s).forEach(t=>{let i=e.PromiseRejectionEvent;if(i){let l=new i(s,{promise:u.promise,reason:u.rejection});t.invoke(l)}})}}c(a,"findPromiseRejectionHandler"),e.PromiseRejectionEvent&&(o[et("unhandledPromiseRejectionHandler")]=a("unhandledrejection"),o[et("rejectionHandledHandler")]=a("rejectionhandled"))}),n.__load_patch("queueMicrotask",(e,o,a)=>{pT(e,a)})}c(dT,"patchBrowser");function ST(n){n.__load_patch("ZoneAwarePromise",(e,o,a)=>{let s=Object.getOwnPropertyDescriptor,u=Object.defineProperty;function r(N){if(N&&N.toString===Object.prototype.toString){let O=N.constructor&&N.constructor.name;return(O||"")+": "+JSON.stringify(N)}return N?N.toString():Object.prototype.toString.call(N)}c(r,"readableObjectToString");let t=a.symbol,i=[],l=e[t("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")]!==!1,p=t("Promise"),E=t("then"),y="__creationTrace__";a.onUnhandledError=N=>{if(a.showUncaughtError()){let O=N&&N.rejection;O?console.error("Unhandled Promise rejection:",O instanceof Error?O.message:O,"; Zone:",N.zone.name,"; Task:",N.task&&N.task.source,"; Value:",O,O instanceof Error?O.stack:void 0):console.error(N)}},a.microtaskDrainDone=()=>{for(;i.length;){let N=i.shift();try{N.zone.runGuarded(()=>{throw N.throwOriginal?N.rejection:N})}catch(O){v(O)}}};let g=t("unhandledPromiseRejectionHandler");function v(N){a.onUnhandledError(N);try{let O=o[g];typeof O=="function"&&O.call(this,N)}catch{}}c(v,"handleUnhandledRejection");function Y(N){return N&&typeof N.then=="function"}c(Y,"isThenable");function $(N){return N}c($,"forwardResolution");function lt(N){return J.reject(N)}c(lt,"forwardRejection");let L=t("state"),x=t("value"),Z=t("finally"),tt=t("parentPromiseValue"),Tt=t("parentPromiseState"),ot="Promise.then",P=null,ct=!0,j=!1,B=0;function V(N,O){return S=>{try{X(N,O,S)}catch(R){X(N,!1,R)}}}c(V,"makeResolver");let F=c(function(){let N=!1;return c(function(S){return function(){N||(N=!0,S.apply(null,arguments))}},"wrapper")},"once"),Mt="Promise resolved with itself",pt=t("currentTaskTrace");function X(N,O,S){let R=F();if(N===S)throw new TypeError(Mt);if(N[L]===P){let M=null;try{(typeof S=="object"||typeof S=="function")&&(M=S&&S.then)}catch(G){return R(()=>{X(N,!1,G)})(),N}if(O!==j&&S instanceof J&&S.hasOwnProperty(L)&&S.hasOwnProperty(x)&&S[L]!==P)A(S),X(N,S[L],S[x]);else if(O!==j&&typeof M=="function")try{M.call(S,R(V(N,O)),R(V(N,!1)))}catch(G){R(()=>{X(N,!1,G)})()}else{N[L]=O;let G=N[x];if(N[x]=S,N[Z]===Z&&O===ct&&(N[L]=N[Tt],N[x]=N[tt]),O===j&&S instanceof Error){let C=o.currentTask&&o.currentTask.data&&o.currentTask.data[y];C&&u(S,pt,{configurable:!0,enumerable:!1,writable:!0,value:C})}for(let C=0;C<G.length;)d(N,G[C++],G[C++],G[C++],G[C++]);if(G.length==0&&O==j){N[L]=B;let C=S;try{throw new Error("Uncaught (in promise): "+r(S)+(S&&S.stack?`
`+S.stack:""))}catch(W){C=W}l&&(C.throwOriginal=!0),C.rejection=S,C.promise=N,C.zone=o.current,C.task=o.currentTask,i.push(C),a.scheduleMicroTask()}}}return N}c(X,"resolvePromise");let h=t("rejectionHandledHandler");function A(N){if(N[L]===B){try{let O=o[h];O&&typeof O=="function"&&O.call(this,{rejection:N[x],promise:N})}catch{}N[L]=j;for(let O=0;O<i.length;O++)N===i[O].promise&&i.splice(O,1)}}c(A,"clearRejectedNoCatch");function d(N,O,S,R,M){A(N);let G=N[L],C=G?typeof R=="function"?R:$:typeof M=="function"?M:lt;O.scheduleMicroTask(ot,()=>{try{let W=N[x],q=!!S&&Z===S[Z];q&&(S[tt]=W,S[Tt]=G);let z=O.run(C,void 0,q&&C!==lt&&C!==$?[]:[W]);X(S,!0,z)}catch(W){X(S,!1,W)}},S)}c(d,"scheduleResolveOrReject");let I="function ZoneAwarePromise() { [native code] }",nt=c(function(){},"noop"),Ft=e.AggregateError;class J{static{c(this,"ZoneAwarePromise")}static toString(){return I}static resolve(O){return O instanceof J?O:X(new this(null),ct,O)}static reject(O){return X(new this(null),j,O)}static withResolvers(){let O={};return O.promise=new J((S,R)=>{O.resolve=S,O.reject=R}),O}static any(O){if(!O||typeof O[Symbol.iterator]!="function")return Promise.reject(new Ft([],"All promises were rejected"));let S=[],R=0;try{for(let C of O)R++,S.push(J.resolve(C))}catch{return Promise.reject(new Ft([],"All promises were rejected"))}if(R===0)return Promise.reject(new Ft([],"All promises were rejected"));let M=!1,G=[];return new J((C,W)=>{for(let q=0;q<S.length;q++)S[q].then(z=>{M||(M=!0,C(z))},z=>{G.push(z),R--,R===0&&(M=!0,W(new Ft(G,"All promises were rejected")))})})}static race(O){let S,R,M=new this((W,q)=>{S=W,R=q});function G(W){S(W)}c(G,"onResolve");function C(W){R(W)}c(C,"onReject");for(let W of O)Y(W)||(W=this.resolve(W)),W.then(G,C);return M}static all(O){return J.allWithCallback(O)}static allSettled(O){return(this&&this.prototype instanceof J?this:J).allWithCallback(O,{thenCallback:c(R=>({status:"fulfilled",value:R}),"thenCallback"),errorCallback:c(R=>({status:"rejected",reason:R}),"errorCallback")})}static allWithCallback(O,S){let R,M,G=new this((z,it)=>{R=z,M=it}),C=2,W=0,q=[];for(let z of O){Y(z)||(z=this.resolve(z));let it=W;try{z.then(st=>{q[it]=S?S.thenCallback(st):st,C--,C===0&&R(q)},st=>{S?(q[it]=S.errorCallback(st),C--,C===0&&R(q)):M(st)})}catch(st){M(st)}C++,W++}return C-=2,C===0&&R(q),G}constructor(O){let S=this;if(!(S instanceof J))throw new Error("Must be an instanceof Promise.");S[L]=P,S[x]=[];try{let R=F();O&&O(R(V(S,ct)),R(V(S,j)))}catch(R){X(S,!1,R)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return J}then(O,S){let R=this.constructor?.[Symbol.species];(!R||typeof R!="function")&&(R=this.constructor||J);let M=new R(nt),G=o.current;return this[L]==P?this[x].push(G,M,O,S):d(this,G,M,O,S),M}catch(O){return this.then(null,O)}finally(O){let S=this.constructor?.[Symbol.species];(!S||typeof S!="function")&&(S=J);let R=new S(nt);R[Z]=Z;let M=o.current;return this[L]==P?this[x].push(M,R,O,O):d(this,M,R,O,O),R}}J.resolve=J.resolve,J.reject=J.reject,J.race=J.race,J.all=J.all;let Ge=e[p]=e.Promise;e.Promise=J;let ir=t("thenPatched");function Gt(N){let O=N.prototype,S=s(O,"then");if(S&&(S.writable===!1||!S.configurable))return;let R=O.then;O[E]=R,N.prototype.then=function(M,G){return new J((W,q)=>{R.call(this,W,q)}).then(M,G)},N[ir]=!0}c(Gt,"patchThen"),a.patchThen=Gt;function Ir(N){return function(O,S){let R=N.apply(O,S);if(R instanceof J)return R;let M=R.constructor;return M[ir]||Gt(M),R}}return c(Ir,"zoneify"),Ge&&(Gt(Ge),be(e,"fetch",N=>Ir(N))),Promise[o.__symbol__("uncaughtPromiseErrors")]=i,J})}c(ST,"patchPromise");function hT(n){n.__load_patch("toString",e=>{let o=Function.prototype.toString,a=et("OriginalDelegate"),s=et("Promise"),u=et("Error"),r=c(function(){if(typeof this=="function"){let p=this[a];if(p)return typeof p=="function"?o.call(p):Object.prototype.toString.call(p);if(this===Promise){let E=e[s];if(E)return o.call(E)}if(this===Error){let E=e[u];if(E)return o.call(E)}}return o.call(this)},"toString");r[a]=o,Function.prototype.toString=r;let t=Object.prototype.toString,i="[object Promise]";Object.prototype.toString=function(){return typeof Promise=="function"&&this instanceof Promise?i:t.call(this)}})}c(hT,"patchToString");function AT(n,e,o,a,s){let u=Zone.__symbol__(a);if(e[u])return;let r=e[u]=e[a];e[a]=function(t,i,l){return i&&i.prototype&&s.forEach(function(p){let E=`${o}.${a}::`+p,y=i.prototype;try{if(y.hasOwnProperty(p)){let g=n.ObjectGetOwnPropertyDescriptor(y,p);g&&g.value?(g.value=n.wrapWithCurrentZone(g.value,E),n._redefineProperty(i.prototype,p,g)):y[p]&&(y[p]=n.wrapWithCurrentZone(y[p],E))}else y[p]&&(y[p]=n.wrapWithCurrentZone(y[p],E))}catch{}}),r.call(e,t,i,l)},n.attachOriginToPatched(e[a],r)}c(AT,"patchCallbacks");function mT(n){n.__load_patch("util",(e,o,a)=>{let s=Na(e);a.patchOnProperties=al,a.patchMethod=be,a.bindArguments=Pa,a.patchMacroTask=sT;let u=o.__symbol__("BLACK_LISTED_EVENTS"),r=o.__symbol__("UNPATCHED_EVENTS");e[r]&&(e[u]=e[r]),e[u]&&(o[u]=o[r]=e[u]),a.patchEventPrototype=lT,a.patchEventTarget=uT,a.isIEOrEdge=aT,a.ObjectDefineProperty=xa,a.ObjectGetOwnPropertyDescriptor=Mn,a.ObjectCreate=eT,a.ArraySlice=rT,a.patchClass=Un,a.wrapWithCurrentZone=Ia,a.filterProperties=fl,a.attachOriginToPatched=Pe,a._redefineProperty=Object.defineProperty,a.patchCallbacks=AT,a.getGlobalObjects=()=>({globalSources:cl,zoneSymbolEventNames:Xt,eventNames:s,isBrowser:Ca,isMix:sl,isNode:Xo,TRUE_STR:Le,FALSE_STR:Ie,ZONE_SYMBOL_PREFIX:Dn,ADD_EVENT_LISTENER_STR:va,REMOVE_EVENT_LISTENER_STR:La})})}c(mT,"patchUtil");function yT(n){ST(n),hT(n),mT(n)}c(yT,"patchCommon");var El=tT();yT(El);dT(El);var Tl=ve("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function cr(n){return n.setValue(Tl,!0)}c(cr,"suppressTracing");function ur(n){return n.getValue(Tl)===!0}c(ur,"isTracingSuppressed");var dl="=",Jo=";",Vn=",",Zo="baggage";function Sl(n){return n.reduce((e,o)=>{let a=`${e}${e!==""?Vn:""}${o}`;return a.length>8192?e:a},"")}c(Sl,"serializeKeyPairs");function hl(n){return n.getAllEntries().map(([e,o])=>{let a=`${encodeURIComponent(e)}=${encodeURIComponent(o.value)}`;return o.metadata!==void 0&&(a+=Jo+o.metadata.toString()),a})}c(hl,"getKeyPairs");function Al(n){let e=n.split(Jo);if(e.length<=0)return;let o=e.shift();if(!o)return;let a=o.indexOf(dl);if(a<=0)return;let s=decodeURIComponent(o.substring(0,a).trim()),u=decodeURIComponent(o.substring(a+1).trim()),r;return e.length>0&&(r=na(e.join(Jo))),{key:s,value:u,metadata:r}}c(Al,"parsePairKeyValue");var lr=class{static{c(this,"W3CBaggagePropagator")}inject(e,o,a){let s=mt.getBaggage(e);if(!s||ur(e))return;let u=hl(s).filter(t=>t.length<=4096).slice(0,180),r=Sl(u);r.length>0&&a.set(o,Zo,r)}extract(e,o,a){let s=a.get(o,Zo),u=Array.isArray(s)?s.join(Vn):s;if(!u)return e;let r={};return u.length===0||(u.split(Vn).forEach(i=>{let l=Al(i);if(l){let p={value:l.value};l.metadata&&(p.metadata=l.metadata),r[l.key]=p}}),Object.entries(r).length===0)?e:mt.setBaggage(e,mt.createBaggage(r))}fields(){return[Zo]}};function pr(n){let e={};if(typeof n!="object"||n==null)return e;for(let[o,a]of Object.entries(n)){if(!xT(o)){m.warn(`Invalid attribute key: ${o}`);continue}if(!_r(a)){m.warn(`Invalid attribute value set for key: ${o}`);continue}Array.isArray(a)?e[o]=a.slice():e[o]=a}return e}c(pr,"sanitizeAttributes");function xT(n){return typeof n=="string"&&n.length>0}c(xT,"isAttributeKey");function _r(n){return n==null?!0:Array.isArray(n)?gT(n):ml(n)}c(_r,"isAttributeValue");function gT(n){let e;for(let o of n)if(o!=null){if(!e){if(ml(o)){e=typeof o;continue}return!1}if(typeof o!==e)return!1}return!0}c(gT,"isHomogeneousAttributeValueArray");function ml(n){switch(typeof n){case"number":case"boolean":case"string":return!0}return!1}c(ml,"isValidPrimitiveAttributeValue");function yl(){return n=>{m.error(vT(n))}}c(yl,"loggingErrorHandler");function vT(n){return typeof n=="string"?n:JSON.stringify(LT(n))}c(vT,"stringifyException");function LT(n){let e={},o=n;for(;o!==null;)Object.getOwnPropertyNames(o).forEach(a=>{if(e[a])return;let s=o[a];s&&(e[a]=String(s))}),o=Object.getPrototypeOf(o);return e}c(LT,"flattenException");var IT=yl();function Ot(n){try{IT(n)}catch{}}c(Ot,"globalErrorHandler");var kr=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};var Rt=performance;var Ol="2.0.1";var bT="net.host.name";var PT="http.method",CT="http.url",UT="http.target";var MT="http.scheme",DT="http.status_code";var wT="http.user_agent";var Ua=bT;var Br=PT,kn=CT,Gr=UT;var Ma=MT,Bn=DT;var Rl=wT;var Gn="error.type";var Qo="exception.message",Nl="exception.stacktrace",ti="exception.type";var Ce="http.request.method";var ei="http.request.method_original";var Ke="http.response.status_code",Da="http.route";var Hr="server.address",ri="server.port",ni="service.name";var Hn="telemetry.sdk.language";var xl="webjs",Yn="telemetry.sdk.name",Fn="telemetry.sdk.version";var Yr="url.full",fr="url.path";var gl="url.scheme";var vl="process.runtime.name";var Fr={[Yn]:"opentelemetry",[vl]:"browser",[Hn]:xl,[Fn]:Ol};var VT=9,kT=6,BT=Math.pow(10,kT),oi=Math.pow(10,VT);function xt(n){let e=n/1e3,o=Math.trunc(e),a=Math.round(n%1e3*BT);return[o,a]}c(xt,"millisToHrTime");function Kn(){let n=Rt.timeOrigin;if(typeof n!="number"){let e=Rt;n=e.timing&&e.timing.fetchStart}return n}c(Kn,"getTimeOrigin");function Jt(n){let e=xt(Kn()),o=xt(typeof n=="number"?n:Rt.now());return si(e,o)}c(Jt,"hrTime");function Ae(n){if(jn(n))return n;if(typeof n=="number")return n<Kn()?Jt(n):xt(n);if(n instanceof Date)return xt(n.getTime());throw TypeError("Invalid input type")}c(Ae,"timeInputToHrTime");function wa(n,e){let o=e[0]-n[0],a=e[1]-n[1];return a<0&&(o-=1,a+=oi),[o,a]}c(wa,"hrTimeDuration");function Zt(n){return n[0]*oi+n[1]}c(Zt,"hrTimeToNanoseconds");function Va(n){return n[0]*1e3+n[1]/1e6}c(Va,"hrTimeToMilliseconds");function Kr(n){return n[0]*1e6+n[1]/1e3}c(Kr,"hrTimeToMicroseconds");function jn(n){return Array.isArray(n)&&n.length===2&&typeof n[0]=="number"&&typeof n[1]=="number"}c(jn,"isTimeInputHrTime");function ii(n){return jn(n)||typeof n=="number"||n instanceof Date}c(ii,"isTimeInput");function si(n,e){let o=[n[0]+e[0],n[1]+e[1]];return o[1]>=oi&&(o[1]-=oi,o[0]+=1),o}c(si,"addHrTimes");var Lt;(function(n){n[n.SUCCESS=0]="SUCCESS",n[n.FAILED=1]="FAILED"})(Lt||(Lt={}));var Er=class{static{c(this,"CompositePropagator")}_propagators;_fields;constructor(e={}){this._propagators=e.propagators??[],this._fields=Array.from(new Set(this._propagators.map(o=>typeof o.fields=="function"?o.fields():[]).reduce((o,a)=>o.concat(a),[])))}inject(e,o,a){for(let s of this._propagators)try{s.inject(e,o,a)}catch(u){m.warn(`Failed to inject with ${s.constructor.name}. Err: ${u.message}`)}}extract(e,o,a){return this._propagators.reduce((s,u)=>{try{return u.extract(s,o,a)}catch(r){m.warn(`Failed to extract with ${u.constructor.name}. Err: ${r.message}`)}return s},e)}fields(){return this._fields.slice()}};var ka="[_0-9a-z-*/]",GT=`[a-z]${ka}{0,255}`,HT=`[a-z0-9]${ka}{0,240}@[a-z]${ka}{0,13}`,YT=new RegExp(`^(?:${GT}|${HT})$`),FT=/^[ -~]{0,255}[!-~]$/,KT=/,|=/;function Ll(n){return YT.test(n)}c(Ll,"validateKey");function Il(n){return FT.test(n)&&!KT.test(n)}c(Il,"validateValue");var bl=32,jT=512,Pl=",",Cl="=",ai=class n{static{c(this,"TraceState")}_internalState=new Map;constructor(e){e&&this._parse(e)}set(e,o){let a=this._clone();return a._internalState.has(e)&&a._internalState.delete(e),a._internalState.set(e,o),a}unset(e){let o=this._clone();return o._internalState.delete(e),o}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,o)=>(e.push(o+Cl+this.get(o)),e),[]).join(Pl)}_parse(e){e.length>jT||(this._internalState=e.split(Pl).reverse().reduce((o,a)=>{let s=a.trim(),u=s.indexOf(Cl);if(u!==-1){let r=s.slice(0,u),t=s.slice(u+1,a.length);Ll(r)&&Il(t)&&o.set(r,t)}return o},new Map),this._internalState.size>bl&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,bl))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new n;return e._internalState=new Map(this._internalState),e}};var jr="traceparent",ci="tracestate",WT="00",qT="(?!ff)[\\da-f]{2}",zT="(?![0]{32})[\\da-f]{32}",$T="(?![0]{16})[\\da-f]{16}",XT="[\\da-f]{2}",JT=new RegExp(`^\\s?(${qT})-(${zT})-(${$T})-(${XT})(-.*)?\\s?$`);function Ul(n){let e=JT.exec(n);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}c(Ul,"parseTraceParent");var Tr=class{static{c(this,"W3CTraceContextPropagator")}inject(e,o,a){let s=H.getSpanContext(e);if(!s||ur(e)||!se(s))return;let u=`${WT}-${s.traceId}-${s.spanId}-0${Number(s.traceFlags||Nt.NONE).toString(16)}`;a.set(o,jr,u),s.traceState&&a.set(o,ci,s.traceState.serialize())}extract(e,o,a){let s=a.get(o,jr);if(!s)return e;let u=Array.isArray(s)?s[0]:s;if(typeof u!="string")return e;let r=Ul(u);if(!r)return e;r.isRemote=!0;let t=a.get(o,ci);if(t){let i=Array.isArray(t)?t.join(","):t;r.traceState=new ai(typeof i=="string"?i:void 0)}return H.setSpanContext(e,r)}fields(){return[jr,ci]}};var ZT="[object Object]",QT="[object Null]",td="[object Undefined]",ed=Function.prototype,Ml=ed.toString,rd=Ml.call(Object),nd=Object.getPrototypeOf,Dl=Object.prototype,wl=Dl.hasOwnProperty,dr=Symbol?Symbol.toStringTag:void 0,Vl=Dl.toString;function Ba(n){if(!od(n)||id(n)!==ZT)return!1;let e=nd(n);if(e===null)return!0;let o=wl.call(e,"constructor")&&e.constructor;return typeof o=="function"&&o instanceof o&&Ml.call(o)===rd}c(Ba,"isPlainObject");function od(n){return n!=null&&typeof n=="object"}c(od,"isObjectLike");function id(n){return n==null?n===void 0?td:QT:dr&&dr in Object(n)?sd(n):ad(n)}c(id,"baseGetTag");function sd(n){let e=wl.call(n,dr),o=n[dr],a=!1;try{n[dr]=void 0,a=!0}catch{}let s=Vl.call(n);return a&&(e?n[dr]=o:delete n[dr]),s}c(sd,"getRawTag");function ad(n){return Vl.call(n)}c(ad,"objectToString");var cd=20;function qn(...n){let e=n.shift(),o=new WeakMap;for(;n.length>0;)e=Bl(e,n.shift(),0,o);return e}c(qn,"merge");function Ga(n){return li(n)?n.slice():n}c(Ga,"takeValue");function Bl(n,e,o=0,a){let s;if(!(o>cd)){if(o++,ui(n)||ui(e)||Gl(e))s=Ga(e);else if(li(n)){if(s=n.slice(),li(e))for(let u=0,r=e.length;u<r;u++)s.push(Ga(e[u]));else if(Wn(e)){let u=Object.keys(e);for(let r=0,t=u.length;r<t;r++){let i=u[r];s[i]=Ga(e[i])}}}else if(Wn(n))if(Wn(e)){if(!ud(n,e))return e;s=Object.assign({},n);let u=Object.keys(e);for(let r=0,t=u.length;r<t;r++){let i=u[r],l=e[i];if(ui(l))typeof l>"u"?delete s[i]:s[i]=l;else{let p=s[i],E=l;if(kl(n,i,a)||kl(e,i,a))delete s[i];else{if(Wn(p)&&Wn(E)){let y=a.get(p)||[],g=a.get(E)||[];y.push({obj:n,key:i}),g.push({obj:e,key:i}),a.set(p,y),a.set(E,g)}s[i]=Bl(s[i],l,o,a)}}}}else s=e;return s}}c(Bl,"mergeTwoObjects");function kl(n,e,o){let a=o.get(n[e])||[];for(let s=0,u=a.length;s<u;s++){let r=a[s];if(r.key===e&&r.obj===n)return!0}return!1}c(kl,"wasObjectReferenced");function li(n){return Array.isArray(n)}c(li,"isArray");function Gl(n){return typeof n=="function"}c(Gl,"isFunction");function Wn(n){return!ui(n)&&!li(n)&&!Gl(n)&&typeof n=="object"}c(Wn,"isObject");function ui(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"||typeof n>"u"||n instanceof Date||n instanceof RegExp||n===null}c(ui,"isPrimitive");function ud(n,e){return!(!Ba(n)||!Ba(e))}c(ud,"shouldMerge");var pi=class n extends Error{static{c(this,"TimeoutError")}constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}};function zn(n,e){let o,a=new Promise(c(function(u,r){o=setTimeout(c(function(){r(new pi("Operation timed out."))},"timeoutHandler"),e)},"timeoutFunction"));return Promise.race([n,a]).then(s=>(clearTimeout(o),s),s=>{throw clearTimeout(o),s})}c(zn,"callWithTimeout");function _i(n,e){return typeof e=="string"?n===e:!!n.match(e)}c(_i,"urlMatches");function $n(n,e){if(!e)return!1;for(let o of e)if(_i(n,o))return!0;return!1}c($n,"isUrlIgnored");var fi=class{static{c(this,"Deferred")}_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,o)=>{this._resolve=e,this._reject=o})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}};var Ue=class{static{c(this,"BindOnceFuture")}_callback;_that;_isCalled=!1;_deferred=new fi;constructor(e,o){this._callback=e,this._that=o}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(o=>this._deferred.resolve(o),o=>this._deferred.reject(o))}catch(o){this._deferred.reject(o)}}return this._deferred.promise}};function Hl(n,e){return new Promise(o=>{D.with(cr(D.active()),()=>{n.export(e,a=>{o(a)})})})}c(Hl,"_export");var Ei={_export:Hl};function Yl(n,e,o,a){for(let s=0,u=n.length;s<u;s++){let r=n[s];e&&r.setTracerProvider(e),o&&r.setMeterProvider(o),a&&r.setLoggerProvider&&r.setLoggerProvider(a),r.getConfig().enabled||r.enable()}}c(Yl,"enableInstrumentations");function Fl(n){n.forEach(e=>e.disable())}c(Fl,"disableInstrumentations");function Ya(n){let e=n.tracerProvider||H.getTracerProvider(),o=n.meterProvider||ae.getMeterProvider(),a=n.loggerProvider||Dr.getLoggerProvider(),s=n.instrumentations?.flat()??[];return Yl(s,e,o,a),()=>{Fl(s)}}c(Ya,"registerInstrumentations");var je=sr(ql());var Ti=class{static{c(this,"InstrumentationAbstract")}instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(e,o,a){this.instrumentationName=e,this.instrumentationVersion=o,this.setConfig(a),this._diag=m.createComponentLogger({namespace:e}),this._tracer=H.getTracer(e,o),this._meter=ae.getMeter(e,o),this._logger=Dr.getLogger(e,o),this._updateMetricInstruments()}_wrap=je.wrap;_unwrap=je.unwrap;_massWrap=je.massWrap;_massUnwrap=je.massUnwrap;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,o,a,s){if(e)try{e(a,s)}catch(u){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:o},u)}}};var Qt=class extends Ti{static{c(this,"InstrumentationBase")}constructor(e,o,a){super(e,o,a),this._config.enabled&&this.enable()}};function Me(n,e,o){let a,s;try{s=n()}catch(u){a=u}finally{if(e(a,s),a&&!o)throw a;return s}}c(Me,"safeExecuteInTheMiddle");function Et(n){return typeof n=="function"&&typeof n.__original=="function"&&typeof n.__unwrap=="function"&&n.__wrapped===!0}c(Et,"isWrapped");var at;(function(n){n[n.STABLE=1]="STABLE",n[n.OLD=2]="OLD",n[n.DUPLICATE=3]="DUPLICATE"})(at||(at={}));function Zn(n,e){let o=at.OLD,a=e?.split(",").map(s=>s.trim()).filter(s=>s!=="");for(let s of a??[])if(s.toLowerCase()===n+"/dup"){o=at.DUPLICATE;break}else s.toLowerCase()===n&&(o=at.STABLE);return o}c(Zn,"semconvStabilityFromStr");function Ka(){return"unknown_service"}c(Ka,"defaultServiceName");var Wr=c(n=>n!==null&&typeof n=="object"&&typeof n.then=="function","isPromiseLike");var di=class n{static{c(this,"ResourceImpl")}_rawAttributes;_asyncAttributesPending=!1;_memoizedAttributes;static FromAttributeList(e){let o=new n({});return o._rawAttributes=zl(e),o._asyncAttributesPending=e.filter(([a,s])=>Wr(s)).length>0,o}constructor(e){let o=e.attributes??{};this._rawAttributes=Object.entries(o).map(([a,s])=>(Wr(s)&&(this._asyncAttributesPending=!0),[a,s])),this._rawAttributes=zl(this._rawAttributes)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[o,a]=this._rawAttributes[e];this._rawAttributes[e]=[o,Wr(a)?await a:a]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&m.error("Accessing resource attributes before async attributes settled"),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[o,a]of this._rawAttributes){if(Wr(a)){m.debug(`Unsettled resource attribute ${o} skipped`);continue}a!=null&&(e[o]??=a)}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}merge(e){return e==null?this:n.FromAttributeList([...e.getRawAttributes(),...this.getRawAttributes()])}};function Qn(n){return di.FromAttributeList(Object.entries(n))}c(Qn,"resourceFromAttributes");function $l(n){return new di(n)}c($l,"resourceFromDetectedResource");function Sr(){return Qn({})}c(Sr,"emptyResource");function De(){return Qn({[ni]:Ka(),[Hn]:Fr[Hn],[Yn]:Fr[Yn],[Fn]:Fr[Fn]})}c(De,"defaultResource");function zl(n){return n.map(([e,o])=>Wr(o)?[e,o.catch(a=>{m.debug("promise rejection for resource attribute: %s - %s",e,a)})]:[e,o])}c(zl,"guardedRawAttributes");var ja=c((n={})=>(n.detectors||[]).map(o=>{try{let a=$l(o.detect(n));return m.debug(`${o.constructor.name} found resource.`,a),a}catch(a){return m.debug(`${o.constructor.name} failed: ${a.message}`),Sr()}}).reduce((o,a)=>o.merge(a),Sr()),"detectResources");var Si=class{static{c(this,"LogRecord")}hrTime;hrTimeObserved;spanContext;resource;instrumentationScope;attributes={};_severityText;_severityNumber;_body;totalAttributesCount=0;_isReadonly=!1;_logRecordLimits;set severityText(e){this._isLogRecordReadonly()||(this._severityText=e)}get severityText(){return this._severityText}set severityNumber(e){this._isLogRecordReadonly()||(this._severityNumber=e)}get severityNumber(){return this._severityNumber}set body(e){this._isLogRecordReadonly()||(this._body=e)}get body(){return this._body}get droppedAttributesCount(){return this.totalAttributesCount-Object.keys(this.attributes).length}constructor(e,o,a){let{timestamp:s,observedTimestamp:u,severityNumber:r,severityText:t,body:i,attributes:l={},context:p}=a,E=Date.now();if(this.hrTime=Ae(s??E),this.hrTimeObserved=Ae(u??E),p){let y=H.getSpanContext(p);y&&se(y)&&(this.spanContext=y)}this.severityNumber=r,this.severityText=t,this.body=i,this.resource=e.resource,this.instrumentationScope=o,this._logRecordLimits=e.logRecordLimits,this.setAttributes(l)}setAttribute(e,o){return this._isLogRecordReadonly()?this:o===null?this:e.length===0?(m.warn(`Invalid attribute key: ${e}`),this):!_r(o)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length>0)?(m.warn(`Invalid attribute value set for key: ${e}`),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this.droppedAttributesCount===1&&m.warn("Dropping extra attributes."),this):(_r(o)?this.attributes[e]=this._truncateToSize(o):this.attributes[e]=o,this))}setAttributes(e){for(let[o,a]of Object.entries(e))this.setAttribute(o,a);return this}setBody(e){return this.body=e,this}setSeverityNumber(e){return this.severityNumber=e,this}setSeverityText(e){return this.severityText=e,this}_makeReadonly(){this._isReadonly=!0}_truncateToSize(e){let o=this._logRecordLimits.attributeValueLengthLimit;return o<=0?(m.warn(`Attribute value limit must be positive, got ${o}`),e):typeof e=="string"?this._truncateToLimitUtil(e,o):Array.isArray(e)?e.map(a=>typeof a=="string"?this._truncateToLimitUtil(a,o):a):e}_truncateToLimitUtil(e,o){return e.length<=o?e:e.substring(0,o)}_isLogRecordReadonly(){return this._isReadonly&&m.warn("Can not execute the operation on emitted log record"),this._isReadonly}};var hi=class{static{c(this,"Logger")}instrumentationScope;_sharedState;constructor(e,o){this.instrumentationScope=e,this._sharedState=o}emit(e){let o=e.context||D.active(),a=new Si(this._sharedState,this.instrumentationScope,{context:o,...e});this._sharedState.activeProcessor.onEmit(a,o),a._makeReadonly()}};function Xl(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:void 0??1/0,attributeCountLimit:void 0??128},includeTraceContext:!0}}c(Xl,"loadDefaultConfig");function Jl(n){return{attributeCountLimit:n.attributeCountLimit??void 0??void 0??128,attributeValueLengthLimit:n.attributeValueLengthLimit??void 0??void 0??1/0}}c(Jl,"reconfigureLimits");var Ai=class{static{c(this,"NoopLogRecordProcessor")}forceFlush(){return Promise.resolve()}onEmit(e,o){}shutdown(){return Promise.resolve()}};var qr=class{static{c(this,"MultiLogRecordProcessor")}processors;forceFlushTimeoutMillis;constructor(e,o){this.processors=e,this.forceFlushTimeoutMillis=o}async forceFlush(){let e=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(o=>zn(o.forceFlush(),e)))}onEmit(e,o){this.processors.forEach(a=>a.onEmit(e,o))}async shutdown(){await Promise.all(this.processors.map(e=>e.shutdown()))}};var mi=class{static{c(this,"LoggerProviderSharedState")}resource;forceFlushTimeoutMillis;logRecordLimits;processors;loggers=new Map;activeProcessor;registeredLogRecordProcessors=[];constructor(e,o,a,s){this.resource=e,this.forceFlushTimeoutMillis=o,this.logRecordLimits=a,this.processors=s,s.length>0?(this.registeredLogRecordProcessors=s,this.activeProcessor=new qr(this.registeredLogRecordProcessors,this.forceFlushTimeoutMillis)):this.activeProcessor=new Ai}};var Ed="unknown",to=class{static{c(this,"LoggerProvider")}_shutdownOnce;_sharedState;constructor(e={}){let o=qn({},Xl(),e),a=e.resource??De();this._sharedState=new mi(a,o.forceFlushTimeoutMillis,Jl(o.logRecordLimits),e?.processors??[]),this._shutdownOnce=new Ue(this._shutdown,this)}getLogger(e,o,a){if(this._shutdownOnce.isCalled)return m.warn("A shutdown LoggerProvider cannot provide a Logger"),bn;e||m.warn("Logger requested without instrumentation scope name.");let s=e||Ed,u=`${s}@${o||""}:${a?.schemaUrl||""}`;return this._sharedState.loggers.has(u)||this._sharedState.loggers.set(u,new hi({name:s,version:o,schemaUrl:a?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(u)}addLogRecordProcessor(e){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(o=>m.error("Error while trying to shutdown current log record processor",o)),this._sharedState.registeredLogRecordProcessors.push(e),this._sharedState.activeProcessor=new qr(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)}forceFlush(){return this._shutdownOnce.isCalled?(m.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(m.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}};var yi=class{static{c(this,"BatchLogRecordProcessorBase")}_exporter;_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_finishedLogRecords=[];_timer;_shutdownOnce;constructor(e,o){this._exporter=e,this._maxExportBatchSize=o?.maxExportBatchSize??void 0??512,this._maxQueueSize=o?.maxQueueSize??void 0??2048,this._scheduledDelayMillis=o?.scheduledDelayMillis??void 0??5e3,this._exportTimeoutMillis=o?.exportTimeoutMillis??void 0??3e4,this._shutdownOnce=new Ue(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(m.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}onEmit(e){this._shutdownOnce.isCalled||this._addToBuffer(e)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}shutdown(){return this._shutdownOnce.call()}async _shutdown(){this.onShutdown(),await this._flushAll(),await this._exporter.shutdown()}_addToBuffer(e){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(e),this._maybeStartTimer())}_flushAll(){return new Promise((e,o)=>{let a=[],s=Math.ceil(this._finishedLogRecords.length/this._maxExportBatchSize);for(let u=0;u<s;u++)a.push(this._flushOneBatch());Promise.all(a).then(()=>{e()}).catch(o)})}_flushOneBatch(){return this._clearTimer(),this._finishedLogRecords.length===0?Promise.resolve():new Promise((e,o)=>{zn(this._export(this._finishedLogRecords.splice(0,this._maxExportBatchSize)),this._exportTimeoutMillis).then(()=>e()).catch(o)})}_maybeStartTimer(){this._timer===void 0&&(this._timer=setTimeout(()=>{this._flushOneBatch().then(()=>{this._finishedLogRecords.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{Ot(e)})},this._scheduledDelayMillis),this._timer,void 0)}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}_export(e){let o=c(()=>Ei._export(this._exporter,e).then(s=>{s.code!==Lt.SUCCESS&&Ot(s.error??new Error(`BatchLogRecordProcessor: log record export failed (status ${s})`))}).catch(Ot),"doExport"),a=e.map(s=>s.resource).filter(s=>s.asyncAttributesPending);return a.length===0?o():Promise.all(a.map(s=>s.waitForAsyncAttributes?.())).then(o,Ot)}};var zr=class extends yi{static{c(this,"BatchLogRecordProcessor")}_visibilityChangeListener;_pageHideListener;constructor(e,o){super(e,o),this._onInit(o)}onShutdown(){typeof document>"u"||(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))}_onInit(e){e?.disableAutoFlushOnDocumentHide===!0||typeof document>"u"||(this._visibilityChangeListener=()=>{document.visibilityState==="hidden"&&this.forceFlush()},this._pageHideListener=()=>{this.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))}};var gt;(function(n){n[n.DELTA=0]="DELTA",n[n.CUMULATIVE=1]="CUMULATIVE"})(gt||(gt={}));var k;(function(n){n.COUNTER="COUNTER",n.GAUGE="GAUGE",n.HISTOGRAM="HISTOGRAM",n.UP_DOWN_COUNTER="UP_DOWN_COUNTER",n.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",n.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",n.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(k||(k={}));var Ct;(function(n){n[n.HISTOGRAM=0]="HISTOGRAM",n[n.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",n[n.GAUGE=2]="GAUGE",n[n.SUM=3]="SUM"})(Ct||(Ct={}));function Zl(n){return n!=null}c(Zl,"isNotNullish");function Oi(n){let e=Object.keys(n);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(o=>[o,n[o]])))}c(Oi,"hashAttributes");function Ql(n){return`${n.name}:${n.version??""}:${n.schemaUrl??""}`}c(Ql,"instrumentationScopeId");var eo=class n extends Error{static{c(this,"TimeoutError")}constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}};function We(n,e){let o,a=new Promise(c(function(u,r){o=setTimeout(c(function(){r(new eo("Operation timed out."))},"timeoutHandler"),e)},"timeoutFunction"));return Promise.race([n,a]).then(s=>(clearTimeout(o),s),s=>{throw clearTimeout(o),s})}c(We,"callWithTimeout");async function tp(n){return Promise.all(n.map(async e=>{try{return{status:"fulfilled",value:await e}}catch(o){return{status:"rejected",reason:o}}}))}c(tp,"PromiseAllSettled");function ep(n){return n.status==="rejected"}c(ep,"isPromiseAllSettledRejectionResult");function Wa(n,e){let o=[];return n.forEach(a=>{o.push(...e(a))}),o}c(Wa,"FlatMap");function rp(n,e){if(n.size!==e.size)return!1;for(let o of n)if(!e.has(o))return!1;return!0}c(rp,"setEquals");function np(n,e){let o=0,a=n.length-1,s=n.length;for(;a>=o;){let u=o+Math.trunc((a-o)/2);n[u]<e?o=u+1:(s=u,a=u-1)}return s}c(np,"binarySearchUB");function op(n,e){return n.toLowerCase()===e.toLowerCase()}c(op,"equalsCaseInsensitive");var te;(function(n){n[n.DROP=0]="DROP",n[n.SUM=1]="SUM",n[n.LAST_VALUE=2]="LAST_VALUE",n[n.HISTOGRAM=3]="HISTOGRAM",n[n.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(te||(te={}));var ro=class{static{c(this,"DropAggregator")}kind=te.DROP;createAccumulation(){}merge(e,o){}diff(e,o){}toMetricData(e,o,a,s){}};function Td(n){let e=n.map(()=>0);return e.push(0),{buckets:{boundaries:n,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}c(Td,"createNewEmptyCheckpoint");var $r=class{static{c(this,"HistogramAccumulation")}startTime;_boundaries;_recordMinMax;_current;constructor(e,o,a=!0,s=Td(o)){this.startTime=e,this._boundaries=o,this._recordMinMax=a,this._current=s}record(e){if(Number.isNaN(e))return;this._current.count+=1,this._current.sum+=e,this._recordMinMax&&(this._current.min=Math.min(e,this._current.min),this._current.max=Math.max(e,this._current.max),this._current.hasMinMax=!0);let o=np(this._boundaries,e);this._current.buckets.counts[o]+=1}setStartTime(e){this.startTime=e}toPointValue(){return this._current}},Xr=class{static{c(this,"HistogramAggregator")}_boundaries;_recordMinMax;kind=te.HISTOGRAM;constructor(e,o){this._boundaries=e,this._recordMinMax=o}createAccumulation(e){return new $r(e,this._boundaries,this._recordMinMax)}merge(e,o){let a=e.toPointValue(),s=o.toPointValue(),u=a.buckets.counts,r=s.buckets.counts,t=new Array(u.length);for(let p=0;p<u.length;p++)t[p]=u[p]+r[p];let i=1/0,l=-1/0;return this._recordMinMax&&(a.hasMinMax&&s.hasMinMax?(i=Math.min(a.min,s.min),l=Math.max(a.max,s.max)):a.hasMinMax?(i=a.min,l=a.max):s.hasMinMax&&(i=s.min,l=s.max)),new $r(e.startTime,a.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:a.buckets.boundaries,counts:t},count:a.count+s.count,sum:a.sum+s.sum,hasMinMax:this._recordMinMax&&(a.hasMinMax||s.hasMinMax),min:i,max:l})}diff(e,o){let a=e.toPointValue(),s=o.toPointValue(),u=a.buckets.counts,r=s.buckets.counts,t=new Array(u.length);for(let i=0;i<u.length;i++)t[i]=r[i]-u[i];return new $r(o.startTime,a.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:a.buckets.boundaries,counts:t},count:s.count-a.count,sum:s.sum-a.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(e,o,a,s){return{descriptor:e,aggregationTemporality:o,dataPointType:Ct.HISTOGRAM,dataPoints:a.map(([u,r])=>{let t=r.toPointValue(),i=e.type===k.GAUGE||e.type===k.UP_DOWN_COUNTER||e.type===k.OBSERVABLE_GAUGE||e.type===k.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:r.startTime,endTime:s,value:{min:t.hasMinMax?t.min:void 0,max:t.hasMinMax?t.max:void 0,sum:i?void 0:t.sum,buckets:t.buckets,count:t.count}}})}}};var no=class n{static{c(this,"Buckets")}backing;indexBase;indexStart;indexEnd;constructor(e=new qa,o=0,a=0,s=0){this.backing=e,this.indexBase=o,this.indexStart=a,this.indexEnd=s}get offset(){return this.indexStart}get length(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1}counts(){return Array.from({length:this.length},(e,o)=>this.at(o))}at(e){let o=this.indexBase-this.indexStart;return e<o&&(e+=this.backing.length),e-=o,this.backing.countAt(e)}incrementBucket(e,o){this.backing.increment(e,o)}decrementBucket(e,o){this.backing.decrement(e,o)}trim(){for(let e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(let e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this._rotate()}downscale(e){this._rotate();let o=1+this.indexEnd-this.indexStart,a=1<<e,s=0,u=0;for(let r=this.indexStart;r<=this.indexEnd;){let t=r%a;t<0&&(t+=a);for(let i=t;i<a&&s<o;i++)this._relocateBucket(u,s),s++,r++;u++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart}clone(){return new n(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)}_rotate(){let e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)}_relocateBucket(e,o){e!==o&&this.incrementBucket(e,this.backing.emptyBucket(o))}},qa=class n{static{c(this,"BucketsBacking")}_counts;constructor(e=[0]){this._counts=e}get length(){return this._counts.length}countAt(e){return this._counts[e]}growTo(e,o,a){let s=new Array(e).fill(0);s.splice(a,this._counts.length-o,...this._counts.slice(o)),s.splice(0,o,...this._counts.slice(0,o)),this._counts=s}reverse(e,o){let a=Math.floor((e+o)/2)-e;for(let s=0;s<a;s++){let u=this._counts[e+s];this._counts[e+s]=this._counts[o-s-1],this._counts[o-s-1]=u}}emptyBucket(e){let o=this._counts[e];return this._counts[e]=0,o}increment(e,o){this._counts[e]+=o}decrement(e,o){this._counts[e]>=o?this._counts[e]-=o:this._counts[e]=0}clone(){return new n([...this._counts])}};var oo=Math.pow(2,-1022);function Ri(n){let e=new DataView(new ArrayBuffer(8));return e.setFloat64(0,n),((e.getUint32(0)&2146435072)>>20)-1023}c(Ri,"getNormalBase2");function Ni(n){let e=new DataView(new ArrayBuffer(8));e.setFloat64(0,n);let o=e.getUint32(0),a=e.getUint32(4);return(o&1048575)*Math.pow(2,32)+a}c(Ni,"getSignificand");function io(n,e){return n===0||n===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY||Number.isNaN(n)?n:n*Math.pow(2,e)}c(io,"ldexp");function sp(n){return n--,n|=n>>1,n|=n>>2,n|=n>>4,n|=n>>8,n|=n>>16,n++,n}c(sp,"nextGreaterSquare");var me=class extends Error{static{c(this,"MappingError")}};var xi=class{static{c(this,"ExponentMapping")}_shift;constructor(e){this._shift=-e}mapToIndex(e){if(e<oo)return this._minNormalLowerBoundaryIndex();let o=Ri(e),a=this._rightShift(Ni(e)-1,52);return o+a>>this._shift}lowerBoundary(e){let o=this._minNormalLowerBoundaryIndex();if(e<o)throw new me(`underflow: ${e} is < minimum lower boundary: ${o}`);let a=this._maxNormalLowerBoundaryIndex();if(e>a)throw new me(`overflow: ${e} is > maximum lower boundary: ${a}`);return io(1,e<<this._shift)}get scale(){return this._shift===0?0:-this._shift}_minNormalLowerBoundaryIndex(){let e=-1022>>this._shift;return this._shift<2&&e--,e}_maxNormalLowerBoundaryIndex(){return 1023>>this._shift}_rightShift(e,o){return Math.floor(e*Math.pow(2,-o))}};var gi=class{static{c(this,"LogarithmMapping")}_scale;_scaleFactor;_inverseFactor;constructor(e){this._scale=e,this._scaleFactor=io(Math.LOG2E,e),this._inverseFactor=io(Math.LN2,-e)}mapToIndex(e){if(e<=oo)return this._minNormalLowerBoundaryIndex()-1;if(Ni(e)===0)return(Ri(e)<<this._scale)-1;let o=Math.floor(Math.log(e)*this._scaleFactor),a=this._maxNormalLowerBoundaryIndex();return o>=a?a:o}lowerBoundary(e){let o=this._maxNormalLowerBoundaryIndex();if(e>=o){if(e===o)return 2*Math.exp((e-(1<<this._scale))/this._scaleFactor);throw new me(`overflow: ${e} is > maximum lower boundary: ${o}`)}let a=this._minNormalLowerBoundaryIndex();if(e<=a){if(e===a)return oo;if(e===a-1)return Math.exp((e+(1<<this._scale))/this._scaleFactor)/2;throw new me(`overflow: ${e} is < minimum lower boundary: ${a}`)}return Math.exp(e*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return-1022<<this._scale}_maxNormalLowerBoundaryIndex(){return(1024<<this._scale)-1}};var cp=-10,up=20,Sd=Array.from({length:31},(n,e)=>e>10?new gi(e-10):new xi(e-10));function Xa(n){if(n>up||n<cp)throw new me(`expected scale >= ${cp} && <= ${up}, got: ${n}`);return Sd[n+10]}c(Xa,"getMapping");var Jr=class n{static{c(this,"HighLow")}low;high;static combine(e,o){return new n(Math.min(e.low,o.low),Math.max(e.high,o.high))}constructor(e,o){this.low=e,this.high=o}},hd=20,Ad=160,Ja=2,vi=class n{static{c(this,"ExponentialHistogramAccumulation")}startTime;_maxSize;_recordMinMax;_sum;_count;_zeroCount;_min;_max;_positive;_negative;_mapping;constructor(e=e,o=Ad,a=!0,s=0,u=0,r=0,t=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,l=new no,p=new no,E=Xa(hd)){this.startTime=e,this._maxSize=o,this._recordMinMax=a,this._sum=s,this._count=u,this._zeroCount=r,this._min=t,this._max=i,this._positive=l,this._negative=p,this._mapping=E,this._maxSize<Ja&&(m.warn(`Exponential Histogram Max Size set to ${this._maxSize},                 changing to the minimum size of: ${Ja}`),this._maxSize=Ja)}record(e){this.updateByIncrement(e,1)}setStartTime(e){this.startTime=e}toPointValue(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}}get sum(){return this._sum}get min(){return this._min}get max(){return this._max}get count(){return this._count}get zeroCount(){return this._zeroCount}get scale(){return this._count===this._zeroCount?0:this._mapping.scale}get positive(){return this._positive}get negative(){return this._negative}updateByIncrement(e,o){if(!Number.isNaN(e)){if(e>this._max&&(this._max=e),e<this._min&&(this._min=e),this._count+=o,e===0){this._zeroCount+=o;return}this._sum+=e*o,e>0?this._updateBuckets(this._positive,e,o):this._updateBuckets(this._negative,-e,o)}}merge(e){this._count===0?(this._min=e.min,this._max=e.max):e.count!==0&&(e.min<this.min&&(this._min=e.min),e.max>this.max&&(this._max=e.max)),this.startTime=e.startTime,this._sum+=e.sum,this._count+=e.count,this._zeroCount+=e.zeroCount;let o=this._minScale(e);this._downscale(this.scale-o),this._mergeBuckets(this.positive,e,e.positive,o),this._mergeBuckets(this.negative,e,e.negative,o)}diff(e){this._min=1/0,this._max=-1/0,this._sum-=e.sum,this._count-=e.count,this._zeroCount-=e.zeroCount;let o=this._minScale(e);this._downscale(this.scale-o),this._diffBuckets(this.positive,e,e.positive,o),this._diffBuckets(this.negative,e,e.negative,o)}clone(){return new n(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)}_updateBuckets(e,o,a){let s=this._mapping.mapToIndex(o),u=!1,r=0,t=0;if(e.length===0?(e.indexStart=s,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):s<e.indexStart&&e.indexEnd-s>=this._maxSize?(u=!0,t=s,r=e.indexEnd):s>e.indexEnd&&s-e.indexStart>=this._maxSize&&(u=!0,t=e.indexStart,r=s),u){let i=this._changeScale(r,t);this._downscale(i),s=this._mapping.mapToIndex(o)}this._incrementIndexBy(e,s,a)}_incrementIndexBy(e,o,a){if(a===0)return;if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=o),o<e.indexStart){let u=e.indexEnd-o;u>=e.backing.length&&this._grow(e,u+1),e.indexStart=o}else if(o>e.indexEnd){let u=o-e.indexStart;u>=e.backing.length&&this._grow(e,u+1),e.indexEnd=o}let s=o-e.indexBase;s<0&&(s+=e.backing.length),e.incrementBucket(s,a)}_grow(e,o){let a=e.backing.length,s=e.indexBase-e.indexStart,u=a-s,r=sp(o);r>this._maxSize&&(r=this._maxSize);let t=r-s;e.backing.growTo(r,u,t)}_changeScale(e,o){let a=0;for(;e-o>=this._maxSize;)e>>=1,o>>=1,a++;return a}_downscale(e){if(e===0)return;if(e<0)throw new Error(`impossible change of scale: ${this.scale}`);let o=this._mapping.scale-e;this._positive.downscale(e),this._negative.downscale(e),this._mapping=Xa(o)}_minScale(e){let o=Math.min(this.scale,e.scale),a=Jr.combine(this._highLowAtScale(this.positive,this.scale,o),this._highLowAtScale(e.positive,e.scale,o)),s=Jr.combine(this._highLowAtScale(this.negative,this.scale,o),this._highLowAtScale(e.negative,e.scale,o));return Math.min(o-this._changeScale(a.high,a.low),o-this._changeScale(s.high,s.low))}_highLowAtScale(e,o,a){if(e.length===0)return new Jr(0,-1);let s=o-a;return new Jr(e.indexStart>>s,e.indexEnd>>s)}_mergeBuckets(e,o,a,s){let u=a.offset,r=o.scale-s;for(let t=0;t<a.length;t++)this._incrementIndexBy(e,u+t>>r,a.at(t))}_diffBuckets(e,o,a,s){let u=a.offset,r=o.scale-s;for(let t=0;t<a.length;t++){let l=(u+t>>r)-e.indexBase;l<0&&(l+=e.backing.length),e.decrementBucket(l,a.at(t))}e.trim()}},so=class{static{c(this,"ExponentialHistogramAggregator")}_maxSize;_recordMinMax;kind=te.EXPONENTIAL_HISTOGRAM;constructor(e,o){this._maxSize=e,this._recordMinMax=o}createAccumulation(e){return new vi(e,this._maxSize,this._recordMinMax)}merge(e,o){let a=o.clone();return a.merge(e),a}diff(e,o){let a=o.clone();return a.diff(e),a}toMetricData(e,o,a,s){return{descriptor:e,aggregationTemporality:o,dataPointType:Ct.EXPONENTIAL_HISTOGRAM,dataPoints:a.map(([u,r])=>{let t=r.toPointValue(),i=e.type===k.GAUGE||e.type===k.UP_DOWN_COUNTER||e.type===k.OBSERVABLE_GAUGE||e.type===k.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:r.startTime,endTime:s,value:{min:t.hasMinMax?t.min:void 0,max:t.hasMinMax?t.max:void 0,sum:i?void 0:t.sum,positive:{offset:t.positive.offset,bucketCounts:t.positive.bucketCounts},negative:{offset:t.negative.offset,bucketCounts:t.negative.bucketCounts},count:t.count,scale:t.scale,zeroCount:t.zeroCount}}})}}};var Zr=class{static{c(this,"LastValueAccumulation")}startTime;_current;sampleTime;constructor(e,o=0,a=[0,0]){this.startTime=e,this._current=o,this.sampleTime=a}record(e){this._current=e,this.sampleTime=xt(Date.now())}setStartTime(e){this.startTime=e}toPointValue(){return this._current}},ao=class{static{c(this,"LastValueAggregator")}kind=te.LAST_VALUE;createAccumulation(e){return new Zr(e)}merge(e,o){let a=Kr(o.sampleTime)>=Kr(e.sampleTime)?o:e;return new Zr(e.startTime,a.toPointValue(),a.sampleTime)}diff(e,o){let a=Kr(o.sampleTime)>=Kr(e.sampleTime)?o:e;return new Zr(o.startTime,a.toPointValue(),a.sampleTime)}toMetricData(e,o,a,s){return{descriptor:e,aggregationTemporality:o,dataPointType:Ct.GAUGE,dataPoints:a.map(([u,r])=>({attributes:u,startTime:r.startTime,endTime:s,value:r.toPointValue()}))}}};var qe=class{static{c(this,"SumAccumulation")}startTime;monotonic;_current;reset;constructor(e,o,a=0,s=!1){this.startTime=e,this.monotonic=o,this._current=a,this.reset=s}record(e){this.monotonic&&e<0||(this._current+=e)}setStartTime(e){this.startTime=e}toPointValue(){return this._current}},Qr=class{static{c(this,"SumAggregator")}monotonic;kind=te.SUM;constructor(e){this.monotonic=e}createAccumulation(e){return new qe(e,this.monotonic)}merge(e,o){let a=e.toPointValue(),s=o.toPointValue();return o.reset?new qe(o.startTime,this.monotonic,s,o.reset):new qe(e.startTime,this.monotonic,a+s)}diff(e,o){let a=e.toPointValue(),s=o.toPointValue();return this.monotonic&&a>s?new qe(o.startTime,this.monotonic,s,!0):new qe(o.startTime,this.monotonic,s-a)}toMetricData(e,o,a,s){return{descriptor:e,aggregationTemporality:o,dataPointType:Ct.SUM,dataPoints:a.map(([u,r])=>({attributes:u,startTime:r.startTime,endTime:s,value:r.toPointValue()})),isMonotonic:this.monotonic}}};var Za=class n{static{c(this,"DropAggregation")}static DEFAULT_INSTANCE=new ro;createAggregator(e){return n.DEFAULT_INSTANCE}};var Qa=class n{static{c(this,"SumAggregation")}static MONOTONIC_INSTANCE=new Qr(!0);static NON_MONOTONIC_INSTANCE=new Qr(!1);createAggregator(e){switch(e.type){case k.COUNTER:case k.OBSERVABLE_COUNTER:case k.HISTOGRAM:return n.MONOTONIC_INSTANCE;default:return n.NON_MONOTONIC_INSTANCE}}};var tc=class n{static{c(this,"LastValueAggregation")}static DEFAULT_INSTANCE=new ao;createAggregator(e){return n.DEFAULT_INSTANCE}};var ec=class n{static{c(this,"HistogramAggregation")}static DEFAULT_INSTANCE=new Xr([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);createAggregator(e){return n.DEFAULT_INSTANCE}};var co=class{static{c(this,"ExplicitBucketHistogramAggregation")}_recordMinMax;_boundaries;constructor(e,o=!0){if(this._recordMinMax=o,e==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");e=e.concat(),e=e.sort((u,r)=>u-r);let a=e.lastIndexOf(-1/0),s=e.indexOf(1/0);s===-1&&(s=void 0),this._boundaries=e.slice(a+1,s)}createAggregator(e){return new Xr(this._boundaries,this._recordMinMax)}},uo=class{static{c(this,"ExponentialHistogramAggregation")}_maxSize;_recordMinMax;constructor(e=160,o=!0){this._maxSize=e,this._recordMinMax=o}createAggregator(e){return new so(this._maxSize,this._recordMinMax)}},rc=class{static{c(this,"DefaultAggregation")}_resolve(e){switch(e.type){case k.COUNTER:case k.UP_DOWN_COUNTER:case k.OBSERVABLE_COUNTER:case k.OBSERVABLE_UP_DOWN_COUNTER:return oc;case k.GAUGE:case k.OBSERVABLE_GAUGE:return ic;case k.HISTOGRAM:return e.advice.explicitBucketBoundaries?new co(e.advice.explicitBucketBoundaries):sc}return m.warn(`Unable to recognize instrument type: ${e.type}`),nc}createAggregator(e){return this._resolve(e).createAggregator(e)}},nc=new Za,oc=new Qa,ic=new tc,sc=new ec,Pg=new uo,lp=new rc;var It;(function(n){n[n.DEFAULT=0]="DEFAULT",n[n.DROP=1]="DROP",n[n.SUM=2]="SUM",n[n.LAST_VALUE=3]="LAST_VALUE",n[n.EXPLICIT_BUCKET_HISTOGRAM=4]="EXPLICIT_BUCKET_HISTOGRAM",n[n.EXPONENTIAL_HISTOGRAM=5]="EXPONENTIAL_HISTOGRAM"})(It||(It={}));function Li(n){switch(n.type){case It.DEFAULT:return lp;case It.DROP:return nc;case It.SUM:return oc;case It.LAST_VALUE:return ic;case It.EXPONENTIAL_HISTOGRAM:{let e=n;return new uo(e.options?.maxSize,e.options?.recordMinMax)}case It.EXPLICIT_BUCKET_HISTOGRAM:{let e=n;return e.options==null?sc:new co(e.options?.boundaries,e.options?.recordMinMax)}default:throw new Error("Unsupported Aggregation")}}c(Li,"toAggregation");var pp=c(n=>({type:It.DEFAULT}),"DEFAULT_AGGREGATION_SELECTOR"),_p=c(n=>gt.CUMULATIVE,"DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR");var Ii=class{static{c(this,"MetricReader")}_shutdown=!1;_metricProducers;_sdkMetricProducer;_aggregationTemporalitySelector;_aggregationSelector;_cardinalitySelector;constructor(e){this._aggregationSelector=e?.aggregationSelector??pp,this._aggregationTemporalitySelector=e?.aggregationTemporalitySelector??_p,this._metricProducers=e?.metricProducers??[],this._cardinalitySelector=e?.cardinalitySelector}setMetricProducer(e){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=e,this.onInitialized()}selectAggregation(e){return this._aggregationSelector(e)}selectAggregationTemporality(e){return this._aggregationTemporalitySelector(e)}selectCardinalityLimit(e){return this._cardinalitySelector?this._cardinalitySelector(e):2e3}onInitialized(){}async collect(e){if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");let[o,...a]=await Promise.all([this._sdkMetricProducer.collect({timeoutMillis:e?.timeoutMillis}),...this._metricProducers.map(t=>t.collect({timeoutMillis:e?.timeoutMillis}))]),s=o.errors.concat(Wa(a,t=>t.errors)),u=o.resourceMetrics.resource,r=o.resourceMetrics.scopeMetrics.concat(Wa(a,t=>t.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:u,scopeMetrics:r},errors:s}}async shutdown(e){if(this._shutdown){m.error("Cannot call shutdown twice.");return}e?.timeoutMillis==null?await this.onShutdown():await We(this.onShutdown(),e.timeoutMillis),this._shutdown=!0}async forceFlush(e){if(this._shutdown){m.warn("Cannot forceFlush on already shutdown MetricReader.");return}if(e?.timeoutMillis==null){await this.onForceFlush();return}await We(this.onForceFlush(),e.timeoutMillis)}};var lo=class extends Ii{static{c(this,"PeriodicExportingMetricReader")}_interval;_exporter;_exportInterval;_exportTimeout;constructor(e){if(super({aggregationSelector:e.exporter.selectAggregation?.bind(e.exporter),aggregationTemporalitySelector:e.exporter.selectAggregationTemporality?.bind(e.exporter),metricProducers:e.metricProducers}),e.exportIntervalMillis!==void 0&&e.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(e.exportTimeoutMillis!==void 0&&e.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(e.exportTimeoutMillis!==void 0&&e.exportIntervalMillis!==void 0&&e.exportIntervalMillis<e.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");this._exportInterval=e.exportIntervalMillis??6e4,this._exportTimeout=e.exportTimeoutMillis??3e4,this._exporter=e.exporter}async _runOnce(){try{await We(this._doRun(),this._exportTimeout)}catch(e){if(e instanceof eo){m.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}Ot(e)}}async _doRun(){let{resourceMetrics:e,errors:o}=await this.collect({timeoutMillis:this._exportTimeout});if(o.length>0&&m.error("PeriodicExportingMetricReader: metrics collection errors",...o),e.resource.asyncAttributesPending)try{await e.resource.waitForAsyncAttributes?.()}catch(s){m.debug("Error while resolving async portion of resource: ",s),Ot(s)}if(e.scopeMetrics.length===0)return;let a=await Ei._export(this._exporter,e);if(a.code!==Lt.SUCCESS)throw new Error(`PeriodicExportingMetricReader: metrics export failed (error ${a.error})`)}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),this._interval}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this.onForceFlush(),await this._exporter.shutdown()}};var bi=class{static{c(this,"ViewRegistry")}_registeredViews=[];addView(e){this._registeredViews.push(e)}findViews(e,o){return this._registeredViews.filter(s=>this._matchInstrument(s.instrumentSelector,e)&&this._matchMeter(s.meterSelector,o))}_matchInstrument(e,o){return(e.getType()===void 0||o.type===e.getType())&&e.getNameFilter().match(o.name)&&e.getUnitFilter().match(o.unit)}_matchMeter(e,o){return e.getNameFilter().match(o.name)&&(o.version===void 0||e.getVersionFilter().match(o.version))&&(o.schemaUrl===void 0||e.getSchemaUrlFilter().match(o.schemaUrl))}};function ye(n,e,o){return yd(n)||m.warn(`Invalid metric name: "${n}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:n,type:e,description:o?.description??"",unit:o?.unit??"",valueType:o?.valueType??ft.DOUBLE,advice:o?.advice??{}}}c(ye,"createInstrumentDescriptor");function fp(n,e){return{name:n.name??e.name,description:n.description??e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}c(fp,"createInstrumentDescriptorWithView");function Ep(n,e){return op(n.name,e.name)&&n.unit===e.unit&&n.type===e.type&&n.valueType===e.valueType}c(Ep,"isDescriptorCompatibleWith");var md=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function yd(n){return n.match(md)!=null}c(yd,"isValidName");var tn=class{static{c(this,"SyncInstrument")}_writableMetricStorage;_descriptor;constructor(e,o){this._writableMetricStorage=e,this._descriptor=o}_record(e,o={},a=D.active()){if(typeof e!="number"){m.warn(`non-number value provided to metric ${this._descriptor.name}: ${e}`);return}this._descriptor.valueType===ft.INT&&!Number.isInteger(e)&&(m.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`),e=Math.trunc(e),!Number.isInteger(e))||this._writableMetricStorage.record(e,o,a,xt(Date.now()))}},Pi=class extends tn{static{c(this,"UpDownCounterInstrument")}add(e,o,a){this._record(e,o,a)}},Ci=class extends tn{static{c(this,"CounterInstrument")}add(e,o,a){if(e<0){m.warn(`negative value provided to counter ${this._descriptor.name}: ${e}`);return}this._record(e,o,a)}},Ui=class extends tn{static{c(this,"GaugeInstrument")}record(e,o,a){this._record(e,o,a)}},Mi=class extends tn{static{c(this,"HistogramInstrument")}record(e,o,a){if(e<0){m.warn(`negative value provided to histogram ${this._descriptor.name}: ${e}`);return}this._record(e,o,a)}},en=class{static{c(this,"ObservableInstrument")}_observableRegistry;_metricStorages;_descriptor;constructor(e,o,a){this._observableRegistry=a,this._descriptor=e,this._metricStorages=o}addCallback(e){this._observableRegistry.addCallback(e,this)}removeCallback(e){this._observableRegistry.removeCallback(e,this)}},Di=class extends en{static{c(this,"ObservableCounterInstrument")}},wi=class extends en{static{c(this,"ObservableGaugeInstrument")}},Vi=class extends en{static{c(this,"ObservableUpDownCounterInstrument")}};function po(n){return n instanceof en}c(po,"isObservableInstrument");var ki=class{static{c(this,"Meter")}_meterSharedState;constructor(e){this._meterSharedState=e}createGauge(e,o){let a=ye(e,k.GAUGE,o),s=this._meterSharedState.registerMetricStorage(a);return new Ui(s,a)}createHistogram(e,o){let a=ye(e,k.HISTOGRAM,o),s=this._meterSharedState.registerMetricStorage(a);return new Mi(s,a)}createCounter(e,o){let a=ye(e,k.COUNTER,o),s=this._meterSharedState.registerMetricStorage(a);return new Ci(s,a)}createUpDownCounter(e,o){let a=ye(e,k.UP_DOWN_COUNTER,o),s=this._meterSharedState.registerMetricStorage(a);return new Pi(s,a)}createObservableGauge(e,o){let a=ye(e,k.OBSERVABLE_GAUGE,o),s=this._meterSharedState.registerAsyncMetricStorage(a);return new wi(a,s,this._meterSharedState.observableRegistry)}createObservableCounter(e,o){let a=ye(e,k.OBSERVABLE_COUNTER,o),s=this._meterSharedState.registerAsyncMetricStorage(a);return new Di(a,s,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(e,o){let a=ye(e,k.OBSERVABLE_UP_DOWN_COUNTER,o),s=this._meterSharedState.registerAsyncMetricStorage(a);return new Vi(a,s,this._meterSharedState.observableRegistry)}addBatchObservableCallback(e,o){this._meterSharedState.observableRegistry.addBatchCallback(e,o)}removeBatchObservableCallback(e,o){this._meterSharedState.observableRegistry.removeBatchCallback(e,o)}};var rn=class{static{c(this,"MetricStorage")}_instrumentDescriptor;constructor(e){this._instrumentDescriptor=e}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(e){this._instrumentDescriptor=ye(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:e,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}};var ac=class{static{c(this,"HashMap")}_hash;_valueMap=new Map;_keyMap=new Map;constructor(e){this._hash=e}get(e,o){return o??=this._hash(e),this._valueMap.get(o)}getOrDefault(e,o){let a=this._hash(e);if(this._valueMap.has(a))return this._valueMap.get(a);let s=o();return this._keyMap.has(a)||this._keyMap.set(a,e),this._valueMap.set(a,s),s}set(e,o,a){a??=this._hash(e),this._keyMap.has(a)||this._keyMap.set(a,e),this._valueMap.set(a,o)}has(e,o){return o??=this._hash(e),this._valueMap.has(o)}*keys(){let e=this._keyMap.entries(),o=e.next();for(;o.done!==!0;)yield[o.value[1],o.value[0]],o=e.next()}*entries(){let e=this._valueMap.entries(),o=e.next();for(;o.done!==!0;)yield[this._keyMap.get(o.value[0]),o.value[1],o.value[0]],o=e.next()}get size(){return this._valueMap.size}},jt=class extends ac{static{c(this,"AttributeHashMap")}constructor(){super(Oi)}};var nn=class{static{c(this,"DeltaMetricProcessor")}_aggregator;_activeCollectionStorage=new jt;_cumulativeMemoStorage=new jt;_cardinalityLimit;_overflowAttributes={"otel.metric.overflow":!0};_overflowHashCode;constructor(e,o){this._aggregator=e,this._cardinalityLimit=(o??2e3)-1,this._overflowHashCode=Oi(this._overflowAttributes)}record(e,o,a,s){let u=this._activeCollectionStorage.get(o);if(!u){if(this._activeCollectionStorage.size>=this._cardinalityLimit){this._activeCollectionStorage.getOrDefault(this._overflowAttributes,()=>this._aggregator.createAccumulation(s))?.record(e);return}u=this._aggregator.createAccumulation(s),this._activeCollectionStorage.set(o,u)}u?.record(e)}batchCumulate(e,o){Array.from(e.entries()).forEach(([a,s,u])=>{let r=this._aggregator.createAccumulation(o);r?.record(s);let t=r;if(this._cumulativeMemoStorage.has(a,u)){let i=this._cumulativeMemoStorage.get(a,u);t=this._aggregator.diff(i,r)}else if(this._cumulativeMemoStorage.size>=this._cardinalityLimit&&(a=this._overflowAttributes,u=this._overflowHashCode,this._cumulativeMemoStorage.has(a,u))){let i=this._cumulativeMemoStorage.get(a,u);t=this._aggregator.diff(i,r)}if(this._activeCollectionStorage.has(a,u)){let i=this._activeCollectionStorage.get(a,u);t=this._aggregator.merge(i,t)}this._cumulativeMemoStorage.set(a,r,u),this._activeCollectionStorage.set(a,t,u)})}collect(){let e=this._activeCollectionStorage;return this._activeCollectionStorage=new jt,e}};var on=class n{static{c(this,"TemporalMetricProcessor")}_aggregator;_unreportedAccumulations=new Map;_reportHistory=new Map;constructor(e,o){this._aggregator=e,o.forEach(a=>{this._unreportedAccumulations.set(a,[])})}buildMetrics(e,o,a,s){this._stashAccumulations(a);let u=this._getMergedUnreportedAccumulations(e),r=u,t;if(this._reportHistory.has(e)){let l=this._reportHistory.get(e),p=l.collectionTime;t=l.aggregationTemporality,t===gt.CUMULATIVE?r=n.merge(l.accumulations,u,this._aggregator):r=n.calibrateStartTime(l.accumulations,u,p)}else t=e.selectAggregationTemporality(o.type);this._reportHistory.set(e,{accumulations:r,collectionTime:s,aggregationTemporality:t});let i=Od(r);if(i.length!==0)return this._aggregator.toMetricData(o,t,i,s)}_stashAccumulations(e){let o=this._unreportedAccumulations.keys();for(let a of o){let s=this._unreportedAccumulations.get(a);s===void 0&&(s=[],this._unreportedAccumulations.set(a,s)),s.push(e)}}_getMergedUnreportedAccumulations(e){let o=new jt,a=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),a===void 0)return o;for(let s of a)o=n.merge(o,s,this._aggregator);return o}static merge(e,o,a){let s=e,u=o.entries(),r=u.next();for(;r.done!==!0;){let[t,i,l]=r.value;if(e.has(t,l)){let p=e.get(t,l),E=a.merge(p,i);s.set(t,E,l)}else s.set(t,i,l);r=u.next()}return s}static calibrateStartTime(e,o,a){for(let[s,u]of e.keys())o.get(s,u)?.setStartTime(a);return o}};function Od(n){return Array.from(n.entries())}c(Od,"AttributesMapToAccumulationRecords");var Bi=class extends rn{static{c(this,"AsyncMetricStorage")}_attributesProcessor;_aggregationCardinalityLimit;_deltaMetricStorage;_temporalMetricStorage;constructor(e,o,a,s,u){super(e),this._attributesProcessor=a,this._aggregationCardinalityLimit=u,this._deltaMetricStorage=new nn(o,this._aggregationCardinalityLimit),this._temporalMetricStorage=new on(o,s)}record(e,o){let a=new jt;Array.from(e.entries()).forEach(([s,u])=>{a.set(this._attributesProcessor.process(s),u)}),this._deltaMetricStorage.batchCumulate(a,o)}collect(e,o){let a=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,a,o)}};function cc(n,e){let o="";return n.unit!==e.unit&&(o+=`	- Unit '${n.unit}' does not match '${e.unit}'
`),n.type!==e.type&&(o+=`	- Type '${n.type}' does not match '${e.type}'
`),n.valueType!==e.valueType&&(o+=`	- Value Type '${n.valueType}' does not match '${e.valueType}'
`),n.description!==e.description&&(o+=`	- Description '${n.description}' does not match '${e.description}'
`),o}c(cc,"getIncompatibilityDetails");function Rd(n,e){return`	- use valueType '${n.valueType}' on instrument creation or use an instrument name other than '${e.name}'`}c(Rd,"getValueTypeConflictResolutionRecipe");function Nd(n,e){return`	- use unit '${n.unit}' on instrument creation or use an instrument name other than '${e.name}'`}c(Nd,"getUnitConflictResolutionRecipe");function xd(n,e){let o={name:e.name,type:e.type,unit:e.unit},a=JSON.stringify(o);return`	- create a new view with a name other than '${n.name}' and InstrumentSelector '${a}'`}c(xd,"getTypeConflictResolutionRecipe");function gd(n,e){let o={name:e.name,type:e.type,unit:e.unit},a=JSON.stringify(o);return`	- create a new view with a name other than '${n.name}' and InstrumentSelector '${a}'
    	- OR - create a new view with the name ${n.name} and description '${n.description}' and InstrumentSelector ${a}
    	- OR - create a new view with the name ${e.name} and description '${n.description}' and InstrumentSelector ${a}`}c(gd,"getDescriptionResolutionRecipe");function uc(n,e){return n.valueType!==e.valueType?Rd(n,e):n.unit!==e.unit?Nd(n,e):n.type!==e.type?xd(n,e):n.description!==e.description?gd(n,e):""}c(uc,"getConflictResolutionRecipe");var Gi=class n{static{c(this,"MetricStorageRegistry")}_sharedRegistry=new Map;_perCollectorRegistry=new Map;static create(){return new n}getStorages(e){let o=[];for(let s of this._sharedRegistry.values())o=o.concat(s);let a=this._perCollectorRegistry.get(e);if(a!=null)for(let s of a.values())o=o.concat(s);return o}register(e){this._registerStorage(e,this._sharedRegistry)}registerForCollector(e,o){let a=this._perCollectorRegistry.get(e);a==null&&(a=new Map,this._perCollectorRegistry.set(e,a)),this._registerStorage(o,a)}findOrUpdateCompatibleStorage(e){let o=this._sharedRegistry.get(e.name);return o===void 0?null:this._findOrUpdateCompatibleStorage(e,o)}findOrUpdateCompatibleCollectorStorage(e,o){let a=this._perCollectorRegistry.get(e);if(a===void 0)return null;let s=a.get(o.name);return s===void 0?null:this._findOrUpdateCompatibleStorage(o,s)}_registerStorage(e,o){let a=e.getInstrumentDescriptor(),s=o.get(a.name);if(s===void 0){o.set(a.name,[e]);return}s.push(e)}_findOrUpdateCompatibleStorage(e,o){let a=null;for(let s of o){let u=s.getInstrumentDescriptor();Ep(u,e)?(u.description!==e.description&&(e.description.length>u.description.length&&s.updateDescription(e.description),m.warn("A view or instrument with the name ",e.name,` has already been registered, but has a different description and is incompatible with another registered view.
`,`Details:
`,cc(u,e),`The longer description will be used.
To resolve the conflict:`,uc(u,e))),a=s):m.warn("A view or instrument with the name ",e.name,` has already been registered and is incompatible with another registered view.
`,`Details:
`,cc(u,e),`To resolve the conflict:
`,uc(u,e))}return a}};var Hi=class{static{c(this,"MultiMetricStorage")}_backingStorages;constructor(e){this._backingStorages=e}record(e,o,a,s){this._backingStorages.forEach(u=>{u.record(e,o,a,s)})}};var Yi=class{static{c(this,"ObservableResultImpl")}_instrumentName;_valueType;_buffer=new jt;constructor(e,o){this._instrumentName=e,this._valueType=o}observe(e,o={}){if(typeof e!="number"){m.warn(`non-number value provided to metric ${this._instrumentName}: ${e}`);return}this._valueType===ft.INT&&!Number.isInteger(e)&&(m.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`),e=Math.trunc(e),!Number.isInteger(e))||this._buffer.set(o,e)}},Fi=class{static{c(this,"BatchObservableResultImpl")}_buffer=new Map;observe(e,o,a={}){if(!po(e))return;let s=this._buffer.get(e);if(s==null&&(s=new jt,this._buffer.set(e,s)),typeof o!="number"){m.warn(`non-number value provided to metric ${e._descriptor.name}: ${o}`);return}e._descriptor.valueType===ft.INT&&!Number.isInteger(o)&&(m.warn(`INT value type cannot accept a floating-point value for ${e._descriptor.name}, ignoring the fractional digits.`),o=Math.trunc(o),!Number.isInteger(o))||s.set(a,o)}};var Ki=class{static{c(this,"ObservableRegistry")}_callbacks=[];_batchCallbacks=[];addCallback(e,o){this._findCallback(e,o)>=0||this._callbacks.push({callback:e,instrument:o})}removeCallback(e,o){let a=this._findCallback(e,o);a<0||this._callbacks.splice(a,1)}addBatchCallback(e,o){let a=new Set(o.filter(po));if(a.size===0){m.error("BatchObservableCallback is not associated with valid instruments",o);return}this._findBatchCallback(e,a)>=0||this._batchCallbacks.push({callback:e,instruments:a})}removeBatchCallback(e,o){let a=new Set(o.filter(po)),s=this._findBatchCallback(e,a);s<0||this._batchCallbacks.splice(s,1)}async observe(e,o){let a=this._observeCallbacks(e,o),s=this._observeBatchCallbacks(e,o);return(await tp([...a,...s])).filter(ep).map(t=>t.reason)}_observeCallbacks(e,o){return this._callbacks.map(async({callback:a,instrument:s})=>{let u=new Yi(s._descriptor.name,s._descriptor.valueType),r=Promise.resolve(a(u));o!=null&&(r=We(r,o)),await r,s._metricStorages.forEach(t=>{t.record(u._buffer,e)})})}_observeBatchCallbacks(e,o){return this._batchCallbacks.map(async({callback:a,instruments:s})=>{let u=new Fi,r=Promise.resolve(a(u));o!=null&&(r=We(r,o)),await r,s.forEach(t=>{let i=u._buffer.get(t);i!=null&&t._metricStorages.forEach(l=>{l.record(i,e)})})})}_findCallback(e,o){return this._callbacks.findIndex(a=>a.callback===e&&a.instrument===o)}_findBatchCallback(e,o){return this._batchCallbacks.findIndex(a=>a.callback===e&&rp(a.instruments,o))}};var ji=class extends rn{static{c(this,"SyncMetricStorage")}_attributesProcessor;_aggregationCardinalityLimit;_deltaMetricStorage;_temporalMetricStorage;constructor(e,o,a,s,u){super(e),this._attributesProcessor=a,this._aggregationCardinalityLimit=u,this._deltaMetricStorage=new nn(o,this._aggregationCardinalityLimit),this._temporalMetricStorage=new on(o,s)}record(e,o,a,s){o=this._attributesProcessor.process(o,a),this._deltaMetricStorage.record(e,o,a,s)}collect(e,o){let a=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,a,o)}};var lc=class{static{c(this,"NoopAttributesProcessor")}process(e,o){return e}},pc=class{static{c(this,"MultiAttributesProcessor")}_processors;constructor(e){this._processors=e}process(e,o){let a=e;for(let s of this._processors)a=s.process(a,o);return a}};function Wi(){return vd}c(Wi,"createNoopAttributesProcessor");function Tp(n){return new pc(n)}c(Tp,"createMultiAttributesProcessor");var vd=new lc;var qi=class{static{c(this,"MeterSharedState")}_meterProviderSharedState;_instrumentationScope;metricStorageRegistry=new Gi;observableRegistry=new Ki;meter;constructor(e,o){this._meterProviderSharedState=e,this._instrumentationScope=o,this.meter=new ki(this)}registerMetricStorage(e){let o=this._registerMetricStorage(e,ji);return o.length===1?o[0]:new Hi(o)}registerAsyncMetricStorage(e){return this._registerMetricStorage(e,Bi)}async collect(e,o,a){let s=await this.observableRegistry.observe(o,a?.timeoutMillis),u=this.metricStorageRegistry.getStorages(e);if(u.length===0)return null;let r=u.map(t=>t.collect(e,o)).filter(Zl);return r.length===0?{errors:s}:{scopeMetrics:{scope:this._instrumentationScope,metrics:r},errors:s}}_registerMetricStorage(e,o){let s=this._meterProviderSharedState.viewRegistry.findViews(e,this._instrumentationScope).map(u=>{let r=fp(u,e),t=this.metricStorageRegistry.findOrUpdateCompatibleStorage(r);if(t!=null)return t;let i=u.aggregation.createAggregator(r),l=new o(r,i,u.attributesProcessor,this._meterProviderSharedState.metricCollectors,u.aggregationCardinalityLimit);return this.metricStorageRegistry.register(l),l});if(s.length===0){let r=this._meterProviderSharedState.selectAggregations(e.type).map(([t,i])=>{let l=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(t,e);if(l!=null)return l;let p=i.createAggregator(e),E=t.selectCardinalityLimit(e.type),y=new o(e,p,Wi(),[t],E);return this.metricStorageRegistry.registerForCollector(t,y),y});s=s.concat(r)}return s}};var zi=class{static{c(this,"MeterProviderSharedState")}resource;viewRegistry=new bi;metricCollectors=[];meterSharedStates=new Map;constructor(e){this.resource=e}getMeterSharedState(e){let o=Ql(e),a=this.meterSharedStates.get(o);return a==null&&(a=new qi(this,e),this.meterSharedStates.set(o,a)),a}selectAggregations(e){let o=[];for(let a of this.metricCollectors)o.push([a,Li(a.selectAggregation(e))]);return o}};var $i=class{static{c(this,"MetricCollector")}_sharedState;_metricReader;constructor(e,o){this._sharedState=e,this._metricReader=o}async collect(e){let o=xt(Date.now()),a=[],s=[],u=Array.from(this._sharedState.meterSharedStates.values()).map(async r=>{let t=await r.collect(this,o,e);t?.scopeMetrics!=null&&a.push(t.scopeMetrics),t?.errors!=null&&s.push(...t.errors)});return await Promise.all(u),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:a},errors:s}}async forceFlush(e){await this._metricReader.forceFlush(e)}async shutdown(e){await this._metricReader.shutdown(e)}selectAggregationTemporality(e){return this._metricReader.selectAggregationTemporality(e)}selectAggregation(e){return this._metricReader.selectAggregation(e)}selectCardinalityLimit(e){return this._metricReader.selectCardinalityLimit?.(e)??2e3}};var Ld=/[\^$\\.+?()[\]{}|]/g,sn=class n{static{c(this,"PatternPredicate")}_matchAll;_regexp;constructor(e){e==="*"?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(n.escapePattern(e)))}match(e){return this._matchAll?!0:this._regexp.test(e)}static escapePattern(e){return`^${e.replace(Ld,"\\$&").replace("*",".*")}$`}static hasWildcard(e){return e.includes("*")}},ze=class{static{c(this,"ExactPredicate")}_matchAll;_pattern;constructor(e){this._matchAll=e===void 0,this._pattern=e}match(e){return!!(this._matchAll||e===this._pattern)}};var Xi=class{static{c(this,"InstrumentSelector")}_nameFilter;_type;_unitFilter;constructor(e){this._nameFilter=new sn(e?.name??"*"),this._type=e?.type,this._unitFilter=new ze(e?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}};var Ji=class{static{c(this,"MeterSelector")}_nameFilter;_versionFilter;_schemaUrlFilter;constructor(e){this._nameFilter=new ze(e?.name),this._versionFilter=new ze(e?.version),this._schemaUrlFilter=new ze(e?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};function Id(n){return n.instrumentName==null&&n.instrumentType==null&&n.instrumentUnit==null&&n.meterName==null&&n.meterVersion==null&&n.meterSchemaUrl==null}c(Id,"isSelectorNotProvided");function bd(n){if(Id(n))throw new Error("Cannot create view with no selector arguments supplied");if(n.name!=null&&(n?.instrumentName==null||sn.hasWildcard(n.instrumentName)))throw new Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.")}c(bd,"validateViewOptions");var Zi=class{static{c(this,"View")}name;description;aggregation;attributesProcessor;instrumentSelector;meterSelector;aggregationCardinalityLimit;constructor(e){bd(e),e.attributesProcessors!=null?this.attributesProcessor=Tp(e.attributesProcessors):this.attributesProcessor=Wi(),this.name=e.name,this.description=e.description,this.aggregation=Li(e.aggregation??{type:It.DEFAULT}),this.instrumentSelector=new Xi({name:e.instrumentName,type:e.instrumentType,unit:e.instrumentUnit}),this.meterSelector=new Ji({name:e.meterName,version:e.meterVersion,schemaUrl:e.meterSchemaUrl}),this.aggregationCardinalityLimit=e.aggregationCardinalityLimit}};var _o=class{static{c(this,"MeterProvider")}_sharedState;_shutdown=!1;constructor(e){if(this._sharedState=new zi(e?.resource??De()),e?.views!=null&&e.views.length>0)for(let o of e.views)this._sharedState.viewRegistry.addView(new Zi(o));if(e?.readers!=null&&e.readers.length>0)for(let o of e.readers){let a=new $i(this._sharedState,o);o.setMetricProducer(a),this._sharedState.metricCollectors.push(a)}}getMeter(e,o="",a={}){return this._shutdown?(m.warn("A shutdown MeterProvider cannot provide a Meter"),sa()):this._sharedState.getMeterSharedState({name:e,version:o,schemaUrl:a.schemaUrl}).meter}async shutdown(e){if(this._shutdown){m.warn("shutdown may only be called once per MeterProvider");return}this._shutdown=!0,await Promise.all(this._sharedState.metricCollectors.map(o=>o.shutdown(e)))}async forceFlush(e){if(this._shutdown){m.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(o=>o.forceFlush(e)))}};var dp="exception";var Qi=class{static{c(this,"SpanImpl")}_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;name;status={code:zt.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(e){let o=Date.now();this._spanContext=e.spanContext,this._performanceStartTime=Rt.now(),this._performanceOffset=o-(this._performanceStartTime+Kn()),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??o),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,o){if(o==null||this._isSpanEnded())return this;if(e.length===0)return m.warn(`Invalid attribute key: ${e}`),this;if(!_r(o))return m.warn(`Invalid attribute value set for key: ${e}`),this;let{attributeCountLimit:a}=this._spanLimits;return a!==void 0&&Object.keys(this.attributes).length>=a&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(o),this)}setAttributes(e){for(let[o,a]of Object.entries(e))this.setAttribute(o,a);return this}addEvent(e,o,a){if(this._isSpanEnded())return this;let{eventCountLimit:s}=this._spanLimits;if(s===0)return m.warn("No events allowed."),this._droppedEventsCount++,this;s!==void 0&&this.events.length>=s&&(this._droppedEventsCount===0&&m.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),ii(o)&&(ii(a)||(a=o),o=void 0);let u=pr(o);return this.events.push({name:e,attributes:u,time:this._getTime(a),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"&&(m.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()){m.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=wa(this.startTime,this.endTime),this._duration[0]<0&&(m.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&&m.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e=="number"&&e<=Rt.now())return Jt(e+this._performanceOffset);if(typeof e=="number")return xt(e);if(e instanceof Date)return xt(e.getTime());if(jn(e))return e;if(this._startTimeProvided)return xt(Date.now());let o=Rt.now()-this._performanceStartTime;return si(this.startTime,xt(o))}isRecording(){return this._ended===!1}recordException(e,o){let a={};typeof e=="string"?a[Qo]=e:e&&(e.code?a[ti]=e.code.toString():e.name&&(a[ti]=e.name),e.message&&(a[Qo]=e.message),e.stack&&(a[Nl]=e.stack)),a[ti]||a[Qo]?this.addEvent(dp,a,o):m.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}}`);m.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,e)}return this._ended}_truncateToLimitUtil(e,o){return e.length<=o?e:e.substring(0,o)}_truncateToSize(e){let o=this._attributeValueLengthLimit;return o<=0?(m.warn(`Attribute value limit must be positive, got ${o}`),e):typeof e=="string"?this._truncateToLimitUtil(e,o):Array.isArray(e)?e.map(a=>typeof a=="string"?this._truncateToLimitUtil(a,o):a):e}};var rt;(function(n){n[n.NOT_RECORD=0]="NOT_RECORD",n[n.RECORD=1]="RECORD",n[n.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(rt||(rt={}));var we=class{static{c(this,"AlwaysOffSampler")}shouldSample(){return{decision:rt.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};var le=class{static{c(this,"AlwaysOnSampler")}shouldSample(){return{decision:rt.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};var $e=class{static{c(this,"ParentBasedSampler")}_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(e){this._root=e.root,this._root||(Ot(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new le),this._remoteParentSampled=e.remoteParentSampled??new le,this._remoteParentNotSampled=e.remoteParentNotSampled??new we,this._localParentSampled=e.localParentSampled??new le,this._localParentNotSampled=e.localParentNotSampled??new we}shouldSample(e,o,a,s,u,r){let t=H.getSpanContext(e);return!t||!se(t)?this._root.shouldSample(e,o,a,s,u,r):t.isRemote?t.traceFlags&Nt.SAMPLED?this._remoteParentSampled.shouldSample(e,o,a,s,u,r):this._remoteParentNotSampled.shouldSample(e,o,a,s,u,r):t.traceFlags&Nt.SAMPLED?this._localParentSampled.shouldSample(e,o,a,s,u,r):this._localParentNotSampled.shouldSample(e,o,a,s,u,r)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};var an=class{static{c(this,"TraceIdRatioBasedSampler")}_ratio;_upperBound;constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,o){return{decision:Yo(o)&&this._accumulate(o)<this._upperBound?rt.RECORD_AND_SAMPLED:rt.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 o=0;for(let a=0;a<e.length/8;a++){let s=a*8,u=parseInt(e.slice(s,s+8),16);o=(o^u)>>>0}return o}};var ts=1;function es(){return{sampler:_c(),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}}}c(es,"loadDefaultConfig");function _c(){let n=void 0??"parentbased_always_on";switch(n){case"always_on":return new le;case"always_off":return new we;case"parentbased_always_on":return new $e({root:new le});case"parentbased_always_off":return new $e({root:new we});case"traceidratio":return new an(Sp());case"parentbased_traceidratio":return new $e({root:new an(Sp())});default:return m.error(`OTEL_TRACES_SAMPLER value "${n}" invalid, defaulting to "parentbased_always_on".`),new $e({root:new le})}}c(_c,"buildSamplerFromEnv");function Sp(){let n=void 0;return n==null?(m.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${ts}.`),ts):n<0||n>1?(m.error(`OTEL_TRACES_SAMPLER_ARG=${n} was given, but it is out of range ([0..1]), defaulting to ${ts}.`),ts):n}c(Sp,"getSamplerProbabilityFromEnv");var Pd=128,Cd=1/0;function hp(n){let e={sampler:_c()},o=es(),a=Object.assign({},o,e,n);return a.generalLimits=Object.assign({},o.generalLimits,n.generalLimits||{}),a.spanLimits=Object.assign({},o.spanLimits,n.spanLimits||{}),a}c(hp,"mergeConfig");function Ap(n){let e=Object.assign({},n.spanLimits);return e.attributeCountLimit=n.spanLimits?.attributeCountLimit??n.generalLimits?.attributeCountLimit??void 0??void 0??Pd,e.attributeValueLengthLimit=n.spanLimits?.attributeValueLengthLimit??n.generalLimits?.attributeValueLengthLimit??void 0??void 0??Cd,Object.assign({},n,{spanLimits:e})}c(Ap,"reconfigureLimits");var rs=class{static{c(this,"BatchSpanProcessorBase")}_exporter;_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_isExporting=!1;_finishedSpans=[];_timer;_shutdownOnce;_droppedSpansCount=0;constructor(e,o){this._exporter=e,this._maxExportBatchSize=typeof o?.maxExportBatchSize=="number"?o.maxExportBatchSize:void 0??512,this._maxQueueSize=typeof o?.maxQueueSize=="number"?o.maxQueueSize:void 0??2048,this._scheduledDelayMillis=typeof o?.scheduledDelayMillis=="number"?o.scheduledDelayMillis:void 0??5e3,this._exportTimeoutMillis=typeof o?.exportTimeoutMillis=="number"?o.exportTimeoutMillis:void 0??3e4,this._shutdownOnce=new Ue(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(m.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,o){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&Nt.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&&m.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(m.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,o)=>{let a=[],s=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let u=0,r=s;u<r;u++)a.push(this._flushOneBatch());Promise.all(a).then(()=>{e()}).catch(o)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,o)=>{let a=setTimeout(()=>{o(new Error("Timeout"))},this._exportTimeoutMillis);D.with(cr(D.active()),()=>{let s;this._finishedSpans.length<=this._maxExportBatchSize?(s=this._finishedSpans,this._finishedSpans=[]):s=this._finishedSpans.splice(0,this._maxExportBatchSize);let u=c(()=>this._exporter.export(s,t=>{clearTimeout(a),t.code===Lt.SUCCESS?e():o(t.error??new Error("BatchSpanProcessor: span export failed"))}),"doExport"),r=null;for(let t=0,i=s.length;t<i;t++){let l=s[t];l.resource.asyncAttributesPending&&l.resource.waitForAsyncAttributes&&(r??=[],r.push(l.resource.waitForAsyncAttributes()))}r===null?u():Promise.all(r).then(u,t=>{Ot(t),o(t)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=c(()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(o=>{this._isExporting=!1,Ot(o)})},"flush");if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),this._timer,void 0)}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};var hr=class extends rs{static{c(this,"BatchSpanProcessor")}_visibilityChangeListener;_pageHideListener;constructor(e,o){super(e,o),this.onInit(o)}onInit(e){e?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=()=>{document.visibilityState==="hidden"&&this.forceFlush().catch(o=>{Ot(o)})},this._pageHideListener=()=>{this.forceFlush().catch(o=>{Ot(o)})},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 Ar=class{static{c(this,"RandomIdGenerator")}generateTraceId=mp(16);generateSpanId=mp(8)},ns=Array(32);function mp(n){return c(function(){for(let o=0;o<n*2;o++)ns[o]=Math.floor(Math.random()*16)+48,ns[o]>=58&&(ns[o]+=39);return String.fromCharCode.apply(null,ns.slice(0,n*2))},"generateId")}c(mp,"getIdGenerator");var os=class{static{c(this,"Tracer")}_sampler;_generalLimits;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;constructor(e,o,a,s){let u=hp(o);this._sampler=u.sampler,this._generalLimits=u.generalLimits,this._spanLimits=u.spanLimits,this._idGenerator=o.idGenerator||new Ar,this._resource=a,this._spanProcessor=s,this.instrumentationScope=e}startSpan(e,o={},a=D.active()){o.root&&(a=H.deleteSpan(a));let s=H.getSpan(a);if(ur(a))return m.debug("Instrumentation suppressed, returning Noop Span"),H.wrapSpanContext(Ln);let u=s?.spanContext(),r=this._idGenerator.generateSpanId(),t,i,l;!u||!H.isSpanContextValid(u)?i=this._idGenerator.generateTraceId():(i=u.traceId,l=u.traceState,t=u);let p=o.kind??Pt.INTERNAL,E=(o.links??[]).map(L=>({context:L.context,attributes:pr(L.attributes)})),y=pr(o.attributes),g=this._sampler.shouldSample(a,i,e,p,y,E);l=g.traceState??l;let v=g.decision===Cr.RECORD_AND_SAMPLED?Nt.SAMPLED:Nt.NONE,Y={traceId:i,spanId:r,traceFlags:v,traceState:l};if(g.decision===Cr.NOT_RECORD)return m.debug("Recording is off, propagating context in a non-recording span"),H.wrapSpanContext(Y);let $=pr(Object.assign(y,g.attributes));return new Qi({resource:this._resource,scope:this.instrumentationScope,context:a,spanContext:Y,name:e,kind:p,links:E,parentSpanContext:t,attributes:$,startTime:o.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits})}startActiveSpan(e,o,a,s){let u,r,t;if(arguments.length<2)return;arguments.length===2?t=o:arguments.length===3?(u=o,t=a):(u=o,r=a,t=s);let i=r??D.active(),l=this.startSpan(e,u,i),p=H.setSpan(i,l);return D.with(p,t,void 0,l)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}};var is=class{static{c(this,"MultiSpanProcessor")}_spanProcessors;constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let o of this._spanProcessors)e.push(o.forceFlush());return new Promise(o=>{Promise.all(e).then(()=>{o()}).catch(a=>{Ot(a||new Error("MultiSpanProcessor: forceFlush failed")),o()})})}onStart(e,o){for(let a of this._spanProcessors)a.onStart(e,o)}onEnd(e){for(let o of this._spanProcessors)o.onEnd(e)}shutdown(){let e=[];for(let o of this._spanProcessors)e.push(o.shutdown());return new Promise((o,a)=>{Promise.all(e).then(()=>{o()},a)})}};var mr;(function(n){n[n.resolved=0]="resolved",n[n.timeout=1]="timeout",n[n.error=2]="error",n[n.unresolved=3]="unresolved"})(mr||(mr={}));var cn=class{static{c(this,"BasicTracerProvider")}_config;_tracers=new Map;_resource;_activeSpanProcessor;constructor(e={}){let o=qn({},es(),Ap(e));this._resource=o.resource??De(),this._config=Object.assign({},o,{resource:this._resource});let a=[];e.spanProcessors?.length&&a.push(...e.spanProcessors),this._activeSpanProcessor=new is(a)}getTracer(e,o,a){let s=`${e}@${o||""}:${a?.schemaUrl||""}`;return this._tracers.has(s)||this._tracers.set(s,new os({name:e,version:o,schemaUrl:a?.schemaUrl},this._config,this._resource,this._activeSpanProcessor)),this._tracers.get(s)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,o=this._activeSpanProcessor._spanProcessors.map(a=>new Promise(s=>{let u,r=setTimeout(()=>{s(new Error(`Span processor did not completed within timeout period of ${e} ms`)),u=mr.timeout},e);a.forceFlush().then(()=>{clearTimeout(r),u!==mr.timeout&&(u=mr.resolved,s(u))}).catch(t=>{clearTimeout(r),u=mr.error,s(t)})}));return new Promise((a,s)=>{Promise.all(o).then(u=>{let r=u.filter(t=>t!==mr.resolved);r.length>0?s(r):a()}).catch(u=>s([u]))})}shutdown(){return this._activeSpanProcessor.shutdown()}};var ee=class{static{c(this,"NoopSpanProcessor")}onStart(e,o){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};var ss=class{static{c(this,"StackContextManager")}_enabled=!1;_currentContext=Dt;_bindFunction(e=Dt,o){let a=this,s=c(function(...u){return a.with(e,()=>o.apply(this,u))},"contextWrapper");return Object.defineProperty(s,"length",{enumerable:!1,configurable:!0,writable:!1,value:o.length}),s}active(){return this._currentContext}bind(e,o){return e===void 0&&(e=this.active()),typeof o=="function"?this._bindFunction(e,o):o}disable(){return this._currentContext=Dt,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=Dt,this)}with(e,o,a,...s){let u=this._currentContext;this._currentContext=e||Dt;try{return o.call(a,...s)}finally{this._currentContext=u}}};function Ud(n){if(n!==null){if(n===void 0){let e=new ss;e.enable(),D.setGlobalContextManager(e);return}n.enable(),D.setGlobalContextManager(n)}}c(Ud,"setupContextManager");function Md(n){if(n!==null){if(n===void 0){mt.setGlobalPropagator(new Er({propagators:[new Tr,new lr]}));return}mt.setGlobalPropagator(n)}}c(Md,"setupPropagator");var fo=class extends cn{static{c(this,"WebTracerProvider")}constructor(e={}){super(e)}register(e={}){H.setGlobalTracerProvider(this),Md(e.propagator),Ud(e.contextManager)}};var w;(function(n){n.CONNECT_END="connectEnd",n.CONNECT_START="connectStart",n.DECODED_BODY_SIZE="decodedBodySize",n.DOM_COMPLETE="domComplete",n.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",n.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",n.DOM_INTERACTIVE="domInteractive",n.DOMAIN_LOOKUP_END="domainLookupEnd",n.DOMAIN_LOOKUP_START="domainLookupStart",n.ENCODED_BODY_SIZE="encodedBodySize",n.FETCH_START="fetchStart",n.LOAD_EVENT_END="loadEventEnd",n.LOAD_EVENT_START="loadEventStart",n.NAVIGATION_START="navigationStart",n.REDIRECT_END="redirectEnd",n.REDIRECT_START="redirectStart",n.REQUEST_START="requestStart",n.RESPONSE_END="responseEnd",n.RESPONSE_START="responseStart",n.SECURE_CONNECTION_START="secureConnectionStart",n.START_TIME="startTime",n.UNLOAD_EVENT_END="unloadEventEnd",n.UNLOAD_EVENT_START="unloadEventStart"})(w||(w={}));var yp="http.response_content_length",Op="http.response_content_length_uncompressed";var fc;function Dd(){return fc||(fc=document.createElement("a")),fc}c(Dd,"getUrlNormalizingAnchor");function Ve(n,e){return e in n}c(Ve,"hasKey");function ht(n,e,o,a=!0){if(Ve(o,e)&&typeof o[e]=="number"&&!(a&&o[e]===0))return n.addEvent(e,o[e])}c(ht,"addSpanNetworkEvent");function Oe(n,e,o=!1,a,s){if(a===void 0&&(a=e[w.START_TIME]!==0),o||(ht(n,w.FETCH_START,e,a),ht(n,w.DOMAIN_LOOKUP_START,e,a),ht(n,w.DOMAIN_LOOKUP_END,e,a),ht(n,w.CONNECT_START,e,a),ht(n,w.SECURE_CONNECTION_START,e,a),ht(n,w.CONNECT_END,e,a),ht(n,w.REQUEST_START,e,a),ht(n,w.RESPONSE_START,e,a),ht(n,w.RESPONSE_END,e,a)),!s){let u=e[w.ENCODED_BODY_SIZE];u!==void 0&&n.setAttribute(yp,u);let r=e[w.DECODED_BODY_SIZE];r!==void 0&&u!==r&&n.setAttribute(Op,r)}}c(Oe,"addSpanNetworkEvents");function Rp(n){return n.slice().sort((e,o)=>{let a=e[w.FETCH_START],s=o[w.FETCH_START];return a>s?1:a<s?-1:0})}c(Rp,"sortResources");function Np(){return typeof location<"u"?location.origin:void 0}c(Np,"getOrigin");function Eo(n,e,o,a,s=new WeakSet,u){let r=re(n);n=r.toString();let t=Vd(n,e,o,a,s,u);if(t.length===0)return{mainRequest:void 0};if(t.length===1)return{mainRequest:t[0]};let i=Rp(t);if(r.origin!==Np()&&i.length>1){let l=i[0],p=wd(i,l[w.RESPONSE_END],o),E=l[w.RESPONSE_END];return p[w.FETCH_START]<E&&(p=l,l=void 0),{corsPreFlightRequest:l,mainRequest:p}}else return{mainRequest:t[0]}}c(Eo,"getResource");function wd(n,e,o){let a=Zt(o),s=Zt(Ae(e)),u=n[1],r,t=n.length;for(let i=1;i<t;i++){let l=n[i],p=Zt(Ae(l[w.FETCH_START])),E=Zt(Ae(l[w.RESPONSE_END])),y=a-E;p>=s&&(!r||y<r)&&(r=y,u=l)}return u}c(wd,"findMainRequest");function Vd(n,e,o,a,s,u){let r=Zt(e),t=Zt(o),i=a.filter(l=>{let p=Zt(Ae(l[w.FETCH_START])),E=Zt(Ae(l[w.RESPONSE_END]));return l.initiatorType.toLowerCase()===(u||"xmlhttprequest")&&l.name===n&&p>=r&&E<=t});return i.length>0&&(i=i.filter(l=>!s.has(l))),i}c(Vd,"filterResourcesForSpan");function re(n){if(typeof URL=="function")return new URL(n,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);let e=Dd();return e.href=n,e}c(re,"parseUrl");function as(n,e){if(n.nodeType===Node.DOCUMENT_NODE)return"/";let o=Bd(n,e);if(e&&o.indexOf("@id")>0)return o;let a="";return n.parentNode&&(a+=as(n.parentNode,!1)),a+=o,a}c(as,"getElementXPath");function kd(n){if(!n.parentNode)return 0;let e=[n.nodeType];n.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);let o=Array.from(n.parentNode.childNodes);return o=o.filter(a=>{let s=a.localName;return e.indexOf(a.nodeType)>=0&&s===n.localName}),o.length>=1?o.indexOf(n)+1:0}c(kd,"getNodeIndex");function Bd(n,e){let o=n.nodeType,a=kd(n),s="";if(o===Node.ELEMENT_NODE){let u=n.getAttribute("id");if(e&&u)return`//*[@id="${u}"]`;s=n.localName}else if(o===Node.TEXT_NODE||o===Node.CDATA_SECTION_NODE)s="text()";else if(o===Node.COMMENT_NODE)s="comment()";else return"";return s&&a>1?`/${s}[${a}]`:`/${s}`}c(Bd,"getNodeValue");function To(n,e){let o=e||[];return(typeof o=="string"||o instanceof RegExp)&&(o=[o]),re(n).origin===Np()?!0:o.some(s=>_i(n,s))}c(To,"shouldPropagateTraceHeaders");var Xe={PLATFORM:"browser.platform",BRANDS:"browser.brands",MOBILE:"browser.mobile",LANGUAGE:"browser.language",USER_AGENT:"browser.user_agent"};var Ec=class{static{c(this,"BrowserDetector")}detect(e){if(!(typeof navigator<"u"))return Sr();let a=Hd();return this._getResourceAttributes(a,e)}_getResourceAttributes(e,o){return!e[Xe.USER_AGENT]&&!e[Xe.PLATFORM]?(m.debug("BrowserDetector failed: Unable to find required browser resources. "),Sr()):{attributes:e}}};function Hd(){let n={},e=navigator.userAgentData;return e?(n[Xe.PLATFORM]=e.platform,n[Xe.BRANDS]=e.brands.map(o=>`${o.brand} ${o.version}`),n[Xe.MOBILE]=e.mobile):n[Xe.USER_AGENT]=navigator.userAgent,n[Xe.LANGUAGE]=navigator.language,n}c(Hd,"getBrowserAttributes");var Tc=new Ec;var xp="service.instance.id";var cs="session.id";var gp={detect:c(()=>{let n={},e=self.sessionStorage.getItem(cs)??self.crypto?.randomUUID();return e&&(self.sessionStorage.setItem(cs,e),n[cs]=e,n[xp]=e),{attributes:n}},"detect")};var un;(function(n){n.DOCUMENT_LOAD="documentLoad",n.DOCUMENT_FETCH="documentFetch",n.RESOURCE_FETCH="resourceFetch"})(un||(un={}));var vp="0.46.0",Lp="@opentelemetry/instrumentation-document-load";var So;(function(n){n.FIRST_PAINT="firstPaint",n.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(So||(So={}));var bp=c(()=>{let n={},e=Rt.getEntriesByType?.("navigation")[0];if(e)Object.values(w).forEach(a=>{if(Ve(e,a)){let s=e[a];typeof s=="number"&&(n[a]=s)}});else{let a=Rt.timing;a&&Object.values(w).forEach(u=>{if(Ve(a,u)){let r=a[u];typeof r=="number"&&(n[u]=r)}})}return n},"getPerformanceNavigationEntries"),Ip={"first-paint":So.FIRST_PAINT,"first-contentful-paint":So.FIRST_CONTENTFUL_PAINT},Pp=c(n=>{let e=Rt.getEntriesByType?.("paint");e&&e.forEach(({name:o,startTime:a})=>{Ve(Ip,o)&&n.addEvent(Ip[o],a)})},"addSpanPerformancePaintEvents");var us=class extends Qt{static{c(this,"DocumentLoadInstrumentation")}component="document-load";version="1";moduleName=this.component;constructor(e={}){super(Lp,vp,e)}init(){}_onDocumentLoaded(){window.setTimeout(()=>{this._collectPerformance()})}_addResourcesSpans(e){let o=Rt.getEntriesByType?.("resource");o&&o.forEach(a=>{this._initResourceSpan(a,e)})}_collectPerformance(){let e=Array.from(document.getElementsByTagName("meta")).find(s=>s.getAttribute("name")===jr),o=bp(),a=e&&e.content||"";D.with(mt.extract(Dt,{traceparent:a}),()=>{let s=this._startSpan(un.DOCUMENT_LOAD,w.FETCH_START,o);s&&(D.with(H.setSpan(D.active(),s),()=>{let u=this._startSpan(un.DOCUMENT_FETCH,w.FETCH_START,o);u&&(u.setAttribute(kn,location.href),D.with(H.setSpan(D.active(),u),()=>{this.getConfig().ignoreNetworkEvents||Oe(u,o),this._addCustomAttributesOnSpan(u,this.getConfig().applyCustomAttributesOnSpan?.documentFetch),this._endSpan(u,w.RESPONSE_END,o)}))}),s.setAttribute(kn,location.href),s.setAttribute(Rl,navigator.userAgent),this._addResourcesSpans(s),this.getConfig().ignoreNetworkEvents||(ht(s,w.FETCH_START,o),ht(s,w.UNLOAD_EVENT_START,o),ht(s,w.UNLOAD_EVENT_END,o),ht(s,w.DOM_INTERACTIVE,o),ht(s,w.DOM_CONTENT_LOADED_EVENT_START,o),ht(s,w.DOM_CONTENT_LOADED_EVENT_END,o),ht(s,w.DOM_COMPLETE,o),ht(s,w.LOAD_EVENT_START,o),ht(s,w.LOAD_EVENT_END,o)),this.getConfig().ignorePerformancePaintEvents||Pp(s),this._addCustomAttributesOnSpan(s,this.getConfig().applyCustomAttributesOnSpan?.documentLoad),this._endSpan(s,w.LOAD_EVENT_END,o))})}_endSpan(e,o,a){e&&(Ve(a,o)?e.end(a[o]):e.end())}_initResourceSpan(e,o){let a=this._startSpan(un.RESOURCE_FETCH,w.FETCH_START,e,o);a&&(a.setAttribute(kn,e.name),this.getConfig().ignoreNetworkEvents||Oe(a,e),this._addCustomAttributesOnResourceSpan(a,e,this.getConfig().applyCustomAttributesOnSpan?.resourceFetch),this._endSpan(a,w.RESPONSE_END,e))}_startSpan(e,o,a,s){if(Ve(a,o)&&typeof a[o]=="number")return this.tracer.startSpan(e,{startTime:a[o]},s?H.setSpan(D.active(),s):void 0)}_waitForPageLoad(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))}_addCustomAttributesOnSpan(e,o){o&&Me(()=>o(e),a=>{a&&this._diag.error("addCustomAttributesOnSpan",a)},!0)}_addCustomAttributesOnResourceSpan(e,o,a){a&&Me(()=>a(e,o),s=>{s&&this._diag.error("addCustomAttributesOnResourceSpan",s)},!0)}enable(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()}disable(){window.removeEventListener("load",this._onDocumentLoaded)}};var ho;(function(n){n.COMPONENT="component",n.HTTP_STATUS_TEXT="http.status_text"})(ho||(ho={}));var Ut=sr(Cp());var Up=m.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function Mp(...n){if(n[0]instanceof URL||typeof n[0]=="string"){let e=n[1];if(!e?.body)return Promise.resolve();if(e.body instanceof ReadableStream){let{body:o,length:a}=Yd(e.body);return e.body=o,a}else return Promise.resolve(Kd(e.body))}else{let e=n[0];return e?.body?e.clone().text().then(o=>dc(o)):Promise.resolve()}}c(Mp,"getFetchBodyLength");function Yd(n){if(!n.pipeThrough)return Up.warn("Platform has ReadableStream but not pipeThrough!"),{body:n,length:Promise.resolve(void 0)};let e=0,o,a=new Promise(u=>{o=u}),s=new TransformStream({start(){},async transform(u,r){let t=await u;e+=t.byteLength,r.enqueue(u)},flush(){o(e)}});return{body:n.pipeThrough(s),length:a}}c(Yd,"_getBodyNonDestructively");function Fd(n){return typeof Document<"u"&&n instanceof Document}c(Fd,"isDocument");function Kd(n){if(Fd(n))return new XMLSerializer().serializeToString(document).length;if(typeof n=="string")return dc(n);if(n instanceof Blob)return n.size;if(n instanceof FormData)return Wd(n);if(n instanceof URLSearchParams)return dc(n.toString());if(n.byteLength!==void 0)return n.byteLength;Up.warn("unknown body type")}c(Kd,"getXHRBodyLength");var jd=new TextEncoder;function dc(n){return jd.encode(n).byteLength}c(dc,"getByteLength");function Wd(n){let e=0;for(let[o,a]of n.entries())e+=o.length,a instanceof Blob?e+=a.size:e+=a.length;return e}c(Wd,"getFormDataSize");function Dp(n){let e=zd(),o=n.toUpperCase();return o in e?o:"_OTHER"}c(Dp,"normalizeHttpRequestMethod");var qd={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0},Ao;function zd(){if(Ao===void 0){let n=void 0;n&&n.length>0?(Ao={},n.forEach(e=>{Ao[e]=!0})):Ao=qd}return Ao}c(zd,"getKnownMethods");var $d={"https:":"443","http:":"80"};function wp(n){let e=Number(n.port||$d[n.protocol]);if(e&&!isNaN(e))return e}c(wp,"serverPortFromUrl");var Sc="0.201.1";var Xd=300,Vp=typeof process=="object"&&process.release?.name==="node",mo=class extends Qt{static{c(this,"FetchInstrumentation")}component="fetch";version=Sc;moduleName=this.component;_usedResources=new WeakSet;_tasksCount=0;_semconvStability;constructor(e={}){super("@opentelemetry/instrumentation-fetch",Sc,e),this._semconvStability=Zn("http",e?.semconvStabilityOptIn)}init(){}_addChildSpan(e,o){let a=this.tracer.startSpan("CORS Preflight",{startTime:o[w.FETCH_START]},H.setSpan(D.active(),e)),s=!(this._semconvStability&at.OLD);Oe(a,o,this.getConfig().ignoreNetworkEvents,void 0,s),a.end(o[w.RESPONSE_END])}_addFinalSpanAttributes(e,o){let a=re(o.url);if(this._semconvStability&at.OLD&&(e.setAttribute(Ut.ATTR_HTTP_STATUS_CODE,o.status),o.statusText!=null&&e.setAttribute(ho.HTTP_STATUS_TEXT,o.statusText),e.setAttribute(Ut.ATTR_HTTP_HOST,a.host),e.setAttribute(Ut.ATTR_HTTP_SCHEME,a.protocol.replace(":","")),typeof navigator<"u"&&e.setAttribute(Ut.ATTR_HTTP_USER_AGENT,navigator.userAgent)),this._semconvStability&at.STABLE){e.setAttribute(Ke,o.status),e.setAttribute(Hr,a.hostname);let s=wp(a);s&&e.setAttribute(ri,s)}}_addHeaders(e,o){if(!To(o,this.getConfig().propagateTraceHeaderCorsUrls)){let a={};mt.inject(D.active(),a),Object.keys(a).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(e instanceof Request)mt.inject(D.active(),e.headers,{set:c((a,s,u)=>a.set(s,typeof u=="string"?u:String(u)),"set")});else if(e.headers instanceof Headers)mt.inject(D.active(),e.headers,{set:c((a,s,u)=>a.set(s,typeof u=="string"?u:String(u)),"set")});else if(e.headers instanceof Map)mt.inject(D.active(),e.headers,{set:c((a,s,u)=>a.set(s,typeof u=="string"?u:String(u)),"set")});else{let a={};mt.inject(D.active(),a),e.headers=Object.assign({},a,e.headers||{})}}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}_createSpan(e,o={}){if($n(e,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}let a="",s={};if(this._semconvStability&at.OLD){let u=(o.method||"GET").toUpperCase();a=`HTTP ${u}`,s[ho.COMPONENT]=this.moduleName,s[Ut.ATTR_HTTP_METHOD]=u,s[Ut.ATTR_HTTP_URL]=e}if(this._semconvStability&at.STABLE){let u=o.method,r=Dp(o.method||"GET");a||(a=r),s[Ce]=r,r!==u&&(s[ei]=u),s[Yr]=e}return this.tracer.startSpan(a,{kind:Pt.CLIENT,attributes:s})}_findResourceAndAddNetworkEvents(e,o,a){let s=o.entries;if(!s.length){if(!performance.getEntriesByType)return;s=performance.getEntriesByType("resource")}let u=Eo(o.spanUrl,o.startTime,a,s,this._usedResources,"fetch");if(u.mainRequest){let r=u.mainRequest;this._markResourceAsUsed(r);let t=u.corsPreFlightRequest;t&&(this._addChildSpan(e,t),this._markResourceAsUsed(t));let i=!(this._semconvStability&at.OLD);Oe(e,r,this.getConfig().ignoreNetworkEvents,void 0,i)}}_markResourceAsUsed(e){this._usedResources.add(e)}_endSpan(e,o,a){let s=xt(Date.now()),u=Jt();this._addFinalSpanAttributes(e,a),this._semconvStability&at.STABLE&&a.status>=400&&(e.setStatus({code:zt.ERROR}),e.setAttribute(Gn,String(a.status))),setTimeout(()=>{o.observer?.disconnect(),this._findResourceAndAddNetworkEvents(e,o,u),this._tasksCount--,this._clearResources(),e.end(s)},Xd)}_patchConstructor(){return e=>{let o=this;return c(function(...s){let u=this,r=re(s[0]instanceof Request?s[0].url:String(s[0])).href,t=s[0]instanceof Request?s[0]:s[1]||{},i=o._createSpan(r,t);if(!i)return e.apply(this,s);let l=o._prepareSpanData(r);o.getConfig().measureRequestSize&&Mp(...s).then(v=>{v&&(o._semconvStability&at.OLD&&i.setAttribute(Ut.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED,v),o._semconvStability&at.STABLE&&i.setAttribute(Ut.ATTR_HTTP_REQUEST_BODY_SIZE,v))}).catch(v=>{o._diag.warn("getFetchBodyLength",v)});function p(v,Y){o._applyAttributesAfterFetch(v,t,Y),o._endSpan(v,l,{status:Y.status||0,statusText:Y.message,url:r})}c(p,"endSpanOnError");function E(v,Y){o._applyAttributesAfterFetch(v,t,Y),Y.status>=200&&Y.status<400?o._endSpan(v,l,Y):o._endSpan(v,l,{status:Y.status,statusText:Y.statusText,url:r})}c(E,"endSpanOnSuccess");function y(v,Y,$){try{let L=$.clone().body;if(L){let x=L.getReader(),Z=c(()=>{x.read().then(({done:tt})=>{tt?E(v,$):Z()},tt=>{p(v,tt)})},"read");Z()}else E(v,$)}finally{Y($)}}c(y,"onSuccess");function g(v,Y,$){try{p(v,$)}finally{Y($)}}return c(g,"onError"),new Promise((v,Y)=>D.with(H.setSpan(D.active(),i),()=>(o._addHeaders(t,r),o._callRequestHook(i,t),o._tasksCount++,e.apply(u,t instanceof Request?[t]:[r,t]).then(y.bind(u,i,v),g.bind(u,i,Y)))))},"patchConstructor")}}_applyAttributesAfterFetch(e,o,a){let s=this.getConfig().applyCustomAttributesOnSpan;s&&Me(()=>s(e,o,a),u=>{u&&this._diag.error("applyCustomAttributesOnSpan",u)},!0)}_callRequestHook(e,o){let a=this.getConfig().requestHook;a&&Me(()=>a(e,o),s=>{s&&this._diag.error("requestHook",s)},!0)}_prepareSpanData(e){let o=Jt(),a=[];if(typeof PerformanceObserver!="function")return{entries:a,startTime:o,spanUrl:e};let s=new PerformanceObserver(u=>{u.getEntries().forEach(t=>{t.initiatorType==="fetch"&&t.name===e&&a.push(t)})});return s.observe({entryTypes:["resource"]}),{entries:a,observer:s,startTime:o,spanUrl:e}}enable(){if(Vp){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}Et(fetch)&&(this._unwrap(kr,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(kr,"fetch",this._patchConstructor())}disable(){Vp||(this._unwrap(kr,"fetch"),this._usedResources=new WeakSet)}};var yr;(function(n){n.EVENT_TYPE="event_type",n.TARGET_ELEMENT="target_element",n.TARGET_XPATH="target_xpath",n.HTTP_URL="http.url"})(yr||(yr={}));var hc="0.46.0",kp="@opentelemetry/instrumentation-user-interaction";var Jd="OT_ZONE_CONTEXT",Zd="Navigation:",Qd=["click"];function tS(){return!1}c(tS,"defaultShouldPreventSpanCreation");var ls=class extends Qt{static{c(this,"UserInteractionInstrumentation")}version=hc;moduleName="user-interaction";_spansData=new WeakMap;_wrappedListeners=new WeakMap;_eventsSpanMap=new WeakMap;_eventNames;_shouldPreventSpanCreation;constructor(e={}){super(kp,hc,e),this._eventNames=new Set(e?.eventNames??Qd),this._shouldPreventSpanCreation=typeof e?.shouldPreventSpanCreation=="function"?e.shouldPreventSpanCreation:tS}init(){}_checkForTimeout(e,o){let a=this._spansData.get(o);a&&(e.source==="setTimeout"?a.hrTimeLastTimeout=Jt():e.source!=="Promise.then"&&e.source!=="setTimeout"&&(a.hrTimeLastTimeout=void 0))}_allowEventName(e){return this._eventNames.has(e)}_createSpan(e,o,a){if(!(e instanceof HTMLElement)||!e.getAttribute||e.hasAttribute("disabled")||!this._allowEventName(o))return;let s=as(e,!0);try{let u=this.tracer.startSpan(o,{attributes:{[yr.EVENT_TYPE]:o,[yr.TARGET_ELEMENT]:e.tagName,[yr.TARGET_XPATH]:s,[yr.HTTP_URL]:window.location.href}},a?H.setSpan(D.active(),a):void 0);return this._shouldPreventSpanCreation(o,e,u)===!0?void 0:(this._spansData.set(u,{taskCount:0}),u)}catch(u){this._diag.error("failed to start create new user interaction span",u)}}_decrementTask(e){let o=this._spansData.get(e);o&&(o.taskCount--,o.taskCount===0&&this._tryToEndSpan(e,o.hrTimeLastTimeout))}_getCurrentSpan(e){let o=e.get(Jd);return o&&H.getSpan(o)}_incrementTask(e){let o=this._spansData.get(e);o&&o.taskCount++}addPatchedListener(e,o,a,s){let u=this._wrappedListeners.get(a);u||(u=new Map,this._wrappedListeners.set(a,u));let r=u.get(o);return r||(r=new Map,u.set(o,r)),r.has(e)?!1:(r.set(e,s),!0)}removePatchedListener(e,o,a){let s=this._wrappedListeners.get(a);if(!s)return;let u=s.get(o);if(!u)return;let r=u.get(e);return r&&(u.delete(e),u.size===0&&(s.delete(o),s.size===0&&this._wrappedListeners.delete(a))),r}_invokeListener(e,o,a){return typeof e=="function"?e.apply(o,a):e.handleEvent(a[0])}_patchAddEventListener(){let e=this;return o=>c(function(s,u,r){if(!u)return o.call(this,s,u,r);let t=r&&typeof r=="object"&&r.once,i=c(function(...l){let p,E=l[0],y=E?.target;E&&(p=e._eventsSpanMap.get(E)),t&&e.removePatchedListener(this,s,u);let g=e._createSpan(y,s,p);return g?(E&&e._eventsSpanMap.set(E,g),D.with(H.setSpan(D.active(),g),()=>{let v=e._invokeListener(u,this,l);return g.end(),v})):e._invokeListener(u,this,l)},"patchedListener");if(e.addPatchedListener(this,s,u,i))return o.call(this,s,i,r)},"addEventListenerPatched")}_patchRemoveEventListener(){let e=this;return o=>c(function(s,u,r){let t=e.removePatchedListener(this,s,u);return t?o.call(this,s,t,r):o.call(this,s,u,r)},"removeEventListenerPatched")}_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 e=this;return o=>c(function(...s){let u=`${location.pathname}${location.hash}${location.search}`,r=o.apply(this,s),t=`${location.pathname}${location.hash}${location.search}`;return u!==t&&e._updateInteractionName(t),r},"patchHistoryMethod")}_unpatchHistoryApi(){Et(history.replaceState)&&this._unwrap(history,"replaceState"),Et(history.pushState)&&this._unwrap(history,"pushState"),Et(history.back)&&this._unwrap(history,"back"),Et(history.forward)&&this._unwrap(history,"forward"),Et(history.go)&&this._unwrap(history,"go")}_updateInteractionName(e){let o=H.getSpan(D.active());o&&typeof o.updateName=="function"&&o.updateName(`${Zd} ${e}`)}_patchZoneCancelTask(){let e=this;return o=>c(function(s){let u=Zone.current,r=e._getCurrentSpan(u);return r&&e._shouldCountTask(s,u)&&e._decrementTask(r),o.call(this,s)},"patchCancelTask")}_patchZoneScheduleTask(){let e=this;return o=>c(function(s){let u=Zone.current,r=e._getCurrentSpan(u);return r&&e._shouldCountTask(s,u)&&(e._incrementTask(r),e._checkForTimeout(s,r)),o.call(this,s)},"patchScheduleTask")}_patchZoneRunTask(){let e=this;return o=>c(function(s,u,r){let i=(Array.isArray(r)&&r[0]instanceof Event?r[0]:void 0)?.target,l,p=this;if(i){if(l=e._createSpan(i,s.eventName),l)return e._incrementTask(l),p.run(()=>{try{return D.with(H.setSpan(D.active(),l),()=>{let E=Zone.current;return s._zone=E,o.call(E,s,u,r)})}finally{e._decrementTask(l)}})}else l=e._getCurrentSpan(p);try{return o.call(p,s,u,r)}finally{l&&e._shouldCountTask(s,p)&&e._decrementTask(l)}},"patchRunTask")}_shouldCountTask(e,o){if(e._zone&&(o=e._zone),!o||!e.data||e.data.isPeriodic)return!1;let a=this._getCurrentSpan(o);return!a||!this._spansData.get(a)?!1:e.type==="macroTask"||e.type==="microTask"}_tryToEndSpan(e,o){e&&this._spansData.get(e)&&(e.end(o),this._spansData.delete(e))}enable(){let e=this._getZoneWithPrototype();this._diag.debug("applying patch to",this.moduleName,this.version,"zone:",!!e),e?(Et(e.prototype.runTask)&&(this._unwrap(e.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),Et(e.prototype.scheduleTask)&&(this._unwrap(e.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),Et(e.prototype.cancelTask)&&(this._unwrap(e.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(e.prototype,"runTask",this._patchZoneRunTask()),this._wrap(e.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(e.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(a=>{Et(a.addEventListener)&&(this._unwrap(a,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),Et(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 e=this._getZoneWithPrototype();this._diag.debug("removing patch from",this.moduleName,this.version,"zone:",!!e),e&&this._zonePatched?(Et(e.prototype.runTask)&&this._unwrap(e.prototype,"runTask"),Et(e.prototype.scheduleTask)&&this._unwrap(e.prototype,"scheduleTask"),Et(e.prototype.cancelTask)&&this._unwrap(e.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(a=>{Et(a.addEventListener)&&this._unwrap(a,"addEventListener"),Et(a.removeEventListener)&&this._unwrap(a,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};var Bp="http.host",Gp="http.method",Hp="http.request.body.size",Yp="http.request_content_length_uncompressed";var Fp="http.scheme",Kp="http.status_code",jp="http.url",Wp="http.user_agent";var Re;(function(n){n.METHOD_OPEN="open",n.METHOD_SEND="send",n.EVENT_ABORT="abort",n.EVENT_ERROR="error",n.EVENT_LOAD="loaded",n.EVENT_TIMEOUT="timeout"})(Re||(Re={}));var eS=m.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function rS(n){return typeof Document<"u"&&n instanceof Document}c(rS,"isDocument");function zp(n){if(rS(n))return new XMLSerializer().serializeToString(document).length;if(typeof n=="string")return qp(n);if(n instanceof Blob)return n.size;if(n instanceof FormData)return oS(n);if(n instanceof URLSearchParams)return qp(n.toString());if(n.byteLength!==void 0)return n.byteLength;eS.warn("unknown body type")}c(zp,"getXHRBodyLength");var nS=new TextEncoder;function qp(n){return nS.encode(n).byteLength}c(qp,"getByteLength");function oS(n){let e=0;for(let[o,a]of n.entries())e+=o.length,a instanceof Blob?e+=a.size:e+=a.length;return e}c(oS,"getFormDataSize");function $p(n){let e=sS(),o=n.toUpperCase();return o in e?o:"_OTHER"}c($p,"normalizeHttpRequestMethod");var iS={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0},yo;function sS(){if(yo===void 0){let n=void 0;n&&n.length>0?(yo={},n.forEach(e=>{yo[e]=!0})):yo=iS}return yo}c(sS,"getKnownMethods");var aS={"https:":"443","http:":"80"};function Xp(n){let e=Number(n.port||aS[n.protocol]);if(e&&!isNaN(e))return e}c(Xp,"serverPortFromUrl");var Ac="0.201.1";var ps;(function(n){n.HTTP_STATUS_TEXT="http.status_text"})(ps||(ps={}));var cS=300,Oo=class extends Qt{static{c(this,"XMLHttpRequestInstrumentation")}component="xml-http-request";version=Ac;moduleName=this.component;_tasksCount=0;_xhrMem=new WeakMap;_usedResources=new WeakSet;_semconvStability;constructor(e={}){super("@opentelemetry/instrumentation-xml-http-request",Ac,e),this._semconvStability=Zn("http",e?.semconvStabilityOptIn)}init(){}_addHeaders(e,o){let a=re(o).href;if(!To(a,this.getConfig().propagateTraceHeaderCorsUrls)){let u={};mt.inject(D.active(),u),Object.keys(u).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}let s={};mt.inject(D.active(),s),Object.keys(s).forEach(u=>{e.setRequestHeader(u,String(s[u]))})}_addChildSpan(e,o){D.with(H.setSpan(D.active(),e),()=>{let a=this.tracer.startSpan("CORS Preflight",{startTime:o[w.FETCH_START]}),s=!(this._semconvStability&at.OLD);Oe(a,o,this.getConfig().ignoreNetworkEvents,void 0,s),a.end(o[w.RESPONSE_END])})}_addFinalSpanAttributes(e,o,a){if(this._semconvStability&at.OLD){if(o.status!==void 0&&e.setAttribute(Kp,o.status),o.statusText!==void 0&&e.setAttribute(ps.HTTP_STATUS_TEXT,o.statusText),typeof a=="string"){let s=re(a);e.setAttribute(Bp,s.host),e.setAttribute(Fp,s.protocol.replace(":",""))}e.setAttribute(Wp,navigator.userAgent)}this._semconvStability&at.STABLE&&o.status&&e.setAttribute(Ke,o.status)}_applyAttributesAfterXHR(e,o){let a=this.getConfig().applyCustomAttributesOnSpan;typeof a=="function"&&Me(()=>a(e,o),s=>{s&&this._diag.error("applyCustomAttributesOnSpan",s)},!0)}_addResourceObserver(e,o){let a=this._xhrMem.get(e);!a||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(a.createdResources={observer:new PerformanceObserver(s=>{let u=s.getEntries(),r=re(o);u.forEach(t=>{t.initiatorType==="xmlhttprequest"&&t.name===r.href&&a.createdResources&&a.createdResources.entries.push(t)})}),entries:[]},a.createdResources.observer.observe({entryTypes:["resource"]}))}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(Rt.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)}_findResourceAndAddNetworkEvents(e,o,a,s,u){if(!a||!s||!u||!e.createdResources)return;let r=e.createdResources.entries;(!r||!r.length)&&(r=Rt.getEntriesByType("resource"));let t=Eo(re(a).href,s,u,r,this._usedResources);if(t.mainRequest){let i=t.mainRequest;this._markResourceAsUsed(i);let l=t.corsPreFlightRequest;l&&(this._addChildSpan(o,l),this._markResourceAsUsed(l));let p=!(this._semconvStability&at.OLD);Oe(o,i,this.getConfig().ignoreNetworkEvents,void 0,p)}}_cleanPreviousSpanInformation(e){let o=this._xhrMem.get(e);if(o){let a=o.callbackToRemoveEvents;a&&a(),this._xhrMem.delete(e)}}_createSpan(e,o,a){if($n(o,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}let s="",u=re(o),r={};if(this._semconvStability&at.OLD&&(s=a.toUpperCase(),r[Gp]=a,r[jp]=u.toString()),this._semconvStability&at.STABLE){let i=a,l=$p(a);s||(s=l),r[Ce]=l,l!==i&&(r[ei]=i),r[Yr]=u.toString(),r[Hr]=u.hostname;let p=Xp(u);p&&(r[ri]=p)}let t=this.tracer.startSpan(s,{kind:Pt.CLIENT,attributes:r});return t.addEvent(Re.METHOD_OPEN),this._cleanPreviousSpanInformation(e),this._xhrMem.set(e,{span:t,spanUrl:o}),t}_markResourceAsUsed(e){this._usedResources.add(e)}_patchOpen(){return e=>{let o=this;return c(function(...s){let u=s[0],r=s[1];return o._createSpan(this,r,u),e.apply(this,s)},"patchOpen")}}_patchSend(){let e=this;function o(l,p,E,y){let g=p.callbackToRemoveEvents;typeof g=="function"&&g();let{span:v,spanUrl:Y,sendStartTime:$}=p;v&&(e._findResourceAndAddNetworkEvents(p,v,Y,$,E),v.addEvent(l,y),e._addFinalSpanAttributes(v,p,Y),v.end(y),e._tasksCount--),e._clearResources()}c(o,"endSpanTimeout");function a(l,p,E,y){let g=e._xhrMem.get(p);if(!g)return;if(g.status=p.status,g.statusText=p.statusText,e._xhrMem.delete(p),g.span){let $=g.span;e._applyAttributesAfterXHR($,p),e._semconvStability&at.STABLE&&(E?y&&($.setStatus({code:zt.ERROR,message:y}),$.setAttribute(Gn,y)):g.status&&g.status>=400&&($.setStatus({code:zt.ERROR}),$.setAttribute(Gn,String(g.status))))}let v=Jt(),Y=Date.now();setTimeout(()=>{o(l,g,v,Y)},cS)}c(a,"endSpan");function s(){a(Re.EVENT_ERROR,this,!0,"error")}c(s,"onError");function u(){a(Re.EVENT_ABORT,this,!1)}c(u,"onAbort");function r(){a(Re.EVENT_TIMEOUT,this,!0,"timeout")}c(r,"onTimeout");function t(){this.status<299?a(Re.EVENT_LOAD,this,!1):a(Re.EVENT_ERROR,this,!1)}c(t,"onLoad");function i(l){l.removeEventListener("abort",u),l.removeEventListener("error",s),l.removeEventListener("load",t),l.removeEventListener("timeout",r);let p=e._xhrMem.get(l);p&&(p.callbackToRemoveEvents=void 0)}return c(i,"unregister"),l=>c(function(...E){let y=e._xhrMem.get(this);if(!y)return l.apply(this,E);let g=y.span,v=y.spanUrl;if(g&&v){if(e.getConfig().measureRequestSize&&E?.[0]){let Y=E[0],$=zp(Y);$!==void 0&&(e._semconvStability&at.OLD&&g.setAttribute(Yp,$),e._semconvStability&at.STABLE&&g.setAttribute(Hp,$))}D.with(H.setSpan(D.active(),g),()=>{e._tasksCount++,y.sendStartTime=Jt(),g.addEvent(Re.METHOD_SEND),this.addEventListener("abort",u),this.addEventListener("error",s),this.addEventListener("load",t),this.addEventListener("timeout",r),y.callbackToRemoveEvents=()=>{i(this),y.createdResources&&y.createdResources.observer.disconnect()},e._addHeaders(this,v),e._addResourceObserver(this,v)})}return l.apply(this,E)},"patchSend")}enable(){this._diag.debug("applying patch to",this.moduleName,this.version),Et(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),Et(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 mc={"@opentelemetry/instrumentation-document-load":us,"@opentelemetry/instrumentation-fetch":mo,"@opentelemetry/instrumentation-user-interaction":ls,"@opentelemetry/instrumentation-xml-http-request":Oo};function _s(n={}){for(let o of Object.keys(n))if(!Object.prototype.hasOwnProperty.call(mc,o)){m.error(`Provided instrumentation name "${o}" not found`);continue}let e=[];for(let o of Object.keys(mc)){let a=mc[o],s=n[o]??{};if(s.enabled===!1){m.debug(`Disabling instrumentation for ${o}`);continue}try{m.debug(`Loading instrumentation for ${o}`),e.push(new a(s))}catch(u){m.error(u)}}return e}c(_s,"getWebAutoInstrumentations");function Jp(){return[Tc,gp]}c(Jp,"getResourceDetectors");var fs=class{static{c(this,"Dice")}#t;#r=0;get rate(){return this.#r}set#e(e){this.#r=Math.max(0,Math.min(this.#t,e))}constructor(e){this.#t=e.scale,this.#e=e.rate??0}update(e){this.#t=e.scale??this.#t,this.#e=e.rate??this.rate}roll(){return Math.random()*this.#t<this.rate}};var Zp=c(()=>{let n=ae.getMeter("sw.apm.sampling.metrics");return{requestCount:n.createCounter("trace.service.request_count",{valueType:ft.INT}),sampleCount:n.createCounter("trace.service.samplecount",{valueType:ft.INT}),traceCount:n.createCounter("trace.service.tracecount",{valueType:ft.INT}),throughTraceCount:n.createCounter("trace.service.through_trace_count",{valueType:ft.INT}),triggeredTraceCount:n.createCounter("trace.service.triggered_trace_count",{valueType:ft.INT}),tokenBucketExhaustionCount:n.createCounter("trace.service.tokenbucket_exhaustion_count",{valueType:ft.INT})}},"counters");var ln;(function(n){n[n.LocalDefault=2]="LocalDefault",n[n.Remote=6]="Remote"})(ln||(ln={}));var dt;(function(n){n[n.OK=0]="OK",n[n.INVALID=1]="INVALID",n[n.OVERRIDE=2]="OVERRIDE",n[n.SAMPLE_START=4]="SAMPLE_START",n[n.SAMPLE_THROUGH_ALWAYS=16]="SAMPLE_THROUGH_ALWAYS",n[n.TRIGGERED_TRACE=32]="TRIGGERED_TRACE"})(dt||(dt={}));var Or;(function(n){n[n.ALWAYS=20]="ALWAYS",n[n.NEVER=0]="NEVER"})(Or||(Or={}));var Vt;(function(n){n.DEFAULT="",n.TRIGGER_RELAXED="TriggerRelaxed",n.TRIGGER_STRICT="TriggerStrict"})(Vt||(Vt={}));function Qp(n,e){let o=e.tracingMode??n.flags;return e.triggerMode?o|=dt.TRIGGERED_TRACE:o&=~dt.TRIGGERED_TRACE,n.flags&dt.OVERRIDE&&(o&=n.flags,o|=dt.OVERRIDE),{...n,flags:o}}c(Qp,"merge");var t_=sr(Ts(),1);var yc=2**31-1,pn=class{static{c(this,"TokenBucket")}#t=0;get capacity(){return this.#t}set#r(e){this.#t=Math.max(0,e)}#e=0;get rate(){return this.#e}set#o(e){this.#e=Math.max(0,e)}#n=yc;get interval(){return this.#n}set#a(e){this.#n=Math.max(0,Math.min(yc,e))}#c=0;get#i(){return this.#c}set#i(e){this.#c=Math.max(0,Math.min(this.capacity,e))}#s=void 0;constructor(e={}){this.#r=e.capacity??0,this.#o=e.rate??0,this.#a=e.interval??yc,this.#i=this.capacity}update(e){if(e.capacity!==void 0){let o=e.capacity-this.capacity;this.#r=e.capacity,this.#i+=o}e.rate!==void 0&&(this.#o=e.rate),e.interval!==void 0&&(this.#a=e.interval,this.running&&(this.stop(),this.start()))}consume(e=1){return this.#i>=e?(this.#i-=e,!0):!1}start(){this.running||(this.#s=(0,t_.unref)(setInterval(()=>{this.#u()},this.interval)))}stop(){this.running&&(clearInterval(this.#s),this.#s=void 0)}get running(){return this.#s!==void 0}#u(){this.#i+=this.rate}};function pS(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}c(pS,"isBytes");function e_(n){if(!Number.isSafeInteger(n)||n<0)throw new Error("positive integer expected, got "+n)}c(e_,"anumber");function fn(n,...e){if(!pS(n))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(n.length))throw new Error("Uint8Array expected of length "+e+", got length="+n.length)}c(fn,"abytes");function r_(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");e_(n.outputLen),e_(n.blockLen)}c(r_,"ahash");function En(n,e=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(e&&n.finished)throw new Error("Hash#digest() has already been called")}c(En,"aexists");function n_(n,e){fn(n);let o=e.outputLen;if(n.length<o)throw new Error("digestInto() expects output buffer of length at least "+o)}c(n_,"aoutput");function Rr(...n){for(let e=0;e<n.length;e++)n[e].fill(0)}c(Rr,"clean");function ds(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}c(ds,"createView");function Ss(n,e){return n<<e|n>>>32-e>>>0}c(Ss,"rotl");function _S(n){if(typeof n!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(n))}c(_S,"utf8ToBytes");function Ro(n){return typeof n=="string"&&(n=_S(n)),fn(n),n}c(Ro,"toBytes");var _n=class{static{c(this,"Hash")}};function o_(n){let e=c(a=>n().update(Ro(a)).digest(),"hashC"),o=n();return e.outputLen=o.outputLen,e.blockLen=o.blockLen,e.create=()=>n(),e}c(o_,"createHasher");var hs=class extends _n{static{c(this,"HMAC")}constructor(e,o){super(),this.finished=!1,this.destroyed=!1,r_(e);let a=Ro(o);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let s=this.blockLen,u=new Uint8Array(s);u.set(a.length>s?e.create().update(a).digest():a);for(let r=0;r<u.length;r++)u[r]^=54;this.iHash.update(u),this.oHash=e.create();for(let r=0;r<u.length;r++)u[r]^=106;this.oHash.update(u),Rr(u)}update(e){return En(this),this.iHash.update(e),this}digestInto(e){En(this),fn(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:o,iHash:a,finished:s,destroyed:u,blockLen:r,outputLen:t}=this;return e=e,e.finished=s,e.destroyed=u,e.blockLen=r,e.outputLen=t,e.oHash=o._cloneInto(e.oHash),e.iHash=a._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},Oc=c((n,e,o)=>new hs(n,e).update(o).digest(),"hmac");Oc.create=(n,e)=>new hs(n,e);function fS(n,e,o,a){if(typeof n.setBigUint64=="function")return n.setBigUint64(e,o,a);let s=BigInt(32),u=BigInt(4294967295),r=Number(o>>s&u),t=Number(o&u),i=a?4:0,l=a?0:4;n.setUint32(e+i,r,a),n.setUint32(e+l,t,a)}c(fS,"setBigUint64");function i_(n,e,o){return n&e^~n&o}c(i_,"Chi");function s_(n,e,o){return n&e^n&o^e&o}c(s_,"Maj");var As=class extends _n{static{c(this,"HashMD")}constructor(e,o,a,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=o,this.padOffset=a,this.isLE=s,this.buffer=new Uint8Array(e),this.view=ds(this.buffer)}update(e){En(this),e=Ro(e),fn(e);let{view:o,buffer:a,blockLen:s}=this,u=e.length;for(let r=0;r<u;){let t=Math.min(s-this.pos,u-r);if(t===s){let i=ds(e);for(;s<=u-r;r+=s)this.process(i,r);continue}a.set(e.subarray(r,r+t),this.pos),this.pos+=t,r+=t,this.pos===s&&(this.process(o,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){En(this),n_(e,this),this.finished=!0;let{buffer:o,view:a,blockLen:s,isLE:u}=this,{pos:r}=this;o[r++]=128,Rr(this.buffer.subarray(r)),this.padOffset>s-r&&(this.process(a,0),r=0);for(let E=r;E<s;E++)o[E]=0;fS(a,s-8,BigInt(this.length*8),u),this.process(a,0);let t=ds(e),i=this.outputLen;if(i%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let l=i/4,p=this.get();if(l>p.length)throw new Error("_sha2: outputLen bigger than state");for(let E=0;E<l;E++)t.setUint32(4*E,p[E],u)}digest(){let{buffer:e,outputLen:o}=this;this.digestInto(e);let a=e.slice(0,o);return this.destroy(),a}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:o,buffer:a,length:s,finished:u,destroyed:r,pos:t}=this;return e.destroyed=r,e.finished=u,e.length=s,e.pos=t,s%o&&e.buffer.set(a),e}clone(){return this._cloneInto()}};var No=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),Je=new Uint32Array(80),Rc=class extends As{static{c(this,"SHA1")}constructor(){super(64,20,8,!1),this.A=No[0]|0,this.B=No[1]|0,this.C=No[2]|0,this.D=No[3]|0,this.E=No[4]|0}get(){let{A:e,B:o,C:a,D:s,E:u}=this;return[e,o,a,s,u]}set(e,o,a,s,u){this.A=e|0,this.B=o|0,this.C=a|0,this.D=s|0,this.E=u|0}process(e,o){for(let i=0;i<16;i++,o+=4)Je[i]=e.getUint32(o,!1);for(let i=16;i<80;i++)Je[i]=Ss(Je[i-3]^Je[i-8]^Je[i-14]^Je[i-16],1);let{A:a,B:s,C:u,D:r,E:t}=this;for(let i=0;i<80;i++){let l,p;i<20?(l=i_(s,u,r),p=1518500249):i<40?(l=s^u^r,p=1859775393):i<60?(l=s_(s,u,r),p=2400959708):(l=s^u^r,p=3395469782);let E=Ss(a,5)+l+t+p+Je[i]|0;t=r,r=u,u=Ss(s,30),s=a,a=E}a=a+this.A|0,s=s+this.B|0,u=u+this.C|0,r=r+this.D|0,t=t+this.E|0,this.set(a,s,u,r,t)}roundClean(){Rr(Je)}destroy(){this.set(0,0,0,0,0),Rr(this.buffer)}},a_=o_(()=>new Rc);var ES="trigger-trace",TS="ts",dS="sw-keys",SS=/^custom-[^\s]+$/,Ze;(function(n){n.OK="ok",n.BAD_TIMESTAMP="bad-timestamp",n.BAD_SIGNATURE="bad-signature",n.NO_SIGNATURE_KEY="no-signature-key"})(Ze||(Ze={}));var Ne;(function(n){n.OK="ok",n.NOT_REQUESTED="not-requested",n.IGNORED="ignored",n.TRACING_DISABLED="tracing-disabled",n.TRIGGER_TRACING_DISABLED="trigger-tracing-disabled",n.RATE_EXCEEDED="rate-exceeded",n.SETTINGS_NOT_AVAILABLE="settings-not-available"})(Ne||(Ne={}));function c_(n,e=m){let o={custom:{},ignored:[]},a=n.split(";").map(s=>{let[u,...r]=s.split("=").map(t=>t.trim());return[u,r.length>0?r.join("="):void 0]}).filter(([s])=>s.length>0);for(let[s,u]of a)if(s===ES){if(u!==void 0||o.triggerTrace!==void 0){e.debug("invalid trace option for trigger trace, should not have a value and only be provided once"),o.ignored.push([s,u]);continue}o.triggerTrace=!0}else if(s===TS){if(u===void 0||o.timestamp!==void 0){e.debug("invalid trace option for timestamp, should have a value and only be provided once"),o.ignored.push([s,u]);continue}let r=Number.parseFloat(u);if(!Number.isSafeInteger(r)){e.debug("invalid trace option for timestamp, should be an integer"),o.ignored.push([s,u]);continue}o.timestamp=r}else if(s===dS){if(u===void 0||o.swKeys!==void 0){e.debug("invalid trace option for sw keys, should have a value and only be provided once"),o.ignored.push([s,u]);continue}o.swKeys=u}else if(SS.test(s)){if(u===void 0||o.custom[s]!==void 0){e.debug(`invalid trace option for custom key ${s}, should have a value and only be provided once`),o.ignored.push([s,u]);continue}o.custom[s]=u}else o.ignored.push([s,u]);return o}c(c_,"parseTraceOptions");function u_(n){let e={auth:n.auth,"trigger-trace":n.triggerTrace,ignored:n.ignored?.join(",")};return Object.entries(e).filter(([,o])=>o!==void 0).map(([o,a])=>`${o}=${a}`).join(";")}c(u_,"stringifyTraceOptionsResponse");function l_(n,e,o,a){if(!o)return Ze.NO_SIGNATURE_KEY;let s=Date.now()/1e3;if(!a||Math.abs(s-a)>5*60)return Ze.BAD_TIMESTAMP;let u=Oc(a_,o,n).reduce((r,t)=>r+t.toString(16).padStart(2,"0"),"");return e===u?Ze.OK:Ze.BAD_SIGNATURE}c(l_,"validateSignature");var hS=/^[0-9a-f]{16}-[0-9a-f]{2}$/,Nc=1e3,AS=1e6,mS="SWKeys",yS="sw.tracestate_parent_id",OS="SampleRate",RS="SampleSource",p_="BucketCapacity",__="BucketRate",NS="TriggeredTrace",Nr;(function(n){n[n.ROOT=0]="ROOT",n[n.ENTRY=1]="ENTRY",n[n.LOCAL=2]="LOCAL"})(Nr||(Nr={}));var ms=class{static{c(this,"OboeSampler")}logger;#t=Zp();#r={[Vt.DEFAULT]:new pn({interval:Nc}),[Vt.TRIGGER_RELAXED]:new pn({interval:Nc}),[Vt.TRIGGER_STRICT]:new pn({interval:Nc})};#e=void 0;constructor(e){this.logger=e;for(let o of Object.values(this.#r))o.start()}shouldSample(...e){let[o,,,,a]=e,s=H.getSpan(o),u=xS(s);if(this.logger.debug(`span type is ${Nr[u]}`),u===Nr.LOCAL)return s.spanContext().traceFlags&Nt.SAMPLED?{decision:rt.RECORD_AND_SAMPLED}:{decision:rt.NOT_RECORD};let r={decision:rt.NOT_RECORD,attributes:a,params:e,settings:this.#s(...e),traceState:s?.spanContext().traceState?.get("sw"),headers:this.requestHeaders(...e)};if(this.#t.requestCount.add(1,{},o),r.headers["X-Trace-Options"]){if(r.traceOptions={...c_(r.headers["X-Trace-Options"],this.logger),response:{}},this.logger.debug("X-Trace-Options present",r.traceOptions),r.headers["X-Trace-Options-Signature"]&&(this.logger.debug("X-Trace-Options-Signature present; validating"),r.traceOptions.response.auth=l_(r.headers["X-Trace-Options"],r.headers["X-Trace-Options-Signature"],r.settings?.signatureKey,r.traceOptions.timestamp),r.traceOptions.response.auth!==Ze.OK))return this.logger.debug("X-Trace-Options-Signature invalid; tracing disabled"),this.#i(r),{decision:rt.NOT_RECORD};r.traceOptions.triggerTrace||(r.traceOptions.response.triggerTrace=Ne.NOT_REQUESTED),r.traceOptions.swKeys&&(r.attributes[mS]=r.traceOptions.swKeys);for(let[t,i]of Object.entries(r.traceOptions.custom))r.attributes[t]=i;r.traceOptions.ignored.length>0&&(r.traceOptions.response.ignored=r.traceOptions.ignored.map(([t])=>t))}return r.settings?(r.traceState&&hS.test(r.traceState)?(this.logger.debug("context is valid for parent-based sampling"),this.#o(r)):r.settings.flags&dt.SAMPLE_START?r.traceOptions?.triggerTrace?(this.logger.debug("trigger trace requested"),this.#n(r)):(this.logger.debug("defaulting to dice roll"),this.#a(r)):(this.logger.debug("SAMPLE_START is unset; sampling disabled"),this.#c(r)),this.logger.debug("final sampling state",r),this.#i(r),{decision:r.decision,attributes:r.attributes}):(this.logger.debug("settings unavailable; sampling disabled"),r.traceOptions?.triggerTrace&&(this.logger.debug("trigger trace requested but unavailable"),r.traceOptions.response.triggerTrace=Ne.SETTINGS_NOT_AVAILABLE),this.#i(r),{decision:rt.NOT_RECORD,attributes:r.attributes})}#o(e){let[o]=e.params;e.attributes[yS]=e.traceState.slice(0,16),e.traceOptions?.triggerTrace&&(this.logger.debug("trigger trace requested but ignored"),e.traceOptions.response.triggerTrace=Ne.IGNORED),e.settings.flags&dt.SAMPLE_THROUGH_ALWAYS?(this.logger.debug("SAMPLE_THROUGH_ALWAYS is set; parent-based sampling"),Number.parseInt(e.traceState.slice(-2),16)&Nt.SAMPLED?(this.logger.debug("parent is sampled; record and sample"),this.#t.traceCount.add(1,{},o),this.#t.throughTraceCount.add(1,{},o),e.decision=rt.RECORD_AND_SAMPLED):(this.logger.debug("parent is not sampled; record only"),e.decision=rt.RECORD)):(this.logger.debug("SAMPLE_THROUGH_ALWAYS is unset; sampling disabled"),e.settings.flags&dt.SAMPLE_START?(this.logger.debug("SAMPLE_START is set; record"),e.decision=rt.RECORD):(this.logger.debug("SAMPLE_START is unset; don't record"),e.decision=rt.NOT_RECORD))}#n(e){let[o]=e.params;if(e.settings.flags&dt.TRIGGERED_TRACE){this.logger.debug("TRIGGERED_TRACE set; trigger tracing");let a;e.traceOptions.response.auth?(this.logger.debug("signed request; using relaxed rate"),a=this.#r[Vt.TRIGGER_RELAXED]):(this.logger.debug("unsigned request; using strict rate"),a=this.#r[Vt.TRIGGER_STRICT]),e.attributes[NS]=!0,e.attributes[p_]=a.capacity,e.attributes[__]=a.rate,a.consume()?(this.logger.debug("sufficient capacity; record and sample"),this.#t.triggeredTraceCount.add(1,{},o),this.#t.traceCount.add(1,{},o),e.traceOptions.response.triggerTrace=Ne.OK,e.decision=rt.RECORD_AND_SAMPLED):(this.logger.debug("insufficient capacity; record only"),e.traceOptions.response.triggerTrace=Ne.RATE_EXCEEDED,e.decision=rt.RECORD)}else this.logger.debug("TRIGGERED_TRACE unset; record only"),e.traceOptions.response.triggerTrace=Ne.TRIGGER_TRACING_DISABLED,e.decision=rt.RECORD}#a(e){let[o]=e.params,a=new fs({rate:e.settings.sampleRate,scale:AS});if(e.attributes[OS]=a.rate,e.attributes[RS]=e.settings.sampleSource,this.#t.sampleCount.add(1,{},o),a.roll()){this.logger.debug("dice roll success; checking capacity");let s=this.#r[Vt.DEFAULT];e.attributes[p_]=s.capacity,e.attributes[__]=s.rate,s.consume()?(this.logger.debug("sufficient capacity; record and sample"),this.#t.traceCount.add(1,{},o),e.decision=rt.RECORD_AND_SAMPLED):(this.logger.debug("insufficient capacity; record only"),this.#t.tokenBucketExhaustionCount.add(1,{},o),e.decision=rt.RECORD)}else this.logger.debug("dice roll failure; record only"),e.decision=rt.RECORD}#c(e){e.traceOptions?.triggerTrace&&(this.logger.debug("trigger trace requested but tracing disabled"),e.traceOptions.response.triggerTrace=Ne.TRACING_DISABLED),e.settings.flags&dt.SAMPLE_THROUGH_ALWAYS?(this.logger.debug("SAMPLE_THROUGH_ALWAYS is set; record"),e.decision=rt.RECORD):(this.logger.debug("SAMPLE_THROUGH_ALWAYS is unset; don't record"),e.decision=rt.NOT_RECORD)}updateSettings(e){if(e.timestamp>(this.#e?.timestamp??0)){this.#e=e;for(let[o,a]of Object.entries(this.#r)){let s=this.#e.buckets[o];s&&a.update(s)}}}#i(e){let o={};e.traceOptions?.response&&(o["X-Trace-Options-Response"]=u_(e.traceOptions.response)),this.setResponseHeaders(o,...e.params)}#s(...e){if(!this.#e)return;let o=(this.#e.timestamp+this.#e.ttl)*1e3;if(Date.now()>o){this.logger.debug("settings expired, removing"),this.#e=void 0;return}return Qp(this.#e,this.localSettings(...e))}};function xS(n){let e=n?.spanContext();return!e||!H.isSpanContextValid(e)?Nr.ROOT:e.isRemote?Nr.ENTRY:Nr.LOCAL}c(xS,"spanType");var ke=class{static{c(this,"OTLPExporterBase")}_delegate;constructor(e){this._delegate=e}export(e,o){this._delegate.export(e,o)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}};var xo=class extends Error{static{c(this,"OTLPExporterError")}code;name="OTLPExporterError";data;constructor(e,o,a){super(e),this.data=a,this.code=o}};function gS(n){if(Number.isFinite(n)&&n>0)return n;throw new Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${n}')`)}c(gS,"validateTimeoutMillis");function f_(n){if(n!=null)return()=>n}c(f_,"wrapStaticHeadersInFunction");function E_(n,e,o){return{timeoutMillis:gS(n.timeoutMillis??e.timeoutMillis??o.timeoutMillis),concurrencyLimit:n.concurrencyLimit??e.concurrencyLimit??o.concurrencyLimit,compression:n.compression??e.compression??o.compression}}c(E_,"mergeOtlpSharedConfigurationWithDefaults");function T_(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}c(T_,"getSharedConfigurationDefaults");var go;(function(n){n.NONE="none",n.GZIP="gzip"})(go||(go={}));var xc=class{static{c(this,"BoundedQueueExportPromiseHandler")}_concurrencyLimit;_sendingPromises=[];constructor(e){this._concurrencyLimit=e}pushPromise(e){if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(e);let o=c(()=>{let a=this._sendingPromises.indexOf(e);this._sendingPromises.splice(a,1)},"popPromise");e.then(o,o)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}};function d_(n){return new xc(n.concurrencyLimit)}c(d_,"createBoundedQueueExportPromiseHandler");function vS(n){return Object.prototype.hasOwnProperty.call(n,"partialSuccess")}c(vS,"isPartialSuccessResponse");function S_(){return{handleResponse(n){n==null||!vS(n)||n.partialSuccess==null||Object.keys(n.partialSuccess).length===0||m.warn("Received Partial Success response:",JSON.stringify(n.partialSuccess))}}}c(S_,"createLoggingPartialSuccessResponseHandler");var gc=class{static{c(this,"OTLPExportDelegate")}_transport;_serializer;_responseHandler;_promiseQueue;_timeout;_diagLogger;constructor(e,o,a,s,u){this._transport=e,this._serializer=o,this._responseHandler=a,this._promiseQueue=s,this._timeout=u,this._diagLogger=m.createComponentLogger({namespace:"OTLPExportDelegate"})}export(e,o){if(this._diagLogger.debug("items to be sent",e),this._promiseQueue.hasReachedLimit()){o({code:Lt.FAILED,error:new Error("Concurrent export limit reached")});return}let a=this._serializer.serializeRequest(e);if(a==null){o({code:Lt.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(a,this._timeout).then(s=>{if(s.status==="success"){if(s.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(s.data))}catch(u){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",u,s.data)}o({code:Lt.SUCCESS});return}else if(s.status==="failure"&&s.error){o({code:Lt.FAILED,error:s.error});return}else s.status==="retryable"?o({code:Lt.FAILED,error:new xo("Export failed with retryable status")}):o({code:Lt.FAILED,error:new xo("Export failed with unknown error")})},s=>o({code:Lt.FAILED,error:s})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}};function h_(n,e){return new gc(n.transport,n.serializer,S_(),n.promiseHandler,e.timeout)}c(h_,"createOtlpExportDelegate");function vc(n,e,o){return h_({transport:o,serializer:e,promiseHandler:d_(n)},{timeout:n.timeoutMillis})}c(vc,"createOtlpNetworkExportDelegate");var Yc=sr(Hc());function hf(n){return n>=48&&n<=57?n-48:n>=97&&n<=102?n-87:n-55}c(hf,"intValue");function xs(n){let e=new Uint8Array(n.length/2),o=0;for(let a=0;a<n.length;a+=2){let s=hf(n.charCodeAt(a)),u=hf(n.charCodeAt(a+1));e[o++]=s<<4|u}return e}c(xs,"hexToBinary");function mf(n){let e=BigInt(1e9);return BigInt(n[0])*e+BigInt(n[1])}c(mf,"hrTimeToNanos");function VS(n){let e=Number(BigInt.asUintN(32,n)),o=Number(BigInt.asUintN(32,n>>BigInt(32)));return{low:e,high:o}}c(VS,"toLongBits");function yf(n){let e=mf(n);return VS(e)}c(yf,"encodeAsLongBits");function kS(n){return mf(n).toString()}c(kS,"encodeAsString");var BS=typeof BigInt<"u"?kS:Zt;function Af(n){return n}c(Af,"identity");function Of(n){if(n!==void 0)return xs(n)}c(Of,"optionalHexToBinary");var GS={encodeHrTime:yf,encodeSpanContext:xs,encodeOptionalSpanContext:Of};function dn(n){if(n===void 0)return GS;let e=n.useLongBits??!0,o=n.useHex??!1;return{encodeHrTime:e?yf:BS,encodeSpanContext:o?Af:xs,encodeOptionalSpanContext:o?Af:Of}}c(dn,"getOtlpEncoder");function Sn(n){return{attributes:Be(n.attributes),droppedAttributesCount:0}}c(Sn,"createResource");function hn(n){return{name:n.name,version:n.version}}c(hn,"createInstrumentationScope");function Be(n){return Object.keys(n).map(e=>gs(e,n[e]))}c(Be,"toAttributes");function gs(n,e){return{key:n,value:vs(e)}}c(gs,"toKeyValue");function vs(n){let e=typeof n;return e==="string"?{stringValue:n}:e==="number"?Number.isInteger(n)?{intValue:n}:{doubleValue:n}:e==="boolean"?{boolValue:n}:n instanceof Uint8Array?{bytesValue:n}:Array.isArray(n)?{arrayValue:{values:n.map(vs)}}:e==="object"&&n!=null?{kvlistValue:{values:Object.entries(n).map(([o,a])=>gs(o,a))}}:{}}c(vs,"toAnyValue");function Rf(n,e){let o=dn(e);return{resourceLogs:YS(n,o)}}c(Rf,"createExportLogsServiceRequest");function HS(n){let e=new Map;for(let o of n){let{resource:a,instrumentationScope:{name:s,version:u="",schemaUrl:r=""}}=o,t=e.get(a);t||(t=new Map,e.set(a,t));let i=`${s}@${u}:${r}`,l=t.get(i);l||(l=[],t.set(i,l)),l.push(o)}return e}c(HS,"createResourceMap");function YS(n,e){let o=HS(n);return Array.from(o,([a,s])=>({resource:Sn(a),scopeLogs:Array.from(s,([,u])=>({scope:hn(u[0].instrumentationScope),logRecords:u.map(r=>FS(r,e)),schemaUrl:u[0].instrumentationScope.schemaUrl})),schemaUrl:void 0}))}c(YS,"logRecordsToResourceLogs");function FS(n,e){return{timeUnixNano:e.encodeHrTime(n.hrTime),observedTimeUnixNano:e.encodeHrTime(n.hrTimeObserved),severityNumber:n.severityNumber,severityText:n.severityText,body:vs(n.body),attributes:KS(n.attributes),droppedAttributesCount:n.droppedAttributesCount,flags:n.spanContext?.traceFlags,traceId:e.encodeOptionalSpanContext(n.spanContext?.traceId),spanId:e.encodeOptionalSpanContext(n.spanContext?.spanId)}}c(FS,"toLogRecord");function KS(n){return Object.keys(n).map(e=>gs(e,n[e]))}c(KS,"toLogAttributes");var jS=Yc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,WS=Yc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,Ls={serializeRequest:c(n=>{let e=Rf(n);return WS.encode(e).finish()},"serializeRequest"),deserializeResponse:c(n=>jS.decode(n),"deserializeResponse")};function qS(n,e){let o=dn(e);return{resource:Sn(n.resource),schemaUrl:void 0,scopeMetrics:zS(n.scopeMetrics,o)}}c(qS,"toResourceMetrics");function zS(n,e){return Array.from(n.map(o=>({scope:hn(o.scope),metrics:o.metrics.map(a=>$S(a,e)),schemaUrl:o.scope.schemaUrl})))}c(zS,"toScopeMetrics");function $S(n,e){let o={name:n.descriptor.name,description:n.descriptor.description,unit:n.descriptor.unit},a=QS(n.aggregationTemporality);switch(n.dataPointType){case Ct.SUM:o.sum={aggregationTemporality:a,isMonotonic:n.isMonotonic,dataPoints:Nf(n,e)};break;case Ct.GAUGE:o.gauge={dataPoints:Nf(n,e)};break;case Ct.HISTOGRAM:o.histogram={aggregationTemporality:a,dataPoints:JS(n,e)};break;case Ct.EXPONENTIAL_HISTOGRAM:o.exponentialHistogram={aggregationTemporality:a,dataPoints:ZS(n,e)};break}return o}c($S,"toMetric");function XS(n,e,o){let a={attributes:Be(n.attributes),startTimeUnixNano:o.encodeHrTime(n.startTime),timeUnixNano:o.encodeHrTime(n.endTime)};switch(e){case ft.INT:a.asInt=n.value;break;case ft.DOUBLE:a.asDouble=n.value;break}return a}c(XS,"toSingularDataPoint");function Nf(n,e){return n.dataPoints.map(o=>XS(o,n.descriptor.valueType,e))}c(Nf,"toSingularDataPoints");function JS(n,e){return n.dataPoints.map(o=>{let a=o.value;return{attributes:Be(o.attributes),bucketCounts:a.buckets.counts,explicitBounds:a.buckets.boundaries,count:a.count,sum:a.sum,min:a.min,max:a.max,startTimeUnixNano:e.encodeHrTime(o.startTime),timeUnixNano:e.encodeHrTime(o.endTime)}})}c(JS,"toHistogramDataPoints");function ZS(n,e){return n.dataPoints.map(o=>{let a=o.value;return{attributes:Be(o.attributes),count:a.count,min:a.min,max:a.max,sum:a.sum,positive:{offset:a.positive.offset,bucketCounts:a.positive.bucketCounts},negative:{offset:a.negative.offset,bucketCounts:a.negative.bucketCounts},scale:a.scale,zeroCount:a.zeroCount,startTimeUnixNano:e.encodeHrTime(o.startTime),timeUnixNano:e.encodeHrTime(o.endTime)}})}c(ZS,"toExponentialHistogramDataPoints");function QS(n){switch(n){case gt.DELTA:return 1;case gt.CUMULATIVE:return 2}}c(QS,"toAggregationTemporality");function xf(n,e){return{resourceMetrics:n.map(o=>qS(o,e))}}c(xf,"createExportMetricsServiceRequest");var Fc=sr(Hc());function th(n,e){let o=n.spanContext(),a=n.status,s=n.parentSpanContext?.spanId?e.encodeSpanContext(n.parentSpanContext?.spanId):void 0;return{traceId:e.encodeSpanContext(o.traceId),spanId:e.encodeSpanContext(o.spanId),parentSpanId:s,traceState:o.traceState?.serialize(),name:n.name,kind:n.kind==null?0:n.kind+1,startTimeUnixNano:e.encodeHrTime(n.startTime),endTimeUnixNano:e.encodeHrTime(n.endTime),attributes:Be(n.attributes),droppedAttributesCount:n.droppedAttributesCount,events:n.events.map(u=>rh(u,e)),droppedEventsCount:n.droppedEventsCount,status:{code:a.code,message:a.message},links:n.links.map(u=>eh(u,e)),droppedLinksCount:n.droppedLinksCount}}c(th,"sdkSpanToOtlpSpan");function eh(n,e){return{attributes:n.attributes?Be(n.attributes):[],spanId:e.encodeSpanContext(n.context.spanId),traceId:e.encodeSpanContext(n.context.traceId),traceState:n.context.traceState?.serialize(),droppedAttributesCount:n.droppedAttributesCount||0}}c(eh,"toOtlpLink");function rh(n,e){return{attributes:n.attributes?Be(n.attributes):[],name:n.name,timeUnixNano:e.encodeHrTime(n.time),droppedAttributesCount:n.droppedAttributesCount||0}}c(rh,"toOtlpSpanEvent");function gf(n,e){let o=dn(e);return{resourceSpans:oh(n,o)}}c(gf,"createExportTraceServiceRequest");function nh(n){let e=new Map;for(let o of n){let a=e.get(o.resource);a||(a=new Map,e.set(o.resource,a));let s=`${o.instrumentationScope.name}@${o.instrumentationScope.version||""}:${o.instrumentationScope.schemaUrl||""}`,u=a.get(s);u||(u=[],a.set(s,u)),u.push(o)}return e}c(nh,"createResourceMap");function oh(n,e){let o=nh(n),a=[],s=o.entries(),u=s.next();for(;!u.done;){let[r,t]=u.value,i=[],l=t.values(),p=l.next();for(;!p.done;){let y=p.value;if(y.length>0){let g=y.map(v=>th(v,e));i.push({scope:hn(y[0].instrumentationScope),spans:g,schemaUrl:y[0].instrumentationScope.schemaUrl})}p=l.next()}let E={resource:Sn(r),scopeSpans:i,schemaUrl:void 0};a.push(E),u=s.next()}return a}c(oh,"spanRecordsToResourceSpans");var ih=Fc.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,sh=Fc.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,Is={serializeRequest:c(n=>{let e=gf(n);return sh.encode(e).finish()},"serializeRequest"),deserializeResponse:c(n=>ih.decode(n),"deserializeResponse")};var bs={serializeRequest:c(n=>{let e=xf([n],{useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},"serializeRequest"),deserializeResponse:c(n=>{if(n.length===0)return{};let e=new TextDecoder;return JSON.parse(e.decode(n))},"deserializeResponse")};function ah(){return Math.random()*(2*.2)-.2}c(ah,"getJitter");var Kc=class{static{c(this,"RetryingTransport")}_transport;constructor(e){this._transport=e}retry(e,o,a){return new Promise((s,u)=>{setTimeout(()=>{this._transport.send(e,o).then(s,u)},a)})}async send(e,o){let a=Date.now()+o,s=await this._transport.send(e,o),u=5,r=1e3;for(;s.status==="retryable"&&u>0;){u--;let t=Math.max(Math.min(r,5e3)+ah(),0);r=r*1.5;let i=s.retryInMillis??t,l=a-Date.now();if(i>l)return s;s=await this.retry(e,l,i)}return s}shutdown(){return this._transport.shutdown()}};function jc(n){return new Kc(n.transport)}c(jc,"createRetryingTransport");function vf(n){return[429,502,503,504].includes(n)}c(vf,"isExportRetryable");function Lf(n){if(n==null)return;let e=Number.parseInt(n,10);if(Number.isInteger(e))return e>0?e*1e3:-1;let o=new Date(n).getTime()-Date.now();return o>=0?o:0}c(Lf,"parseRetryAfterToMills");var Wc=class{static{c(this,"XhrTransport")}_parameters;constructor(e){this._parameters=e}send(e,o){return new Promise(a=>{let s=new XMLHttpRequest;s.timeout=o,s.open("POST",this._parameters.url);let u=this._parameters.headers();Object.entries(u).forEach(([r,t])=>{s.setRequestHeader(r,t)}),s.ontimeout=r=>{a({status:"failure",error:new Error("XHR request timed out")})},s.onreadystatechange=()=>{s.status>=200&&s.status<=299?(m.debug("XHR success"),a({status:"success"})):s.status&&vf(s.status)?a({status:"retryable",retryInMillis:Lf(s.getResponseHeader("Retry-After"))}):s.status!==0&&a({status:"failure",error:new Error("XHR request failed with non-retryable status")})},s.onabort=()=>{a({status:"failure",error:new Error("XHR request aborted")})},s.onerror=()=>{a({status:"failure",error:new Error("XHR request errored")})},s.send(e)})}shutdown(){}};function If(n){return new Wc(n)}c(If,"createXhrTransport");var qc=class{static{c(this,"SendBeaconTransport")}_params;constructor(e){this._params=e}send(e){return new Promise(o=>{navigator.sendBeacon(this._params.url,new Blob([e],{type:this._params.blobType}))?(m.debug("SendBeacon success"),o({status:"success"})):o({status:"failure",error:new Error("SendBeacon failed")})})}shutdown(){}};function bf(n){return new qc(n)}c(bf,"createSendBeaconTransport");function Pf(n,e){return vc(n,e,jc({transport:If(n)}))}c(Pf,"createOtlpXhrExportDelegate");function Cf(n,e){return vc(n,e,jc({transport:bf({url:n.url,blobType:n.headers()["Content-Type"]})}))}c(Cf,"createOtlpSendBeaconExportDelegate");function Uf(n){return()=>{let e={};return Object.entries(n?.()??{}).forEach(([o,a])=>{typeof a<"u"?e[o]=String(a):m.warn(`Header "${o}" has invalid value (${a}) and will be ignored`)}),e}}c(Uf,"validateAndNormalizeHeaders");function ch(n,e,o){let a={...o()},s={};return()=>(e!=null&&Object.assign(s,e()),n!=null&&Object.assign(s,n()),Object.assign(s,a))}c(ch,"mergeHeaders");function uh(n){if(n!=null)try{return new URL(n),n}catch{throw new Error(`Configuration: Could not parse user-provided export URL: '${n}'`)}}c(uh,"validateUserProvidedUrl");function Mf(n,e,o){return{...E_(n,e,o),headers:ch(Uf(n.headers),e.headers,o.headers),url:uh(n.url)??e.url??o.url,agentOptions:n.agentOptions??e.agentOptions??o.agentOptions}}c(Mf,"mergeOtlpHttpConfigurationWithDefaults");function Df(n,e){return{...T_(),headers:c(()=>n,"headers"),url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}}}c(Df,"getHttpConfigurationDefaults");function wf(n,e,o){return Mf({url:n.url,timeoutMillis:n.timeoutMillis,headers:f_(n.headers),concurrencyLimit:n.concurrencyLimit},{},Df(o,e))}c(wf,"convertLegacyBrowserHttpOptions");function vr(n,e,o,a){let s=!!n.headers||typeof navigator.sendBeacon!="function",u=wf(n,o,a);return s?Pf(u,e):Cf(u,e)}c(vr,"createLegacyOtlpBrowserExportDelegate");var An=class extends ke{static{c(this,"OTLPLogExporter")}constructor(e={}){super(vr(e,Ls,"v1/logs",{"Content-Type":"application/x-protobuf"}))}};function mn(n,e){let o=n.otlp[e],a={...n.headers};try{n.token&&new URL(o).hostname.endsWith(".solarwinds.com")&&(a.authorization=`Bearer ${n.token}`)}catch{}return{url:o,headers:a,compression:go.GZIP,httpAgentOptions:{ca:n.trustedpath}}}c(mn,"exporterConfig");var Ps=class extends An{static{c(this,"LogExporter")}constructor(e){super(mn(e,"logs"))}};var bo;(function(n){n[n.DELTA=0]="DELTA",n[n.CUMULATIVE=1]="CUMULATIVE",n[n.LOWMEMORY=2]="LOWMEMORY"})(bo||(bo={}));var zc=c(()=>gt.CUMULATIVE,"CumulativeTemporalitySelector"),Vf=c(n=>{switch(n){case k.COUNTER:case k.OBSERVABLE_COUNTER:case k.GAUGE:case k.HISTOGRAM:case k.OBSERVABLE_GAUGE:return gt.DELTA;case k.UP_DOWN_COUNTER:case k.OBSERVABLE_UP_DOWN_COUNTER:return gt.CUMULATIVE}},"DeltaTemporalitySelector"),kf=c(n=>{switch(n){case k.COUNTER:case k.HISTOGRAM:return gt.DELTA;case k.GAUGE:case k.UP_DOWN_COUNTER:case k.OBSERVABLE_UP_DOWN_COUNTER:case k.OBSERVABLE_COUNTER:case k.OBSERVABLE_GAUGE:return gt.CUMULATIVE}},"LowMemoryTemporalitySelector");function lh(){let n=(void 0??"cumulative").toLowerCase();return n==="cumulative"?zc:n==="delta"?Vf:n==="lowmemory"?kf:(m.warn(`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${n}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`),zc)}c(lh,"chooseTemporalitySelectorFromEnvironment");function ph(n){return n!=null?n===bo.DELTA?Vf:n===bo.LOWMEMORY?kf:zc:lh()}c(ph,"chooseTemporalitySelector");var _h=Object.freeze({type:It.DEFAULT});function fh(n){return n?.aggregationPreference??(()=>_h)}c(fh,"chooseAggregationSelector");var Cs=class extends ke{static{c(this,"OTLPMetricExporterBase")}_aggregationTemporalitySelector;_aggregationSelector;constructor(e,o){super(e),this._aggregationSelector=fh(o),this._aggregationTemporalitySelector=ph(o?.temporalityPreference)}selectAggregation(e){return this._aggregationSelector(e)}selectAggregationTemporality(e){return this._aggregationTemporalitySelector(e)}};var yn=class extends Cs{static{c(this,"OTLPMetricExporter")}constructor(e){super(vr(e??{},bs,"v1/metrics",{"Content-Type":"application/json"}),e)}};var Us=class extends yn{static{c(this,"MetricExporter")}constructor(e){super(mn(e,"metrics"))}selectAggregationTemporality(){return gt.DELTA}},Eh=200,Ms=class extends lo{static{c(this,"MetricReader")}#t;constructor(e){super(e),this.#t=e.cardinalityLimit??Eh}selectAggregation(e){switch(e){case k.HISTOGRAM:return{type:It.EXPONENTIAL_HISTOGRAM,options:{recordMinMax:!0}};default:return super.selectAggregation(e)}}selectCardinalityLimit(e){return Math.min(super.selectCardinalityLimit(e),this.#t)}};var Th="v1/traces",On=class extends ke{static{c(this,"OTLPTraceExporter")}constructor(e={}){super(vr(e,Is,Th,{"Content-Type":"application/x-protobuf"}))}};var Ds=class extends On{static{c(this,"TraceExporter")}constructor(e){super(mn(e,"traces"))}};var ws=class extends ee{static{c(this,"LocationProcessor")}onStart(e){e.kind===Pt.INTERNAL&&(e.setAttribute(Yr,window.location.href),e.setAttribute(fr,window.location.pathname))}};function Bf(n,e){let o=Symbol.for(`solarwinds-apm / ${n}`),a=Reflect.get(globalThis,o);return a||(a=e(),Reflect.defineProperty(globalThis,o,{value:a,configurable:!1,enumerable:!1,writable:!1})),a}c(Bf,"global");var Po=Bf("span storage",()=>new WeakMap);function $c(n,e,o){return"setAttribute"in n&&"attributes"in n?o(n):(m.debug("span storage passed an invalid key",n),e)}c($c,"withSdkSpan");function Gf(n){let e=ve(n);return{get:c(o=>o.getValue(e),"get"),set:c((o,a)=>o.setValue(e,a),"set"),delete:c(o=>o.deleteValue(e),"delete")}}c(Gf,"contextStorage");function Hf(n){let e=Symbol.for(n);return{get:c(o=>$c(o,void 0,a=>Po.get(a)?.get(e)),"get"),set:c((o,a)=>$c(o,!1,s=>{let u=Po.get(s)??new Map;return u.set(e,a),Po.set(s,u),!0}),"set"),delete:c(o=>$c(o,!1,a=>{let s=Po.get(a);if(!s)return!1;let u=s.delete(e);return s.size===0&&Po.delete(a),u}),"delete")}}c(Hf,"spanStorage");function Co(n){return Bf(n,()=>{let e,o=new Promise(a=>e=a);return Object.assign(o,{resolve:e})})}c(Co,"cellStorage");var Xc=Hf("parent");function ks(n){let e=Xc.get(n);return e===!1||e?.spanContext().isRemote===!0}c(ks,"isRootOrEntry");var Vs=class extends ee{static{c(this,"ParentSpanProcessor")}onStart(e,o){let a=H.getSpan(o);Xc.set(e,a??!1)}onEnd(e){Xc.delete(e)}};function rr(n){return m.createComponentLogger({namespace:`solarwinds-apm/${n.name}`})}c(rr,"componentLogger");var Yf=sr(Ts(),1);var Uo={IS_NODE:typeof globalThis.process=="object"&&typeof globalThis.process?.versions?.node=="string",get AWS_LAMBDA_NAME(){return this.IS_NODE?process.env.AWS_LAMBDA_FUNCTION_NAME:void 0},get IS_AWS_LAMBDA(){return this.AWS_LAMBDA_NAME!==void 0},get SERVERLESS_NAME(){return this.AWS_LAMBDA_NAME},get IS_SERVERLESS(){return this.IS_AWS_LAMBDA}};var Bs="sw.transaction",dh=60*1e3,Sh=200,hh=256,Ah="other";var Gs=class n extends ee{static{c(this,"TransactionNameProcessor")}#t=rr(n);#r=new Jc({max:Sh,ttl:dh,maxLength:hh,default:Ah});#e;constructor(e){super(),this.#e=e.transactionName}onEnd(e){if(!ks(e))return;let o=e.attributes[Bs];this.#t.debug("initial transaction name",o,e.attributes),typeof o!="string"&&(o=this.#e?.()??mh(e)),o=this.#r.registered(o),this.#t.debug("final transaction name",o),e.attributes[Bs]=o}};function mh(n){let e=c(o=>o.split("/",3).join("/"),"trim");return Uo.SERVERLESS_NAME?Uo.SERVERLESS_NAME:typeof n.attributes[Da]=="string"?n.attributes[Da]:typeof n.attributes[fr]=="string"?e(n.attributes[fr]):typeof n.attributes[Gr]=="string"?e(n.attributes[Gr]):n.name}c(mh,"computedTransactionName");var Jc=class{static{c(this,"TransactionNamePool")}#t=new Map;#r;#e;#o;#n;constructor(e){this.#r=e.max,this.#e=e.ttl,this.#o=e.maxLength,this.#n=e.default}registered(e){e=e.slice(0,this.#o);let o=this.#t.get(e);if(o!==void 0&&clearTimeout(o),o!==void 0||this.#t.size<this.#r){let a=(0,Yf.unref)(setTimeout(()=>this.#t.delete(e),this.#e));return this.#t.set(e,a),e}else return this.#n}};var Hs=class n extends ee{static{c(this,"ResponseTimeProcessor")}#t=rr(n);#r=ae.getMeter("sw.apm.request.metrics").createHistogram("trace.service.response_time",{valueType:ft.DOUBLE,unit:"ms"});onEnd(e){if(!ks(e))return;let o=Va(e.duration),a={"sw.is_error":e.status.code===zt.ERROR},s=[Bs];e.kind===Pt.SERVER&&s.push(Ce,Ke,Br,Bn);for(let u of s)u in e.attributes&&(a[u]=e.attributes[u]);this.#t.debug("recording response time",o,a),this.#r.record(o,a)}};var Ff="tracestate";function Kf(n){return`${n.spanId}-${n.traceFlags.toString(16).padStart(2,"0")}`}c(Kf,"swValue");var Ys=class extends Tr{static{c(this,"TraceContextPropagator")}inject(e,o,a){super.inject(e,o,{set:c((u,r,t)=>{r!==Ff&&a.set(u,r,t)},"set")});let s=H.getSpanContext(e);if(s){let u=(s.traceState??_a()).set("sw",Kf(s)).serialize();a.set(o,Ff,u)}}};var Ks=Gf("solarwinds-apm headers");var Zc="X-Trace-Options";var Qc="X-Trace-Options-Signature";var Fs=class{static{c(this,"RequestHeadersPropagator")}extract(e,o,a){return Ks.set(e,{request:{[Zc]:Oh(a.get(o,Zc.toLowerCase()),";"),[Qc]:yh(a.get(o,Qc.toLowerCase()))},response:{}})}inject(){}fields(){return[Zc,Qc]}};function yh(n){return Array.isArray(n)?n[0]:n}c(yh,"firstIfArray");function Oh(n,e){return Array.isArray(n)?n.length>0?n.join(e):void 0:n}c(Oh,"joinIfArray");var tu=sr(Ts(),1);var js=class{static{c(this,"Backoff")}#t;#r;#e;constructor(e){if(e.initial<=0)throw new TypeError("initial backup value should be positive");if(e.max!==void 0&&e.max<e.initial)throw new TypeError("max backoff should be greater than initial");if(e.retries!==void 0&&e.retries<=0)throw new Error("max retries should be positive");this.#t={initial:e.initial,current:e.initial,max:e.max??Number.POSITIVE_INFINITY},this.#r=e.multiplier,e.retries&&(this.#e={initial:e.retries,current:e.retries})}reset(){this.#t.current=this.#t.initial,this.#e&&(this.#e.current=this.#e.initial)}backoff(){let e=this.#t.current;return this.#t.current=Math.min(e*this.#r,this.#t.max),this.#e&&(this.#e.current===0?e=!1:this.#e.current-=1),e}};function Rh(n,e){if(n!==Pt.SERVER||!(Ce in e||Br in e))return{http:!1};let o=String(e[Ce]??e[Br]),a=Number(e[Ke]??e[Bn]??0),s=String(e[gl]??e[Ma]??"http"),u=String(e[Hr]??e[Ua]??"localhost"),r=String(e[fr]??e[Gr]),t=`${s}://${u}${r}`;return{http:!0,method:o,status:a,scheme:s,hostname:u,path:r,url:t}}c(Rh,"httpSpanMetadata");function Nh(n){if(typeof n!="object"||n===null)return;let e,o,a;if("value"in n&&typeof n.value=="number"&&"timestamp"in n&&typeof n.timestamp=="number"&&"ttl"in n&&typeof n.ttl=="number")e=n.value,o=n.timestamp,a=n.ttl;else return;let s;if("flags"in n&&typeof n.flags=="string")s=n.flags.split(",").reduce((i,l)=>{let p={OVERRIDE:dt.OVERRIDE,SAMPLE_START:dt.SAMPLE_START,SAMPLE_THROUGH_ALWAYS:dt.SAMPLE_THROUGH_ALWAYS,TRIGGER_TRACE:dt.TRIGGERED_TRACE}[l];return p&&(i|=p),i},dt.OK);else return;let u={},r;"arguments"in n&&typeof n.arguments=="object"&&n.arguments!==null&&("BucketCapacity"in n.arguments&&typeof n.arguments.BucketCapacity=="number"&&"BucketRate"in n.arguments&&typeof n.arguments.BucketRate=="number"&&(u[Vt.DEFAULT]={capacity:n.arguments.BucketCapacity,rate:n.arguments.BucketRate}),"TriggerRelaxedBucketCapacity"in n.arguments&&typeof n.arguments.TriggerRelaxedBucketCapacity=="number"&&"TriggerRelaxedBucketRate"in n.arguments&&typeof n.arguments.TriggerRelaxedBucketRate=="number"&&(u[Vt.TRIGGER_RELAXED]={capacity:n.arguments.TriggerRelaxedBucketCapacity,rate:n.arguments.TriggerRelaxedBucketRate}),"TriggerStrictBucketCapacity"in n.arguments&&typeof n.arguments.TriggerStrictBucketCapacity=="number"&&"TriggerStrictBucketRate"in n.arguments&&typeof n.arguments.TriggerStrictBucketRate=="number"&&(u[Vt.TRIGGER_STRICT]={capacity:n.arguments.TriggerStrictBucketCapacity,rate:n.arguments.TriggerStrictBucketRate}),"SignatureKey"in n.arguments&&typeof n.arguments.SignatureKey=="string"&&(r=new TextEncoder().encode(n.arguments.SignatureKey)));let t;return"warning"in n&&typeof n.warning=="string"&&(t=n.warning),{sampleSource:ln.Remote,sampleRate:e,flags:s,timestamp:o,ttl:a,buckets:u,signatureKey:r,warning:t}}c(Nh,"parseSettings");var Ws=class extends ms{static{c(this,"Sampler")}#t;#r;#e;#o;#n;constructor(e,o,a){super(o),e.tracingMode!==void 0&&(this.#t=e.tracingMode?Or.ALWAYS:Or.NEVER),this.#r=e.triggerTraceEnabled,this.#e=e.transactionSettings,this.#o=new Promise(s=>this.#n=s),a&&super.updateSettings(a)}waitUntilReady(e){return new Promise(o=>{this.#o.then(()=>{o(!0)}).catch(()=>{o(!1)}),setTimeout(()=>{o(!1)},e)})}localSettings(e,o,a,s,u,r){let t={tracingMode:this.#t,triggerMode:this.#r};if(!this.#e?.length)return t;let i=Rh(s,u),l=i.http?i.url:`${Pt[s]}:${a}`;for(let{tracing:p,matcher:E}of this.#e)if(E(l)){t.tracingMode=p?Or.ALWAYS:Or.NEVER;break}return t}requestHeaders(e){return Ks.get(e)?.request??{}}setResponseHeaders(e,o){let a=Ks.get(o);a&&Object.assign(a.response,e)}updateSettings(e){let o=Nh(e);if(o)return this.logger.debug("valid settings",o,e),super.updateSettings(o),this.#n(),o.warning&&this.logger.warn(o.warning),o;this.logger.debug("invalid settings",e)}};var jf=10*1e3,xh=500,gh=60*1e3,vh=20,Wf=1.5;async function Lh(){if(Uo.IS_NODE){let{hostname:n}=await import("node:os");return encodeURIComponent(n())}else return encodeURIComponent(navigator.userAgent)}c(Lh,"hostname");var qs=class n extends Ws{static{c(this,"HttpSampler")}#t;#r;#e;#o=Lh();#n=new js({initial:xh,max:gh,retries:vh,multiplier:Wf});#a=void 0;constructor(e,o){super(e,rr(n),o),this.#t=e.collector,this.#e=encodeURIComponent(e.service),this.#r={...e.headers},this.#t.hostname.endsWith(".solarwinds.com")&&(this.#r.authorization=`Bearer ${e.token}`),setTimeout(()=>{this.#u()},0)}toString(){return`HTTP Sampler (${this.#t.host})`}#c(e,...o){e!==this.#a?(this.logger.warn(e,...o),this.#a=e):this.logger.debug(e,...o)}#i(){this.#a=void 0,this.#n.reset()}#s(){let e=this.#n.backoff();e?(this.logger.debug(`retrying in ${(e/1e3).toFixed(1)}s`),(0,tu.unref)(setTimeout(()=>{this.#u()},e))):this.logger.warn("Reached max retry attempts for sampling settings retrieval.","Tracing will remain disabled.")}#u(){(async()=>{let e=new URL(`./v1/settings/${this.#e}/${await this.#o}`,this.#t);this.logger.debug(`retrieving sampling settings from ${e.href}`);let o=new AbortController,a=setTimeout(()=>{o.abort("HTTP request timeout")},jf),s=await D.bind(cr(D.active()),fetch)(e,{method:"GET",headers:this.#r,signal:o.signal});this.logger.debug("received sampling settings response",s),clearTimeout(a);let u=await s.json(),r=this.updateSettings(u);if(!r){this.#c("Retrieved sampling settings are invalid.","If you are connecting to an AppOptics collector please set the 'SW_APM_LEGACY' environment variable."),this.#s();return}this.#i();let i=(r.timestamp+r.ttl)*1e3-jf*Wf-Date.now();(0,tu.unref)(setTimeout(()=>{this.#u()},Math.max(0,i)))})().catch(e=>{let o="Failed to retrieve sampling settings";e instanceof Error&&(o+=` (${e.message})`),o+=", tracing will be disabled until valid ones are available.",this.#c(o,e),this.#s()})}};var eu=Co("sampler"),ru=Co("tracer provider"),nu=Co("meter provider"),zs=Co("logger provider");var qf="15.5.1";var ou;function $f(n){return{lang:n?.lang??ou?.lang,message:n?.message,abortEarly:n?.abortEarly??ou?.abortEarly,abortPipeEarly:n?.abortPipeEarly??ou?.abortPipeEarly}}c($f,"getGlobalConfig");var Ih;function bh(n){return Ih?.get(n)}c(bh,"getGlobalMessage");var Ph;function Ch(n){return Ph?.get(n)}c(Ch,"getSchemaMessage");var Uh;function Mh(n,e){return Uh?.get(n)?.get(e)}c(Mh,"getSpecificMessage");function Xf(n){let e=typeof n;return e==="string"?`"${n}"`:e==="number"||e==="bigint"||e==="boolean"?`${n}`:e==="object"||e==="function"?(n&&Object.getPrototypeOf(n)?.constructor?.name)??"null":e}c(Xf,"_stringify");function kt(n,e,o,a,s){let u=s&&"input"in s?s.input:o.value,r=s?.expected??n.expects??null,t=s?.received??Xf(u),i={kind:n.kind,type:n.type,input:u,expected:r,received:t,message:`Invalid ${e}: ${r?`Expected ${r} but r`:"R"}eceived ${t}`,requirement:n.requirement,path:s?.path,issues:s?.issues,lang:a.lang,abortEarly:a.abortEarly,abortPipeEarly:a.abortPipeEarly},l=n.kind==="schema",p=s?.message??n.message??Mh(n.reference,i.lang)??(l?Ch(i.lang):null)??a.message??bh(i.lang);p!==void 0&&(i.message=typeof p=="function"?p(i):p),l&&(o.typed=!1),o.issues?o.issues.push(i):o.issues=[i]}c(kt,"_addIssue");function Wt(n){return{version:1,vendor:"valibot",validate(e){return n["~run"]({value:e},$f())}}}c(Wt,"_getStandardProps");function Dh(n,e){return Object.hasOwn(n,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}c(Dh,"_isValidObjectKey");function su(n,e){let o=[...new Set(n)];return o.length>1?`(${o.join(` ${e} `)})`:o[0]??"never"}c(su,"_joinExpects");var wh=class extends Error{static{c(this,"ValiError")}constructor(n){super(n[0].message),this.name="ValiError",this.issues=n}};var FV=new RegExp("^(?:[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}))*)+$","u");function $s(n){return{kind:"transformation",type:"raw_transform",reference:$s,async:!1,"~run"(e,o){let a=n({dataset:e,config:o,addIssue:c(s=>kt(this,s?.label??"input",e,o,s),"addIssue"),NEVER:null});return e.issues?e.typed=!1:e.value=a,e}}}c($s,"rawTransform");function au(n,e){return{kind:"validation",type:"regex",reference:au,async:!1,expects:`${n}`,requirement:n,message:e,"~run"(o,a){return o.typed&&!this.requirement.test(o.value)&&kt(this,"format",o,a),o}}}c(au,"regex");function qt(n){return{kind:"transformation",type:"transform",reference:qt,async:!1,operation:n,"~run"(e){return e.value=this.operation(e.value),e}}}c(qt,"transform");function Vh(n,e,o){return typeof n.fallback=="function"?n.fallback(e,o):n.fallback}c(Vh,"getFallback");function Jf(n,e,o){return typeof n.default=="function"?n.default(e,o):n.default}c(Jf,"getDefault");function Mo(n,e){return{kind:"schema",type:"array",reference:Mo,expects:"Array",async:!1,item:n,message:e,get"~standard"(){return Wt(this)},"~run"(o,a){let s=o.value;if(Array.isArray(s)){o.typed=!0,o.value=[];for(let u=0;u<s.length;u++){let r=s[u],t=this.item["~run"]({value:r},a);if(t.issues){let i={type:"array",origin:"value",input:s,key:u,value:r};for(let l of t.issues)l.path?l.path.unshift(i):l.path=[i],o.issues?.push(l);if(o.issues||(o.issues=t.issues),a.abortEarly){o.typed=!1;break}}t.typed||(o.typed=!1),o.value.push(t.value)}}else kt(this,"type",o,a);return o}}}c(Mo,"array");function cu(n){return{kind:"schema",type:"boolean",reference:cu,expects:"boolean",async:!1,message:n,get"~standard"(){return Wt(this)},"~run"(e,o){return typeof e.value=="boolean"?e.typed=!0:kt(this,"type",e,o),e}}}c(cu,"boolean");function Xs(n){return{kind:"schema",type:"function",reference:Xs,expects:"Function",async:!1,message:n,get"~standard"(){return Wt(this)},"~run"(e,o){return typeof e.value=="function"?e.typed=!0:kt(this,"type",e,o),e}}}c(Xs,"function_");function Js(n,e){return{kind:"schema",type:"instance",reference:Js,expects:n.name,async:!1,class:n,message:e,get"~standard"(){return Wt(this)},"~run"(o,a){return o.value instanceof this.class?o.typed=!0:kt(this,"type",o,a),o}}}c(Js,"instance");function iu(n,e){if(typeof n==typeof e){if(n===e||n instanceof Date&&e instanceof Date&&+n==+e)return{value:n};if(n&&e&&n.constructor===Object&&e.constructor===Object){for(let o in e)if(o in n){let a=iu(n[o],e[o]);if(a.issue)return a;n[o]=a.value}else n[o]=e[o];return{value:n}}if(Array.isArray(n)&&Array.isArray(e)&&n.length===e.length){for(let o=0;o<n.length;o++){let a=iu(n[o],e[o]);if(a.issue)return a;n[o]=a.value}return{value:n}}}return{issue:!0}}c(iu,"_merge");function uu(n,e){return{kind:"schema",type:"intersect",reference:uu,expects:su(n.map(o=>o.expects),"&"),async:!1,options:n,message:e,get"~standard"(){return Wt(this)},"~run"(o,a){if(this.options.length){let s=o.value,u;o.typed=!0;for(let r of this.options){let t=r["~run"]({value:s},a);if(t.issues&&(o.issues?o.issues.push(...t.issues):o.issues=t.issues,a.abortEarly)){o.typed=!1;break}t.typed||(o.typed=!1),o.typed&&(u?u.push(t.value):u=[t.value])}if(o.typed){o.value=u[0];for(let r=1;r<u.length;r++){let t=iu(o.value,u[r]);if(t.issue){kt(this,"type",o,a,{received:"unknown"});break}o.value=t.value}}}else kt(this,"type",o,a);return o}}}c(uu,"intersect");function nr(n,e){return{kind:"schema",type:"object",reference:nr,expects:"Object",async:!1,entries:n,message:e,get"~standard"(){return Wt(this)},"~run"(o,a){let s=o.value;if(s&&typeof s=="object"){o.typed=!0,o.value={};for(let u in this.entries){let r=this.entries[u];if(u in s||(r.type==="exact_optional"||r.type==="optional"||r.type==="nullish")&&r.default!==void 0){let t=u in s?s[u]:Jf(r),i=r["~run"]({value:t},a);if(i.issues){let l={type:"object",origin:"value",input:s,key:u,value:t};for(let p of i.issues)p.path?p.path.unshift(l):p.path=[l],o.issues?.push(p);if(o.issues||(o.issues=i.issues),a.abortEarly){o.typed=!1;break}}i.typed||(o.typed=!1),o.value[u]=i.value}else if(r.fallback!==void 0)o.value[u]=Vh(r);else if(r.type!=="exact_optional"&&r.type!=="optional"&&r.type!=="nullish"&&(kt(this,"key",o,a,{input:void 0,expected:`"${u}"`,path:[{type:"object",origin:"key",input:s,key:u,value:s[u]}]}),a.abortEarly))break}}else kt(this,"type",o,a);return o}}}c(nr,"object");function Bt(n,e){return{kind:"schema",type:"optional",reference:Bt,expects:`(${n.expects} | undefined)`,async:!1,wrapped:n,default:e,get"~standard"(){return Wt(this)},"~run"(o,a){return o.value===void 0&&(this.default!==void 0&&(o.value=Jf(this,o,a)),o.value===void 0)?(o.typed=!0,o):this.wrapped["~run"](o,a)}}}c(Bt,"optional");function Do(n,e){return{kind:"schema",type:"picklist",reference:Do,expects:su(n.map(Xf),"|"),async:!1,options:n,message:e,get"~standard"(){return Wt(this)},"~run"(o,a){return this.options.includes(o.value)?o.typed=!0:kt(this,"type",o,a),o}}}c(Do,"picklist");function lu(n,e,o){return{kind:"schema",type:"record",reference:lu,expects:"Object",async:!1,key:n,value:e,message:o,get"~standard"(){return Wt(this)},"~run"(a,s){let u=a.value;if(u&&typeof u=="object"){a.typed=!0,a.value={};for(let r in u)if(Dh(u,r)){let t=u[r],i=this.key["~run"]({value:r},s);if(i.issues){let p={type:"object",origin:"key",input:u,key:r,value:t};for(let E of i.issues)E.path=[p],a.issues?.push(E);if(a.issues||(a.issues=i.issues),s.abortEarly){a.typed=!1;break}}let l=this.value["~run"]({value:t},s);if(l.issues){let p={type:"object",origin:"value",input:u,key:r,value:t};for(let E of l.issues)E.path?E.path.unshift(p):E.path=[p],a.issues?.push(E);if(a.issues||(a.issues=l.issues),s.abortEarly){a.typed=!1;break}}(!i.typed||!l.typed)&&(a.typed=!1),i.typed&&(a.value[i.value]=l.value)}}else kt(this,"type",a,s);return a}}}c(lu,"record");function or(n){return{kind:"schema",type:"string",reference:or,expects:"string",async:!1,message:n,get"~standard"(){return Wt(this)},"~run"(e,o){return typeof e.value=="string"?e.typed=!0:kt(this,"type",e,o),e}}}c(or,"string");function zf(n){let e;if(n)for(let o of n)e?e.push(...o.issues):e=o.issues;return e}c(zf,"_subIssues");function Lr(n,e){return{kind:"schema",type:"union",reference:Lr,expects:su(n.map(o=>o.expects),"|"),async:!1,options:n,message:e,get"~standard"(){return Wt(this)},"~run"(o,a){let s,u,r;for(let t of this.options){let i=t["~run"]({value:o.value},a);if(i.typed)if(i.issues)u?u.push(i):u=[i];else{s=i;break}else r?r.push(i):r=[i]}if(s)return s;if(u){if(u.length===1)return u[0];kt(this,"type",o,a,{issues:zf(u)}),o.typed=!0}else{if(r?.length===1)return r[0];kt(this,"type",o,a,{issues:zf(r)})}return o}}}c(Lr,"union");function Zs(){return{kind:"schema",type:"unknown",reference:Zs,expects:"unknown",async:!1,get"~standard"(){return Wt(this)},"~run"(n){return n.typed=!0,n}}}c(Zs,"unknown");function Zf(n,e,o){let a=n["~run"]({value:e},$f(o));if(a.issues)throw new wh(a.issues);return a.value}c(Zf,"parse");function Yt(...n){return{...n[0],pipe:n,get"~standard"(){return Wt(this)},"~run"(e,o){for(let a of n)if(a.kind!=="metadata"){if(e.issues&&(a.kind==="schema"||a.kind==="transformation")){e.typed=!1;break}(!e.issues||!o.abortEarly&&!o.abortPipeEarly)&&(e=a["~run"](e,o))}return e}}}c(Yt,"pipe");var oe={boolean:Lr([cu(),Yt(Do(["true","false","1","0"]),qt(n=>n==="true"||n==="1"))]),logLevel:Yt(Do(["all","verbose","debug","info","warn","error","none"]),qt(n=>{switch(n){case"all":return ut.ALL;case"verbose":return ut.VERBOSE;case"debug":return ut.DEBUG;case"info":return ut.INFO;case"warn":return ut.WARN;case"error":return ut.ERROR;case"none":return ut.NONE}})),regex:Lr([Js(RegExp),Yt(or(),$s(({dataset:{value:n},addIssue:e,NEVER:o})=>{try{return new RegExp(n)}catch{return e({label:RegExp.name}),o}}))]),serviceKey:Yt(or(),au(/:.+$/),qt(n=>{let[e,...o]=n.split(":");return{token:e||void 0,name:o.join(":")}})),stringy:Lr([Yt(or(),qt(n=>()=>n)),Yt(Xs(),qt(n=>()=>String(n())))]),tracingMode:Yt(Do(["enabled","disabled"]),qt(n=>n==="enabled")),url:Lr([Js(URL),Yt(or(),$s(({dataset:{value:n},addIssue:e,NEVER:o})=>{/^https?:/.test(n)||(n=`https://${n}`);try{return new URL(n)}catch{return e({label:URL.name}),o}}))])},tE=c(n=>Yt(nr({enabled:Bt(oe.boolean,!0),serviceKey:n.serviceKey?Bt(oe.serviceKey,n.serviceKey):oe.serviceKey,collector:Bt(oe.url,"apm.collector.na-01.cloud.solarwinds.com"),logLevel:Bt(oe.logLevel,"warn"),tracingMode:Bt(oe.tracingMode),triggerTraceEnabled:Bt(oe.boolean,n.triggerTraceEnabled),exportLogsEnabled:Bt(oe.boolean,!1),transactionName:Bt(oe.stringy),transactionSettings:Bt(Mo(Lr([Yt(nr({tracing:oe.tracingMode,regex:oe.regex}),qt(({tracing:e,regex:o})=>({tracing:e,matcher:c(a=>o.test(a),"matcher")}))),Yt(nr({tracing:oe.tracingMode,matcher:Xs()}),qt(({tracing:e,matcher:o})=>({tracing:e,matcher:c(a=>!!o(a),"matcher")})))])))}),qt(e=>{let o=void 0??e.serviceKey.name,a=e.serviceKey.token,s=e.collector,u={},r=Object.fromEntries(["traces","metrics","logs"].map(t=>[t,kh(t,s)]));return{enabled:e.enabled,service:o,token:a,collector:s,headers:u,otlp:r,logLevel:e.logLevel,tracingMode:e.tracingMode,triggerTraceEnabled:e.triggerTraceEnabled,exportLogsEnabled:e.exportLogsEnabled,transactionName:e.transactionName,transactionSettings:e.transactionSettings}})),"schema"),Rn={PREFIX:"SW_APM_",object(n,e){return e??=Rn.PREFIX,Object.fromEntries(Object.entries(n).filter(([o])=>o.startsWith(e)).map(([o,a])=>[Rn.fromKey(o,e),a]))},fromKey(n,e){return e??=Rn.PREFIX,n.slice(e.length).toLowerCase().replace(/_[a-z]/g,o=>o.slice(1).toUpperCase())},toKey(n,e){return e??=Rn.PREFIX,`${e}${n.replace(/[A-Z]/g,o=>`_${o}`).toUpperCase()}`}};function kh(n,e){let o=`/v1/${n}`,a=(`${n.toUpperCase()}`,void 0);if(a)return a;let s=void 0;if(s)return`${s}${o}`;let u=new URL(e);return u.hostname=e.hostname.replace(/^apm\.collector\./,"otel.collector."),u.pathname=o,u.href}c(kh,"signalEndpoint");var Bh=uu([tE({triggerTraceEnabled:!1}),Yt(nr({instrumentations:Bt(nr({configs:Bt(lu(or(),Zs()),{}),extra:Bt(Mo(Zs()),[])}),{})}),qt(({instrumentations:n})=>({instrumentations:n})))]);function eE(){return Zf(Bh,Rn.object(globalThis))}c(eE,"read");var Qs=class n{static{c(this,"Logger")}error=n.makeLogger(console.error);warn=n.makeLogger(console.warn);info=n.makeLogger(console.info);debug=n.makeLogger(console.debug);verbose=n.makeLogger(console.debug);static makeLogger(e){return(o,...a)=>{for(;typeof a[0]=="string";)o+=` ${a.shift()}`;e(o,...a)}}};function pu(){try{let n=eE();m.setLogger(new Qs,n.logLevel);let e=rr(pu);if(e.debug("config",n),!n.enabled){e.warn("Library disabled, application will not be instrumented."),eu.resolve(void 0),ru.resolve(void 0),nu.resolve(void 0),zs.resolve(void 0);return}let o=ja({detectors:Jp()}).merge(De()).merge(Qn({[ni]:n.service,"sw.data.module":"apm","sw.apm.version":qf})),a=Hh(n,o),s=Gh(n,o);Yh(n,o),Ya({instrumentations:_s(),tracerProvider:s,meterProvider:a}),e.debug("resource",o.attributes)}catch(n){console.error("solarwinds-apm",n)}}c(pu,"init");function Gh(n,e){let o=new qs(n,{sampleRate:1e6,sampleSource:ln.LocalDefault,flags:dt.SAMPLE_START|dt.SAMPLE_THROUGH_ALWAYS,buckets:{[Vt.DEFAULT]:{capacity:10,rate:0}},timestamp:Math.round(Date.now()/1e3),ttl:10}),a=new fo({resource:e,sampler:o,spanProcessors:[new Gs(n),new Hs,new hr(new Ds(n)),new Vs,new ws]});return a.register({contextManager:new wr,propagator:new Er({propagators:[new Fs,new Ys,new lr]})}),eu.resolve(o),ru.resolve(a),a}c(Gh,"initTracing");function Hh(n,e){let o=new _o({resource:e,readers:[new Ms({exporter:new Us(n)})]});return ae.setGlobalMeterProvider(o),nu.resolve(o),o}c(Hh,"initMetrics");function Yh(n,e){if(!n.exportLogsEnabled){zs.resolve(void 0);return}let o=new to({resource:e,processors:[new zr(new Ps(n))]});return Dr.setGlobalLoggerProvider(o),zs.resolve(o),o}c(Yh,"initLogs");pu();
/*! Bundled license information:

zone.js/fesm2015/zone.js:
  (**
   * @license Angular v<unknown>
   * (c) 2010-2025 Google LLC. https://angular.io/
   * License: MIT
   *)

@noble/hashes/esm/utils.js:
  (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
*/
//# sourceMappingURL=web.js.map