@sentio/runtime 2.49.0-rc.1 → 2.49.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/processor-runner.js
CHANGED
@@ -56,7 +56,7 @@ ${o}
|
|
56
56
|
${r}`.trim()}_serializeSingularDataPoint(e,n,i){let a="";e=Ed(e,n);let{value:s,attributes:o}=i,r=(0,LI.hrTimeToMilliseconds)(i.endTime);return a+=Fu(e,o,s,this._appendTimestamp?r:void 0,void 0),a}_serializeHistogramDataPoint(e,n,i){let a="";e=Ed(e,n);let s=i.attributes,o=i.value,r=(0,LI.hrTimeToMilliseconds)(i.endTime);for(let p of["count","sum"]){let _=o[p];_!=null&&(a+=Fu(e+"_"+p,s,_,this._appendTimestamp?r:void 0,void 0))}let u=0,l=o.buckets.counts.entries(),c=!1;for(let[p,_]of l){u+=_;let f=o.buckets.boundaries[p];if(f===void 0&&c)break;f===1/0&&(c=!0),a+=Fu(e+"_bucket",s,u,this._appendTimestamp?r:void 0,{le:f===void 0||f===1/0?"+Inf":String(f)})}return a}_serializeResource(e){let n="target_info",i=`# HELP ${n} Target metadata`,a=`# TYPE ${n} gauge`,s=Fu(n,e.attributes,1).trim();return`${i}
|
57
57
|
${a}
|
58
58
|
${s}
|
59
|
-
`}};qu.PrometheusSerializer=Sd});var CI=h($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.PrometheusExporter=void 0;var mi=(b(),Y(Re)),bz=(K(),Y(Is)),Td=(xn(),Y(Yp)),Mz=L("http"),xz=hd(),Lz=L("url"),ju=class t extends Td.MetricReader{constructor(e={},n=()=>{}){super({aggregationSelector:i=>Td.Aggregation.Default(),aggregationTemporalitySelector:i=>Td.AggregationTemporality.CUMULATIVE,metricProducers:e.metricProducers}),this._requestHandler=(i,a)=>{i.url!=null&&new Lz.URL(i.url,this._baseUrl).pathname===this._endpoint?this._exportMetrics(a):this._notFound(a)},this._exportMetrics=i=>{i.statusCode=200,i.setHeader("content-type","text/plain"),this.collect().then(a=>{let{resourceMetrics:s,errors:o}=a;o.length&&mi.diag.error("PrometheusExporter: metrics collection errors",...o),i.end(this._serializer.serialize(s))},a=>{i.end(`# failed to export metrics: ${a}`)})},this._notFound=i=>{i.statusCode=404,i.end()},this._host=e.host||process.env.OTEL_EXPORTER_PROMETHEUS_HOST||t.DEFAULT_OPTIONS.host,this._port=e.port||Number(process.env.OTEL_EXPORTER_PROMETHEUS_PORT)||t.DEFAULT_OPTIONS.port,this._prefix=e.prefix||t.DEFAULT_OPTIONS.prefix,this._appendTimestamp=typeof e.appendTimestamp=="boolean"?e.appendTimestamp:t.DEFAULT_OPTIONS.appendTimestamp,this._server=(0,Mz.createServer)(this._requestHandler).unref(),this._serializer=new xz.PrometheusSerializer(this._prefix,this._appendTimestamp),this._baseUrl=`http://${this._host}:${this._port}/`,this._endpoint=(e.endpoint||t.DEFAULT_OPTIONS.endpoint).replace(/^([^/])/,"/$1"),e.preventServerStart!==!0?this.startServer().then(n,i=>{mi.diag.error(i),n(i)}):n&&queueMicrotask(n)}async onForceFlush(){}onShutdown(){return this.stopServer()}stopServer(){return this._server?new Promise(e=>{this._server.close(n=>{n?n.code!=="ERR_SERVER_NOT_RUNNING"&&(0,bz.globalErrorHandler)(n):mi.diag.debug("Prometheus exporter was stopped"),e()})}):(mi.diag.debug("Prometheus stopServer() was called but server was never started."),Promise.resolve())}startServer(){var e;return(e=this._startServerPromise)!==null&&e!==void 0||(this._startServerPromise=new Promise((n,i)=>{this._server.once("error",i),this._server.listen({port:this._port,host:this._host},()=>{mi.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),n()})})),this._startServerPromise}getMetricsRequestHandler(e,n){this._exportMetrics(n)}};$u.PrometheusExporter=ju;ju.DEFAULT_OPTIONS={host:void 0,port:9464,endpoint:"/metrics",prefix:"",appendTimestamp:!1}});var wI=h(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.PrometheusSerializer=Gn.PrometheusExporter=void 0;var Iz=CI();Object.defineProperty(Gn,"PrometheusExporter",{enumerable:!0,get:function(){return Iz.PrometheusExporter}});var Cz=hd();Object.defineProperty(Gn,"PrometheusSerializer",{enumerable:!0,get:function(){return Cz.PrometheusSerializer}})});var md=h(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.AbstractAsyncHooksContextManager=void 0;var wz=L("events"),Uz=["addListener","on","once","prependListener","prependOnceListener"],vd=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,n){return n instanceof wz.EventEmitter?this._bindEventEmitter(e,n):typeof n=="function"?this._bindFunction(e,n):n}_bindFunction(e,n){let i=this,a=function(...s){return i.with(e,()=>n.apply(this,s))};return Object.defineProperty(a,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),a}_bindEventEmitter(e,n){return this._getPatchMap(n)!==void 0||(this._createPatchMap(n),Uz.forEach(a=>{n[a]!==void 0&&(n[a]=this._patchAddListener(n,n[a],e))}),typeof n.removeListener=="function"&&(n.removeListener=this._patchRemoveListener(n,n.removeListener)),typeof n.off=="function"&&(n.off=this._patchRemoveListener(n,n.off)),typeof n.removeAllListeners=="function"&&(n.removeAllListeners=this._patchRemoveAllListeners(n,n.removeAllListeners))),n}_patchRemoveListener(e,n){let i=this;return function(a,s){var o;let r=(o=i._getPatchMap(e))===null||o===void 0?void 0:o[a];if(r===void 0)return n.call(this,a,s);let u=r.get(s);return n.call(this,a,u||s)}}_patchRemoveAllListeners(e,n){let i=this;return function(a){let s=i._getPatchMap(e);return s!==void 0&&(arguments.length===0?i._createPatchMap(e):s[a]!==void 0&&delete s[a]),n.apply(this,arguments)}}_patchAddListener(e,n,i){let a=this;return function(s,o){if(a._wrapped)return n.call(this,s,o);let r=a._getPatchMap(e);r===void 0&&(r=a._createPatchMap(e));let u=r[s];u===void 0&&(u=new WeakMap,r[s]=u);let l=a.bind(i,o);u.set(o,l),a._wrapped=!0;try{return n.call(this,s,l)}finally{a._wrapped=!1}}}_createPatchMap(e){let n=Object.create(null);return e[this._kOtListeners]=n,n}_getPatchMap(e){return e[this._kOtListeners]}};Ku.AbstractAsyncHooksContextManager=vd});var UI=h(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});Wu.AsyncHooksContextManager=void 0;var Dz=(b(),Y(Re)),Vz=L("async_hooks"),Bz=md(),yd=class extends Bz.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=Vz.createHook({init:this._init.bind(this),before:this._before.bind(this),after:this._after.bind(this),destroy:this._destroy.bind(this),promiseResolve:this._destroy.bind(this)})}active(){var e;return(e=this._stack[this._stack.length-1])!==null&&e!==void 0?e:Dz.ROOT_CONTEXT}with(e,n,i,...a){this._enterContext(e);try{return n.call(i,...a)}finally{this._exitContext()}}enable(){return this._asyncHook.enable(),this}disable(){return this._asyncHook.disable(),this._contexts.clear(),this._stack=[],this}_init(e,n){if(n==="TIMERWRAP")return;let i=this._stack[this._stack.length-1];i!==void 0&&this._contexts.set(e,i)}_destroy(e){this._contexts.delete(e)}_before(e){let n=this._contexts.get(e);n!==void 0&&this._enterContext(n)}_after(){this._exitContext()}_enterContext(e){this._stack.push(e)}_exitContext(){this._stack.pop()}};Wu.AsyncHooksContextManager=yd});var DI=h(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});zu.AsyncLocalStorageContextManager=void 0;var Gz=(b(),Y(Re)),kz=L("async_hooks"),Hz=md(),Ad=class extends Hz.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new kz.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:Gz.ROOT_CONTEXT}with(e,n,i,...a){let s=i==null?n:n.bind(i);return this._asyncLocalStorage.run(e,s,...a)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};zu.AsyncLocalStorageContextManager=Ad});var VI=h(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.AsyncLocalStorageContextManager=kn.AsyncHooksContextManager=void 0;var Fz=UI();Object.defineProperty(kn,"AsyncHooksContextManager",{enumerable:!0,get:function(){return Fz.AsyncHooksContextManager}});var Yz=DI();Object.defineProperty(kn,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return Yz.AsyncLocalStorageContextManager}})});var Hn,Od=m(()=>{"use strict";b();Hn=$r("OpenTelemetry Context Key B3 Debug Flag")});var Er,Fn,Yn,qn,Xu,jn,yi=m(()=>{"use strict";Er="b3",Fn="x-b3-traceid",Yn="x-b3-spanid",qn="x-b3-sampled",Xu="x-b3-parentspanid",jn="x-b3-flags"});function $z(t){return t===J.SAMPLED||t===J.NONE}function Kz(t){return Array.isArray(t)?t[0]:t}function Ju(t,e,n){var i=e.get(t,n);return Kz(i)}function Wz(t,e){var n=Ju(t,e,Fn);return typeof n=="string"?n.padStart(32,"0"):""}function zz(t,e){var n=Ju(t,e,Yn);return typeof n=="string"?n:""}function BI(t,e){var n=Ju(t,e,jn);return n==="1"?"1":void 0}function Xz(t,e){var n=Ju(t,e,qn),i=BI(t,e);if(i==="1"||qz.has(n))return J.SAMPLED;if(n===void 0||jz.has(n))return J.NONE}var qz,jz,GI,kI=m(()=>{"use strict";b();K();Od();yi();qz=new Set([!0,"true","True","1",1]),jz=new Set([!1,"false","False","0",0]);GI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=X.getSpanContext(e);if(!(!a||!dt(a)||be(e))){var s=e.getValue(Hn);i.set(n,Fn,a.traceId),i.set(n,Yn,a.spanId),s==="1"?i.set(n,jn,s):a.traceFlags!==void 0&&i.set(n,qn,(J.SAMPLED&a.traceFlags)===J.SAMPLED?"1":"0")}},t.prototype.extract=function(e,n,i){var a=Wz(n,i),s=zz(n,i),o=Xz(n,i),r=BI(n,i);return Gt(a)&&Ii(s)&&$z(o)?(e=e.setValue(Hn,r),X.setSpanContext(e,{traceId:a,spanId:s,isRemote:!0,traceFlags:o})):e},t.prototype.fields=function(){return[Fn,Yn,jn,qn,Xu]},t}()});function rX(t){return t.length===32?t:""+Zz+t}function nX(t){return t&&eX.has(t)?J.SAMPLED:J.NONE}var Jz,Qz,Zz,eX,tX,HI,FI=m(()=>{"use strict";b();K();Od();yi();Jz=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},Qz=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,Zz="0".repeat(16),eX=new Set(["d","1"]),tX="d";HI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=X.getSpanContext(e);if(!(!a||!dt(a)||be(e))){var s=e.getValue(Hn)||a.traceFlags&1,o=a.traceId+"-"+a.spanId+"-"+s;i.set(n,Er,o)}},t.prototype.extract=function(e,n,i){var a=i.get(n,Er),s=Array.isArray(a)?a[0]:a;if(typeof s!="string")return e;var o=s.match(Qz);if(!o)return e;var r=Jz(o,4),u=r[1],l=r[2],c=r[3],p=rX(u);if(!Gt(p)||!Ii(l))return e;var _=nX(c);return c===tX&&(e=e.setValue(Hn,c)),X.setSpanContext(e,{traceId:p,spanId:l,isRemote:!0,traceFlags:_})},t.prototype.fields=function(){return[Er]},t}()});var $n,gd=m(()=>{"use strict";(function(t){t[t.SINGLE_HEADER=0]="SINGLE_HEADER",t[t.MULTI_HEADER=1]="MULTI_HEADER"})($n||($n={}))});var YI,qI=m(()=>{"use strict";K();kI();FI();yi();gd();YI=function(){function t(e){e===void 0&&(e={}),this._b3MultiPropagator=new GI,this._b3SinglePropagator=new HI,e.injectEncoding===$n.MULTI_HEADER?(this._inject=this._b3MultiPropagator.inject,this._fields=this._b3MultiPropagator.fields()):(this._inject=this._b3SinglePropagator.inject,this._fields=this._b3SinglePropagator.fields())}return t.prototype.inject=function(e,n,i){be(e)||this._inject(e,n,i)},t.prototype.extract=function(e,n,i){var a=i.get(n,Er),s=Array.isArray(a)?a[0]:a;return s?this._b3SinglePropagator.extract(e,n,i):this._b3MultiPropagator.extract(e,n,i)},t.prototype.fields=function(){return this._fields},t}()});var jI={};nt(jI,{B3InjectEncoding:()=>$n,B3Propagator:()=>YI,B3_CONTEXT_HEADER:()=>Er,X_B3_FLAGS:()=>jn,X_B3_PARENT_SPAN_ID:()=>Xu,X_B3_SAMPLED:()=>qn,X_B3_SPAN_ID:()=>Yn,X_B3_TRACE_ID:()=>Fn});var $I=m(()=>{"use strict";qI();yi();gd()});var KI,WI=m(()=>{"use strict";KI="exception"});var Nd,oX,zI,iX,Qu,Rd=m(()=>{"use strict";b();K();jo();WI();Nd=function(){return Nd=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},Nd.apply(this,arguments)},oX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zI=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},iX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))},Qu=function(){function t(e,n,i,a,s,o,r,u,l,c){r===void 0&&(r=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:pE.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=a,this.parentSpanId=o,this.kind=s,this.links=r;var p=Date.now();this._performanceStartTime=Ze.now(),this._performanceOffset=p-(this._performanceStartTime+yn()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,c!=null&&this.setAttributes(c),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,n){return n==null||this._isSpanEnded()?this:e.length===0?(g.warn("Invalid attribute key: "+e),this):Wo(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(n),this):(g.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,i;try{for(var a=oX(Object.entries(e)),s=a.next();!s.done;s=a.next()){var o=zI(s.value,2),r=o[0],u=o[1];this.setAttribute(r,u)}}catch(l){n={error:l}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,i){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return g.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&g.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Qo(n)&&(Qo(i)||(i=n),n=void 0);var a=or(n);return this.events.push({name:e,attributes:a,time:this._getTime(i),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var n;return(n=this.links).push.apply(n,iX([],zI(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=Nd({},e),this.status.message!=null&&typeof e.message!="string"&&(g.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){g.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=Os(this.startTime,this.endTime),this._duration[0]<0&&(g.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&&g.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<Ze.now())return Jo(e+this._performanceOffset);if(typeof e=="number")return Oe(e);if(e instanceof Date)return Oe(e.getTime());if(An(e))return e;if(this._startTimeProvided)return Oe(Date.now());var n=Ze.now()-this._performanceStartTime;return Zo(this.startTime,Oe(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var i={};typeof e=="string"?i[ls]=e:e&&(e.code?i[us]=e.code.toString():e.name&&(i[us]=e.name),e.message&&(i[ls]=e.message),e.stack&&(i[l0]=e.stack)),i[us]||i[ls]?this.addEvent(KI,i,n):g.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&g.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,n){return e.length<=n?e:e.substr(0,n)},t.prototype._truncateToSize=function(e){var n=this,i=this._attributeValueLengthLimit;return i<=0?(g.warn("Attribute value limit must be positive, got "+i),e):typeof e=="string"?this._truncateToLimitUtil(e,i):Array.isArray(e)?e.map(function(a){return typeof a=="string"?n._truncateToLimitUtil(a,i):a}):e},t}()});var ft,Ai=m(()=>{"use strict";(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ft||(ft={}))});var _r,Zu=m(()=>{"use strict";Ai();_r=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ft.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var Mt,el=m(()=>{"use strict";Ai();Mt=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ft.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var Kn,Pd=m(()=>{"use strict";b();K();Zu();el();Kn=function(){function t(e){var n,i,a,s;this._root=e.root,this._root||(he(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Mt),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new Mt,this._remoteParentNotSampled=(i=e.remoteParentNotSampled)!==null&&i!==void 0?i:new _r,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new Mt,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new _r}return t.prototype.shouldSample=function(e,n,i,a,s,o){var r=X.getSpanContext(e);return!r||!dt(r)?this._root.shouldSample(e,n,i,a,s,o):r.isRemote?r.traceFlags&J.SAMPLED?this._remoteParentSampled.shouldSample(e,n,i,a,s,o):this._remoteParentNotSampled.shouldSample(e,n,i,a,s,o):r.traceFlags&J.SAMPLED?this._localParentSampled.shouldSample(e,n,i,a,s,o):this._localParentNotSampled.shouldSample(e,n,i,a,s,o)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}()});var Oi,bd=m(()=>{"use strict";b();Ai();Oi=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Gt(n)&&this._accumulate(n)<this._upperBound?ft.RECORD_AND_SAMPLED:ft.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,i=0;i<e.length/8;i++){var a=i*8,s=parseInt(e.slice(a,a+8),16);n=(n^s)>>>0}return n},t}()});function tl(){var t=Ae();return{sampler:Md(aX),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function Md(t){switch(t===void 0&&(t=Ae()),t.OTEL_TRACES_SAMPLER){case je.AlwaysOn:return new Mt;case je.AlwaysOff:return new _r;case je.ParentBasedAlwaysOn:return new Kn({root:new Mt});case je.ParentBasedAlwaysOff:return new Kn({root:new _r});case je.TraceIdRatio:return new Oi(XI(t));case je.ParentBasedTraceIdRatio:return new Kn({root:new Oi(XI(t))});default:return g.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+sX+'".'),new Mt}}function XI(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return g.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Wn+"."),Wn;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Wn+"."),Wn):e<0||e>1?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Wn+"."),Wn):e}var aX,sX,Wn,xd=m(()=>{"use strict";b();K();Zu();el();Pd();bd();aX=Ae(),sX=je.AlwaysOn,Wn=1});function JI(t){var e={sampler:Md()},n=tl(),i=Object.assign({},n,e,t);return i.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),i.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),i}function QI(t){var e,n,i,a,s,o,r,u,l,c,p,_,f=Object.assign({},t.spanLimits),S=vn();return f.attributeCountLimit=(o=(s=(a=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(i=t.generalLimits)===null||i===void 0?void 0:i.attributeCountLimit)!==null&&a!==void 0?a:S.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:S.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:Ur,f.attributeValueLengthLimit=(_=(p=(c=(u=(r=t.spanLimits)===null||r===void 0?void 0:r.attributeValueLengthLimit)!==null&&u!==void 0?u:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&c!==void 0?c:S.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:S.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&_!==void 0?_:wr,Object.assign({},t,{spanLimits:f})}var Ld=m(()=>{"use strict";xd();K()});var ZI,eC=m(()=>{"use strict";b();K();ZI=function(){function t(e,n){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var i=Ae();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:i.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:i.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:i.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:i.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new ur(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(g.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&J.SAMPLED&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e._flushAll()}).then(function(){return e._exporter.shutdown()})},t.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&g.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(g.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(n,i){for(var a=[],s=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),o=0,r=s;o<r;o++)a.push(e._flushOneBatch());Promise.all(a).then(function(){n()}).catch(i)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,i){var a=setTimeout(function(){i(new Error("Timeout"))},e._exportTimeoutMillis);He.with(hn(He.active()),function(){var s;e._finishedSpans.length<=e._maxExportBatchSize?(s=e._finishedSpans,e._finishedSpans=[]):s=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var o=function(){return e._exporter.export(s,function(p){var _;clearTimeout(a),p.code===ee.SUCCESS?n():i((_=p.error)!==null&&_!==void 0?_:new Error("BatchSpanProcessor: span export failed"))})},r=null,u=0,l=s.length;u<l;u++){var c=s[u];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(r??(r=[]),r.push(c.resource.waitForAsyncAttributes()))}r===null?o():Promise.all(r).then(o,function(p){he(p),i(p)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var n=function(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(i){e._isExporting=!1,he(i)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis),sr(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}()});var uX,Sr,tC=m(()=>{"use strict";eC();uX=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(i[s]=a[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function i(){this.constructor=e}e.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),Sr=function(t){uX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onShutdown=function(){},e}(ZI)});function rC(t){return function(){for(var n=0;n<t/4;n++)rl.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(rl[n]>0);n++)n===t-1&&(rl[t-1]=1);return rl.toString("hex",0,t)}}var lX,nC,zn,rl,oC=m(()=>{"use strict";lX=8,nC=16,zn=function(){function t(){this.generateTraceId=rC(nC),this.generateSpanId=rC(lX)}return t}(),rl=Buffer.allocUnsafe(nC)});var iC=m(()=>{"use strict";tC();oC()});var nl=m(()=>{"use strict";iC()});var ol,aC=m(()=>{"use strict";b();K();Rd();Ld();nl();ol=function(){function t(e,n,i){this._tracerProvider=i;var a=JI(n);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=n.idGenerator||new zn,this.resource=i.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,i){var a,s,o;n===void 0&&(n={}),i===void 0&&(i=He.active()),n.root&&(i=X.deleteSpan(i));var r=X.getSpan(i);if(be(i)){g.debug("Instrumentation suppressed, returning Noop Span");var u=X.wrapSpanContext(lE);return u}var l=r?.spanContext(),c=this._idGenerator.generateSpanId(),p,_,f;!l||!X.isSpanContextValid(l)?p=this._idGenerator.generateTraceId():(p=l.traceId,_=l.traceState,f=l.spanId);var S=(a=n.kind)!==null&&a!==void 0?a:fE.INTERNAL,v=((s=n.links)!==null&&s!==void 0?s:[]).map(function(F){return{context:F.context,attributes:or(F.attributes)}}),T=or(n.attributes),A=this._sampler.shouldSample(i,p,e,S,T,v);_=(o=A.traceState)!==null&&o!==void 0?o:_;var O=A.decision===Et.RECORD_AND_SAMPLED?J.SAMPLED:J.NONE,N={traceId:p,spanId:c,traceFlags:O,traceState:_};if(A.decision===Et.NOT_RECORD){g.debug("Recording is off, propagating context in a non-recording span");var u=X.wrapSpanContext(N);return u}var D=or(Object.assign(T,A.attributes)),G=new Qu(this,i,e,N,S,f,v,n.startTime,void 0,D);return G},t.prototype.startActiveSpan=function(e,n,i,a){var s,o,r;if(!(arguments.length<2)){arguments.length===2?r=n:arguments.length===3?(s=n,r=i):(s=n,o=i,r=a);var u=o??He.active(),l=this.startSpan(e,s,u),c=X.setSpan(u,l);return He.with(c,r,void 0,l)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}()});var il,sC,uC=m(()=>{"use strict";K();il=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},sC=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,n,i=[];try{for(var a=il(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;i.push(o.forceFlush())}}catch(r){e={error:r}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r){Promise.all(i).then(function(){r()}).catch(function(u){he(u||new Error("MultiSpanProcessor: forceFlush failed")),r()})})},t.prototype.onStart=function(e,n){var i,a;try{for(var s=il(this._spanProcessors),o=s.next();!o.done;o=s.next()){var r=o.value;r.onStart(e,n)}}catch(u){i={error:u}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}},t.prototype.onEnd=function(e){var n,i;try{for(var a=il(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;o.onEnd(e)}}catch(r){n={error:r}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,i=[];try{for(var a=il(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;i.push(o.shutdown())}}catch(r){e={error:r}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r,u){Promise.all(i).then(function(){r()},u)})},t}()});var al,Id=m(()=>{"use strict";al=function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}()});var Vt,lC,cC=m(()=>{"use strict";b();K();Us();gi();xd();uC();Id();nl();Ld();(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Vt||(Vt={}));lC=function(){function t(e){e===void 0&&(e={});var n;this._registeredSpanProcessors=[],this._tracers=new Map;var i=Ls({},tl(),QI(e));this.resource=(n=i.resource)!==null&&n!==void 0?n:Ut.empty(),this.resource=Ut.default().merge(this.resource),this._config=Object.assign({},i,{resource:this.resource});var a=this._buildExporterFromEnv();if(a!==void 0){var s=new Sr(a);this.activeSpanProcessor=s}else this.activeSpanProcessor=new al}return t.prototype.getTracer=function(e,n,i){var a=e+"@"+(n||"")+":"+(i?.schemaUrl||"");return this._tracers.has(a)||this._tracers.set(a,new ol({name:e,version:n,schemaUrl:i?.schemaUrl},this._config,this)),this._tracers.get(a)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return g.error("Error while trying to shutdown current span processor",n)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new sC(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),X.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&He.setGlobalContextManager(e.contextManager),e.propagator&&it.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(function(i){return new Promise(function(a){var s,o=setTimeout(function(){a(new Error("Span processor did not completed within timeout period of "+e+" ms")),s=Vt.timeout},e);i.forceFlush().then(function(){clearTimeout(o),s!==Vt.timeout&&(s=Vt.resolved,a(s))}).catch(function(r){clearTimeout(o),s=Vt.error,a(r)})})});return new Promise(function(i,a){Promise.all(n).then(function(s){var o=s.filter(function(r){return r!==Vt.resolved});o.length>0?a(o):i()}).catch(function(s){return a([s])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var n;return(n=this.constructor._registeredPropagators.get(e))===null||n===void 0?void 0:n()},t.prototype._getSpanExporter=function(e){var n;return(n=this.constructor._registeredExporters.get(e))===null||n===void 0?void 0:n()},t.prototype._buildPropagatorFromEnv=function(){var e=this,n=Array.from(new Set(Ae().OTEL_PROPAGATORS)),i=n.map(function(s){var o=e._getPropagator(s);return o||g.warn('Propagator "'+s+'" requested through environment variable is unavailable.'),o}),a=i.reduce(function(s,o){return o&&s.push(o),s},[]);if(a.length!==0)return n.length===1?a[0]:new Ns({propagators:a})},t.prototype._buildExporterFromEnv=function(){var e=Ae().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this._getSpanExporter(e);return n||g.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t._registeredPropagators=new Map([["tracecontext",function(){return new Ps}],["baggage",function(){return new _s}]]),t._registeredExporters=new Map,t}()});var cX,fC,pC=m(()=>{"use strict";K();cX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},fC=function(){function t(){}return t.prototype.export=function(e,n){return this._sendSpans(e,n)},t.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype._exportInfo=function(e){var n;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(n=e.spanContext().traceState)===null||n===void 0?void 0:n.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:Ot(e.startTime),duration:Ot(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},t.prototype._sendSpans=function(e,n){var i,a;try{for(var s=cX(e),o=s.next();!o.done;o=s.next()){var r=o.value;console.dir(this._exportInfo(r),{depth:3})}}catch(u){i={error:u}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(n)return n({code:ee.SUCCESS})},t}()});var fX,pX,dC,EC=m(()=>{"use strict";K();fX=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},pX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))},dC=function(){function t(){this._finishedSpans=[],this._stopped=!1}return t.prototype.export=function(e,n){var i;if(this._stopped)return n({code:ee.FAILED,error:new Error("Exporter has been stopped")});(i=this._finishedSpans).push.apply(i,pX([],fX(e),!1)),setTimeout(function(){return n({code:ee.SUCCESS})},0)},t.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype.reset=function(){this._finishedSpans=[]},t.prototype.getFinishedSpans=function(){return this._finishedSpans},t}()});var dX,EX,_C,SC=m(()=>{"use strict";b();K();dX=function(t,e,n,i){function a(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function r(c){try{l(i.next(c))}catch(p){o(p)}}function u(c){try{l(i.throw(c))}catch(p){o(p)}}function l(c){c.done?s(c.value):a(c.value).then(r,u)}l((i=i.apply(t,e||[])).next())})},EX=function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(l){return function(c){return u([l,c])}}function u(l){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,a&&(s=l[0]&2?a.return:l[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,l[1])).done)return s;switch(a=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,a=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],a=0}finally{i=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},_C=function(){function t(e){this._exporter=e,this._shutdownOnce=new ur(this._shutdown,this),this._unresolvedExports=new Set}return t.prototype.forceFlush=function(){return dX(this,void 0,void 0,function(){return EX(this,function(e){switch(e.label){case 0:return[4,Promise.all(Array.from(this._unresolvedExports))];case 1:return e.sent(),this._exporter.forceFlush?[4,this._exporter.forceFlush()]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}})})},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){var n=this,i,a;if(!this._shutdownOnce.isCalled&&e.spanContext().traceFlags&J.SAMPLED){var s=function(){return oi._export(n._exporter,[e]).then(function(r){var u;r.code!==ee.SUCCESS&&he((u=r.error)!==null&&u!==void 0?u:new Error("SimpleSpanProcessor: span export failed (status "+r+")"))}).catch(function(r){he(r)})};if(e.resource.asyncAttributesPending){var o=(a=(i=e.resource).waitForAsyncAttributes)===null||a===void 0?void 0:a.call(i).then(function(){return o!=null&&n._unresolvedExports.delete(o),s()},function(r){return he(r)});o!=null&&this._unresolvedExports.add(o)}else s()}},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){return this._exporter.shutdown()},t}()});var Cd={};nt(Cd,{AlwaysOffSampler:()=>_r,AlwaysOnSampler:()=>Mt,BasicTracerProvider:()=>lC,BatchSpanProcessor:()=>Sr,ConsoleSpanExporter:()=>fC,ForceFlushState:()=>Vt,InMemorySpanExporter:()=>dC,NoopSpanProcessor:()=>al,ParentBasedSampler:()=>Kn,RandomIdGenerator:()=>zn,SamplingDecision:()=>ft,SimpleSpanProcessor:()=>_C,Span:()=>Qu,TraceIdRatioBasedSampler:()=>Oi,Tracer:()=>ol});var gi=m(()=>{"use strict";aC();cC();nl();pC();EC();SC();Id();Zu();el();Pd();bd();Ai();Rd()});var Ni=h((Xce,hC)=>{"use strict";var _X="2.0.0",SX=Number.MAX_SAFE_INTEGER||9007199254740991,hX=16,TX=250,vX=["major","premajor","minor","preminor","patch","prepatch","prerelease"];hC.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:hX,MAX_SAFE_BUILD_LENGTH:TX,MAX_SAFE_INTEGER:SX,RELEASE_TYPES:vX,SEMVER_SPEC_VERSION:_X,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ri=h((Jce,TC)=>{"use strict";var mX=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};TC.exports=mX});var Xn=h((Bt,vC)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:wd,MAX_SAFE_BUILD_LENGTH:yX,MAX_LENGTH:AX}=Ni(),OX=Ri();Bt=vC.exports={};var gX=Bt.re=[],NX=Bt.safeRe=[],R=Bt.src=[],P=Bt.t={},RX=0,Ud="[a-zA-Z0-9-]",PX=[["\\s",1],["\\d",AX],[Ud,yX]],bX=t=>{for(let[e,n]of PX)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},U=(t,e,n)=>{let i=bX(e),a=RX++;OX(t,a,e),P[t]=a,R[a]=e,gX[a]=new RegExp(e,n?"g":void 0),NX[a]=new RegExp(i,n?"g":void 0)};U("NUMERICIDENTIFIER","0|[1-9]\\d*");U("NUMERICIDENTIFIERLOOSE","\\d+");U("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ud}*`);U("MAINVERSION",`(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})`);U("MAINVERSIONLOOSE",`(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})`);U("PRERELEASEIDENTIFIER",`(?:${R[P.NUMERICIDENTIFIER]}|${R[P.NONNUMERICIDENTIFIER]})`);U("PRERELEASEIDENTIFIERLOOSE",`(?:${R[P.NUMERICIDENTIFIERLOOSE]}|${R[P.NONNUMERICIDENTIFIER]})`);U("PRERELEASE",`(?:-(${R[P.PRERELEASEIDENTIFIER]}(?:\\.${R[P.PRERELEASEIDENTIFIER]})*))`);U("PRERELEASELOOSE",`(?:-?(${R[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${R[P.PRERELEASEIDENTIFIERLOOSE]})*))`);U("BUILDIDENTIFIER",`${Ud}+`);U("BUILD",`(?:\\+(${R[P.BUILDIDENTIFIER]}(?:\\.${R[P.BUILDIDENTIFIER]})*))`);U("FULLPLAIN",`v?${R[P.MAINVERSION]}${R[P.PRERELEASE]}?${R[P.BUILD]}?`);U("FULL",`^${R[P.FULLPLAIN]}$`);U("LOOSEPLAIN",`[v=\\s]*${R[P.MAINVERSIONLOOSE]}${R[P.PRERELEASELOOSE]}?${R[P.BUILD]}?`);U("LOOSE",`^${R[P.LOOSEPLAIN]}$`);U("GTLT","((?:<|>)?=?)");U("XRANGEIDENTIFIERLOOSE",`${R[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);U("XRANGEIDENTIFIER",`${R[P.NUMERICIDENTIFIER]}|x|X|\\*`);U("XRANGEPLAIN",`[v=\\s]*(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:${R[P.PRERELEASE]})?${R[P.BUILD]}?)?)?`);U("XRANGEPLAINLOOSE",`[v=\\s]*(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:${R[P.PRERELEASELOOSE]})?${R[P.BUILD]}?)?)?`);U("XRANGE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAIN]}$`);U("XRANGELOOSE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAINLOOSE]}$`);U("COERCEPLAIN",`(^|[^\\d])(\\d{1,${wd}})(?:\\.(\\d{1,${wd}}))?(?:\\.(\\d{1,${wd}}))?`);U("COERCE",`${R[P.COERCEPLAIN]}(?:$|[^\\d])`);U("COERCEFULL",R[P.COERCEPLAIN]+`(?:${R[P.PRERELEASE]})?(?:${R[P.BUILD]})?(?:$|[^\\d])`);U("COERCERTL",R[P.COERCE],!0);U("COERCERTLFULL",R[P.COERCEFULL],!0);U("LONETILDE","(?:~>?)");U("TILDETRIM",`(\\s*)${R[P.LONETILDE]}\\s+`,!0);Bt.tildeTrimReplace="$1~";U("TILDE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAIN]}$`);U("TILDELOOSE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAINLOOSE]}$`);U("LONECARET","(?:\\^)");U("CARETTRIM",`(\\s*)${R[P.LONECARET]}\\s+`,!0);Bt.caretTrimReplace="$1^";U("CARET",`^${R[P.LONECARET]}${R[P.XRANGEPLAIN]}$`);U("CARETLOOSE",`^${R[P.LONECARET]}${R[P.XRANGEPLAINLOOSE]}$`);U("COMPARATORLOOSE",`^${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]})$|^$`);U("COMPARATOR",`^${R[P.GTLT]}\\s*(${R[P.FULLPLAIN]})$|^$`);U("COMPARATORTRIM",`(\\s*)${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]}|${R[P.XRANGEPLAIN]})`,!0);Bt.comparatorTrimReplace="$1$2$3";U("HYPHENRANGE",`^\\s*(${R[P.XRANGEPLAIN]})\\s+-\\s+(${R[P.XRANGEPLAIN]})\\s*$`);U("HYPHENRANGELOOSE",`^\\s*(${R[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${R[P.XRANGEPLAINLOOSE]})\\s*$`);U("STAR","(<|>)?=?\\s*\\*");U("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");U("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var sl=h((Qce,mC)=>{"use strict";var MX=Object.freeze({loose:!0}),xX=Object.freeze({}),LX=t=>t?typeof t!="object"?MX:t:xX;mC.exports=LX});var Dd=h((Zce,OC)=>{"use strict";var yC=/^[0-9]+$/,AC=(t,e)=>{let n=yC.test(t),i=yC.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:t<e?-1:1},IX=(t,e)=>AC(e,t);OC.exports={compareIdentifiers:AC,rcompareIdentifiers:IX}});var Me=h((efe,PC)=>{"use strict";var ul=Ri(),{MAX_LENGTH:gC,MAX_SAFE_INTEGER:ll}=Ni(),{safeRe:NC,t:RC}=Xn(),CX=sl(),{compareIdentifiers:Jn}=Dd(),Vd=class t{constructor(e,n){if(n=CX(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>gC)throw new TypeError(`version is longer than ${gC} characters`);ul("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=e.trim().match(n.loose?NC[RC.LOOSE]:NC[RC.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>ll||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ll||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ll||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let s=+a;if(s>=0&&s<ll)return s}return a}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(ul("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Jn(this.major,e.major)||Jn(this.minor,e.minor)||Jn(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],a=e.prerelease[n];if(ul("prerelease compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Jn(i,a)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let i=this.build[n],a=e.build[n];if(ul("build compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Jn(i,a)}while(++n)}inc(e,n,i){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let a=Number(i)?1:0;if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(n){let s=[n,a];i===!1&&(s=[n]),Jn(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};PC.exports=Vd});var Yr=h((tfe,MC)=>{"use strict";var bC=Me(),wX=(t,e,n=!1)=>{if(t instanceof bC)return t;try{return new bC(t,e)}catch(i){if(!n)return null;throw i}};MC.exports=wX});var LC=h((rfe,xC)=>{"use strict";var UX=Yr(),DX=(t,e)=>{let n=UX(t,e);return n?n.version:null};xC.exports=DX});var CC=h((nfe,IC)=>{"use strict";var VX=Yr(),BX=(t,e)=>{let n=VX(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};IC.exports=BX});var DC=h((ofe,UC)=>{"use strict";var wC=Me(),GX=(t,e,n,i,a)=>{typeof n=="string"&&(a=i,i=n,n=void 0);try{return new wC(t instanceof wC?t.version:t,n).inc(e,i,a).version}catch{return null}};UC.exports=GX});var GC=h((ife,BC)=>{"use strict";var VC=Yr(),kX=(t,e)=>{let n=VC(t,null,!0),i=VC(e,null,!0),a=n.compare(i);if(a===0)return null;let s=a>0,o=s?n:i,r=s?i:n,u=!!o.prerelease.length;if(!!r.prerelease.length&&!u)return!r.patch&&!r.minor?"major":o.patch?"patch":o.minor?"minor":"major";let c=u?"pre":"";return n.major!==i.major?c+"major":n.minor!==i.minor?c+"minor":n.patch!==i.patch?c+"patch":"prerelease"};BC.exports=kX});var HC=h((afe,kC)=>{"use strict";var HX=Me(),FX=(t,e)=>new HX(t,e).major;kC.exports=FX});var YC=h((sfe,FC)=>{"use strict";var YX=Me(),qX=(t,e)=>new YX(t,e).minor;FC.exports=qX});var jC=h((ufe,qC)=>{"use strict";var jX=Me(),$X=(t,e)=>new jX(t,e).patch;qC.exports=$X});var KC=h((lfe,$C)=>{"use strict";var KX=Yr(),WX=(t,e)=>{let n=KX(t,e);return n&&n.prerelease.length?n.prerelease:null};$C.exports=WX});var tt=h((cfe,zC)=>{"use strict";var WC=Me(),zX=(t,e,n)=>new WC(t,n).compare(new WC(e,n));zC.exports=zX});var JC=h((ffe,XC)=>{"use strict";var XX=tt(),JX=(t,e,n)=>XX(e,t,n);XC.exports=JX});var ZC=h((pfe,QC)=>{"use strict";var QX=tt(),ZX=(t,e)=>QX(t,e,!0);QC.exports=ZX});var cl=h((dfe,tw)=>{"use strict";var ew=Me(),eJ=(t,e,n)=>{let i=new ew(t,n),a=new ew(e,n);return i.compare(a)||i.compareBuild(a)};tw.exports=eJ});var nw=h((Efe,rw)=>{"use strict";var tJ=cl(),rJ=(t,e)=>t.sort((n,i)=>tJ(n,i,e));rw.exports=rJ});var iw=h((_fe,ow)=>{"use strict";var nJ=cl(),oJ=(t,e)=>t.sort((n,i)=>nJ(i,n,e));ow.exports=oJ});var Pi=h((Sfe,aw)=>{"use strict";var iJ=tt(),aJ=(t,e,n)=>iJ(t,e,n)>0;aw.exports=aJ});var fl=h((hfe,sw)=>{"use strict";var sJ=tt(),uJ=(t,e,n)=>sJ(t,e,n)<0;sw.exports=uJ});var Bd=h((Tfe,uw)=>{"use strict";var lJ=tt(),cJ=(t,e,n)=>lJ(t,e,n)===0;uw.exports=cJ});var Gd=h((vfe,lw)=>{"use strict";var fJ=tt(),pJ=(t,e,n)=>fJ(t,e,n)!==0;lw.exports=pJ});var pl=h((mfe,cw)=>{"use strict";var dJ=tt(),EJ=(t,e,n)=>dJ(t,e,n)>=0;cw.exports=EJ});var dl=h((yfe,fw)=>{"use strict";var _J=tt(),SJ=(t,e,n)=>_J(t,e,n)<=0;fw.exports=SJ});var kd=h((Afe,pw)=>{"use strict";var hJ=Bd(),TJ=Gd(),vJ=Pi(),mJ=pl(),yJ=fl(),AJ=dl(),OJ=(t,e,n,i)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return hJ(t,n,i);case"!=":return TJ(t,n,i);case">":return vJ(t,n,i);case">=":return mJ(t,n,i);case"<":return yJ(t,n,i);case"<=":return AJ(t,n,i);default:throw new TypeError(`Invalid operator: ${e}`)}};pw.exports=OJ});var Ew=h((Ofe,dw)=>{"use strict";var gJ=Me(),NJ=Yr(),{safeRe:El,t:_l}=Xn(),RJ=(t,e)=>{if(t instanceof gJ)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?El[_l.COERCEFULL]:El[_l.COERCE]);else{let u=e.includePrerelease?El[_l.COERCERTLFULL]:El[_l.COERCERTL],l;for(;(l=u.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||l.index+l[0].length!==n.index+n[0].length)&&(n=l),u.lastIndex=l.index+l[1].length+l[2].length;u.lastIndex=-1}if(n===null)return null;let i=n[2],a=n[3]||"0",s=n[4]||"0",o=e.includePrerelease&&n[5]?`-${n[5]}`:"",r=e.includePrerelease&&n[6]?`+${n[6]}`:"";return NJ(`${i}.${a}.${s}${o}${r}`,e)};dw.exports=RJ});var Sw=h((gfe,_w)=>{"use strict";var Hd=class{constructor(){this.max=1e3,this.map=new Map}get(e){let n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){let a=this.map.keys().next().value;this.delete(a)}this.map.set(e,n)}return this}};_w.exports=Hd});var rt=h((Nfe,mw)=>{"use strict";var Fd=class t{constructor(e,n){if(n=bJ(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof Yd)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(a=>!Tw(a[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&UJ(a[0])){this.set=[a];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let i=((this.options.includePrerelease&&CJ)|(this.options.loose&&wJ))+":"+e,a=hw.get(i);if(a)return a;let s=this.options.loose,o=s?$e[Ve.HYPHENRANGELOOSE]:$e[Ve.HYPHENRANGE];e=e.replace(o,jJ(this.options.includePrerelease)),te("hyphen replace",e),e=e.replace($e[Ve.COMPARATORTRIM],xJ),te("comparator trim",e),e=e.replace($e[Ve.TILDETRIM],LJ),te("tilde trim",e),e=e.replace($e[Ve.CARETTRIM],IJ),te("caret trim",e);let r=e.split(" ").map(p=>DJ(p,this.options)).join(" ").split(/\s+/).map(p=>qJ(p,this.options));s&&(r=r.filter(p=>(te("loose invalid filter",p,this.options),!!p.match($e[Ve.COMPARATORLOOSE])))),te("range list",r);let u=new Map,l=r.map(p=>new Yd(p,this.options));for(let p of l){if(Tw(p))return[p];u.set(p.value,p)}u.size>1&&u.has("")&&u.delete("");let c=[...u.values()];return hw.set(i,c),c}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(i=>vw(i,n)&&e.set.some(a=>vw(a,n)&&i.every(s=>a.every(o=>s.intersects(o,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new MJ(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if($J(this.set[n],e,this.options))return!0;return!1}};mw.exports=Fd;var PJ=Sw(),hw=new PJ,bJ=sl(),Yd=bi(),te=Ri(),MJ=Me(),{safeRe:$e,t:Ve,comparatorTrimReplace:xJ,tildeTrimReplace:LJ,caretTrimReplace:IJ}=Xn(),{FLAG_INCLUDE_PRERELEASE:CJ,FLAG_LOOSE:wJ}=Ni(),Tw=t=>t.value==="<0.0.0-0",UJ=t=>t.value==="",vw=(t,e)=>{let n=!0,i=t.slice(),a=i.pop();for(;n&&i.length;)n=i.every(s=>a.intersects(s,e)),a=i.pop();return n},DJ=(t,e)=>(te("comp",t,e),t=GJ(t,e),te("caret",t),t=VJ(t,e),te("tildes",t),t=HJ(t,e),te("xrange",t),t=YJ(t,e),te("stars",t),t),Be=t=>!t||t.toLowerCase()==="x"||t==="*",VJ=(t,e)=>t.trim().split(/\s+/).map(n=>BJ(n,e)).join(" "),BJ=(t,e)=>{let n=e.loose?$e[Ve.TILDELOOSE]:$e[Ve.TILDE];return t.replace(n,(i,a,s,o,r)=>{te("tilde",t,i,a,s,o,r);let u;return Be(a)?u="":Be(s)?u=`>=${a}.0.0 <${+a+1}.0.0-0`:Be(o)?u=`>=${a}.${s}.0 <${a}.${+s+1}.0-0`:r?(te("replaceTilde pr",r),u=`>=${a}.${s}.${o}-${r} <${a}.${+s+1}.0-0`):u=`>=${a}.${s}.${o} <${a}.${+s+1}.0-0`,te("tilde return",u),u})},GJ=(t,e)=>t.trim().split(/\s+/).map(n=>kJ(n,e)).join(" "),kJ=(t,e)=>{te("caret",t,e);let n=e.loose?$e[Ve.CARETLOOSE]:$e[Ve.CARET],i=e.includePrerelease?"-0":"";return t.replace(n,(a,s,o,r,u)=>{te("caret",t,a,s,o,r,u);let l;return Be(s)?l="":Be(o)?l=`>=${s}.0.0${i} <${+s+1}.0.0-0`:Be(r)?s==="0"?l=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:u?(te("replaceCaret pr",u),s==="0"?o==="0"?l=`>=${s}.${o}.${r}-${u} <${s}.${o}.${+r+1}-0`:l=`>=${s}.${o}.${r}-${u} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${r}-${u} <${+s+1}.0.0-0`):(te("no pr"),s==="0"?o==="0"?l=`>=${s}.${o}.${r}${i} <${s}.${o}.${+r+1}-0`:l=`>=${s}.${o}.${r}${i} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${r} <${+s+1}.0.0-0`),te("caret return",l),l})},HJ=(t,e)=>(te("replaceXRanges",t,e),t.split(/\s+/).map(n=>FJ(n,e)).join(" ")),FJ=(t,e)=>{t=t.trim();let n=e.loose?$e[Ve.XRANGELOOSE]:$e[Ve.XRANGE];return t.replace(n,(i,a,s,o,r,u)=>{te("xRange",t,i,a,s,o,r,u);let l=Be(s),c=l||Be(o),p=c||Be(r),_=p;return a==="="&&_&&(a=""),u=e.includePrerelease?"-0":"",l?a===">"||a==="<"?i="<0.0.0-0":i="*":a&&_?(c&&(o=0),r=0,a===">"?(a=">=",c?(s=+s+1,o=0,r=0):(o=+o+1,r=0)):a==="<="&&(a="<",c?s=+s+1:o=+o+1),a==="<"&&(u="-0"),i=`${a+s}.${o}.${r}${u}`):c?i=`>=${s}.0.0${u} <${+s+1}.0.0-0`:p&&(i=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`),te("xRange return",i),i})},YJ=(t,e)=>(te("replaceStars",t,e),t.trim().replace($e[Ve.STAR],"")),qJ=(t,e)=>(te("replaceGTE0",t,e),t.trim().replace($e[e.includePrerelease?Ve.GTE0PRE:Ve.GTE0],"")),jJ=t=>(e,n,i,a,s,o,r,u,l,c,p,_)=>(Be(i)?n="":Be(a)?n=`>=${i}.0.0${t?"-0":""}`:Be(s)?n=`>=${i}.${a}.0${t?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,Be(l)?u="":Be(c)?u=`<${+l+1}.0.0-0`:Be(p)?u=`<${l}.${+c+1}.0-0`:_?u=`<=${l}.${c}.${p}-${_}`:t?u=`<${l}.${c}.${+p+1}-0`:u=`<=${u}`,`${n} ${u}`.trim()),$J=(t,e,n)=>{for(let i=0;i<t.length;i++)if(!t[i].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let i=0;i<t.length;i++)if(te(t[i].semver),t[i].semver!==Yd.ANY&&t[i].semver.prerelease.length>0){let a=t[i].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var bi=h((Rfe,Rw)=>{"use strict";var Mi=Symbol("SemVer ANY"),$d=class t{static get ANY(){return Mi}constructor(e,n){if(n=yw(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),jd("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===Mi?this.value="":this.value=this.operator+this.semver.version,jd("comp",this)}parse(e){let n=this.options.loose?Aw[Ow.COMPARATORLOOSE]:Aw[Ow.COMPARATOR],i=e.match(n);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new gw(i[2],this.options.loose):this.semver=Mi}toString(){return this.value}test(e){if(jd("Comparator.test",e,this.options.loose),this.semver===Mi||e===Mi)return!0;if(typeof e=="string")try{e=new gw(e,this.options)}catch{return!1}return qd(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Nw(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new Nw(this.value,n).test(e.semver):(n=yw(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||qd(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||qd(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Rw.exports=$d;var yw=sl(),{safeRe:Aw,t:Ow}=Xn(),qd=kd(),jd=Ri(),gw=Me(),Nw=rt()});var xi=h((Pfe,Pw)=>{"use strict";var KJ=rt(),WJ=(t,e,n)=>{try{e=new KJ(e,n)}catch{return!1}return e.test(t)};Pw.exports=WJ});var Mw=h((bfe,bw)=>{"use strict";var zJ=rt(),XJ=(t,e)=>new zJ(t,e).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));bw.exports=XJ});var Lw=h((Mfe,xw)=>{"use strict";var JJ=Me(),QJ=rt(),ZJ=(t,e,n)=>{let i=null,a=null,s=null;try{s=new QJ(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!i||a.compare(o)===-1)&&(i=o,a=new JJ(i,n))}),i};xw.exports=ZJ});var Cw=h((xfe,Iw)=>{"use strict";var e9=Me(),t9=rt(),r9=(t,e,n)=>{let i=null,a=null,s=null;try{s=new t9(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!i||a.compare(o)===1)&&(i=o,a=new e9(i,n))}),i};Iw.exports=r9});var Dw=h((Lfe,Uw)=>{"use strict";var Kd=Me(),n9=rt(),ww=Pi(),o9=(t,e)=>{t=new n9(t,e);let n=new Kd("0.0.0");if(t.test(n)||(n=new Kd("0.0.0-0"),t.test(n)))return n;n=null;for(let i=0;i<t.set.length;++i){let a=t.set[i],s=null;a.forEach(o=>{let r=new Kd(o.semver.version);switch(o.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!s||ww(r,s))&&(s=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!n||ww(n,s))&&(n=s)}return n&&t.test(n)?n:null};Uw.exports=o9});var Bw=h((Ife,Vw)=>{"use strict";var i9=rt(),a9=(t,e)=>{try{return new i9(t,e).range||"*"}catch{return null}};Vw.exports=a9});var Sl=h((Cfe,Fw)=>{"use strict";var s9=Me(),Hw=bi(),{ANY:u9}=Hw,l9=rt(),c9=xi(),Gw=Pi(),kw=fl(),f9=dl(),p9=pl(),d9=(t,e,n,i)=>{t=new s9(t,i),e=new l9(e,i);let a,s,o,r,u;switch(n){case">":a=Gw,s=f9,o=kw,r=">",u=">=";break;case"<":a=kw,s=p9,o=Gw,r="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(c9(t,e,i))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],p=null,_=null;if(c.forEach(f=>{f.semver===u9&&(f=new Hw(">=0.0.0")),p=p||f,_=_||f,a(f.semver,p.semver,i)?p=f:o(f.semver,_.semver,i)&&(_=f)}),p.operator===r||p.operator===u||(!_.operator||_.operator===r)&&s(t,_.semver))return!1;if(_.operator===u&&o(t,_.semver))return!1}return!0};Fw.exports=d9});var qw=h((wfe,Yw)=>{"use strict";var E9=Sl(),_9=(t,e,n)=>E9(t,e,">",n);Yw.exports=_9});var $w=h((Ufe,jw)=>{"use strict";var S9=Sl(),h9=(t,e,n)=>S9(t,e,"<",n);jw.exports=h9});var zw=h((Dfe,Ww)=>{"use strict";var Kw=rt(),T9=(t,e,n)=>(t=new Kw(t,n),e=new Kw(e,n),t.intersects(e,n));Ww.exports=T9});var Jw=h((Vfe,Xw)=>{"use strict";var v9=xi(),m9=tt();Xw.exports=(t,e,n)=>{let i=[],a=null,s=null,o=t.sort((c,p)=>m9(c,p,n));for(let c of o)v9(c,e,n)?(s=c,a||(a=c)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let r=[];for(let[c,p]of i)c===p?r.push(c):!p&&c===o[0]?r.push("*"):p?c===o[0]?r.push(`<=${p}`):r.push(`${c} - ${p}`):r.push(`>=${c}`);let u=r.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e}});var nU=h((Bfe,rU)=>{"use strict";var Qw=rt(),zd=bi(),{ANY:Wd}=zd,Li=xi(),Xd=tt(),y9=(t,e,n={})=>{if(t===e)return!0;t=new Qw(t,n),e=new Qw(e,n);let i=!1;e:for(let a of t.set){for(let s of e.set){let o=O9(a,s,n);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},A9=[new zd(">=0.0.0-0")],Zw=[new zd(">=0.0.0")],O9=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Wd){if(e.length===1&&e[0].semver===Wd)return!0;n.includePrerelease?t=A9:t=Zw}if(e.length===1&&e[0].semver===Wd){if(n.includePrerelease)return!0;e=Zw}let i=new Set,a,s;for(let f of t)f.operator===">"||f.operator===">="?a=eU(a,f,n):f.operator==="<"||f.operator==="<="?s=tU(s,f,n):i.add(f.semver);if(i.size>1)return null;let o;if(a&&s){if(o=Xd(a.semver,s.semver,n),o>0)return null;if(o===0&&(a.operator!==">="||s.operator!=="<="))return null}for(let f of i){if(a&&!Li(f,String(a),n)||s&&!Li(f,String(s),n))return null;for(let S of e)if(!Li(f,String(S),n))return!1;return!0}let r,u,l,c,p=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1,_=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let f of e){if(c=c||f.operator===">"||f.operator===">=",l=l||f.operator==="<"||f.operator==="<=",a){if(_&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===_.major&&f.semver.minor===_.minor&&f.semver.patch===_.patch&&(_=!1),f.operator===">"||f.operator===">="){if(r=eU(a,f,n),r===f&&r!==a)return!1}else if(a.operator===">="&&!Li(a.semver,String(f),n))return!1}if(s){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator==="<"||f.operator==="<="){if(u=tU(s,f,n),u===f&&u!==s)return!1}else if(s.operator==="<="&&!Li(s.semver,String(f),n))return!1}if(!f.operator&&(s||a)&&o!==0)return!1}return!(a&&l&&!s&&o!==0||s&&c&&!a&&o!==0||_||p)},eU=(t,e,n)=>{if(!t)return e;let i=Xd(t.semver,e.semver,n);return i>0?t:i<0||e.operator===">"&&t.operator===">="?e:t},tU=(t,e,n)=>{if(!t)return e;let i=Xd(t.semver,e.semver,n);return i<0?t:i>0||e.operator==="<"&&t.operator==="<="?e:t};rU.exports=y9});var sU=h((Gfe,aU)=>{"use strict";var Jd=Xn(),oU=Ni(),g9=Me(),iU=Dd(),N9=Yr(),R9=LC(),P9=CC(),b9=DC(),M9=GC(),x9=HC(),L9=YC(),I9=jC(),C9=KC(),w9=tt(),U9=JC(),D9=ZC(),V9=cl(),B9=nw(),G9=iw(),k9=Pi(),H9=fl(),F9=Bd(),Y9=Gd(),q9=pl(),j9=dl(),$9=kd(),K9=Ew(),W9=bi(),z9=rt(),X9=xi(),J9=Mw(),Q9=Lw(),Z9=Cw(),e7=Dw(),t7=Bw(),r7=Sl(),n7=qw(),o7=$w(),i7=zw(),a7=Jw(),s7=nU();aU.exports={parse:N9,valid:R9,clean:P9,inc:b9,diff:M9,major:x9,minor:L9,patch:I9,prerelease:C9,compare:w9,rcompare:U9,compareLoose:D9,compareBuild:V9,sort:B9,rsort:G9,gt:k9,lt:H9,eq:F9,neq:Y9,gte:q9,lte:j9,cmp:$9,coerce:K9,Comparator:W9,Range:z9,satisfies:X9,toComparators:J9,maxSatisfying:Q9,minSatisfying:Z9,minVersion:e7,validRange:t7,outside:r7,gtr:n7,ltr:o7,intersects:i7,simplifyRange:a7,subset:s7,SemVer:g9,re:Jd.re,src:Jd.src,tokens:Jd.t,SEMVER_SPEC_VERSION:oU.SEMVER_SPEC_VERSION,RELEASE_TYPES:oU.RELEASE_TYPES,compareIdentifiers:iU.compareIdentifiers,rcompareIdentifiers:iU.rcompareIdentifiers}});function l7(t){var e=decodeURIComponent(t).split(":");if(e.length!==4)return null;var n=lU(e,4),i=n[0],a=n[1],s=n[3],o=i.padStart(32,"0"),r=a.padStart(16,"0"),u=u7.test(s)?parseInt(s,16)&1:1;return{traceId:o,spanId:r,isRemote:!0,traceFlags:u}}var uU,lU,Qd,hl,cU,u7,fU=m(()=>{"use strict";b();K();uU=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},lU=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},Qd="uber-trace-id",hl="uberctx",cU=function(){function t(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=hl):(this._jaegerTraceHeader=e?.customTraceHeader||Qd,this._jaegerBaggageHeaderPrefix=e?.customBaggageHeaderPrefix||hl)}return t.prototype.inject=function(e,n,i){var a,s,o=X.getSpanContext(e),r=it.getBaggage(e);if(o&&be(e)===!1){var u="0"+(o.traceFlags||J.NONE).toString(16);i.set(n,this._jaegerTraceHeader,o.traceId+":"+o.spanId+":0:"+u)}if(r)try{for(var l=uU(r.getAllEntries()),c=l.next();!c.done;c=l.next()){var p=lU(c.value,2),_=p[0],f=p[1];i.set(n,this._jaegerBaggageHeaderPrefix+"-"+_,encodeURIComponent(f.value))}}catch(S){a={error:S}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}},t.prototype.extract=function(e,n,i){var a,s,o=this,r,u=i.get(n,this._jaegerTraceHeader),l=Array.isArray(u)?u[0]:u,c=i.keys(n).filter(function(A){return A.startsWith(o._jaegerBaggageHeaderPrefix+"-")}).map(function(A){var O=i.get(n,A);return{key:A.substring(o._jaegerBaggageHeaderPrefix.length+1),value:Array.isArray(O)?O[0]:O}}),p=e;if(typeof l=="string"){var _=l7(l);_&&(p=X.setSpanContext(p,_))}if(c.length===0)return p;var f=(r=it.getBaggage(e))!==null&&r!==void 0?r:it.createBaggage();try{for(var S=uU(c),v=S.next();!v.done;v=S.next()){var T=v.value;T.value!==void 0&&(f=f.setEntry(T.key,{value:decodeURIComponent(T.value)}))}}catch(A){a={error:A}}finally{try{v&&!v.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}return p=it.setBaggage(p,f),p},t.prototype.fields=function(){return[this._jaegerTraceHeader]},t}(),u7=/^[0-9a-f]{1,2}$/i});var pU={};nt(pU,{JaegerPropagator:()=>cU,UBER_BAGGAGE_HEADER_PREFIX:()=>hl,UBER_TRACE_ID_HEADER:()=>Qd});var dU=m(()=>{"use strict";fU()});var SU=h(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.NodeTracerProvider=void 0;var EU=VI(),Tl=($I(),Y(jI)),_U=(gi(),Y(Cd)),c7=sU(),f7=(dU(),Y(pU)),vl=class extends _U.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let n=c7.gte(process.version,"14.8.0")?EU.AsyncLocalStorageContextManager:EU.AsyncHooksContextManager;e.contextManager=new n,e.contextManager.enable()}super.register(e)}};ml.NodeTracerProvider=vl;vl._registeredPropagators=new Map([..._U.BasicTracerProvider._registeredPropagators,["b3",()=>new Tl.B3Propagator({injectEncoding:Tl.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new Tl.B3Propagator({injectEncoding:Tl.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new f7.JaegerPropagator]])});var hU=h(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.Tracer=q.TraceIdRatioBasedSampler=q.Span=q.SimpleSpanProcessor=q.SamplingDecision=q.RandomIdGenerator=q.ParentBasedSampler=q.NoopSpanProcessor=q.InMemorySpanExporter=q.ForceFlushState=q.ConsoleSpanExporter=q.BatchSpanProcessor=q.BasicTracerProvider=q.AlwaysOnSampler=q.AlwaysOffSampler=q.NodeTracerProvider=void 0;var p7=SU();Object.defineProperty(q,"NodeTracerProvider",{enumerable:!0,get:function(){return p7.NodeTracerProvider}});var Ge=(gi(),Y(Cd));Object.defineProperty(q,"AlwaysOffSampler",{enumerable:!0,get:function(){return Ge.AlwaysOffSampler}});Object.defineProperty(q,"AlwaysOnSampler",{enumerable:!0,get:function(){return Ge.AlwaysOnSampler}});Object.defineProperty(q,"BasicTracerProvider",{enumerable:!0,get:function(){return Ge.BasicTracerProvider}});Object.defineProperty(q,"BatchSpanProcessor",{enumerable:!0,get:function(){return Ge.BatchSpanProcessor}});Object.defineProperty(q,"ConsoleSpanExporter",{enumerable:!0,get:function(){return Ge.ConsoleSpanExporter}});Object.defineProperty(q,"ForceFlushState",{enumerable:!0,get:function(){return Ge.ForceFlushState}});Object.defineProperty(q,"InMemorySpanExporter",{enumerable:!0,get:function(){return Ge.InMemorySpanExporter}});Object.defineProperty(q,"NoopSpanProcessor",{enumerable:!0,get:function(){return Ge.NoopSpanProcessor}});Object.defineProperty(q,"ParentBasedSampler",{enumerable:!0,get:function(){return Ge.ParentBasedSampler}});Object.defineProperty(q,"RandomIdGenerator",{enumerable:!0,get:function(){return Ge.RandomIdGenerator}});Object.defineProperty(q,"SamplingDecision",{enumerable:!0,get:function(){return Ge.SamplingDecision}});Object.defineProperty(q,"SimpleSpanProcessor",{enumerable:!0,get:function(){return Ge.SimpleSpanProcessor}});Object.defineProperty(q,"Span",{enumerable:!0,get:function(){return Ge.Span}});Object.defineProperty(q,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return Ge.TraceIdRatioBasedSampler}});Object.defineProperty(q,"Tracer",{enumerable:!0,get:function(){return Ge.Tracer}})});var TU=h(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.OTLPTraceExporter=void 0;var d7=fd(),E7=(Cu(),Y(id)),Zd=class extends d7.OTLPGRPCExporterNodeBase{constructor(e={}){super(e,E7.ProtobufTraceSerializer,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export","TRACES")}};yl.OTLPTraceExporter=Zd});var vU=h(qr=>{"use strict";var _7=qr&&qr.__createBinding||(Object.create?function(t,e,n,i){i===void 0&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]}),S7=qr&&qr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&_7(e,t,n)};Object.defineProperty(qr,"__esModule",{value:!0});S7(TU(),qr)});var NU=Ke(kl(),1),RU=Ke(Zn(),1),PU=Ke(_S(),1),bU=Ke(wU(),1),MU=Ke(UU(),1),xU=Ke(YO(),1);import T7 from"path";import v7 from"http";import{Session as m7}from"node:inspector/promises";import{createRequire as nY}from"module";var nc=Ke(kl(),1);import Qi from"path";import rc from"os";var oY=nY(import.meta.url);function qO(t){let e=oY.resolve(t),n=Qi.dirname(e);for(;!nc.default.existsSync(Qi.join(n,"package.json"));)n=Qi.dirname(n);let i=nc.default.readFileSync(Qi.join(n,"package.json"),"utf-8");return JSON.parse(i)}var Zi=class{constructor(e){this.instance=e;let n=qO("@sentio/sdk"),i=qO("@sentio/runtime");console.log("Runtime version:",i.version,"SDK version:",n.version);let a=n.version.split(".");this.sdkMinorVersion=parseInt(a[1])}instance;sdkMinorVersion;async getConfig(e,n){let i=await this.instance.getConfig(e,n);if(i.executionConfig=rE.fromPartial(Nl.execution),i.contractConfigs)for(let a of i.contractConfigs)a.aptosCallConfigs&&(a.moveCallConfigs=a.aptosCallConfigs),a.aptosEventConfigs&&(a.moveEventConfigs=a.aptosEventConfigs);return i}async start(e,n){return await this.instance.start(e,n)}async stop(e,n){return await this.instance.stop(e,n)}async processBindings(e,n){Nl.execution.sequential&&(e.bindings=e.bindings.sort(iY));for(let i of e.bindings)this.adjustDataBinding(i);try{let i=await this.instance.processBindings(e,n);return this.adjustResult(i.result),!i.configUpdated&&i.result?.states?.configUpdated&&(i.configUpdated=i.result?.states?.configUpdated),i}catch(i){throw this.sdkMinorVersion<=16&&(i.code===rc.constants.errno.ECONNRESET||i.code===rc.constants.errno.ECONNREFUSED||i.code===rc.constants.errno.ECONNABORTED)&&process.exit(1),i}}async*processBindingsStream(e,n){yield*this.instance.processBindingsStream(e,n)}async*preprocessBindingsStream(e,n){yield*this.instance.preprocessBindingsStream(e,n)}adjustResult(e){}adjustDataBinding(e){switch(e.handlerType){case 6:e.data?.aptEvent&&e.data.aptEvent.rawTransaction&&!e.data.aptEvent.transaction&&(e.data.aptEvent.transaction=JSON.parse(e.data.aptEvent.rawTransaction));break;case 7:e.data?.aptCall&&e.data.aptCall.rawTransaction&&!e.data.aptCall.transaction&&(e.data.aptCall.transaction=JSON.parse(e.data.aptCall.rawTransaction));break;case 8:e.data?.aptResource?.resources&&e.data.aptResource.rawResources&&e.data.aptResource.rawResources.length>0&&(e.data.aptResource.resources=e.data.aptResource.rawResources.map(n=>JSON.parse(n)));break;case 0:e.data?.ethBlock&&e.data.raw.length===0&&(e.data.raw=new TextEncoder().encode(JSON.stringify(e.data.ethBlock.block)));break;default:break}}};function iY(t,e){let n=jO(t)||new Date(0),i=jO(e)||new Date(0),a=n.getTime()-i.getTime();return a!==0?a:$O(t)-$O(e)}function jO(t){return t.data?.ethLog?.timestamp||t.data?.ethTransaction?.timestamp||(t.data?.ethBlock?.block?.timestamp?new Date(Number(t.data.ethBlock.block.timestamp)*1e3):void 0)||t.data?.ethTrace?.timestamp||(t.data?.aptCall?.transaction?new Date(Number(t.data.aptCall.transaction.timestamp)/1e3):void 0)||(t.data?.aptEvent?.transaction?new Date(Number(t.data.aptEvent.transaction.timestamp)/1e3):void 0)||(t.data?.aptResource?.timestampMicros?new Date(Number(t.data.aptResource.timestampMicros)/1e3):void 0)||t.data?.fuelCall?.timestamp}function $O(t){return t.data?.ethLog?.log?.logIndex||t.data?.ethTransaction?.transaction?.transactionIndex||t.data?.ethBlock?.block?.number||t.data?.ethTrace?.trace?.transactionPosition}import("node:process").then(t=>t.stdout.write(""));var At=Ke(a0(),1);function s0(t){let e=[],n=JSON.stringify(t,function(i,a){if(typeof a=="object"&&a!==null){if(e.indexOf(a)!==-1)return;e.push(a)}return a});return e=[],n}function u0(t,e){let n={transform:a=>{let s=[];typeof a.message=="object"?s.push(s0(a.message)):s.push(a.message);let o=a[Symbol.for("splat")];if(o)for(let r in o){let u=o[r];typeof u=="object"?s.push(s0(u)):s.push(u)}return a.message=s.join(" "),a}},i=(0,At.createLogger)({format:At.format.combine(At.format.timestamp({format:"YYYY-MM-DDTHH:mm:ss.SSSZ"}),n,At.format.errors({stack:!0}),t?At.format.json():At.format.simple()),level:e?"debug":"info",transports:[new At.transports.Console]});console.log=(...a)=>i.info.call(i,...a),console.info=(...a)=>i.info.call(i,...a),console.warn=(...a)=>i.warn.call(i,...a),console.error=(...a)=>i.error.call(i,...a),console.debug=(...a)=>i.debug.call(i,...a)}import("node:process").then(t=>t.stdout.write(""));Us();xn();var mU=Ke(xI(),1),yU=Ke(wI(),1),eE=Ke(hU(),1),AU=Ke(vU(),1);gi();b();async function OU(t){t&&g.setLogger(new sE,ot.DEBUG);let e=await ws.detect(),n=new pi({resource:e,readers:[new Js({exporter:new mU.OTLPMetricExporter}),new yU.PrometheusExporter({port:4041})]}),i=new eE.NodeTracerProvider({resource:e}),a=new AU.OTLPTraceExporter,s=new Sr(a);i.addSpanProcessor(s),Ci.setGlobalMeterProvider(n),X.setGlobalTracerProvider(i),["SIGINT","SIGTERM"].forEach(o=>{process.on(o,()=>h7())}),Ci.getMeter("processor").createGauge("up").record(1)}async function h7(){let t=X.getTracerProvider();if(t instanceof cE){let n=t.getDelegate();n instanceof eE.NodeTracerProvider&&n.shutdown().catch(console.error)}let e=Ci.getMeterProvider();e instanceof pi&&e.shutdown().catch(console.error)}import("node:process").then(t=>t.stdout.write(""));var Al=class{constructor(e){this.loader=e}async listen(e){let n=Ol.INSTANCE;await this.loader(),await n.configure(tE.create()),console.log("Starting Action Server at:",e),await n.startServer(e)}forceShutdown(){Ol.INSTANCE.shutdown()}};import("node:process").then(t=>t.stdout.write(""));var y7=[{name:"target",type:String,defaultOption:!0},{name:"port",alias:"p",type:String,defaultValue:"4000"},{name:"concurrency",type:Number,defaultValue:4},{name:"batch-count",type:Number,defaultValue:1},{name:"chains-config",alias:"c",type:String,defaultValue:"chains-config.json"},{name:"chainquery-server",type:String,defaultValue:""},{name:"pricefeed-server",type:String,defaultValue:""},{name:"log-format",type:String,defaultValue:"console"},{name:"debug",type:Boolean,defaultValue:!1},{name:"start-action-server",type:Boolean,defaultValue:!1}],ke=(0,PU.default)(y7,{partial:!0}),A7=process.env.LOG_LEVEL?.toUpperCase();u0(ke["log-format"]==="json",A7==="debug"?!0:ke.debug);console.debug("Starting with",ke.target);await OU(ke.debug);Error.stackTraceLimit=20;var O7=T7.resolve(ke["chains-config"]),g7=NU.default.readJsonSync(O7),N7=process.env.OVERRIDE_CONCURRENCY?parseInt(process.env.OVERRIDE_CONCURRENCY):void 0,R7=process.env.OVERRIDE_BATCH_COUNT?parseInt(process.env.OVERRIDE_BATCH_COUNT):void 0;hr.INSTANCE.concurrency=N7??ke.concurrency;hr.INSTANCE.batchCount=R7??ke["batch-count"];hr.INSTANCE.chainQueryAPI=ke["chainquery-server"];hr.INSTANCE.priceFeedAPI=ke["pricefeed-server"];for(let[t,e]of Object.entries(g7)){let n=e;if(n.ChainServer)hr.INSTANCE.chainServer.set(t,n.ChainServer);else{let i=n.Https?.[0];i?hr.INSTANCE.chainServer.set(t,i):console.error("not valid config for chain",t)}}console.debug("Starting Server",ke);var jr,Qn,gU=async()=>{let t=await import(ke.target);return console.debug("Module loaded",t),t};if(ke["start-action-server"])jr=new Al(gU),jr.listen(ke.port);else{jr=(0,bU.createServer)({"grpc.max_send_message_length":384*1024*1024,"grpc.max_receive_message_length":384*1024*1024,"grpc.default_compression_algorithm":RU.compressionAlgorithms.gzip}).use((0,xU.openTelemetryServerMiddleware)()).use(MU.errorDetailsServerMiddleware),Qn=new dE(gU,jr.shutdown);let t=new Zi(Qn);jr.add(nE,t),jr.listen("0.0.0.0:"+ke.port),console.log("Processor Server Started at:",ke.port)}var LU=4040,P7=v7.createServer(async function(t,e){if(t.url){let n=new URL(t.url,`http://${t.headers.host}`),i=n.searchParams;switch(n.pathname){case"/profile":{try{let a=parseInt(i.get("t")||"1000",10)||1e3,s=new m7;s.connect(),await s.post("Profiler.enable"),await s.post("Profiler.start"),await new Promise(r=>setTimeout(r,a));let{profile:o}=await s.post("Profiler.stop");e.writeHead(200,{"Content-Type":"application/json"}),e.write(JSON.stringify(o)),s.disconnect()}catch{e.writeHead(500)}break}default:e.writeHead(404)}}else e.writeHead(404);e.end()}).listen(LU);console.log("Metric Server Started at:",LU);process.on("SIGINT",function(){b7(0)}).on("uncaughtException",t=>{console.error("Uncaught Exception, please checking if await is properly used",t),Qn&&(Qn.unhandled=t)}).on("unhandledRejection",(t,e)=>{t?.message.startsWith('invalid ENS name (disallowed character: "*"')||(console.error("Unhandled Rejection, please checking if await is properly",t),Qn&&(Qn.unhandled=t))});function b7(t){jr?.forceShutdown(),console.log("RPC server shut down"),P7.close(function(){console.log("Http server shut down"),process.exit(t)})}import("node:process").then(t=>t.stdout.write(""));
|
59
|
+
`}};qu.PrometheusSerializer=Sd});var CI=h($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.PrometheusExporter=void 0;var mi=(b(),Y(Re)),bz=(K(),Y(Is)),Td=(xn(),Y(Yp)),Mz=L("http"),xz=hd(),Lz=L("url"),ju=class t extends Td.MetricReader{constructor(e={},n=()=>{}){super({aggregationSelector:i=>Td.Aggregation.Default(),aggregationTemporalitySelector:i=>Td.AggregationTemporality.CUMULATIVE,metricProducers:e.metricProducers}),this._requestHandler=(i,a)=>{i.url!=null&&new Lz.URL(i.url,this._baseUrl).pathname===this._endpoint?this._exportMetrics(a):this._notFound(a)},this._exportMetrics=i=>{i.statusCode=200,i.setHeader("content-type","text/plain"),this.collect().then(a=>{let{resourceMetrics:s,errors:o}=a;o.length&&mi.diag.error("PrometheusExporter: metrics collection errors",...o),i.end(this._serializer.serialize(s))},a=>{i.end(`# failed to export metrics: ${a}`)})},this._notFound=i=>{i.statusCode=404,i.end()},this._host=e.host||process.env.OTEL_EXPORTER_PROMETHEUS_HOST||t.DEFAULT_OPTIONS.host,this._port=e.port||Number(process.env.OTEL_EXPORTER_PROMETHEUS_PORT)||t.DEFAULT_OPTIONS.port,this._prefix=e.prefix||t.DEFAULT_OPTIONS.prefix,this._appendTimestamp=typeof e.appendTimestamp=="boolean"?e.appendTimestamp:t.DEFAULT_OPTIONS.appendTimestamp,this._server=(0,Mz.createServer)(this._requestHandler).unref(),this._serializer=new xz.PrometheusSerializer(this._prefix,this._appendTimestamp),this._baseUrl=`http://${this._host}:${this._port}/`,this._endpoint=(e.endpoint||t.DEFAULT_OPTIONS.endpoint).replace(/^([^/])/,"/$1"),e.preventServerStart!==!0?this.startServer().then(n,i=>{mi.diag.error(i),n(i)}):n&&queueMicrotask(n)}async onForceFlush(){}onShutdown(){return this.stopServer()}stopServer(){return this._server?new Promise(e=>{this._server.close(n=>{n?n.code!=="ERR_SERVER_NOT_RUNNING"&&(0,bz.globalErrorHandler)(n):mi.diag.debug("Prometheus exporter was stopped"),e()})}):(mi.diag.debug("Prometheus stopServer() was called but server was never started."),Promise.resolve())}startServer(){var e;return(e=this._startServerPromise)!==null&&e!==void 0||(this._startServerPromise=new Promise((n,i)=>{this._server.once("error",i),this._server.listen({port:this._port,host:this._host},()=>{mi.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),n()})})),this._startServerPromise}getMetricsRequestHandler(e,n){this._exportMetrics(n)}};$u.PrometheusExporter=ju;ju.DEFAULT_OPTIONS={host:void 0,port:9464,endpoint:"/metrics",prefix:"",appendTimestamp:!1}});var wI=h(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.PrometheusSerializer=Gn.PrometheusExporter=void 0;var Iz=CI();Object.defineProperty(Gn,"PrometheusExporter",{enumerable:!0,get:function(){return Iz.PrometheusExporter}});var Cz=hd();Object.defineProperty(Gn,"PrometheusSerializer",{enumerable:!0,get:function(){return Cz.PrometheusSerializer}})});var md=h(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.AbstractAsyncHooksContextManager=void 0;var wz=L("events"),Uz=["addListener","on","once","prependListener","prependOnceListener"],vd=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,n){return n instanceof wz.EventEmitter?this._bindEventEmitter(e,n):typeof n=="function"?this._bindFunction(e,n):n}_bindFunction(e,n){let i=this,a=function(...s){return i.with(e,()=>n.apply(this,s))};return Object.defineProperty(a,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),a}_bindEventEmitter(e,n){return this._getPatchMap(n)!==void 0||(this._createPatchMap(n),Uz.forEach(a=>{n[a]!==void 0&&(n[a]=this._patchAddListener(n,n[a],e))}),typeof n.removeListener=="function"&&(n.removeListener=this._patchRemoveListener(n,n.removeListener)),typeof n.off=="function"&&(n.off=this._patchRemoveListener(n,n.off)),typeof n.removeAllListeners=="function"&&(n.removeAllListeners=this._patchRemoveAllListeners(n,n.removeAllListeners))),n}_patchRemoveListener(e,n){let i=this;return function(a,s){var o;let r=(o=i._getPatchMap(e))===null||o===void 0?void 0:o[a];if(r===void 0)return n.call(this,a,s);let u=r.get(s);return n.call(this,a,u||s)}}_patchRemoveAllListeners(e,n){let i=this;return function(a){let s=i._getPatchMap(e);return s!==void 0&&(arguments.length===0?i._createPatchMap(e):s[a]!==void 0&&delete s[a]),n.apply(this,arguments)}}_patchAddListener(e,n,i){let a=this;return function(s,o){if(a._wrapped)return n.call(this,s,o);let r=a._getPatchMap(e);r===void 0&&(r=a._createPatchMap(e));let u=r[s];u===void 0&&(u=new WeakMap,r[s]=u);let l=a.bind(i,o);u.set(o,l),a._wrapped=!0;try{return n.call(this,s,l)}finally{a._wrapped=!1}}}_createPatchMap(e){let n=Object.create(null);return e[this._kOtListeners]=n,n}_getPatchMap(e){return e[this._kOtListeners]}};Ku.AbstractAsyncHooksContextManager=vd});var UI=h(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});Wu.AsyncHooksContextManager=void 0;var Dz=(b(),Y(Re)),Vz=L("async_hooks"),Bz=md(),yd=class extends Bz.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=Vz.createHook({init:this._init.bind(this),before:this._before.bind(this),after:this._after.bind(this),destroy:this._destroy.bind(this),promiseResolve:this._destroy.bind(this)})}active(){var e;return(e=this._stack[this._stack.length-1])!==null&&e!==void 0?e:Dz.ROOT_CONTEXT}with(e,n,i,...a){this._enterContext(e);try{return n.call(i,...a)}finally{this._exitContext()}}enable(){return this._asyncHook.enable(),this}disable(){return this._asyncHook.disable(),this._contexts.clear(),this._stack=[],this}_init(e,n){if(n==="TIMERWRAP")return;let i=this._stack[this._stack.length-1];i!==void 0&&this._contexts.set(e,i)}_destroy(e){this._contexts.delete(e)}_before(e){let n=this._contexts.get(e);n!==void 0&&this._enterContext(n)}_after(){this._exitContext()}_enterContext(e){this._stack.push(e)}_exitContext(){this._stack.pop()}};Wu.AsyncHooksContextManager=yd});var DI=h(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});zu.AsyncLocalStorageContextManager=void 0;var Gz=(b(),Y(Re)),kz=L("async_hooks"),Hz=md(),Ad=class extends Hz.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new kz.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:Gz.ROOT_CONTEXT}with(e,n,i,...a){let s=i==null?n:n.bind(i);return this._asyncLocalStorage.run(e,s,...a)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};zu.AsyncLocalStorageContextManager=Ad});var VI=h(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.AsyncLocalStorageContextManager=kn.AsyncHooksContextManager=void 0;var Fz=UI();Object.defineProperty(kn,"AsyncHooksContextManager",{enumerable:!0,get:function(){return Fz.AsyncHooksContextManager}});var Yz=DI();Object.defineProperty(kn,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return Yz.AsyncLocalStorageContextManager}})});var Hn,Od=m(()=>{"use strict";b();Hn=$r("OpenTelemetry Context Key B3 Debug Flag")});var Er,Fn,Yn,qn,Xu,jn,yi=m(()=>{"use strict";Er="b3",Fn="x-b3-traceid",Yn="x-b3-spanid",qn="x-b3-sampled",Xu="x-b3-parentspanid",jn="x-b3-flags"});function $z(t){return t===J.SAMPLED||t===J.NONE}function Kz(t){return Array.isArray(t)?t[0]:t}function Ju(t,e,n){var i=e.get(t,n);return Kz(i)}function Wz(t,e){var n=Ju(t,e,Fn);return typeof n=="string"?n.padStart(32,"0"):""}function zz(t,e){var n=Ju(t,e,Yn);return typeof n=="string"?n:""}function BI(t,e){var n=Ju(t,e,jn);return n==="1"?"1":void 0}function Xz(t,e){var n=Ju(t,e,qn),i=BI(t,e);if(i==="1"||qz.has(n))return J.SAMPLED;if(n===void 0||jz.has(n))return J.NONE}var qz,jz,GI,kI=m(()=>{"use strict";b();K();Od();yi();qz=new Set([!0,"true","True","1",1]),jz=new Set([!1,"false","False","0",0]);GI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=X.getSpanContext(e);if(!(!a||!dt(a)||be(e))){var s=e.getValue(Hn);i.set(n,Fn,a.traceId),i.set(n,Yn,a.spanId),s==="1"?i.set(n,jn,s):a.traceFlags!==void 0&&i.set(n,qn,(J.SAMPLED&a.traceFlags)===J.SAMPLED?"1":"0")}},t.prototype.extract=function(e,n,i){var a=Wz(n,i),s=zz(n,i),o=Xz(n,i),r=BI(n,i);return Gt(a)&&Ii(s)&&$z(o)?(e=e.setValue(Hn,r),X.setSpanContext(e,{traceId:a,spanId:s,isRemote:!0,traceFlags:o})):e},t.prototype.fields=function(){return[Fn,Yn,jn,qn,Xu]},t}()});function rX(t){return t.length===32?t:""+Zz+t}function nX(t){return t&&eX.has(t)?J.SAMPLED:J.NONE}var Jz,Qz,Zz,eX,tX,HI,FI=m(()=>{"use strict";b();K();Od();yi();Jz=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},Qz=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,Zz="0".repeat(16),eX=new Set(["d","1"]),tX="d";HI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=X.getSpanContext(e);if(!(!a||!dt(a)||be(e))){var s=e.getValue(Hn)||a.traceFlags&1,o=a.traceId+"-"+a.spanId+"-"+s;i.set(n,Er,o)}},t.prototype.extract=function(e,n,i){var a=i.get(n,Er),s=Array.isArray(a)?a[0]:a;if(typeof s!="string")return e;var o=s.match(Qz);if(!o)return e;var r=Jz(o,4),u=r[1],l=r[2],c=r[3],p=rX(u);if(!Gt(p)||!Ii(l))return e;var _=nX(c);return c===tX&&(e=e.setValue(Hn,c)),X.setSpanContext(e,{traceId:p,spanId:l,isRemote:!0,traceFlags:_})},t.prototype.fields=function(){return[Er]},t}()});var $n,gd=m(()=>{"use strict";(function(t){t[t.SINGLE_HEADER=0]="SINGLE_HEADER",t[t.MULTI_HEADER=1]="MULTI_HEADER"})($n||($n={}))});var YI,qI=m(()=>{"use strict";K();kI();FI();yi();gd();YI=function(){function t(e){e===void 0&&(e={}),this._b3MultiPropagator=new GI,this._b3SinglePropagator=new HI,e.injectEncoding===$n.MULTI_HEADER?(this._inject=this._b3MultiPropagator.inject,this._fields=this._b3MultiPropagator.fields()):(this._inject=this._b3SinglePropagator.inject,this._fields=this._b3SinglePropagator.fields())}return t.prototype.inject=function(e,n,i){be(e)||this._inject(e,n,i)},t.prototype.extract=function(e,n,i){var a=i.get(n,Er),s=Array.isArray(a)?a[0]:a;return s?this._b3SinglePropagator.extract(e,n,i):this._b3MultiPropagator.extract(e,n,i)},t.prototype.fields=function(){return this._fields},t}()});var jI={};nt(jI,{B3InjectEncoding:()=>$n,B3Propagator:()=>YI,B3_CONTEXT_HEADER:()=>Er,X_B3_FLAGS:()=>jn,X_B3_PARENT_SPAN_ID:()=>Xu,X_B3_SAMPLED:()=>qn,X_B3_SPAN_ID:()=>Yn,X_B3_TRACE_ID:()=>Fn});var $I=m(()=>{"use strict";qI();yi();gd()});var KI,WI=m(()=>{"use strict";KI="exception"});var Nd,oX,zI,iX,Qu,Rd=m(()=>{"use strict";b();K();jo();WI();Nd=function(){return Nd=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},Nd.apply(this,arguments)},oX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zI=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},iX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))},Qu=function(){function t(e,n,i,a,s,o,r,u,l,c){r===void 0&&(r=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:pE.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=a,this.parentSpanId=o,this.kind=s,this.links=r;var p=Date.now();this._performanceStartTime=Ze.now(),this._performanceOffset=p-(this._performanceStartTime+yn()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,c!=null&&this.setAttributes(c),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,n){return n==null||this._isSpanEnded()?this:e.length===0?(g.warn("Invalid attribute key: "+e),this):Wo(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(n),this):(g.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,i;try{for(var a=oX(Object.entries(e)),s=a.next();!s.done;s=a.next()){var o=zI(s.value,2),r=o[0],u=o[1];this.setAttribute(r,u)}}catch(l){n={error:l}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,i){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return g.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&g.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Qo(n)&&(Qo(i)||(i=n),n=void 0);var a=or(n);return this.events.push({name:e,attributes:a,time:this._getTime(i),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var n;return(n=this.links).push.apply(n,iX([],zI(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=Nd({},e),this.status.message!=null&&typeof e.message!="string"&&(g.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){g.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=Os(this.startTime,this.endTime),this._duration[0]<0&&(g.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&&g.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<Ze.now())return Jo(e+this._performanceOffset);if(typeof e=="number")return Oe(e);if(e instanceof Date)return Oe(e.getTime());if(An(e))return e;if(this._startTimeProvided)return Oe(Date.now());var n=Ze.now()-this._performanceStartTime;return Zo(this.startTime,Oe(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var i={};typeof e=="string"?i[ls]=e:e&&(e.code?i[us]=e.code.toString():e.name&&(i[us]=e.name),e.message&&(i[ls]=e.message),e.stack&&(i[l0]=e.stack)),i[us]||i[ls]?this.addEvent(KI,i,n):g.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&g.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,n){return e.length<=n?e:e.substr(0,n)},t.prototype._truncateToSize=function(e){var n=this,i=this._attributeValueLengthLimit;return i<=0?(g.warn("Attribute value limit must be positive, got "+i),e):typeof e=="string"?this._truncateToLimitUtil(e,i):Array.isArray(e)?e.map(function(a){return typeof a=="string"?n._truncateToLimitUtil(a,i):a}):e},t}()});var ft,Ai=m(()=>{"use strict";(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ft||(ft={}))});var _r,Zu=m(()=>{"use strict";Ai();_r=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ft.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var Mt,el=m(()=>{"use strict";Ai();Mt=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ft.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var Kn,Pd=m(()=>{"use strict";b();K();Zu();el();Kn=function(){function t(e){var n,i,a,s;this._root=e.root,this._root||(he(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Mt),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new Mt,this._remoteParentNotSampled=(i=e.remoteParentNotSampled)!==null&&i!==void 0?i:new _r,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new Mt,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new _r}return t.prototype.shouldSample=function(e,n,i,a,s,o){var r=X.getSpanContext(e);return!r||!dt(r)?this._root.shouldSample(e,n,i,a,s,o):r.isRemote?r.traceFlags&J.SAMPLED?this._remoteParentSampled.shouldSample(e,n,i,a,s,o):this._remoteParentNotSampled.shouldSample(e,n,i,a,s,o):r.traceFlags&J.SAMPLED?this._localParentSampled.shouldSample(e,n,i,a,s,o):this._localParentNotSampled.shouldSample(e,n,i,a,s,o)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}()});var Oi,bd=m(()=>{"use strict";b();Ai();Oi=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Gt(n)&&this._accumulate(n)<this._upperBound?ft.RECORD_AND_SAMPLED:ft.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,i=0;i<e.length/8;i++){var a=i*8,s=parseInt(e.slice(a,a+8),16);n=(n^s)>>>0}return n},t}()});function tl(){var t=Ae();return{sampler:Md(aX),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function Md(t){switch(t===void 0&&(t=Ae()),t.OTEL_TRACES_SAMPLER){case je.AlwaysOn:return new Mt;case je.AlwaysOff:return new _r;case je.ParentBasedAlwaysOn:return new Kn({root:new Mt});case je.ParentBasedAlwaysOff:return new Kn({root:new _r});case je.TraceIdRatio:return new Oi(XI(t));case je.ParentBasedTraceIdRatio:return new Kn({root:new Oi(XI(t))});default:return g.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+sX+'".'),new Mt}}function XI(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return g.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Wn+"."),Wn;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Wn+"."),Wn):e<0||e>1?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Wn+"."),Wn):e}var aX,sX,Wn,xd=m(()=>{"use strict";b();K();Zu();el();Pd();bd();aX=Ae(),sX=je.AlwaysOn,Wn=1});function JI(t){var e={sampler:Md()},n=tl(),i=Object.assign({},n,e,t);return i.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),i.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),i}function QI(t){var e,n,i,a,s,o,r,u,l,c,p,_,f=Object.assign({},t.spanLimits),S=vn();return f.attributeCountLimit=(o=(s=(a=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(i=t.generalLimits)===null||i===void 0?void 0:i.attributeCountLimit)!==null&&a!==void 0?a:S.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:S.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:Ur,f.attributeValueLengthLimit=(_=(p=(c=(u=(r=t.spanLimits)===null||r===void 0?void 0:r.attributeValueLengthLimit)!==null&&u!==void 0?u:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&c!==void 0?c:S.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:S.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&_!==void 0?_:wr,Object.assign({},t,{spanLimits:f})}var Ld=m(()=>{"use strict";xd();K()});var ZI,eC=m(()=>{"use strict";b();K();ZI=function(){function t(e,n){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var i=Ae();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:i.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:i.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:i.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:i.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new ur(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(g.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&J.SAMPLED&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e._flushAll()}).then(function(){return e._exporter.shutdown()})},t.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&g.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(g.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(n,i){for(var a=[],s=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),o=0,r=s;o<r;o++)a.push(e._flushOneBatch());Promise.all(a).then(function(){n()}).catch(i)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,i){var a=setTimeout(function(){i(new Error("Timeout"))},e._exportTimeoutMillis);He.with(hn(He.active()),function(){var s;e._finishedSpans.length<=e._maxExportBatchSize?(s=e._finishedSpans,e._finishedSpans=[]):s=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var o=function(){return e._exporter.export(s,function(p){var _;clearTimeout(a),p.code===ee.SUCCESS?n():i((_=p.error)!==null&&_!==void 0?_:new Error("BatchSpanProcessor: span export failed"))})},r=null,u=0,l=s.length;u<l;u++){var c=s[u];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(r??(r=[]),r.push(c.resource.waitForAsyncAttributes()))}r===null?o():Promise.all(r).then(o,function(p){he(p),i(p)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var n=function(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(i){e._isExporting=!1,he(i)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis),sr(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}()});var uX,Sr,tC=m(()=>{"use strict";eC();uX=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(i[s]=a[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function i(){this.constructor=e}e.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),Sr=function(t){uX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onShutdown=function(){},e}(ZI)});function rC(t){return function(){for(var n=0;n<t/4;n++)rl.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(rl[n]>0);n++)n===t-1&&(rl[t-1]=1);return rl.toString("hex",0,t)}}var lX,nC,zn,rl,oC=m(()=>{"use strict";lX=8,nC=16,zn=function(){function t(){this.generateTraceId=rC(nC),this.generateSpanId=rC(lX)}return t}(),rl=Buffer.allocUnsafe(nC)});var iC=m(()=>{"use strict";tC();oC()});var nl=m(()=>{"use strict";iC()});var ol,aC=m(()=>{"use strict";b();K();Rd();Ld();nl();ol=function(){function t(e,n,i){this._tracerProvider=i;var a=JI(n);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=n.idGenerator||new zn,this.resource=i.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,i){var a,s,o;n===void 0&&(n={}),i===void 0&&(i=He.active()),n.root&&(i=X.deleteSpan(i));var r=X.getSpan(i);if(be(i)){g.debug("Instrumentation suppressed, returning Noop Span");var u=X.wrapSpanContext(lE);return u}var l=r?.spanContext(),c=this._idGenerator.generateSpanId(),p,_,f;!l||!X.isSpanContextValid(l)?p=this._idGenerator.generateTraceId():(p=l.traceId,_=l.traceState,f=l.spanId);var S=(a=n.kind)!==null&&a!==void 0?a:fE.INTERNAL,v=((s=n.links)!==null&&s!==void 0?s:[]).map(function(F){return{context:F.context,attributes:or(F.attributes)}}),T=or(n.attributes),A=this._sampler.shouldSample(i,p,e,S,T,v);_=(o=A.traceState)!==null&&o!==void 0?o:_;var O=A.decision===Et.RECORD_AND_SAMPLED?J.SAMPLED:J.NONE,N={traceId:p,spanId:c,traceFlags:O,traceState:_};if(A.decision===Et.NOT_RECORD){g.debug("Recording is off, propagating context in a non-recording span");var u=X.wrapSpanContext(N);return u}var D=or(Object.assign(T,A.attributes)),G=new Qu(this,i,e,N,S,f,v,n.startTime,void 0,D);return G},t.prototype.startActiveSpan=function(e,n,i,a){var s,o,r;if(!(arguments.length<2)){arguments.length===2?r=n:arguments.length===3?(s=n,r=i):(s=n,o=i,r=a);var u=o??He.active(),l=this.startSpan(e,s,u),c=X.setSpan(u,l);return He.with(c,r,void 0,l)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}()});var il,sC,uC=m(()=>{"use strict";K();il=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},sC=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,n,i=[];try{for(var a=il(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;i.push(o.forceFlush())}}catch(r){e={error:r}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r){Promise.all(i).then(function(){r()}).catch(function(u){he(u||new Error("MultiSpanProcessor: forceFlush failed")),r()})})},t.prototype.onStart=function(e,n){var i,a;try{for(var s=il(this._spanProcessors),o=s.next();!o.done;o=s.next()){var r=o.value;r.onStart(e,n)}}catch(u){i={error:u}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}},t.prototype.onEnd=function(e){var n,i;try{for(var a=il(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;o.onEnd(e)}}catch(r){n={error:r}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,i=[];try{for(var a=il(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;i.push(o.shutdown())}}catch(r){e={error:r}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r,u){Promise.all(i).then(function(){r()},u)})},t}()});var al,Id=m(()=>{"use strict";al=function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}()});var Vt,lC,cC=m(()=>{"use strict";b();K();Us();gi();xd();uC();Id();nl();Ld();(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Vt||(Vt={}));lC=function(){function t(e){e===void 0&&(e={});var n;this._registeredSpanProcessors=[],this._tracers=new Map;var i=Ls({},tl(),QI(e));this.resource=(n=i.resource)!==null&&n!==void 0?n:Ut.empty(),this.resource=Ut.default().merge(this.resource),this._config=Object.assign({},i,{resource:this.resource});var a=this._buildExporterFromEnv();if(a!==void 0){var s=new Sr(a);this.activeSpanProcessor=s}else this.activeSpanProcessor=new al}return t.prototype.getTracer=function(e,n,i){var a=e+"@"+(n||"")+":"+(i?.schemaUrl||"");return this._tracers.has(a)||this._tracers.set(a,new ol({name:e,version:n,schemaUrl:i?.schemaUrl},this._config,this)),this._tracers.get(a)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return g.error("Error while trying to shutdown current span processor",n)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new sC(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),X.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&He.setGlobalContextManager(e.contextManager),e.propagator&&it.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(function(i){return new Promise(function(a){var s,o=setTimeout(function(){a(new Error("Span processor did not completed within timeout period of "+e+" ms")),s=Vt.timeout},e);i.forceFlush().then(function(){clearTimeout(o),s!==Vt.timeout&&(s=Vt.resolved,a(s))}).catch(function(r){clearTimeout(o),s=Vt.error,a(r)})})});return new Promise(function(i,a){Promise.all(n).then(function(s){var o=s.filter(function(r){return r!==Vt.resolved});o.length>0?a(o):i()}).catch(function(s){return a([s])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var n;return(n=this.constructor._registeredPropagators.get(e))===null||n===void 0?void 0:n()},t.prototype._getSpanExporter=function(e){var n;return(n=this.constructor._registeredExporters.get(e))===null||n===void 0?void 0:n()},t.prototype._buildPropagatorFromEnv=function(){var e=this,n=Array.from(new Set(Ae().OTEL_PROPAGATORS)),i=n.map(function(s){var o=e._getPropagator(s);return o||g.warn('Propagator "'+s+'" requested through environment variable is unavailable.'),o}),a=i.reduce(function(s,o){return o&&s.push(o),s},[]);if(a.length!==0)return n.length===1?a[0]:new Ns({propagators:a})},t.prototype._buildExporterFromEnv=function(){var e=Ae().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this._getSpanExporter(e);return n||g.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t._registeredPropagators=new Map([["tracecontext",function(){return new Ps}],["baggage",function(){return new _s}]]),t._registeredExporters=new Map,t}()});var cX,fC,pC=m(()=>{"use strict";K();cX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},fC=function(){function t(){}return t.prototype.export=function(e,n){return this._sendSpans(e,n)},t.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype._exportInfo=function(e){var n;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(n=e.spanContext().traceState)===null||n===void 0?void 0:n.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:Ot(e.startTime),duration:Ot(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},t.prototype._sendSpans=function(e,n){var i,a;try{for(var s=cX(e),o=s.next();!o.done;o=s.next()){var r=o.value;console.dir(this._exportInfo(r),{depth:3})}}catch(u){i={error:u}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(n)return n({code:ee.SUCCESS})},t}()});var fX,pX,dC,EC=m(()=>{"use strict";K();fX=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},pX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))},dC=function(){function t(){this._finishedSpans=[],this._stopped=!1}return t.prototype.export=function(e,n){var i;if(this._stopped)return n({code:ee.FAILED,error:new Error("Exporter has been stopped")});(i=this._finishedSpans).push.apply(i,pX([],fX(e),!1)),setTimeout(function(){return n({code:ee.SUCCESS})},0)},t.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype.reset=function(){this._finishedSpans=[]},t.prototype.getFinishedSpans=function(){return this._finishedSpans},t}()});var dX,EX,_C,SC=m(()=>{"use strict";b();K();dX=function(t,e,n,i){function a(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function r(c){try{l(i.next(c))}catch(p){o(p)}}function u(c){try{l(i.throw(c))}catch(p){o(p)}}function l(c){c.done?s(c.value):a(c.value).then(r,u)}l((i=i.apply(t,e||[])).next())})},EX=function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(l){return function(c){return u([l,c])}}function u(l){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,a&&(s=l[0]&2?a.return:l[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,l[1])).done)return s;switch(a=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,a=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],a=0}finally{i=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},_C=function(){function t(e){this._exporter=e,this._shutdownOnce=new ur(this._shutdown,this),this._unresolvedExports=new Set}return t.prototype.forceFlush=function(){return dX(this,void 0,void 0,function(){return EX(this,function(e){switch(e.label){case 0:return[4,Promise.all(Array.from(this._unresolvedExports))];case 1:return e.sent(),this._exporter.forceFlush?[4,this._exporter.forceFlush()]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}})})},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){var n=this,i,a;if(!this._shutdownOnce.isCalled&&e.spanContext().traceFlags&J.SAMPLED){var s=function(){return oi._export(n._exporter,[e]).then(function(r){var u;r.code!==ee.SUCCESS&&he((u=r.error)!==null&&u!==void 0?u:new Error("SimpleSpanProcessor: span export failed (status "+r+")"))}).catch(function(r){he(r)})};if(e.resource.asyncAttributesPending){var o=(a=(i=e.resource).waitForAsyncAttributes)===null||a===void 0?void 0:a.call(i).then(function(){return o!=null&&n._unresolvedExports.delete(o),s()},function(r){return he(r)});o!=null&&this._unresolvedExports.add(o)}else s()}},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){return this._exporter.shutdown()},t}()});var Cd={};nt(Cd,{AlwaysOffSampler:()=>_r,AlwaysOnSampler:()=>Mt,BasicTracerProvider:()=>lC,BatchSpanProcessor:()=>Sr,ConsoleSpanExporter:()=>fC,ForceFlushState:()=>Vt,InMemorySpanExporter:()=>dC,NoopSpanProcessor:()=>al,ParentBasedSampler:()=>Kn,RandomIdGenerator:()=>zn,SamplingDecision:()=>ft,SimpleSpanProcessor:()=>_C,Span:()=>Qu,TraceIdRatioBasedSampler:()=>Oi,Tracer:()=>ol});var gi=m(()=>{"use strict";aC();cC();nl();pC();EC();SC();Id();Zu();el();Pd();bd();Ai();Rd()});var Ni=h((Xce,hC)=>{"use strict";var _X="2.0.0",SX=Number.MAX_SAFE_INTEGER||9007199254740991,hX=16,TX=250,vX=["major","premajor","minor","preminor","patch","prepatch","prerelease"];hC.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:hX,MAX_SAFE_BUILD_LENGTH:TX,MAX_SAFE_INTEGER:SX,RELEASE_TYPES:vX,SEMVER_SPEC_VERSION:_X,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ri=h((Jce,TC)=>{"use strict";var mX=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};TC.exports=mX});var Xn=h((Bt,vC)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:wd,MAX_SAFE_BUILD_LENGTH:yX,MAX_LENGTH:AX}=Ni(),OX=Ri();Bt=vC.exports={};var gX=Bt.re=[],NX=Bt.safeRe=[],R=Bt.src=[],P=Bt.t={},RX=0,Ud="[a-zA-Z0-9-]",PX=[["\\s",1],["\\d",AX],[Ud,yX]],bX=t=>{for(let[e,n]of PX)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},U=(t,e,n)=>{let i=bX(e),a=RX++;OX(t,a,e),P[t]=a,R[a]=e,gX[a]=new RegExp(e,n?"g":void 0),NX[a]=new RegExp(i,n?"g":void 0)};U("NUMERICIDENTIFIER","0|[1-9]\\d*");U("NUMERICIDENTIFIERLOOSE","\\d+");U("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ud}*`);U("MAINVERSION",`(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})`);U("MAINVERSIONLOOSE",`(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})`);U("PRERELEASEIDENTIFIER",`(?:${R[P.NUMERICIDENTIFIER]}|${R[P.NONNUMERICIDENTIFIER]})`);U("PRERELEASEIDENTIFIERLOOSE",`(?:${R[P.NUMERICIDENTIFIERLOOSE]}|${R[P.NONNUMERICIDENTIFIER]})`);U("PRERELEASE",`(?:-(${R[P.PRERELEASEIDENTIFIER]}(?:\\.${R[P.PRERELEASEIDENTIFIER]})*))`);U("PRERELEASELOOSE",`(?:-?(${R[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${R[P.PRERELEASEIDENTIFIERLOOSE]})*))`);U("BUILDIDENTIFIER",`${Ud}+`);U("BUILD",`(?:\\+(${R[P.BUILDIDENTIFIER]}(?:\\.${R[P.BUILDIDENTIFIER]})*))`);U("FULLPLAIN",`v?${R[P.MAINVERSION]}${R[P.PRERELEASE]}?${R[P.BUILD]}?`);U("FULL",`^${R[P.FULLPLAIN]}$`);U("LOOSEPLAIN",`[v=\\s]*${R[P.MAINVERSIONLOOSE]}${R[P.PRERELEASELOOSE]}?${R[P.BUILD]}?`);U("LOOSE",`^${R[P.LOOSEPLAIN]}$`);U("GTLT","((?:<|>)?=?)");U("XRANGEIDENTIFIERLOOSE",`${R[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);U("XRANGEIDENTIFIER",`${R[P.NUMERICIDENTIFIER]}|x|X|\\*`);U("XRANGEPLAIN",`[v=\\s]*(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:${R[P.PRERELEASE]})?${R[P.BUILD]}?)?)?`);U("XRANGEPLAINLOOSE",`[v=\\s]*(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:${R[P.PRERELEASELOOSE]})?${R[P.BUILD]}?)?)?`);U("XRANGE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAIN]}$`);U("XRANGELOOSE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAINLOOSE]}$`);U("COERCEPLAIN",`(^|[^\\d])(\\d{1,${wd}})(?:\\.(\\d{1,${wd}}))?(?:\\.(\\d{1,${wd}}))?`);U("COERCE",`${R[P.COERCEPLAIN]}(?:$|[^\\d])`);U("COERCEFULL",R[P.COERCEPLAIN]+`(?:${R[P.PRERELEASE]})?(?:${R[P.BUILD]})?(?:$|[^\\d])`);U("COERCERTL",R[P.COERCE],!0);U("COERCERTLFULL",R[P.COERCEFULL],!0);U("LONETILDE","(?:~>?)");U("TILDETRIM",`(\\s*)${R[P.LONETILDE]}\\s+`,!0);Bt.tildeTrimReplace="$1~";U("TILDE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAIN]}$`);U("TILDELOOSE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAINLOOSE]}$`);U("LONECARET","(?:\\^)");U("CARETTRIM",`(\\s*)${R[P.LONECARET]}\\s+`,!0);Bt.caretTrimReplace="$1^";U("CARET",`^${R[P.LONECARET]}${R[P.XRANGEPLAIN]}$`);U("CARETLOOSE",`^${R[P.LONECARET]}${R[P.XRANGEPLAINLOOSE]}$`);U("COMPARATORLOOSE",`^${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]})$|^$`);U("COMPARATOR",`^${R[P.GTLT]}\\s*(${R[P.FULLPLAIN]})$|^$`);U("COMPARATORTRIM",`(\\s*)${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]}|${R[P.XRANGEPLAIN]})`,!0);Bt.comparatorTrimReplace="$1$2$3";U("HYPHENRANGE",`^\\s*(${R[P.XRANGEPLAIN]})\\s+-\\s+(${R[P.XRANGEPLAIN]})\\s*$`);U("HYPHENRANGELOOSE",`^\\s*(${R[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${R[P.XRANGEPLAINLOOSE]})\\s*$`);U("STAR","(<|>)?=?\\s*\\*");U("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");U("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var sl=h((Qce,mC)=>{"use strict";var MX=Object.freeze({loose:!0}),xX=Object.freeze({}),LX=t=>t?typeof t!="object"?MX:t:xX;mC.exports=LX});var Dd=h((Zce,OC)=>{"use strict";var yC=/^[0-9]+$/,AC=(t,e)=>{let n=yC.test(t),i=yC.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:t<e?-1:1},IX=(t,e)=>AC(e,t);OC.exports={compareIdentifiers:AC,rcompareIdentifiers:IX}});var Me=h((efe,PC)=>{"use strict";var ul=Ri(),{MAX_LENGTH:gC,MAX_SAFE_INTEGER:ll}=Ni(),{safeRe:NC,t:RC}=Xn(),CX=sl(),{compareIdentifiers:Jn}=Dd(),Vd=class t{constructor(e,n){if(n=CX(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>gC)throw new TypeError(`version is longer than ${gC} characters`);ul("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=e.trim().match(n.loose?NC[RC.LOOSE]:NC[RC.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>ll||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ll||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ll||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let s=+a;if(s>=0&&s<ll)return s}return a}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(ul("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Jn(this.major,e.major)||Jn(this.minor,e.minor)||Jn(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],a=e.prerelease[n];if(ul("prerelease compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Jn(i,a)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let i=this.build[n],a=e.build[n];if(ul("build compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Jn(i,a)}while(++n)}inc(e,n,i){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let a=Number(i)?1:0;if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(n){let s=[n,a];i===!1&&(s=[n]),Jn(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};PC.exports=Vd});var Yr=h((tfe,MC)=>{"use strict";var bC=Me(),wX=(t,e,n=!1)=>{if(t instanceof bC)return t;try{return new bC(t,e)}catch(i){if(!n)return null;throw i}};MC.exports=wX});var LC=h((rfe,xC)=>{"use strict";var UX=Yr(),DX=(t,e)=>{let n=UX(t,e);return n?n.version:null};xC.exports=DX});var CC=h((nfe,IC)=>{"use strict";var VX=Yr(),BX=(t,e)=>{let n=VX(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};IC.exports=BX});var DC=h((ofe,UC)=>{"use strict";var wC=Me(),GX=(t,e,n,i,a)=>{typeof n=="string"&&(a=i,i=n,n=void 0);try{return new wC(t instanceof wC?t.version:t,n).inc(e,i,a).version}catch{return null}};UC.exports=GX});var GC=h((ife,BC)=>{"use strict";var VC=Yr(),kX=(t,e)=>{let n=VC(t,null,!0),i=VC(e,null,!0),a=n.compare(i);if(a===0)return null;let s=a>0,o=s?n:i,r=s?i:n,u=!!o.prerelease.length;if(!!r.prerelease.length&&!u)return!r.patch&&!r.minor?"major":o.patch?"patch":o.minor?"minor":"major";let c=u?"pre":"";return n.major!==i.major?c+"major":n.minor!==i.minor?c+"minor":n.patch!==i.patch?c+"patch":"prerelease"};BC.exports=kX});var HC=h((afe,kC)=>{"use strict";var HX=Me(),FX=(t,e)=>new HX(t,e).major;kC.exports=FX});var YC=h((sfe,FC)=>{"use strict";var YX=Me(),qX=(t,e)=>new YX(t,e).minor;FC.exports=qX});var jC=h((ufe,qC)=>{"use strict";var jX=Me(),$X=(t,e)=>new jX(t,e).patch;qC.exports=$X});var KC=h((lfe,$C)=>{"use strict";var KX=Yr(),WX=(t,e)=>{let n=KX(t,e);return n&&n.prerelease.length?n.prerelease:null};$C.exports=WX});var tt=h((cfe,zC)=>{"use strict";var WC=Me(),zX=(t,e,n)=>new WC(t,n).compare(new WC(e,n));zC.exports=zX});var JC=h((ffe,XC)=>{"use strict";var XX=tt(),JX=(t,e,n)=>XX(e,t,n);XC.exports=JX});var ZC=h((pfe,QC)=>{"use strict";var QX=tt(),ZX=(t,e)=>QX(t,e,!0);QC.exports=ZX});var cl=h((dfe,tw)=>{"use strict";var ew=Me(),eJ=(t,e,n)=>{let i=new ew(t,n),a=new ew(e,n);return i.compare(a)||i.compareBuild(a)};tw.exports=eJ});var nw=h((Efe,rw)=>{"use strict";var tJ=cl(),rJ=(t,e)=>t.sort((n,i)=>tJ(n,i,e));rw.exports=rJ});var iw=h((_fe,ow)=>{"use strict";var nJ=cl(),oJ=(t,e)=>t.sort((n,i)=>nJ(i,n,e));ow.exports=oJ});var Pi=h((Sfe,aw)=>{"use strict";var iJ=tt(),aJ=(t,e,n)=>iJ(t,e,n)>0;aw.exports=aJ});var fl=h((hfe,sw)=>{"use strict";var sJ=tt(),uJ=(t,e,n)=>sJ(t,e,n)<0;sw.exports=uJ});var Bd=h((Tfe,uw)=>{"use strict";var lJ=tt(),cJ=(t,e,n)=>lJ(t,e,n)===0;uw.exports=cJ});var Gd=h((vfe,lw)=>{"use strict";var fJ=tt(),pJ=(t,e,n)=>fJ(t,e,n)!==0;lw.exports=pJ});var pl=h((mfe,cw)=>{"use strict";var dJ=tt(),EJ=(t,e,n)=>dJ(t,e,n)>=0;cw.exports=EJ});var dl=h((yfe,fw)=>{"use strict";var _J=tt(),SJ=(t,e,n)=>_J(t,e,n)<=0;fw.exports=SJ});var kd=h((Afe,pw)=>{"use strict";var hJ=Bd(),TJ=Gd(),vJ=Pi(),mJ=pl(),yJ=fl(),AJ=dl(),OJ=(t,e,n,i)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return hJ(t,n,i);case"!=":return TJ(t,n,i);case">":return vJ(t,n,i);case">=":return mJ(t,n,i);case"<":return yJ(t,n,i);case"<=":return AJ(t,n,i);default:throw new TypeError(`Invalid operator: ${e}`)}};pw.exports=OJ});var Ew=h((Ofe,dw)=>{"use strict";var gJ=Me(),NJ=Yr(),{safeRe:El,t:_l}=Xn(),RJ=(t,e)=>{if(t instanceof gJ)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?El[_l.COERCEFULL]:El[_l.COERCE]);else{let u=e.includePrerelease?El[_l.COERCERTLFULL]:El[_l.COERCERTL],l;for(;(l=u.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||l.index+l[0].length!==n.index+n[0].length)&&(n=l),u.lastIndex=l.index+l[1].length+l[2].length;u.lastIndex=-1}if(n===null)return null;let i=n[2],a=n[3]||"0",s=n[4]||"0",o=e.includePrerelease&&n[5]?`-${n[5]}`:"",r=e.includePrerelease&&n[6]?`+${n[6]}`:"";return NJ(`${i}.${a}.${s}${o}${r}`,e)};dw.exports=RJ});var Sw=h((gfe,_w)=>{"use strict";var Hd=class{constructor(){this.max=1e3,this.map=new Map}get(e){let n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){let a=this.map.keys().next().value;this.delete(a)}this.map.set(e,n)}return this}};_w.exports=Hd});var rt=h((Nfe,mw)=>{"use strict";var Fd=class t{constructor(e,n){if(n=bJ(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof Yd)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(a=>!Tw(a[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&UJ(a[0])){this.set=[a];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let i=((this.options.includePrerelease&&CJ)|(this.options.loose&&wJ))+":"+e,a=hw.get(i);if(a)return a;let s=this.options.loose,o=s?$e[Ve.HYPHENRANGELOOSE]:$e[Ve.HYPHENRANGE];e=e.replace(o,jJ(this.options.includePrerelease)),te("hyphen replace",e),e=e.replace($e[Ve.COMPARATORTRIM],xJ),te("comparator trim",e),e=e.replace($e[Ve.TILDETRIM],LJ),te("tilde trim",e),e=e.replace($e[Ve.CARETTRIM],IJ),te("caret trim",e);let r=e.split(" ").map(p=>DJ(p,this.options)).join(" ").split(/\s+/).map(p=>qJ(p,this.options));s&&(r=r.filter(p=>(te("loose invalid filter",p,this.options),!!p.match($e[Ve.COMPARATORLOOSE])))),te("range list",r);let u=new Map,l=r.map(p=>new Yd(p,this.options));for(let p of l){if(Tw(p))return[p];u.set(p.value,p)}u.size>1&&u.has("")&&u.delete("");let c=[...u.values()];return hw.set(i,c),c}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(i=>vw(i,n)&&e.set.some(a=>vw(a,n)&&i.every(s=>a.every(o=>s.intersects(o,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new MJ(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if($J(this.set[n],e,this.options))return!0;return!1}};mw.exports=Fd;var PJ=Sw(),hw=new PJ,bJ=sl(),Yd=bi(),te=Ri(),MJ=Me(),{safeRe:$e,t:Ve,comparatorTrimReplace:xJ,tildeTrimReplace:LJ,caretTrimReplace:IJ}=Xn(),{FLAG_INCLUDE_PRERELEASE:CJ,FLAG_LOOSE:wJ}=Ni(),Tw=t=>t.value==="<0.0.0-0",UJ=t=>t.value==="",vw=(t,e)=>{let n=!0,i=t.slice(),a=i.pop();for(;n&&i.length;)n=i.every(s=>a.intersects(s,e)),a=i.pop();return n},DJ=(t,e)=>(te("comp",t,e),t=GJ(t,e),te("caret",t),t=VJ(t,e),te("tildes",t),t=HJ(t,e),te("xrange",t),t=YJ(t,e),te("stars",t),t),Be=t=>!t||t.toLowerCase()==="x"||t==="*",VJ=(t,e)=>t.trim().split(/\s+/).map(n=>BJ(n,e)).join(" "),BJ=(t,e)=>{let n=e.loose?$e[Ve.TILDELOOSE]:$e[Ve.TILDE];return t.replace(n,(i,a,s,o,r)=>{te("tilde",t,i,a,s,o,r);let u;return Be(a)?u="":Be(s)?u=`>=${a}.0.0 <${+a+1}.0.0-0`:Be(o)?u=`>=${a}.${s}.0 <${a}.${+s+1}.0-0`:r?(te("replaceTilde pr",r),u=`>=${a}.${s}.${o}-${r} <${a}.${+s+1}.0-0`):u=`>=${a}.${s}.${o} <${a}.${+s+1}.0-0`,te("tilde return",u),u})},GJ=(t,e)=>t.trim().split(/\s+/).map(n=>kJ(n,e)).join(" "),kJ=(t,e)=>{te("caret",t,e);let n=e.loose?$e[Ve.CARETLOOSE]:$e[Ve.CARET],i=e.includePrerelease?"-0":"";return t.replace(n,(a,s,o,r,u)=>{te("caret",t,a,s,o,r,u);let l;return Be(s)?l="":Be(o)?l=`>=${s}.0.0${i} <${+s+1}.0.0-0`:Be(r)?s==="0"?l=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:u?(te("replaceCaret pr",u),s==="0"?o==="0"?l=`>=${s}.${o}.${r}-${u} <${s}.${o}.${+r+1}-0`:l=`>=${s}.${o}.${r}-${u} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${r}-${u} <${+s+1}.0.0-0`):(te("no pr"),s==="0"?o==="0"?l=`>=${s}.${o}.${r}${i} <${s}.${o}.${+r+1}-0`:l=`>=${s}.${o}.${r}${i} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${r} <${+s+1}.0.0-0`),te("caret return",l),l})},HJ=(t,e)=>(te("replaceXRanges",t,e),t.split(/\s+/).map(n=>FJ(n,e)).join(" ")),FJ=(t,e)=>{t=t.trim();let n=e.loose?$e[Ve.XRANGELOOSE]:$e[Ve.XRANGE];return t.replace(n,(i,a,s,o,r,u)=>{te("xRange",t,i,a,s,o,r,u);let l=Be(s),c=l||Be(o),p=c||Be(r),_=p;return a==="="&&_&&(a=""),u=e.includePrerelease?"-0":"",l?a===">"||a==="<"?i="<0.0.0-0":i="*":a&&_?(c&&(o=0),r=0,a===">"?(a=">=",c?(s=+s+1,o=0,r=0):(o=+o+1,r=0)):a==="<="&&(a="<",c?s=+s+1:o=+o+1),a==="<"&&(u="-0"),i=`${a+s}.${o}.${r}${u}`):c?i=`>=${s}.0.0${u} <${+s+1}.0.0-0`:p&&(i=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`),te("xRange return",i),i})},YJ=(t,e)=>(te("replaceStars",t,e),t.trim().replace($e[Ve.STAR],"")),qJ=(t,e)=>(te("replaceGTE0",t,e),t.trim().replace($e[e.includePrerelease?Ve.GTE0PRE:Ve.GTE0],"")),jJ=t=>(e,n,i,a,s,o,r,u,l,c,p,_)=>(Be(i)?n="":Be(a)?n=`>=${i}.0.0${t?"-0":""}`:Be(s)?n=`>=${i}.${a}.0${t?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,Be(l)?u="":Be(c)?u=`<${+l+1}.0.0-0`:Be(p)?u=`<${l}.${+c+1}.0-0`:_?u=`<=${l}.${c}.${p}-${_}`:t?u=`<${l}.${c}.${+p+1}-0`:u=`<=${u}`,`${n} ${u}`.trim()),$J=(t,e,n)=>{for(let i=0;i<t.length;i++)if(!t[i].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let i=0;i<t.length;i++)if(te(t[i].semver),t[i].semver!==Yd.ANY&&t[i].semver.prerelease.length>0){let a=t[i].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var bi=h((Rfe,Rw)=>{"use strict";var Mi=Symbol("SemVer ANY"),$d=class t{static get ANY(){return Mi}constructor(e,n){if(n=yw(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),jd("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===Mi?this.value="":this.value=this.operator+this.semver.version,jd("comp",this)}parse(e){let n=this.options.loose?Aw[Ow.COMPARATORLOOSE]:Aw[Ow.COMPARATOR],i=e.match(n);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new gw(i[2],this.options.loose):this.semver=Mi}toString(){return this.value}test(e){if(jd("Comparator.test",e,this.options.loose),this.semver===Mi||e===Mi)return!0;if(typeof e=="string")try{e=new gw(e,this.options)}catch{return!1}return qd(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Nw(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new Nw(this.value,n).test(e.semver):(n=yw(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||qd(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||qd(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Rw.exports=$d;var yw=sl(),{safeRe:Aw,t:Ow}=Xn(),qd=kd(),jd=Ri(),gw=Me(),Nw=rt()});var xi=h((Pfe,Pw)=>{"use strict";var KJ=rt(),WJ=(t,e,n)=>{try{e=new KJ(e,n)}catch{return!1}return e.test(t)};Pw.exports=WJ});var Mw=h((bfe,bw)=>{"use strict";var zJ=rt(),XJ=(t,e)=>new zJ(t,e).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));bw.exports=XJ});var Lw=h((Mfe,xw)=>{"use strict";var JJ=Me(),QJ=rt(),ZJ=(t,e,n)=>{let i=null,a=null,s=null;try{s=new QJ(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!i||a.compare(o)===-1)&&(i=o,a=new JJ(i,n))}),i};xw.exports=ZJ});var Cw=h((xfe,Iw)=>{"use strict";var e9=Me(),t9=rt(),r9=(t,e,n)=>{let i=null,a=null,s=null;try{s=new t9(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!i||a.compare(o)===1)&&(i=o,a=new e9(i,n))}),i};Iw.exports=r9});var Dw=h((Lfe,Uw)=>{"use strict";var Kd=Me(),n9=rt(),ww=Pi(),o9=(t,e)=>{t=new n9(t,e);let n=new Kd("0.0.0");if(t.test(n)||(n=new Kd("0.0.0-0"),t.test(n)))return n;n=null;for(let i=0;i<t.set.length;++i){let a=t.set[i],s=null;a.forEach(o=>{let r=new Kd(o.semver.version);switch(o.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!s||ww(r,s))&&(s=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!n||ww(n,s))&&(n=s)}return n&&t.test(n)?n:null};Uw.exports=o9});var Bw=h((Ife,Vw)=>{"use strict";var i9=rt(),a9=(t,e)=>{try{return new i9(t,e).range||"*"}catch{return null}};Vw.exports=a9});var Sl=h((Cfe,Fw)=>{"use strict";var s9=Me(),Hw=bi(),{ANY:u9}=Hw,l9=rt(),c9=xi(),Gw=Pi(),kw=fl(),f9=dl(),p9=pl(),d9=(t,e,n,i)=>{t=new s9(t,i),e=new l9(e,i);let a,s,o,r,u;switch(n){case">":a=Gw,s=f9,o=kw,r=">",u=">=";break;case"<":a=kw,s=p9,o=Gw,r="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(c9(t,e,i))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],p=null,_=null;if(c.forEach(f=>{f.semver===u9&&(f=new Hw(">=0.0.0")),p=p||f,_=_||f,a(f.semver,p.semver,i)?p=f:o(f.semver,_.semver,i)&&(_=f)}),p.operator===r||p.operator===u||(!_.operator||_.operator===r)&&s(t,_.semver))return!1;if(_.operator===u&&o(t,_.semver))return!1}return!0};Fw.exports=d9});var qw=h((wfe,Yw)=>{"use strict";var E9=Sl(),_9=(t,e,n)=>E9(t,e,">",n);Yw.exports=_9});var $w=h((Ufe,jw)=>{"use strict";var S9=Sl(),h9=(t,e,n)=>S9(t,e,"<",n);jw.exports=h9});var zw=h((Dfe,Ww)=>{"use strict";var Kw=rt(),T9=(t,e,n)=>(t=new Kw(t,n),e=new Kw(e,n),t.intersects(e,n));Ww.exports=T9});var Jw=h((Vfe,Xw)=>{"use strict";var v9=xi(),m9=tt();Xw.exports=(t,e,n)=>{let i=[],a=null,s=null,o=t.sort((c,p)=>m9(c,p,n));for(let c of o)v9(c,e,n)?(s=c,a||(a=c)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let r=[];for(let[c,p]of i)c===p?r.push(c):!p&&c===o[0]?r.push("*"):p?c===o[0]?r.push(`<=${p}`):r.push(`${c} - ${p}`):r.push(`>=${c}`);let u=r.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e}});var nU=h((Bfe,rU)=>{"use strict";var Qw=rt(),zd=bi(),{ANY:Wd}=zd,Li=xi(),Xd=tt(),y9=(t,e,n={})=>{if(t===e)return!0;t=new Qw(t,n),e=new Qw(e,n);let i=!1;e:for(let a of t.set){for(let s of e.set){let o=O9(a,s,n);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},A9=[new zd(">=0.0.0-0")],Zw=[new zd(">=0.0.0")],O9=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Wd){if(e.length===1&&e[0].semver===Wd)return!0;n.includePrerelease?t=A9:t=Zw}if(e.length===1&&e[0].semver===Wd){if(n.includePrerelease)return!0;e=Zw}let i=new Set,a,s;for(let f of t)f.operator===">"||f.operator===">="?a=eU(a,f,n):f.operator==="<"||f.operator==="<="?s=tU(s,f,n):i.add(f.semver);if(i.size>1)return null;let o;if(a&&s){if(o=Xd(a.semver,s.semver,n),o>0)return null;if(o===0&&(a.operator!==">="||s.operator!=="<="))return null}for(let f of i){if(a&&!Li(f,String(a),n)||s&&!Li(f,String(s),n))return null;for(let S of e)if(!Li(f,String(S),n))return!1;return!0}let r,u,l,c,p=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1,_=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let f of e){if(c=c||f.operator===">"||f.operator===">=",l=l||f.operator==="<"||f.operator==="<=",a){if(_&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===_.major&&f.semver.minor===_.minor&&f.semver.patch===_.patch&&(_=!1),f.operator===">"||f.operator===">="){if(r=eU(a,f,n),r===f&&r!==a)return!1}else if(a.operator===">="&&!Li(a.semver,String(f),n))return!1}if(s){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator==="<"||f.operator==="<="){if(u=tU(s,f,n),u===f&&u!==s)return!1}else if(s.operator==="<="&&!Li(s.semver,String(f),n))return!1}if(!f.operator&&(s||a)&&o!==0)return!1}return!(a&&l&&!s&&o!==0||s&&c&&!a&&o!==0||_||p)},eU=(t,e,n)=>{if(!t)return e;let i=Xd(t.semver,e.semver,n);return i>0?t:i<0||e.operator===">"&&t.operator===">="?e:t},tU=(t,e,n)=>{if(!t)return e;let i=Xd(t.semver,e.semver,n);return i<0?t:i>0||e.operator==="<"&&t.operator==="<="?e:t};rU.exports=y9});var sU=h((Gfe,aU)=>{"use strict";var Jd=Xn(),oU=Ni(),g9=Me(),iU=Dd(),N9=Yr(),R9=LC(),P9=CC(),b9=DC(),M9=GC(),x9=HC(),L9=YC(),I9=jC(),C9=KC(),w9=tt(),U9=JC(),D9=ZC(),V9=cl(),B9=nw(),G9=iw(),k9=Pi(),H9=fl(),F9=Bd(),Y9=Gd(),q9=pl(),j9=dl(),$9=kd(),K9=Ew(),W9=bi(),z9=rt(),X9=xi(),J9=Mw(),Q9=Lw(),Z9=Cw(),e7=Dw(),t7=Bw(),r7=Sl(),n7=qw(),o7=$w(),i7=zw(),a7=Jw(),s7=nU();aU.exports={parse:N9,valid:R9,clean:P9,inc:b9,diff:M9,major:x9,minor:L9,patch:I9,prerelease:C9,compare:w9,rcompare:U9,compareLoose:D9,compareBuild:V9,sort:B9,rsort:G9,gt:k9,lt:H9,eq:F9,neq:Y9,gte:q9,lte:j9,cmp:$9,coerce:K9,Comparator:W9,Range:z9,satisfies:X9,toComparators:J9,maxSatisfying:Q9,minSatisfying:Z9,minVersion:e7,validRange:t7,outside:r7,gtr:n7,ltr:o7,intersects:i7,simplifyRange:a7,subset:s7,SemVer:g9,re:Jd.re,src:Jd.src,tokens:Jd.t,SEMVER_SPEC_VERSION:oU.SEMVER_SPEC_VERSION,RELEASE_TYPES:oU.RELEASE_TYPES,compareIdentifiers:iU.compareIdentifiers,rcompareIdentifiers:iU.rcompareIdentifiers}});function l7(t){var e=decodeURIComponent(t).split(":");if(e.length!==4)return null;var n=lU(e,4),i=n[0],a=n[1],s=n[3],o=i.padStart(32,"0"),r=a.padStart(16,"0"),u=u7.test(s)?parseInt(s,16)&1:1;return{traceId:o,spanId:r,isRemote:!0,traceFlags:u}}var uU,lU,Qd,hl,cU,u7,fU=m(()=>{"use strict";b();K();uU=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},lU=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},Qd="uber-trace-id",hl="uberctx",cU=function(){function t(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=hl):(this._jaegerTraceHeader=e?.customTraceHeader||Qd,this._jaegerBaggageHeaderPrefix=e?.customBaggageHeaderPrefix||hl)}return t.prototype.inject=function(e,n,i){var a,s,o=X.getSpanContext(e),r=it.getBaggage(e);if(o&&be(e)===!1){var u="0"+(o.traceFlags||J.NONE).toString(16);i.set(n,this._jaegerTraceHeader,o.traceId+":"+o.spanId+":0:"+u)}if(r)try{for(var l=uU(r.getAllEntries()),c=l.next();!c.done;c=l.next()){var p=lU(c.value,2),_=p[0],f=p[1];i.set(n,this._jaegerBaggageHeaderPrefix+"-"+_,encodeURIComponent(f.value))}}catch(S){a={error:S}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}},t.prototype.extract=function(e,n,i){var a,s,o=this,r,u=i.get(n,this._jaegerTraceHeader),l=Array.isArray(u)?u[0]:u,c=i.keys(n).filter(function(A){return A.startsWith(o._jaegerBaggageHeaderPrefix+"-")}).map(function(A){var O=i.get(n,A);return{key:A.substring(o._jaegerBaggageHeaderPrefix.length+1),value:Array.isArray(O)?O[0]:O}}),p=e;if(typeof l=="string"){var _=l7(l);_&&(p=X.setSpanContext(p,_))}if(c.length===0)return p;var f=(r=it.getBaggage(e))!==null&&r!==void 0?r:it.createBaggage();try{for(var S=uU(c),v=S.next();!v.done;v=S.next()){var T=v.value;T.value!==void 0&&(f=f.setEntry(T.key,{value:decodeURIComponent(T.value)}))}}catch(A){a={error:A}}finally{try{v&&!v.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}return p=it.setBaggage(p,f),p},t.prototype.fields=function(){return[this._jaegerTraceHeader]},t}(),u7=/^[0-9a-f]{1,2}$/i});var pU={};nt(pU,{JaegerPropagator:()=>cU,UBER_BAGGAGE_HEADER_PREFIX:()=>hl,UBER_TRACE_ID_HEADER:()=>Qd});var dU=m(()=>{"use strict";fU()});var SU=h(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.NodeTracerProvider=void 0;var EU=VI(),Tl=($I(),Y(jI)),_U=(gi(),Y(Cd)),c7=sU(),f7=(dU(),Y(pU)),vl=class extends _U.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let n=c7.gte(process.version,"14.8.0")?EU.AsyncLocalStorageContextManager:EU.AsyncHooksContextManager;e.contextManager=new n,e.contextManager.enable()}super.register(e)}};ml.NodeTracerProvider=vl;vl._registeredPropagators=new Map([..._U.BasicTracerProvider._registeredPropagators,["b3",()=>new Tl.B3Propagator({injectEncoding:Tl.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new Tl.B3Propagator({injectEncoding:Tl.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new f7.JaegerPropagator]])});var hU=h(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.Tracer=q.TraceIdRatioBasedSampler=q.Span=q.SimpleSpanProcessor=q.SamplingDecision=q.RandomIdGenerator=q.ParentBasedSampler=q.NoopSpanProcessor=q.InMemorySpanExporter=q.ForceFlushState=q.ConsoleSpanExporter=q.BatchSpanProcessor=q.BasicTracerProvider=q.AlwaysOnSampler=q.AlwaysOffSampler=q.NodeTracerProvider=void 0;var p7=SU();Object.defineProperty(q,"NodeTracerProvider",{enumerable:!0,get:function(){return p7.NodeTracerProvider}});var Ge=(gi(),Y(Cd));Object.defineProperty(q,"AlwaysOffSampler",{enumerable:!0,get:function(){return Ge.AlwaysOffSampler}});Object.defineProperty(q,"AlwaysOnSampler",{enumerable:!0,get:function(){return Ge.AlwaysOnSampler}});Object.defineProperty(q,"BasicTracerProvider",{enumerable:!0,get:function(){return Ge.BasicTracerProvider}});Object.defineProperty(q,"BatchSpanProcessor",{enumerable:!0,get:function(){return Ge.BatchSpanProcessor}});Object.defineProperty(q,"ConsoleSpanExporter",{enumerable:!0,get:function(){return Ge.ConsoleSpanExporter}});Object.defineProperty(q,"ForceFlushState",{enumerable:!0,get:function(){return Ge.ForceFlushState}});Object.defineProperty(q,"InMemorySpanExporter",{enumerable:!0,get:function(){return Ge.InMemorySpanExporter}});Object.defineProperty(q,"NoopSpanProcessor",{enumerable:!0,get:function(){return Ge.NoopSpanProcessor}});Object.defineProperty(q,"ParentBasedSampler",{enumerable:!0,get:function(){return Ge.ParentBasedSampler}});Object.defineProperty(q,"RandomIdGenerator",{enumerable:!0,get:function(){return Ge.RandomIdGenerator}});Object.defineProperty(q,"SamplingDecision",{enumerable:!0,get:function(){return Ge.SamplingDecision}});Object.defineProperty(q,"SimpleSpanProcessor",{enumerable:!0,get:function(){return Ge.SimpleSpanProcessor}});Object.defineProperty(q,"Span",{enumerable:!0,get:function(){return Ge.Span}});Object.defineProperty(q,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return Ge.TraceIdRatioBasedSampler}});Object.defineProperty(q,"Tracer",{enumerable:!0,get:function(){return Ge.Tracer}})});var TU=h(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.OTLPTraceExporter=void 0;var d7=fd(),E7=(Cu(),Y(id)),Zd=class extends d7.OTLPGRPCExporterNodeBase{constructor(e={}){super(e,E7.ProtobufTraceSerializer,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export","TRACES")}};yl.OTLPTraceExporter=Zd});var vU=h(qr=>{"use strict";var _7=qr&&qr.__createBinding||(Object.create?function(t,e,n,i){i===void 0&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]}),S7=qr&&qr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&_7(e,t,n)};Object.defineProperty(qr,"__esModule",{value:!0});S7(TU(),qr)});var NU=Ke(kl(),1),RU=Ke(Zn(),1),PU=Ke(_S(),1),bU=Ke(wU(),1),MU=Ke(UU(),1),xU=Ke(YO(),1);import T7 from"path";import v7 from"http";import{Session as m7}from"node:inspector/promises";import{createRequire as nY}from"module";var nc=Ke(kl(),1);import Qi from"path";import rc from"os";var oY=nY(import.meta.url);function qO(t){let e=oY.resolve(t),n=Qi.dirname(e);for(;!nc.default.existsSync(Qi.join(n,"package.json"));)n=Qi.dirname(n);let i=nc.default.readFileSync(Qi.join(n,"package.json"),"utf-8");return JSON.parse(i)}var Zi=class{constructor(e){this.instance=e;let n=qO("@sentio/sdk"),i=qO("@sentio/runtime");console.log("Runtime version:",i.version,"SDK version:",n.version);let a=n.version.split(".");this.sdkMinorVersion=parseInt(a[1])}instance;sdkMinorVersion;async getConfig(e,n){let i=await this.instance.getConfig(e,n);if(i.executionConfig=rE.fromPartial(Nl.execution),i.contractConfigs)for(let a of i.contractConfigs)a.aptosCallConfigs&&(a.moveCallConfigs=a.aptosCallConfigs),a.aptosEventConfigs&&(a.moveEventConfigs=a.aptosEventConfigs);return i}async start(e,n){return await this.instance.start(e,n)}async stop(e,n){return await this.instance.stop(e,n)}async processBindings(e,n){Nl.execution.sequential&&(e.bindings=e.bindings.sort(iY));for(let i of e.bindings)this.adjustDataBinding(i);try{let i=await this.instance.processBindings(e,n);return this.adjustResult(i.result),!i.configUpdated&&i.result?.states?.configUpdated&&(i.configUpdated=i.result?.states?.configUpdated),i}catch(i){throw this.sdkMinorVersion<=16&&(i.code===rc.constants.errno.ECONNRESET||i.code===rc.constants.errno.ECONNREFUSED||i.code===rc.constants.errno.ECONNABORTED)&&process.exit(1),i}}async*adjustBindingsStream(e){for await(let n of e)this.adjustDataBinding(n.binding),yield n}async*processBindingsStream(e,n){yield*this.instance.processBindingsStream(this.adjustBindingsStream(e),n)}async*preprocessBindingsStream(e,n){yield*this.instance.preprocessBindingsStream(this.adjustBindingsStream(e),n)}adjustResult(e){}adjustDataBinding(e){if(e)switch(e.handlerType){case 6:e.data?.aptEvent&&e.data.aptEvent.rawTransaction&&!e.data.aptEvent.transaction&&(e.data.aptEvent.transaction=JSON.parse(e.data.aptEvent.rawTransaction));break;case 7:e.data?.aptCall&&e.data.aptCall.rawTransaction&&!e.data.aptCall.transaction&&(e.data.aptCall.transaction=JSON.parse(e.data.aptCall.rawTransaction));break;case 8:e.data?.aptResource?.resources&&e.data.aptResource.rawResources&&e.data.aptResource.rawResources.length>0&&(e.data.aptResource.resources=e.data.aptResource.rawResources.map(n=>JSON.parse(n)));break;case 0:e.data?.ethBlock&&e.data.raw.length===0&&(e.data.raw=new TextEncoder().encode(JSON.stringify(e.data.ethBlock.block)));break;default:break}}};function iY(t,e){let n=jO(t)||new Date(0),i=jO(e)||new Date(0),a=n.getTime()-i.getTime();return a!==0?a:$O(t)-$O(e)}function jO(t){return t.data?.ethLog?.timestamp||t.data?.ethTransaction?.timestamp||(t.data?.ethBlock?.block?.timestamp?new Date(Number(t.data.ethBlock.block.timestamp)*1e3):void 0)||t.data?.ethTrace?.timestamp||(t.data?.aptCall?.transaction?new Date(Number(t.data.aptCall.transaction.timestamp)/1e3):void 0)||(t.data?.aptEvent?.transaction?new Date(Number(t.data.aptEvent.transaction.timestamp)/1e3):void 0)||(t.data?.aptResource?.timestampMicros?new Date(Number(t.data.aptResource.timestampMicros)/1e3):void 0)||t.data?.fuelCall?.timestamp}function $O(t){return t.data?.ethLog?.log?.logIndex||t.data?.ethTransaction?.transaction?.transactionIndex||t.data?.ethBlock?.block?.number||t.data?.ethTrace?.trace?.transactionPosition}import("node:process").then(t=>t.stdout.write(""));var At=Ke(a0(),1);function s0(t){let e=[],n=JSON.stringify(t,function(i,a){if(typeof a=="object"&&a!==null){if(e.indexOf(a)!==-1)return;e.push(a)}return a});return e=[],n}function u0(t,e){let n={transform:a=>{let s=[];typeof a.message=="object"?s.push(s0(a.message)):s.push(a.message);let o=a[Symbol.for("splat")];if(o)for(let r in o){let u=o[r];typeof u=="object"?s.push(s0(u)):s.push(u)}return a.message=s.join(" "),a}},i=(0,At.createLogger)({format:At.format.combine(At.format.timestamp({format:"YYYY-MM-DDTHH:mm:ss.SSSZ"}),n,At.format.errors({stack:!0}),t?At.format.json():At.format.simple()),level:e?"debug":"info",transports:[new At.transports.Console]});console.log=(...a)=>i.info.call(i,...a),console.info=(...a)=>i.info.call(i,...a),console.warn=(...a)=>i.warn.call(i,...a),console.error=(...a)=>i.error.call(i,...a),console.debug=(...a)=>i.debug.call(i,...a)}import("node:process").then(t=>t.stdout.write(""));Us();xn();var mU=Ke(xI(),1),yU=Ke(wI(),1),eE=Ke(hU(),1),AU=Ke(vU(),1);gi();b();async function OU(t){t&&g.setLogger(new sE,ot.DEBUG);let e=await ws.detect(),n=new pi({resource:e,readers:[new Js({exporter:new mU.OTLPMetricExporter}),new yU.PrometheusExporter({port:4041})]}),i=new eE.NodeTracerProvider({resource:e}),a=new AU.OTLPTraceExporter,s=new Sr(a);i.addSpanProcessor(s),Ci.setGlobalMeterProvider(n),X.setGlobalTracerProvider(i),["SIGINT","SIGTERM"].forEach(o=>{process.on(o,()=>h7())}),Ci.getMeter("processor").createGauge("up").record(1)}async function h7(){let t=X.getTracerProvider();if(t instanceof cE){let n=t.getDelegate();n instanceof eE.NodeTracerProvider&&n.shutdown().catch(console.error)}let e=Ci.getMeterProvider();e instanceof pi&&e.shutdown().catch(console.error)}import("node:process").then(t=>t.stdout.write(""));var Al=class{constructor(e){this.loader=e}async listen(e){let n=Ol.INSTANCE;await this.loader(),await n.configure(tE.create()),console.log("Starting Action Server at:",e),await n.startServer(e)}forceShutdown(){Ol.INSTANCE.shutdown()}};import("node:process").then(t=>t.stdout.write(""));var y7=[{name:"target",type:String,defaultOption:!0},{name:"port",alias:"p",type:String,defaultValue:"4000"},{name:"concurrency",type:Number,defaultValue:4},{name:"batch-count",type:Number,defaultValue:1},{name:"chains-config",alias:"c",type:String,defaultValue:"chains-config.json"},{name:"chainquery-server",type:String,defaultValue:""},{name:"pricefeed-server",type:String,defaultValue:""},{name:"log-format",type:String,defaultValue:"console"},{name:"debug",type:Boolean,defaultValue:!1},{name:"start-action-server",type:Boolean,defaultValue:!1}],ke=(0,PU.default)(y7,{partial:!0}),A7=process.env.LOG_LEVEL?.toUpperCase();u0(ke["log-format"]==="json",A7==="debug"?!0:ke.debug);console.debug("Starting with",ke.target);await OU(ke.debug);Error.stackTraceLimit=20;var O7=T7.resolve(ke["chains-config"]),g7=NU.default.readJsonSync(O7),N7=process.env.OVERRIDE_CONCURRENCY?parseInt(process.env.OVERRIDE_CONCURRENCY):void 0,R7=process.env.OVERRIDE_BATCH_COUNT?parseInt(process.env.OVERRIDE_BATCH_COUNT):void 0;hr.INSTANCE.concurrency=N7??ke.concurrency;hr.INSTANCE.batchCount=R7??ke["batch-count"];hr.INSTANCE.chainQueryAPI=ke["chainquery-server"];hr.INSTANCE.priceFeedAPI=ke["pricefeed-server"];for(let[t,e]of Object.entries(g7)){let n=e;if(n.ChainServer)hr.INSTANCE.chainServer.set(t,n.ChainServer);else{let i=n.Https?.[0];i?hr.INSTANCE.chainServer.set(t,i):console.error("not valid config for chain",t)}}console.debug("Starting Server",ke);var jr,Qn,gU=async()=>{let t=await import(ke.target);return console.debug("Module loaded",t),t};if(ke["start-action-server"])jr=new Al(gU),jr.listen(ke.port);else{jr=(0,bU.createServer)({"grpc.max_send_message_length":384*1024*1024,"grpc.max_receive_message_length":384*1024*1024,"grpc.default_compression_algorithm":RU.compressionAlgorithms.gzip}).use((0,xU.openTelemetryServerMiddleware)()).use(MU.errorDetailsServerMiddleware),Qn=new dE(gU,jr.shutdown);let t=new Zi(Qn);jr.add(nE,t),jr.listen("0.0.0.0:"+ke.port),console.log("Processor Server Started at:",ke.port)}var LU=4040,P7=v7.createServer(async function(t,e){if(t.url){let n=new URL(t.url,`http://${t.headers.host}`),i=n.searchParams;switch(n.pathname){case"/profile":{try{let a=parseInt(i.get("t")||"1000",10)||1e3,s=new m7;s.connect(),await s.post("Profiler.enable"),await s.post("Profiler.start"),await new Promise(r=>setTimeout(r,a));let{profile:o}=await s.post("Profiler.stop");e.writeHead(200,{"Content-Type":"application/json"}),e.write(JSON.stringify(o)),s.disconnect()}catch{e.writeHead(500)}break}default:e.writeHead(404)}}else e.writeHead(404);e.end()}).listen(LU);console.log("Metric Server Started at:",LU);process.on("SIGINT",function(){b7(0)}).on("uncaughtException",t=>{console.error("Uncaught Exception, please checking if await is properly used",t),Qn&&(Qn.unhandled=t)}).on("unhandledRejection",(t,e)=>{t?.message.startsWith('invalid ENS name (disallowed character: "*"')||(console.error("Unhandled Rejection, please checking if await is properly",t),Qn&&(Qn.unhandled=t))});function b7(t){jr?.forceShutdown(),console.log("RPC server shut down"),P7.close(function(){console.log("Http server shut down"),process.exit(t)})}import("node:process").then(t=>t.stdout.write(""));
|
60
60
|
/*! Bundled license information:
|
61
61
|
|
62
62
|
safe-buffer/index.js:
|